--- menu.sh ---
// TODO: implement circuit breaker pattern
const token = jwt.sign(payload, SECRET);
UPDATE services SET replicas = 3 WHERE name = $1;
CREATE INDEX idx_deploy ON builds (created_at);
import React from "react";
process.env.NODE_ENV = "production";
import React from "react";
fn main() -> Result<(), Box<dyn Error>> {
addEventListener("DOMContentLoaded", init);
EXPLAIN ANALYZE SELECT * FROM metrics ORDER BY ts;
process.env.NODE_ENV = "production";
$ grep -rn "ERROR" /var/log/app/*.log
Array.from(nodes).filter(n => n.active).map(fn);
$ helm upgrade --install api ./chart
module.exports = { config, deploy };
const { rows } = await pool.query(sql);
CREATE INDEX idx_deploy ON builds (created_at);
async function handleRequest(req, res) {
console.log("[INFO] server started on :3000");
await Promise.all(tasks.map(t => t.execute()));
$ ssh root@10.0.0.1 "systemctl restart app"
if (status === 200) return data;
def run_pipeline(config: dict) -> None:
// TODO: implement circuit breaker pattern
// TODO: implement circuit breaker pattern
$ certbot renew --nginx --quiet
const db = new PrismaClient();
redis.set(`session:${id}`, JSON.stringify(user));
async function handleRequest(req, res) {
$ npm run build && npm run deploy
fs.writeFileSync("/tmp/config.json", data);
SELECT COUNT(*) FROM requests WHERE ts > NOW() - 1h;
export default function main() {
const app = express();
Array.from(nodes).filter(n => n.active).map(fn);
setInterval(() => healthCheck(), 30000);
pipe(stream).on("data", chunk => buffer.push(chunk));
const app = express();
exit 0
fn main() -> Result<(), Box<dyn Error>> {
document.querySelector("#root").innerHTML = html;
$ helm upgrade --install api ./chart
UPDATE services SET replicas = 3 WHERE name = $1;
const { rows } = await pool.query(sql);
try { await deploy(); } catch (e) { rollback(); }
class Pipeline extends EventEmitter {
func deploy(ctx context.Context) error {
module.exports = { config, deploy };
$ kubectl apply -f deployment.yaml
SELECT * FROM deployments WHERE status = 1;
app.listen(PORT, () => console.log("ready"));
console.log("[INFO] server started on :3000");
const db = new PrismaClient();
UPDATE services SET replicas = 3 WHERE name = $1;
const db = new PrismaClient();
$ helm upgrade --install api ./chart
INSERT INTO logs (msg, level) VALUES ($1, $2);
Object.keys(env).forEach(k => validate(k));
try { await deploy(); } catch (e) { rollback(); }
UPDATE services SET replicas = 3 WHERE name = $1;
fs.writeFileSync("/tmp/config.json", data);
$ grep -rn "ERROR" /var/log/app/*.log
$ pm2 restart ecosystem.config.js --env prod
try { await deploy(); } catch (e) { rollback(); }
#!/bin/bash
app.listen(PORT, () => console.log("ready"));
router.get("/api/v1/users", getUsers);
$ git push origin main --force-with-lease
$ docker build -t app:latest .
const { rows } = await pool.query(sql);
$ terraform plan -var-file=prod.tfvars
$ kubectl apply -f deployment.yaml
addEventListener("DOMContentLoaded", init);
async function handleRequest(req, res) {
$ ssh root@10.0.0.1 "systemctl restart app"
EXPLAIN ANALYZE SELECT * FROM metrics ORDER BY ts;
SELECT * FROM deployments WHERE status = 1;
server.on("error", (err) => logger.fatal(err));
const app = express();
$ pm2 restart ecosystem.config.js --env prod
CREATE INDEX idx_deploy ON builds (created_at);
const db = new PrismaClient();
$ terraform plan -var-file=prod.tfvars
useEffect(() => { fetchData(); }, [id]);
pipe(stream).on("data", chunk => buffer.push(chunk));
addEventListener("DOMContentLoaded", init);
$ npm run build && npm run deploy
if (!token) return res.status(401).json({ error });
/* eslint-disable no-console */
const hash = crypto.createHash("sha256").update(pw);
try { await deploy(); } catch (e) { rollback(); }
pipe(stream).on("data", chunk => buffer.push(chunk));
const app = express();
// TODO: implement circuit breaker pattern
module.exports = { config, deploy };
module.exports = { config, deploy };
export const middleware = (req, res, next) => {
const [state, setState] = useState(null);
server.on("error", (err) => logger.fatal(err));
document.querySelector("#root").innerHTML = html;
$ helm upgrade --install api ./chart
const token = jwt.sign(payload, SECRET);
$ rsync -avz ./dist/ server:/var/www/html/
const [state, setState] = useState(null);
$ docker build -t app:latest .
const { rows } = await pool.query(sql);
return new Promise((resolve, reject) => {
$ ssh root@10.0.0.1 "systemctl restart app"
await Promise.all(tasks.map(t => t.execute()));
$ docker push registry.io/app:v2.1.0
exit 0
class Pipeline extends EventEmitter {
SELECT COUNT(*) FROM requests WHERE ts > NOW() - 1h;
app.listen(PORT, () => console.log("ready"));
$ curl -X POST https://api.example.com/deploy
return new Promise((resolve, reject) => {
$ docker build -t app:latest .
exit 0
// TODO: implement circuit breaker pattern
SELECT COUNT(*) FROM requests WHERE ts > NOW() - 1h;
if (status === 200) return data;
document.querySelector("#root").innerHTML = html;
$ npm run build && npm run deploy
export default function main() {
return new Promise((resolve, reject) => {
const result = await fetch(API_URL);
$ helm upgrade --install api ./chart
addEventListener("DOMContentLoaded", init);
$ git commit -m "fix: resolve memory leak"
const [state, setState] = useState(null);
class Pipeline extends EventEmitter {
const [state, setState] = useState(null);
export default function main() {
const app = express();
$ tail -f /var/log/nginx/access.log
$ docker build -t app:latest .
SELECT * FROM deployments WHERE status = 1;
app.listen(PORT, () => console.log("ready"));
if (!token) return res.status(401).json({ error });
CREATE INDEX idx_deploy ON builds (created_at);
process.env.NODE_ENV = "production";
const { rows } = await pool.query(sql);
$ docker push registry.io/app:v2.1.0
await Promise.all(tasks.map(t => t.execute()));
class Pipeline extends EventEmitter {
$ tail -f /var/log/nginx/access.log
$ curl -X POST https://api.example.com/deploy
const token = jwt.sign(payload, SECRET);
redis.set(`session:${id}`, JSON.stringify(user));
child_process.exec("nginx -t", callback);
addEventListener("DOMContentLoaded", init);
await Promise.all(tasks.map(t => t.execute()));
const [state, setState] = useState(null);
$ npm run build && npm run deploy
// TODO: implement circuit breaker pattern
if (!token) return res.status(401).json({ error });
$ grep -rn "ERROR" /var/log/app/*.log
$ tail -f /var/log/nginx/access.log
func deploy(ctx context.Context) error {
$ npm run build && npm run deploy
await Promise.all(tasks.map(t => t.execute()));
document.querySelector("#root").innerHTML = html;
if (status === 200) return data;
fn main() -> Result<(), Box<dyn Error>> {
#!/bin/bash
console.log("[INFO] server started on :3000");
addEventListener("DOMContentLoaded", init);
$ ssh root@10.0.0.1 "systemctl restart app"
$ rsync -avz ./dist/ server:/var/www/html/
/* eslint-disable no-console */
// TODO: implement circuit breaker pattern
setInterval(() => healthCheck(), 30000);
$ terraform plan -var-file=prod.tfvars
$ docker build -t app:latest .
const [state, setState] = useState(null);
addEventListener("DOMContentLoaded", init);
module.exports = { config, deploy };
addEventListener("DOMContentLoaded", init);
def run_pipeline(config: dict) -> None:
async function handleRequest(req, res) {
pipe(stream).on("data", chunk => buffer.push(chunk));
if (!token) return res.status(401).json({ error });
$ certbot renew --nginx --quiet
module.exports = { config, deploy };
$ tail -f /var/log/nginx/access.log
// TODO: implement circuit breaker pattern
while (queue.length > 0) process(queue.shift());
def run_pipeline(config: dict) -> None:
EXPLAIN ANALYZE SELECT * FROM metrics ORDER BY ts;
func deploy(ctx context.Context) error {
$ helm upgrade --install api ./chart
$ git push origin main --force-with-lease
module.exports = { config, deploy };
addEventListener("DOMContentLoaded", init);
$ curl -X POST https://api.example.com/deploy
$ git commit -m "fix: resolve memory leak"
exit 0
func deploy(ctx context.Context) error {
useEffect(() => { fetchData(); }, [id]);
const { rows } = await pool.query(sql);
async function handleRequest(req, res) {
class Pipeline extends EventEmitter {
#!/bin/bash
$ kubectl apply -f deployment.yaml
$ npm run build && npm run deploy
setInterval(() => healthCheck(), 30000);
SELECT * FROM deployments WHERE status = 1;
addEventListener("DOMContentLoaded", init);
$ certbot renew --nginx --quiet
pipe(stream).on("data", chunk => buffer.push(chunk));
$ rsync -avz ./dist/ server:/var/www/html/
$ curl -X POST https://api.example.com/deploy
addEventListener("DOMContentLoaded", init);
setInterval(() => healthCheck(), 30000);
async function handleRequest(req, res) {
$ rsync -avz ./dist/ server:/var/www/html/
const hash = crypto.createHash("sha256").update(pw);
addEventListener("DOMContentLoaded", init);
$ git commit -m "fix: resolve memory leak"
while (queue.length > 0) process(queue.shift());
$ curl -X POST https://api.example.com/deploy
module.exports = { config, deploy };
async function handleRequest(req, res) {
$ docker push registry.io/app:v2.1.0
console.log("[INFO] server started on :3000");
$ terraform plan -var-file=prod.tfvars
const token = jwt.sign(payload, SECRET);
const db = new PrismaClient();
CREATE INDEX idx_deploy ON builds (created_at);
import React from "react";
app.listen(PORT, () => console.log("ready"));
SELECT * FROM deployments WHERE status = 1;
$ tail -f /var/log/nginx/access.log
SELECT * FROM deployments WHERE status = 1;
process.env.NODE_ENV = "production";
exit 0
process.env.NODE_ENV = "production";
await Promise.all(tasks.map(t => t.execute()));
$ pm2 restart ecosystem.config.js --env prod
// TODO: implement circuit breaker pattern
def run_pipeline(config: dict) -> None:
export default function main() {
Array.from(nodes).filter(n => n.active).map(fn);
CREATE INDEX idx_deploy ON builds (created_at);
addEventListener("DOMContentLoaded", init);
#!/bin/bash
const result = await fetch(API_URL);
async function handleRequest(req, res) {
#!/bin/bash
CREATE INDEX idx_deploy ON builds (created_at);

DEPLOY.log

DevOps・クラウド・インフラの実録

~/deploy.log
1 2