<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>DevOps on Chen Kai Blog</title><link>https://www.chenk.top/en/tags/devops/</link><description>Recent content in DevOps on Chen Kai Blog</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 20 Jun 2023 09:00:00 +0000</lastBuildDate><atom:link href="https://www.chenk.top/en/tags/devops/index.xml" rel="self" type="application/rss+xml"/><item><title>Docker and Containers (5): Docker Compose — Multi-Container Applications</title><link>https://www.chenk.top/en/docker-containers/05-docker-compose/</link><pubDate>Tue, 20 Jun 2023 09:00:00 +0000</pubDate><guid>https://www.chenk.top/en/docker-containers/05-docker-compose/</guid><description>&lt;p>The previous articles taught you how to run containers with &lt;code>docker run&lt;/code>, pass port mappings with &lt;code>-p&lt;/code>, create networks with &lt;code>docker network create&lt;/code>, and mount volumes with &lt;code>-v&lt;/code>. Now imagine doing that for a web server, an API backend, a database, a cache, and a task queue — every time you start your development environment. Docker Compose replaces those 20+ commands with a single file and a single command: &lt;code>docker compose up&lt;/code>.&lt;/p></description></item><item><title>Docker and Containers (3): Dockerfile Patterns — From Naive to Production</title><link>https://www.chenk.top/en/docker-containers/03-dockerfile-patterns/</link><pubDate>Sun, 18 Jun 2023 09:00:00 +0000</pubDate><guid>https://www.chenk.top/en/docker-containers/03-dockerfile-patterns/</guid><description>&lt;p>Most tutorials show you a 5-line Dockerfile and move on. When you deploy to production, you might find your image is 1.2 GB, builds take 8 minutes even for a one-line code change, and your security team flags vulnerabilities in packages you didn&amp;rsquo;t know were installed. Writing a good Dockerfile is a skill that pays off every time your CI pipeline runs.&lt;/p>
&lt;hr>
&lt;h2 id="every-dockerfile-instruction" class="heading-anchor">Every Dockerfile Instruction&lt;a href="#every-dockerfile-instruction" class="heading-link" aria-label="Permalink to this section" title="Copy link to this section">#&lt;/a>
&lt;/h2>&lt;p>Let&amp;rsquo;s go through every instruction you&amp;rsquo;ll use, with concrete examples.&lt;/p></description></item><item><title>Docker and Containers (1): Why Containers — The Problem VMs Didn't Solve</title><link>https://www.chenk.top/en/docker-containers/01-why-containers/</link><pubDate>Fri, 16 Jun 2023 09:00:00 +0000</pubDate><guid>https://www.chenk.top/en/docker-containers/01-why-containers/</guid><description>&lt;p>Every developer has heard the phrase &amp;ldquo;it works on my machine.&amp;rdquo; Virtual machines were supposed to fix that, and they did — at the cost of gigabytes of RAM, minutes of boot time, and an entire duplicate operating system per application. Containers asked a different question: what if we could isolate applications without duplicating the kernel?&lt;/p>
&lt;hr>
&lt;h2 id="the-actual-problem" class="heading-anchor">The Actual Problem&lt;a href="#the-actual-problem" class="heading-link" aria-label="Permalink to this section" title="Copy link to this section">#&lt;/a>
&lt;/h2>&lt;p>Consider deploying a Python web application. You need Python 3.11, specific pip packages, a particular version of libssl, and some system-level configuration. Your colleague&amp;rsquo;s app needs Python 3.9 and a conflicting libssl version. The staging server runs Ubuntu 20.04 while production runs Amazon Linux 2.&lt;/p></description></item><item><title>Cloud Computing (7): Cloud Operations and DevOps Practices</title><link>https://www.chenk.top/en/cloud-computing/operations-devops/</link><pubDate>Fri, 26 May 2023 09:00:00 +0000</pubDate><guid>https://www.chenk.top/en/cloud-computing/operations-devops/</guid><description>&lt;p>&lt;figure class="article-figure">
 &lt;img src="https://blog-pic-ck.oss-cn-beijing.aliyuncs.com/posts/en/cloud-computing/operations-devops/illustration_1.png" alt="Cloud Computing (7): Cloud Operations and DevOps Practices — Chapter overview" loading="lazy" decoding="async" class="content-image">
 
&lt;/figure>
&lt;/p>
&lt;p>In 2017 GitLab lost six hours of database state. An engineer, exhausted, ran &lt;code>rm -rf&lt;/code> on the wrong server during an incident. The backup procedures had silently been broken for months; nobody noticed because no one was restoring from backups. The lesson is not &amp;ldquo;be careful with rm&amp;rdquo;. The lesson is that operations is a &lt;em>system&lt;/em> — tools, runbooks, monitoring, automation, and the rituals around them. When the system is healthy, no single tired engineer can take down production. When the system is rotten, every late-night fix is one keystroke from disaster.&lt;/p></description></item></channel></rss>