<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Adebola Williams on Medium]]></title>
        <description><![CDATA[Stories by Adebola Williams on Medium]]></description>
        <link>https://medium.com/@williamsadebolah?source=rss-b768382e6f27------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*3tS1TXNkgkU9TITjFXXf8g.jpeg</url>
            <title>Stories by Adebola Williams on Medium</title>
            <link>https://medium.com/@williamsadebolah?source=rss-b768382e6f27------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 12:33:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@williamsadebolah/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Elasticsearch Upgrade That Took 8 Months to Fail — And One Long Night to Fix]]></title>
            <link>https://medium.com/@williamsadebolah/the-elasticsearch-upgrade-that-took-8-months-to-fail-and-one-long-night-to-fix-433a9d858bad?source=rss-b768382e6f27------2</link>
            <guid isPermaLink="false">https://medium.com/p/433a9d858bad</guid>
            <category><![CDATA[elk-stack]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <dc:creator><![CDATA[Adebola Williams]]></dc:creator>
            <pubDate>Wed, 22 Jul 2026 10:50:41 GMT</pubDate>
            <atom:updated>2026-07-22T10:50:41.301Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-kjNjBcqDJfGHq9TqcCvJg.png" /></figure><p><em>A war story about production infrastructure, invisible failures, and the upgrade step nobody warns you about.</em></p><p>There’s a particular kind of dread that comes with inheriting infrastructure someone else touched last. Not because they did anything malicious usually, they were just trying to help. A quick kubectl edit here, a version bump there. No merge request, no documentation. Just a quiet change on a Friday afternoon that wouldn&#39;t surface as a problem until months later, when you&#39;re the one holding the pager.</p><p>This is the story of how I upgraded a 4-year-old, 10-node production Elasticsearch cluster from version 8.19.4 to 9.4.3. It should have been a rolling upgrade. Instead, it became a 14-hour debugging session that peeled back layer after layer of accumulated drift, broken assumptions, and one critical upgrade step that isn’t well-documented anywhere.</p><p>If you’re planning an Elasticsearch 8-to-9 major version upgrade, this post might save you a very long night.</p><h3>The Setup: A Cluster With Secrets</h3><p>Our production ELK stack had been running for over four years. Ten Elasticsearch nodes, each with 4TB of storage, managing roughly 20,000 shards across billions of log documents. Kibana sat in front, Fluent Bit fed logs in from every pod in the Kubernetes cluster. It was the kind of setup that just worked until you looked closely.</p><p>When I started investigating, I found something odd:</p><pre>spec.version:   9.1.5<br>status.version: 8.19.4</pre><p>Someone had edited the Elasticsearch custom resource back in October 2025 eight months ago and bumped the version to 9.1.5. The cluster never actually upgraded. It just… sat there, with the operator quietly trying and failing to complete the upgrade every few minutes for eight months straight.</p><p>Nobody noticed because the cluster kept serving traffic. The pods would cycle, Elasticsearch would briefly go yellow, Fluent Bit would hiccup, and everything would recover. The NoOutputBytesProcessed alerts that fired sporadically? “Fluent Bit being Fluent Bit,” people assumed. Nobody connected the dots.</p><h3>Layer 1: The Memory Mismatch</h3><p>The first question was obvious:</p><p>Why had the upgrade been failing for eight months?</p><p>The answer was hiding in the ECK operator’s status conditions:</p><pre>ResourcesAwareManagement: False<br>Message:<br>&quot;memory request and limit do not have the same value&quot;</pre><p>ECK — the Elastic Cloud on Kubernetes operator — has a feature called ResourcesAwareManagement that calculates resource requirements for safe rolling upgrades. It has one hard rule: Memory requests and limits must be equal. Our config had:</p><pre>resources:<br>  requests:<br>    memory: 8Gi<br>  limits:<br>    memory: 14Gi</pre><p>That mismatch meant ECK couldn’t safely orchestrate the upgrade. So it retried. Every few minutes. For eight months. Each retry terminated an Elasticsearch pod, the cluster briefly lost quorum, Fluent Bit couldn’t write, alerts fired, the pod came back on the old version, things stabilized, and the cycle repeated.</p><p>The fix was simple: Set requests.memory to 14Gi to match limits. But the implications weren’t. This also meant each Elasticsearch pod now reserved 14GB on its node. With m7i.2xlarge nodes (32GB RAM), you could no longer fit two ES pods on a single node. We needed to scale the node group from 8 to at least 10 before applying the change.</p><p><strong>Lesson:</strong> ECK’s memory requirement isn’t just a suggestion. A mismatch doesn’t produce a loud error — it silently blocks all upgrades and causes intermittent pod cycling that looks like unrelated instability.</p><h3>Layer 2: The Backup That Never Worked</h3><p>Before any major upgrade, you take a snapshot. That’s not optional — it’s your restore point if everything goes sideways.</p><p>Our snapshot repository existed: Prod-ELK-S3 It was pointing at an S3 bucket. But when I tried to take a snapshot:</p><pre>Unknown s3 client name [Prod-ELK-S3].<br>Existing client configs:<br>default</pre><p>The repository had been registered with a client name of Prod-ELK-S3, but Elasticsearch only had one S3 client configured:default Every snapshot attempt had been failing silently. There were no snapshots in the repository. Zero backups on a four-year-old production cluster.</p><p>The fix was a one-line re-registration:</p><pre># Re-register with the correct client name<br>curl -X PUT /_snapshot/Prod-ELK-S3 \<br>  -H &#39;Content-Type: application/json&#39; \<br>  -d &#39;{&quot;type&quot;:&quot;s3&quot;,&quot;settings&quot;:{&quot;bucket&quot;:&quot;prod-elk-s3&quot;,&quot;client&quot;:&quot;default&quot;,&quot;server_side_encryption&quot;:&quot;true&quot;}}&#39;<br># Verify all nodes can reach the bucket<br>curl -X POST /_snapshot/Prod-ELK-S3/_verify<br># Take the pre-upgrade snapshot<br>curl -X PUT &#39;/_snapshot/Prod-ELK-S3/pre-upgrade-snapshot?wait_for_completion=false&#39;<br># Monitor progress<br>curl -s /_snapshot/Prod-ELK-S3/pre-upgrade-snapshot | \<br>  jq &#39;.snapshots[0] | {state, shards}&#39;</pre><p>After re-registration, _verify succeeded on all 10 nodes, and I kicked off the first-ever snapshot. Nearly 10,000 shards. It took hours — but it completed successfully.</p><p><strong>Lesson:</strong> Test your snapshot repository before you need it. Run _verify and confirm it returns all nodes. A repository that exists but doesn’t work is worse than no repository — it gives you false confidence.</p><h3>Layer 3: The Wall of Legacy Indices</h3><p>With the memory fix applied and a valid snapshot in hand, I edited the Elasticsearch resource:</p><pre>version: 9.4.3<br>requests.memory: 14Gi</pre><p>ECK began the rolling upgrade, starting with pod-9. Pod-9 entered a CrashLoopBackOff. The logs told me why:</p><pre>fatal exception while booting Elasticsearch:<br>The index [cwl-sms-2024.06.14-0001] created in version [7.17.9]<br>must be marked as read-only using [index.blocks.write] before<br>upgrading to 9.4.3.</pre><p>Our cluster had been running since the 7.x era. When it was upgraded to 8.x, all those old indices came along — 8.x can read 7.x indices without restrictions. But 9.x has a new rule: Any index created on a version older than 8.0 must be explicitly marked as read-only before the upgrade.</p><p>There were hundreds of them. Daily log indices from 2023 and 2024, each created on 7.17.9. I found them by querying the settings endpoint:</p><pre># Find all indices created on ES 7.x<br>curl -s /_settings/index.version.created?flat_settings=true | \<br>  jq -r &#39;to_entries[] | select(.value.settings[&quot;index.version.created&quot;] &lt; &quot;8000000&quot;) | .key&#39; \<br>  &gt; legacy-indices.txt<br>wc -l legacy-indices.txt<br># 400+</pre><p>My first instinct was the settings API:</p><pre>curl -X PUT /&lt;index&gt;/_settings \<br>  -H &#39;Content-Type: application/json&#39; \<br>  -d &#39;{&quot;index.blocks.write&quot;: true}&#39;</pre><p>I chunked them in batches of 50 to avoid URL length limits:</p><pre>split -l 50 legacy-indices.txt chunk-<br>for chunk in chunk-*; do<br>  INDICES=$(paste -sd, &quot;$chunk&quot;)<br>curl -X PUT &quot;/${INDICES}/_settings&quot; \<br>    -H &#39;Content-Type: application/json&#39; \<br>    -d &#39;{&quot;index.blocks.write&quot;: true}&#39;<br>done</pre><p>Every batch returned:</p><pre>{&quot;acknowledged&quot;: true}</pre><p>The verification query showed zero writable legacy indices. I deleted pod-9, watched it restart, and…</p><p>It crashed again. Same error. Different index name.</p><p>I ran the verification again. Still zero. But the pod kept dying.</p><h3>Layer 4: The Setting That Wasn’t Enough</h3><p>This is the part that cost me hours — and it’s the part I haven’t seen well-documented anywhere.</p><p>Setting:</p><pre>index.blocks.write: true</pre><p>via the _settings API is not sufficient for a 9.x upgrade.</p><p>Elasticsearch 9.x doesn’t just check whether the setting exists. It checks for a verified read-only marker in the index metadata — a marker that’s only written by the Add Block API:</p><pre>PUT /&lt;index&gt;/_block/write</pre><p>This API does three things the settings update doesn’t:</p><ul><li>Sets the index.blocks.write flag (same as the settings approach)</li><li>Flushes the index to ensure all pending writes are committed</li><li>Records a verified_read_only flag in the index metadata</li></ul><p>The IndexMetadataVerifier at boot time and the NodeJoinExecutor during cluster joins both check for that verified flag. Without it, the node either refuses to start or gets rejected by the master — even though the index is technically write-blocked.</p><p>I had to redo the marking for every legacy index using the correct API.First, I pulled the full list from cluster state metadata — the same data source the verifier actually reads:</p><pre># The definitive list — from cluster state, not the _settings endpoint<br>curl -s /_cluster/state/metadata?filter_path=metadata.indices.*.settings.index.version.created | \<br>  jq -r &#39;.metadata.indices | to_entries[] | select(.value.settings.index.version.created &lt; &quot;8000000&quot;) | .key&#39; \<br>  | grep -v &#39;^\.&#39; &gt; legacy-all.txt</pre><p>Then chunked them through the Add Block API:</p><pre>split -l 50 legacy-all.txt block-chunk-<br>for chunk in block-chunk-*; do<br>  INDICES=$(paste -sd, &quot;$chunk&quot;)<br>curl -X PUT &quot;/${INDICES}/_block/write&quot;<br>done</pre><p>Each response included:</p><pre>{<br>  &quot;blocked&quot;: true,<br>  &quot;shards_acknowledged&quot;: true<br>}</pre><p>The verified marker was being written. The difference in the response alone tells you this API does more than a settings update.</p><p><strong>Lesson:</strong> For Elasticsearch 8-to-9 upgrades, always use:</p><pre>PUT /&lt;index&gt;/_block/write</pre><p>to mark pre-8.0 indices. The _settings approach sets the flag but not the verified marker. This is the single most important takeaway from this entire experience.</p><h3>Layer 5: The System Indices</h3><p>With regular indices verified-blocked, the master still rejected pod-9’s join. This time, the offending index was:</p><pre>.siem-signals-default-000001</pre><p>A dot-prefixed index from the old Kibana SIEM feature. System indices:</p><pre>.security-7<br>.kibana_7.17.2_001<br>.fleet-*</pre><p>can’t be modified through the normal settings or block APIs — even the elastic superuser gets a 403 Forbidden. They need a different mechanism entirely:</p><pre># Check what needs migrating<br>curl -s /_migration/system_features | jq &#39;.migration_status&#39;<br># Kick off the migration<br>curl -X POST /_migration/system_features<br># Poll until complete<br>curl -s /_migration/system_features | \<br>  jq &#39;{status: .migration_status, pending: [.features[] | select(.migration_status != &quot;NO_MIGRATION_NEEDED&quot;) | .feature_name]}&#39;</pre><p>This is Elasticsearch’s official system index migration API. It reindexes old-format system indices into current-format replacements.It runs in the background and handles: security,kibana,fleet,task,transformand other internal indices</p><p>But here’s the catch:.siem-signals-* indices are dot-prefixed but not managed by the system features migration. They’re Kibana Security detection alert indices. They look like system indices but behave like regular ones.</p><p>They need the block API with expand_wildcards=all:</p><pre># Find remaining dot-prefixed 7.x indices not covered by the migration<br>curl -s &#39;/_cluster/state/metadata?filter_path=metadata.indices.*.settings.index.version.created,metadata.indices.*.settings.index.verified_read_only&#39; | \<br>  jq -r &#39;.metadata.indices | to_entries[] | select(.value.settings.index.version.created &lt; &quot;8000000&quot;) | select(.value.settings.index.verified_read_only != &quot;true&quot;) | .key&#39;<br># Block them individually<br>curl -X PUT &#39;/.siem-signals-default-*/_block/write?expand_wildcards=all&#39;</pre><p><strong>Lesson:</strong> Not all dot-prefixed indices are “system” indices.</p><p>After running _migration/system_features, check for remaining dot-prefixed 7.x indices and block them individually.</p><h3>Layer 6: The Stale Metadata Trap</h3><p>Even after every index in the live cluster was properly verified-blocked, pod-9 kept crashing with the same error — but naming indices I’d already confirmed were blocked.</p><p>The key was in the stack trace:</p><pre>GatewayMetaState.createOnDiskPersistedState</pre><p>The boot verifier wasn’t checking the live cluster’s metadata. It was checking pod-9’s own on-disk copy — stored on its persistent volume from back when it was a healthy member of the 8.19.4 cluster. That copy predated all my marking work. The pod couldn’t refresh its local copy without joining the cluster, and it couldn’t join the cluster without passing verification. Classic chicken-and-egg.</p><p>The solution was to delete pod-9’s PVC and let the StatefulSet create a fresh one.But deleting a production PVC is irreversible — you need to be certain the data is safe elsewhere first:</p><pre># CRITICAL: confirm no primaries depend on this volume<br>curl -s /_cluster/health | \<br>  jq &#39;{status, unassigned_primary_shards, unassigned_shards}&#39;<br># Must show:<br># &quot;unassigned_primary_shards&quot;: 0<br># Ideally:<br># &quot;status&quot;: &quot;green&quot; (all replicas also safe)</pre><p>Only then — delete PVC and pod together:</p><pre>kubectl delete pvc elasticsearch-data-...-prod-9 \<br>  -n elastic-system \<br>  --wait=false<br>kubectl delete pod elasticsearch-prod-es-...-prod-9 \<br>  -n elastic-system</pre><p>The StatefulSet recreates both automatically with a fresh volume. The new pod came up with an empty volume, no stale metadata, and — crucially — passed the local boot verification for the first time.</p><p><strong>Lesson:</strong> If a node was down when you marked the legacy indices, its PVC holds stale metadata. The boot verifier checks local state first. You either need to ensure all nodes are up during the marking (the right approach) or recreate the PVC of a down node (the recovery approach).</p><h3>Layer 7: The Master’s Gatekeeping</h3><p>Pod-9 finally booted — no crashes, no exit code 1. It was alive for 10 minutes straight after weeks of 45-second deaths. But it still wasn’t in the cluster.</p><p>The logs showed:</p><pre>failed to join ... NodeJoinExecutor.ensureIndexCompatibility:<br>The index [cwl-datadog_log_exporte-2023.08.14-0001] must be<br>marked as read-only before upgrading</pre><p>The master node (still on 8.19.4) was running its own compatibility check when the 9.4.3 node tried to join. This check also requires the verified read-only marker. My earlier _settings marking had satisfied neither the boot check nor the join check.</p><p>Only after re-applying the block API:</p><pre>PUT /&lt;index&gt;/_block/write</pre><p>to all remaining indices did the master finally accept pod-9 into the cluster.</p><p>After re-running the block API on the remaining stragglers, I ran the definitive verification — this time checking for the verified_read_only marker, not just blocks.write:</p><pre># The REAL verification — checks the marker the verifier actually looks for<br>curl -s &#39;/_cluster/state/metadata?filter_path=metadata.indices.*.settings.index.version.created,metadata.indices.*.settings.index.verified_read_only&#39; | \<br>  jq &#39;[to_entries[] | select(.value.settings.index.version.created &lt; &quot;8000000&quot;) | select(.value.settings.index.verified_read_only != &quot;true&quot;) | .key] | length&#39;<br># 0 — finally, truly zero</pre><p>Minutes later, pod-9 appeared in the node list:</p><pre>elasticsearch-prod-es-elasticsearch-prod-9 9.4.3</pre><p>ECK saw the successful join and immediately began rolling the next pod. One by one, all ten nodes upgraded without further issues — because the verified blocks were now cluster-wide and every other node’s local metadata was current.</p><h3>The Aftermath</h3><p>The full rolling upgrade of the remaining nine pods took about three hours. Each pod cycled through:</p><pre>terminate → pending → init → running → join → shard recovery → green → next pod</pre><p>By noon, the cluster was fully on 9.4.3:</p><pre>elasticsearch-prod   green   10   9.4.3   Ready<br>kibana-prod          green    1   9.4.3</pre><p>Some collateral damage along the way:</p><p>Two Fluent Bit pods had their local buffer storage corrupted during the node shuffling. Fluent Bit v1.9.9 (a 2022 release) doesn’t recover from chunk storage corruption — it just spins on errors forever, silently dropping all logs from its node. Those two nodes had a 3.5-day log gap. Deleting the pods fixed them instantly; the DaemonSet recreated fresh instances.</p><h3>What I’d Do Differently</h3><p>If I could rewind and do this upgrade fresh, here’s the checklist I’d follow:</p><ul><li><strong>Verify the snapshot repository works </strong>— run _snapshot/&lt;repo&gt;/_verify before anything else</li><li><strong>Take a complete snapshot and confirm SUCCESS</strong> — not PARTIAL, not IN_PROGRESS</li><li><strong>Ensure all nodes are up and healthy</strong> — don’t mark indices while any node is down</li><li><strong>Run </strong>POST /_migration/system_features — handle system indices first</li><li><strong>Use </strong>PUT /&lt;index&gt;/_block/write <strong>for ALL pre-8.0 indices </strong>— never the settings API</li><li><strong>Include dot-prefixed non-system indices </strong>— .siem-signals-*, .transform-notifications*</li><li><strong>Verify using cluster state metadata</strong>, not the _settings endpoint — they can disagree</li><li><strong>Ensure memory </strong>requests == limits in the ECK spec — or ResourcesAwareManagement blocks everything</li><li><strong>Scale the node group to N+1 before starting</strong> — gives ECK room to schedule replacement pods during the roll</li><li><strong>Do all of this during working hours with someone else awake</strong> — not at midnight after a 14-hour session (I did not follow this one)</li></ul><h3>The Real Lesson</h3><p>Infrastructure doesn’t break all at once. It accumulates drift. A kubectl edit that never made it to the repo. A snapshot repository configured with the wrong client name. A memory mismatch that silently blocks upgrades for months. Each one is harmless on its own. Together, they form a minefield that only reveals itself when you try to move forward.</p><p>The upgrade itself — changing a version number in a YAML file — took 30 seconds. Understanding why it wouldn’t take took 14 hours and touched every layer of the stack:</p><ul><li>Kubernetes scheduling</li><li>EBS volume AZ affinity</li><li>ECK operator behavior</li><li>Elasticsearch index metadata verification</li><li>S3 IAM configuration</li><li>cluster state management</li><li>a Fluent Bit version from 2022 that couldn’t handle an output outage</li></ul><p>The most useful skill in infrastructure work isn’t knowing how to build things.</p><p>It’s knowing how to read error messages, resist the urge to force things, and peel back one layer at a time until you find the actual problem — which is almost never what the first error message suggests.</p><p>If you’re planning an Elasticsearch 8-to-9 upgrade and this saved you some pain, I’d love to hear about it.</p><p>And if you’ve already been through the same night I have — solidarity.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=433a9d858bad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Code to Cloud: A Beginner’s Guide to Automated Deployment with GitLab and AWS]]></title>
            <link>https://medium.com/@williamsadebolah/from-code-to-cloud-a-beginners-guide-to-automated-deployment-with-gitlab-and-aws-d93b604fe626?source=rss-b768382e6f27------2</link>
            <guid isPermaLink="false">https://medium.com/p/d93b604fe626</guid>
            <category><![CDATA[gitlab]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <dc:creator><![CDATA[Adebola Williams]]></dc:creator>
            <pubDate>Mon, 13 Jul 2026 13:05:12 GMT</pubDate>
            <atom:updated>2026-07-13T13:05:12.474Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YVQe6XtAwp9zotMeRKtqIA.png" /></figure><p>Anyone who has deployed an application manually knows how stressful the process can become.</p><p>You connect to a server, upload files, install dependencies, restart the application, check the logs, and hope nothing breaks. Even when the deployment succeeds, repeating those steps consistently can be difficult.</p><p>This is one of the problems CI/CD helps solve.</p><p>Continuous Integration and Continuous Deployment allow teams to automate how code is tested, packaged, and released. Instead of relying on someone to remember every deployment step, the process is written as code and executed consistently by a pipeline.</p><p>In this guide, I will walk through the architecture of a beginner-friendly GitLab CI/CD project that deploys a Dockerised Node.js application to AWS.</p><h3>What We Are Building</h3><p>The project follows this deployment flow:</p><pre>Developer pushes code<br>        ↓<br>GitLab runs automated tests<br>        ↓<br>GitLab builds a Docker image<br>        ↓<br>GitLab pushes the image to Amazon ECR<br>        ↓<br>GitLab connects to Amazon EC2<br>        ↓<br>EC2 pulls and runs the new image<br>        ↓<br>The application health is checked<br>        ↓<br>The previous image is restored if the new release is unhealthy</pre><p>The application itself is intentionally small.</p><p>The main goal is not to build a complex backend system. The goal is to understand how source code moves from a Git repository to a running cloud server.</p><p>The project uses:</p><ul><li>Node.js and Express</li><li>Jest and Supertest</li><li>Docker</li><li>GitLab CI/CD</li><li>Amazon Elastic Container Registry</li><li>Amazon EC2</li><li>Bash deployment scripts</li></ul><h3>Why Automated Deployment Matters</h3><p>Manual deployments are often:</p><p><strong>Error-prone:</strong> A person may forget a command or perform the steps in the wrong order.</p><p><strong>Inconsistent:</strong> The process may be slightly different each time or between team members.</p><p><strong>Slow:</strong> Repetitive deployment tasks take time.</p><p><strong>Difficult to recover:</strong> If a release fails, restoring the previous version may not be straightforward.</p><p>An automated pipeline improves the process by making deployments:</p><p><strong>Repeatable:</strong> The same defined steps run for every release.</p><p><strong>Faster:</strong> Testing, packaging, and deployment happen automatically.</p><p><strong>Safer:</strong> Broken code can be stopped before it reaches the server.</p><p><strong>Traceable:</strong> Each deployed image can be connected to a particular Git commit.</p><p><strong>Recoverable:</strong> A previous working image can be redeployed when necessary.</p><p>Automation does not remove every deployment risk, but it makes the process more controlled and easier to troubleshoot.</p><h3>The Application</h3><p>The project uses a simple Express application with two endpoints.</p><pre>GET /<br>GET /health</pre><p>The home endpoint returns a welcome message and the application version.</p><pre>{<br>  &quot;message&quot;: &quot;GitLab AWS CI/CD application is running&quot;,<br>  &quot;version&quot;: &quot;1.0.0&quot;<br>}</pre><p>The health endpoint tells the deployment script whether the application started successfully.</p><pre>{<br>  &quot;status&quot;: &quot;healthy&quot;<br>}</pre><p>A small application is useful for this kind of learning project because students can focus on the pipeline instead of spending most of their time understanding application code.</p><h3>Step 1: Testing the Application</h3><p>Before creating a Docker image or deploying anything to AWS, the application must pass its tests.</p><p>The project uses Jest and Supertest to test the HTTP endpoints.</p><p>The test job in GitLab looks similar to this:</p><pre>test_application:<br>  stage: test<br>  image: node:20<br>  script:<br>    - npm ci<br>    - npm test</pre><p>GitLab starts a temporary Node.js environment, installs the project dependencies, and runs the tests.</p><p>When a test fails, the job fails and the remaining deployment process is stopped.</p><p>This is an important principle:</p><blockquote><em>Code should prove that it meets basic expectations before it is packaged and deployed.</em></blockquote><p>The pipeline is not performing magic. It is running the same commands a developer would normally run locally.</p><pre>npm ci<br>npm test</pre><h3>Step 2: Containerising the Application</h3><p>Applications can behave differently across computers because of operating systems, installed packages, runtime versions, and environment configuration.</p><p>Docker helps reduce these differences by packaging the application and its runtime into an image.</p><p>The Dockerfile for this project is intentionally simple:</p><pre>FROM node:20-alpine<br>WORKDIR /app<br>COPY package.json package-lock.json ./<br>RUN npm ci --omit=dev<br>COPY src/ ./src/<br>USER node<br>EXPOSE 3000<br>CMD [&quot;npm&quot;, &quot;start&quot;]Here is what the important instructions do:</pre><p>FROM node:20-alpine uses a lightweight Node.js 20 base image.</p><p>WORKDIR /app creates and selects the application directory inside the image.</p><p>COPY package.json package-lock.json ./ copies the dependency files before the source code.</p><p>RUN npm ci --omit=dev installs only the dependencies required to run the application.</p><p>COPY src/ ./src/ adds the application code.</p><p>USER node avoids running the application as the root user.</p><p>EXPOSE 3000 documents the port used by the application.</p><p>CMD [&quot;npm&quot;, &quot;start&quot;] defines the command that starts the server.</p><p>The image can be tested locally with:</p><pre>docker build -t gitlab-aws-demo .<br>docker run --rm -p 3000:3000 gitlab-aws-demo</pre><p>The application should then be accessible at:</p><pre>http://localhost:3000<br>http://localhost:3000/health</pre><h3>Step 3: Storing Images in Amazon ECR</h3><p>After building the Docker image, it needs to be stored somewhere the EC2 instance can access.</p><p>Amazon Elastic Container Registry, commonly called ECR, is AWS’s managed container image registry.</p><p>You can think of it as a repository for Docker images.</p><p>Instead of giving every image only the latest tag, the pipeline also tags each image with the short Git commit SHA.</p><p>For example:</p><pre>gitlab-aws-demo:a1b2c3d<br>gitlab-aws-demo:f4e5d6c<br>gitlab-aws-demo:latest</pre><p>A commit SHA tag connects a Docker image to a specific version of the source code.</p><p>This gives us traceability.</p><p>When an issue occurs, we can identify:</p><ul><li>Which commit created the image</li><li>Which image was deployed</li><li>Which previous image was working</li><li>Which version should be restored</li></ul><h3>Step 4: Creating the GitLab Pipeline</h3><p>The project uses three stages:</p><pre>stages:<br>  - test<br>  - package<br>  - deploy</pre><p>Each stage has a clear responsibility.</p><h3>Test</h3><p>The test stage installs the application dependencies and runs the automated tests.</p><h3>Package</h3><p>The package stage builds the Docker image, logs in to ECR, and pushes the image.</p><h3>Deploy</h3><p>The deploy stage connects to EC2 and runs the deployment script.</p><p>Keeping the pipeline to three stages makes it easier for beginners to understand while still demonstrating a complete CI/CD process.</p><h3>Building and Pushing the Image</h3><p>The build and push operations are placed in the same GitLab job.</p><p>This is important because GitLab jobs normally run in separate, temporary environments. A Docker image built in one job is not automatically available inside another job.</p><p>A simplified version of the packaging logic is:</p><pre>build_and_push_image:<br>  stage: package<br>  image: docker:24<br>  services:<br>    - docker:24-dind<br>  before_script:<br>    - apk add --no-cache aws-cli<br>    - aws --version<br>    - docker version<br>  script:<br>    - aws ecr get-login-password --region &quot;$AWS_DEFAULT_REGION&quot; |<br>      docker login<br>      --username AWS<br>      --password-stdin<br>      &quot;$AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com&quot;<br>    - docker build -t &quot;$IMAGE_URI&quot; .<br>    - docker push &quot;$IMAGE_URI&quot;</pre><p>The real project uses GitLab variables to construct the complete image URI.</p><p>The image is tagged using CI_COMMIT_SHORT_SHA, which is automatically provided by GitLab.</p><p>The packaging and deployment jobs run only from the main branch. Feature branches can still run tests without deploying changes to AWS.</p><h3>Step 5: Deploying to Amazon EC2</h3><p>Amazon EC2 provides the virtual server that runs the application container.</p><p>During deployment, GitLab:</p><ol><li>Connects to the EC2 instance using SSH.</li><li>Copies the deployment script to the server.</li><li>Executes the script with the new ECR image URI.</li><li>EC2 authenticates with ECR using an IAM role.</li><li>EC2 pulls the new image.</li><li>The old container is replaced.</li><li>The new container is checked through the health endpoint.</li></ol><p>A simplified GitLab deployment job looks like this:</p><pre>deploy_to_ec2:<br>  stage: deploy<br>  script:<br>    - scp scripts/deploy.sh &quot;$EC2_USER@$EC2_HOST:~/deploy.sh&quot;<br>    - ssh &quot;$EC2_USER@$EC2_HOST&quot; \<br>      &quot;chmod +x ~/deploy.sh &amp;&amp; ~/deploy.sh &#39;$IMAGE_URI&#39; &#39;$AWS_DEFAULT_REGION&#39;&quot;</pre><p>The SSH key, EC2 address, username, AWS account information, and other environment-specific values are stored as GitLab CI/CD variables.</p><p>They are not committed to the repository.</p><h3>Step 6: Health Checks and Automatic Recovery</h3><p>Starting a Docker container does not always mean the application is working correctly.</p><p>The process may be running while the application is unable to serve requests.</p><p>That is why the deployment script checks:</p><pre>http://localhost:3000/health</pre><p>A simplified health check might look like this:</p><pre>curl --fail http://localhost:3000/health</pre><p>The actual deployment script retries the request because applications sometimes need a few seconds to start.</p><p>Before replacing the existing container, the script records the image currently being used.</p><p>If the new image fails the health check:</p><ol><li>The unhealthy container is removed.</li><li>The previous image is started again.</li><li>The pipeline is marked as failed.</li><li>The working version remains available to users.</li></ol><p>This is better described as <strong>automated deployment recovery</strong> rather than full self-healing.</p><p>The pipeline still fails because the new release was unsuccessful, even though the previous application version was restored.</p><p>That failure is useful. It alerts the team that the new deployment needs investigation.</p><h3>Step 7: Manual Rollback</h3><p>There may be situations where a deployment passes its initial health check but a problem is discovered later.</p><p>Because each Docker image is tagged with a commit SHA, an earlier image can be deployed manually.</p><pre>./deploy.sh \<br>123456789012.dkr.ecr.us-east-1.amazonaws.com/gitlab-aws-demo:a1b2c3d \<br>us-east-1</pre><p>This command tells the deployment script to pull and run a specific previous version.</p><p>Rollback becomes much easier when releases are immutable and clearly versioned.</p><p>Instead of trying to reverse changes directly on the server, we redeploy an image that was already known to work.</p><h3>Protecting Credentials</h3><p>Secrets should never be placed directly inside:</p><ul><li>Source-code files</li><li>Dockerfiles</li><li>.gitlab-ci.yml</li><li>README files</li><li>Screenshots</li><li>Git commits</li></ul><p>The project uses GitLab CI/CD variables for values such as:</p><pre>AWS_ACCESS_KEY_ID<br>AWS_SECRET_ACCESS_KEY<br>AWS_DEFAULT_REGION<br>AWS_ACCOUNT_ID<br>ECR_REPOSITORY<br>EC2_HOST<br>EC2_USER<br>SSH_PRIVATE_KEY</pre><p>Sensitive variables should be masked and protected where appropriate.</p><p>Care must still be taken when writing pipeline commands. Masking variables reduces accidental exposure, but secrets can still be leaked by unsafe scripts, debugging commands, or careless logging.</p><p>For the EC2 instance, the project uses an IAM role to pull images from ECR instead of storing permanent AWS access keys on the server.</p><h3>A Beginner-Friendly Learning Path</h3><p>I structured the project into four lessons.</p><h3>Lesson 1: Application and Testing</h3><p>Students run the application locally, test the endpoints, and understand why tests must pass before deployment.</p><h3>Lesson 2: Docker</h3><p>Students build the Docker image, run a container, inspect its logs, and understand image-to-container port mapping.</p><h3>Lesson 3: GitLab CI/CD and ECR</h3><p>Students learn about pipelines, stages, jobs, runners, variables, Docker-in-Docker, ECR, and commit SHA image tags.</p><h3>Lesson 4: EC2 Deployment and Rollback</h3><p>Students configure EC2, deploy the application, check its health, and practise manual and automatic rollback.</p><p>The rollback section is treated as the final advanced concept rather than introducing it at the beginning.</p><h3>What You Will Learn</h3><p>By completing the project, learners should understand:</p><ul><li>How automated testing fits into CI</li><li>How to containerise a Node.js application</li><li>How GitLab stages and jobs work</li><li>How Docker images are stored in ECR</li><li>How GitLab deploys to EC2 through SSH</li><li>How IAM roles and CI/CD variables improve security</li><li>How health checks detect unsuccessful deployments</li><li>How commit SHA tags support rollback</li><li>How to clean up AWS resources and control costs</li></ul><h3>The Complete Repository</h3><p>The complete project is available here:</p><p><a href="https://gitlab.com/heiswillz/gitlab-aws-cicd-beginner-lab">GitLab AWS CI/CD Beginner Lab</a></p><p>The repository includes:</p><ul><li>A working Node.js application</li><li>Automated tests</li><li>A Dockerfile</li><li>A multi-stage GitLab pipeline</li><li>Amazon ECR and EC2 setup instructions</li><li>Deployment and rollback scripts</li><li>Separate beginner learning guides</li><li>An instructor guide</li><li>A student assignment</li><li>Troubleshooting and cleanup documentation</li></ul><p>The AWS-dependent jobs are disabled by default so learners do not create billable cloud resources accidentally. They can be enabled after ECR, EC2, IAM permissions, SSH access, and the required GitLab variables have been configured.</p><h3>Final Thoughts</h3><p>CI/CD is not only about writing a YAML file.</p><p>It is about building confidence in the path between a code change and a running application.</p><p>A good pipeline answers several important questions:</p><ul><li>Has the code been tested?</li><li>Can the application be packaged consistently?</li><li>Can the release be traced to a particular commit?</li><li>Can the server retrieve and run the image?</li><li>Can the deployment be verified?</li><li>Can the previous version be restored if something goes wrong?</li></ul><p>This project keeps the application simple so beginners can focus on those questions.</p><p>Once you understand this workflow, the same principles can be applied to GitHub Actions, Jenkins, CircleCI, Azure DevOps, Kubernetes, ECS, and other deployment platforms.</p><p>The tools may change, but the core idea remains the same: test every change, create a repeatable release, deploy it consistently, verify the result, and always have a recovery path.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d93b604fe626" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Terraform Is Not Just About Provisioning: Building Infrastructure Teams Can Trust]]></title>
            <link>https://medium.com/@williamsadebolah/terraform-is-not-just-about-provisioning-building-infrastructure-teams-can-trust-f73b3f227502?source=rss-b768382e6f27------2</link>
            <guid isPermaLink="false">https://medium.com/p/f73b3f227502</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[terraform]]></category>
            <dc:creator><![CDATA[Adebola Williams]]></dc:creator>
            <pubDate>Fri, 26 Jun 2026 09:39:02 GMT</pubDate>
            <atom:updated>2026-06-26T09:39:02.630Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7t-Cy019ZiYtiT6CLDqiRw.png" /></figure><p>Terraform is often introduced with a simple example:</p><p>Create a virtual machine.<br>Create a network.<br>Create a database.</p><p>That is useful for learning the syntax, but it does not explain why Infrastructure as Code matters in a real production environment.</p><p>The real value of Terraform is not that it can create cloud resources.</p><p>The real value is that it makes infrastructure repeatable, reviewable, and easier to manage as a team.</p><h3>The Problem With Manual Infrastructure</h3><p>Manual cloud configuration can work when a system is small.</p><p>An engineer can log into the cloud console, create a server, configure networking, attach storage, and update a security group.</p><p>The problem appears later.</p><p>Someone asks:</p><p>Why was this resource created?</p><p>Does staging use the same configuration as production?</p><p>Who changed this firewall rule?</p><p>Can we rebuild the environment if the account is lost?</p><p>Without Infrastructure as Code, the answers may depend on memory, screenshots, or incomplete documentation.</p><p>That creates operational risk.</p><h3>Infrastructure Should Be Reviewable</h3><p>Application teams review code before deploying it.</p><p>Infrastructure changes should receive the same treatment.</p><p>With Terraform, a proposed infrastructure change can go through a pull request. Other engineers can review the configuration, question risky decisions, and understand the expected impact before anything changes.</p><p>A Terraform plan can show whether a change will:</p><ul><li>Create a new resource</li><li>Modify an existing resource</li><li>Replace a resource</li><li>Destroy infrastructure</li></ul><p>This does not remove every risk, but it makes changes more visible.</p><h3>Consistency Across Environments</h3><p>One of the common problems in production systems is environment drift.</p><p>Development may use one configuration.</p><p>Staging may use another.</p><p>Production may contain manual changes that are not documented anywhere.</p><p>Terraform helps teams use the same infrastructure patterns across environments while still allowing environment-specific values.</p><p>For example, development may use smaller compute resources, while production uses larger instances and additional redundancy.</p><p>The architecture stays consistent even when the scale changes.</p><h3>Reusable Infrastructure Matters</h3><p>Copying the same Terraform code into multiple folders may work at first, but it quickly becomes difficult to maintain.</p><p>If a networking rule changes, every copied configuration must be updated.</p><p>Reusable modules help solve this problem.</p><p>A well-designed module can represent a repeatable infrastructure pattern such as:</p><ul><li>A virtual network</li><li>A Kubernetes cluster</li><li>A database</li><li>A load-balanced application</li><li>A monitoring setup</li></ul><p>The goal is not to turn every resource into a module.</p><p>The goal is to create useful building blocks that reduce duplication without hiding too much complexity.</p><h3>State Is Part of the Infrastructure</h3><p>Terraform state is not just another file.</p><p>It connects the Terraform configuration to the resources that already exist.</p><p>Losing or corrupting state can make infrastructure difficult to manage safely.</p><p>For team environments, state should normally be stored remotely with appropriate access controls, locking, encryption, and backups.</p><p>Engineers should also avoid manually editing state unless they fully understand the risk.</p><p>A good Terraform workflow protects the state as carefully as the infrastructure itself.</p><h3>Automation Needs Guardrails</h3><p>Terraform works well in CI/CD, but automatic infrastructure deployment needs controls.</p><p>A safe workflow may include:</p><ol><li>Formatting and validation</li><li>Security and policy checks</li><li>Terraform plan generation</li><li>Peer review</li><li>Approval before production changes</li><li>Controlled application of the plan</li></ol><p>Not every environment needs the same level of approval.</p><p>Development changes may be more flexible, while production changes require stricter review.</p><p>The important thing is to match the workflow to the risk.</p><h3>Terraform Does Not Fix Poor Architecture</h3><p>Infrastructure as Code can automate both good and bad decisions.</p><p>A poorly designed network is still poorly designed when written in Terraform.</p><p>An oversized database is still expensive.</p><p>An insecure security group is still insecure.</p><p>Terraform improves consistency and visibility, but engineering judgment is still required.</p><p>The team must still think about:</p><ul><li>Security</li><li>Cost</li><li>Availability</li><li>Scalability</li><li>Recovery</li><li>Maintainability</li></ul><h3>What Good Terraform Looks Like</h3><p>Good Terraform is not necessarily the most abstract or advanced configuration.</p><p>It should be understandable.</p><p>Another engineer should be able to read the code and understand what the infrastructure does.</p><p>It should also be safe to change.</p><p>Small, predictable plans are usually easier to review than large changes affecting dozens of unrelated resources.</p><p>Good Terraform should help the team answer:</p><p>What exists?</p><p>Why does it exist?</p><p>How is it configured?</p><p>What will change?</p><p>How can we rebuild it?</p><h3>Final Thoughts</h3><p>Terraform is not just a provisioning tool.</p><p>It is a way to bring infrastructure into the software engineering workflow.</p><p>It allows teams to review changes, reduce manual configuration, reproduce environments, and understand how infrastructure evolves over time.</p><p>The goal is not to automate everything for the sake of automation.</p><p>The goal is to make infrastructure safer, clearer, and easier for the team to operate.</p><p>Good Infrastructure as Code is not just code that successfully creates resources.</p><p>It is infrastructure that the team can trust.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f73b3f227502" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[System Design Is Not Just Architecture Diagrams: It Is How Software Survives Production]]></title>
            <link>https://medium.com/@williamsadebolah/system-design-is-not-just-architecture-diagrams-it-is-how-software-survives-production-7e04c323b480?source=rss-b768382e6f27------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e04c323b480</guid>
            <category><![CDATA[platform-engineering]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Adebola Williams]]></dc:creator>
            <pubDate>Thu, 18 Jun 2026 13:40:34 GMT</pubDate>
            <atom:updated>2026-06-18T13:40:34.610Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6m2mgwcdA-OR8XBt5PT-Gg.png" /></figure><p>When people talk about system design, the conversation often starts with diagrams.</p><p>Frontend.<br>Backend.<br>Database.<br>Cache.<br>Queue.<br>Load balancer.</p><p>These components matter, but real system design goes beyond drawing boxes and connecting arrows.</p><p>A system is not truly designed until we understand how it behaves when traffic increases, services fail, databases slow down, deployments go wrong, and users depend on it.</p><p>System design is not just about choosing technologies.</p><p>It is about designing software that can be built, deployed, secured, monitored, scaled, and operated reliably.</p><p>That is where full-stack engineering and DevOps, cloud, platform, and SRE thinking come together.</p><h3>The Request Flow Is the Foundation</h3><p>Every software interaction begins with a request.</p><p>A user clicks a button.<br>The frontend sends a request to the backend.<br>The backend validates the request.<br>Business logic is applied.<br>The database is read or updated.<br>A response is returned to the frontend.</p><p>At a basic level:</p><pre>User → Frontend → Backend API → Database → Backend API → Frontend</pre><p>In production, that request may pass through additional layers:</p><pre>User<br>  ↓<br>DNS<br>  ↓<br>CDN or Web Application Firewall<br>  ↓<br>Load Balancer<br>  ↓<br>Backend Service<br>  ↓<br>Cache or Database<br>  ↓<br>Queue or Background Worker</pre><p>Each layer solves a different problem.</p><p>DNS points users to the correct destination. A load balancer distributes traffic across healthy servers. A cache improves performance. A queue allows slower tasks to run in the background.</p><p>Understanding this request flow is the foundation of system design.</p><h3>Why Production Changes Everything</h3><p>During development, the main question is often:</p><blockquote><em>Does the feature work?</em></blockquote><p>In production, that is only the beginning.</p><p>Production introduces traffic spikes, unreliable networks, security threats, third-party outages, infrastructure cost, and deployment risk.</p><p>The questions become:</p><p>What happens if one backend server fails?</p><p>What happens if the database becomes slow?</p><p>Can failed requests be safely retried?</p><p>Can we roll back a broken deployment?</p><p>Can engineers quickly understand what went wrong?</p><p>A feature that works locally may still be unreliable in production.</p><p>System design closes the gap between working software and dependable software.</p><h3>E-commerce Checkout Example</h3><p>Consider an e-commerce checkout system.</p><p>A customer adds products to a cart and clicks <strong>Pay Now</strong>.</p><p>The backend checks the products, confirms their prices and availability, creates a pending order, and starts a payment with a payment provider.</p><p>After payment succeeds, the provider sends a webhook to the backend.</p><p>The backend verifies the webhook, updates the payment and order records, reduces inventory, and sends a confirmation message.</p><p>The flow may look like this:</p><pre>Customer<br>  ↓<br>Frontend<br>  ↓<br>Checkout API<br>  ↓<br>Order Created<br>  ↓<br>Payment Provider<br>  ↓<br>Payment Webhook<br>  ↓<br>Order and Inventory Updated<br>  ↓<br>Queue<br>  ↓<br>Email and SMS Workers</pre><p>The happy path looks simple.</p><p>But production design must also ask:</p><p>What happens if the customer clicks <strong>Pay Now</strong> twice?</p><p>What happens if payment succeeds but the webhook arrives late?</p><p>What happens if the same webhook is sent multiple times?</p><p>What happens if two customers try to buy the last item?</p><p>What happens if the email provider is unavailable?</p><p>These are the questions that make system design practical.</p><p>For example, an idempotency key can prevent duplicate payment processing. A database transaction can keep related updates consistent. A queue can move email and SMS delivery outside the main checkout request.</p><p>The system must be designed for both success and failure.</p><h3>What Senior Engineers Think About</h3><p>A basic design may contain:</p><pre>Frontend → Backend → Database</pre><p>That is a valid starting point.</p><p>A senior engineer thinks further.</p><p>How will users be authenticated?</p><p>Which operations need transactions?</p><p>What actions can be safely retried?</p><p>What should happen asynchronously?</p><p>Where is caching useful?</p><p>How will the system scale?</p><p>What should be logged and monitored?</p><p>How will deployments be rolled back?</p><p>What does the system cost to operate?</p><p>Senior system design is not about adding as many tools as possible.</p><p>It is about understanding risk, making trade-offs, and choosing an architecture that fits the product.</p><h3>APIs and Databases Need More Than Basic Design</h3><p>An API is not just a list of endpoints such as:</p><pre>GET /products<br>POST /orders<br>POST /payments</pre><p>Each endpoint should have clear behaviour.</p><p>Who can call it?</p><p>What input is valid?</p><p>What happens when the same request is submitted twice?</p><p>How long should the request wait?</p><p>What error should be returned if a dependency is unavailable?</p><p>What should be logged?</p><p>A production-ready API should be secure, predictable, observable, and safe under retries.</p><p>Database design also goes beyond creating tables.</p><p>An e-commerce system may include:</p><p>Products<br>Customers<br>Orders<br>Payments<br>Inventory<br>Refunds<br>Shipments</p><p>But good design must also consider indexing, transactions, backups, migrations, data growth, and query performance.</p><p>A badly indexed database can slow down an otherwise well-built application.</p><p>A failed database migration can damage production even when the application code is correct.</p><p>System design must therefore consider both how data is structured and how it is operated.</p><h3>Caching and Background Jobs</h3><p>Caching reduces repeated database work by storing frequently requested data in a faster layer such as Redis.</p><p>For example, popular product information can be cached so every request does not reach the primary database.</p><p>However, not all data should be cached.</p><p>Product descriptions may tolerate slightly stale data. Inventory and payment status often require stronger consistency.</p><p>Background jobs are useful for work that does not need to delay the user.</p><p>After an order is confirmed, background workers can:</p><p>Send an email<br>Send an SMS<br>Generate a receipt<br>Update analytics<br>Notify a warehouse system</p><p>If the email provider is temporarily unavailable, checkout should still succeed. The notification job can be retried later.</p><p>This makes the main application faster and isolates failures in secondary services.</p><h3>Why DevOps Matters in System Design</h3><p>A system design is incomplete if it does not explain how the application will run in production.</p><p>Important questions include:</p><p>Where will the application run?</p><p>How will development, staging, and production be separated?</p><p>How will secrets be stored?</p><p>How will code reach production?</p><p>How will unhealthy instances be detected?</p><p>How will the system scale?</p><p>How will failed releases be rolled back?</p><p>A typical delivery flow may look like this:</p><pre>Developer Push<br>  ↓<br>CI Pipeline<br>  ↓<br>Tests and Security Checks<br>  ↓<br>Container Image Build<br>  ↓<br>Staging Deployment<br>  ↓<br>Production Deployment<br>  ↓<br>Monitoring</pre><p>Deployment strategy is part of system design.</p><p>Rolling, blue-green, and canary deployments all reduce risk in different ways.</p><p>The right choice depends on the product, traffic, infrastructure, and team maturity.</p><h3>Monitoring and Designing for Failure</h3><p>Monitoring should be part of the design from the beginning.</p><p>For an e-commerce platform, useful signals include:</p><p>API latency<br>Error rate<br>Checkout success rate<br>Payment failure rate<br>Queue depth<br>Failed background jobs<br>Database performance<br>Container restarts</p><p>A useful alert represents user or business impact.</p><p>For example:</p><blockquote><em>Checkout failure rate has exceeded 5% for five minutes.</em></blockquote><p>That is usually more meaningful than simply alerting because one server has high CPU usage.</p><p>Failure is expected in production.</p><p>Servers crash. Networks become unstable. Third-party services go offline. Containers restart. Webhooks arrive late or more than once.</p><p>Good systems use:</p><p>Timeouts<br>Retries with backoff<br>Idempotency<br>Health checks<br>Circuit breakers<br>Dead-letter queues<br>Backups<br>Rollback strategies</p><p>The goal is not to prevent every failure.</p><p>The goal is to limit the impact and recover safely.</p><h3>Simplicity Wins</h3><p>A more complex architecture is not automatically better.</p><p>Not every application needs microservices.</p><p>Not every team needs Kubernetes.</p><p>Not every workload needs Kafka.</p><p>A smaller product may work well with:</p><p>A modular monolith<br>A managed relational database<br>Object storage<br>A simple queue<br>Containerized deployment<br>Automated CI/CD<br>Centralized logging<br>Reliable backups</p><p>This may be easier to operate, cheaper to maintain, and more reliable than a large distributed architecture.</p><p>Complexity should be introduced only when there is a clear reason.</p><p>The best architecture is not the one with the most tools.</p><p>It is the one that fits the product, team, traffic, budget, and reliability needs.</p><h3>Final Thoughts</h3><p>System design is not just about drawing architecture diagrams.</p><p>It is about understanding how a system receives requests, processes data, handles failure, scales, deploys changes, protects information, and supports the business.</p><p>For full-stack engineers, system design connects features to architecture.</p><p>For DevOps, cloud, platform, and SRE engineers, it connects architecture to production reality.</p><p>A system is not production-ready simply because it works.</p><p>It becomes production-ready when it can be deployed, secured, monitored, maintained, scaled, and recovered reliably.</p><p>That is where system design becomes engineering.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e04c323b480" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migrating from Self-Managed Node Groups to EKS Managed Node Groups (staging → prod, safely)]]></title>
            <link>https://medium.com/@williamsadebolah/migrating-from-self-managed-node-groups-to-eks-managed-node-groups-staging-prod-safely-a4eb06b6e4af?source=rss-b768382e6f27------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4eb06b6e4af</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Adebola Williams]]></dc:creator>
            <pubDate>Wed, 04 Mar 2026 08:40:41 GMT</pubDate>
            <atom:updated>2026-03-04T08:40:41.096Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7jWvhv5psfZY5ZvNMVkEEQ.png" /></figure><p>Our Kubernetes cluster was stable — but the cost of maintaining it, especially as it grew, was adding up. We were running <strong>self-managed node groups</strong> with older instance types (like <strong>t2.large</strong>), mixing <strong>Spot</strong> and <strong>On-Demand</strong> instances, and using custom <strong>pre-bootstrap scripts</strong>. As much as it worked, managing updates, scaling, and lifecycle for each node was becoming a bit of a headache.</p><p>So, I decided to migrate to <strong>AWS EKS Managed Node Groups</strong>, which would handle the heavy lifting of node management for me. I took the process step-by-step, migrating first in <strong>staging</strong>, then in <strong>production</strong>, to minimize risk.</p><p>This post breaks down <strong>what changed</strong>, <strong>how I safely rolled it out</strong>, and <strong>what issues I encountered</strong> along the way.</p><h3>What I Started With (Legacy Reality)</h3><p>Before the migration, we had:</p><ul><li><strong>Self-managed node group</strong> with <strong>AutoScaling Groups (ASG)</strong> and <strong>custom bootstrap scripts</strong>.</li><li><strong>Instances</strong>: primarily <strong>t2.large</strong>, plus a mix of Spot and On-Demand instances.</li><li><strong>Pre-bootstrap scripts</strong> that installed agents, tweaked system settings, and handled logging.</li><li>Configurations like:</li><li>instanceDistribution (for mixed instances and Spot strategy)</li><li>containerRuntime (explicit configuration)</li><li>instanceProfileARN (custom instance profiles)</li><li>Taints configured in an outdated format (not a proper list structure).</li></ul><p>While this setup worked, the management was cumbersome, and our scaling strategy was a bit too “manual.”</p><h3>Why Move to Managed Node Groups?</h3><p>The goal was simple: reduce <strong>operational overhead</strong> while gaining more flexibility and stability.</p><p>With <strong>EKS Managed Node Groups</strong>, AWS takes over:</p><ul><li>Node lifecycle management (e.g., rolling updates, scaling)</li><li>IAM and security (no more DIY instance profiles)</li><li>Scaling and replacement without manual intervention</li><li>Less need for <strong>bootstrap scripts</strong> and <strong>manual intervention</strong></li></ul><p>In short, it was time to migrate to managed node groups for easier maintenance and better scalability.</p><h3>The Key Configuration Changes</h3><p>Here are the major changes I made when moving to managed node groups:</p><h3>1) instanceDistribution → instanceType + capacityType</h3><p>In our old setup, we used instanceDistribution to configure the mix of Spot and On-Demand instances. With managed node groups, I moved to explicitly defining instanceType and <strong>capacityType</strong> (e.g., SPOT vs ON_DEMAND).</p><p>This allowed me to:</p><ul><li>Create two separate node groups:</li><li><strong>On-Demand group</strong> for critical workloads</li><li><strong>Spot group</strong> for non-critical workloads to optimize costs</li></ul><h3>2) Removed containerRuntime</h3><p>The EKS managed node groups don’t require explicit container runtime settings, so I removed the <strong>containerRuntime</strong> configuration. EKS automatically handles this, reducing unnecessary customizations.</p><h3>3) Removed instanceProfileARN</h3><p>In our legacy setup, we had custom <strong>instance profiles</strong>. In managed node groups, this is abstracted away, and EKS manages the role and permissions for the nodes.</p><h3>4) Converted taints into a proper list</h3><p>In the old setup, taints were configured in a non-standard way. I converted them into a proper <strong>list format</strong> as expected by EKS managed node groups. This change helped prevent <strong>pods from failing to schedule</strong> due to mismatched configurations.</p><h3>5) Explicit Spot vs On-Demand configuration</h3><p>In the legacy system, Spot vs On-Demand instances were implied. With managed node groups, I explicitly separated the groups for <strong>critical workloads</strong> (On-Demand) and <strong>flexible workloads</strong> (Spot) to better manage resource costs.</p><h3>My Migration Approach (Staging → Prod)</h3><p>I followed a <strong>safe, gradual approach</strong> to minimize disruptions:</p><ol><li><strong>Create managed node group alongside old group</strong>: This ensures no downtime for applications while the new nodes join the cluster.</li><li><strong>Ensure new nodes are Ready</strong>: Verify that the new managed nodes are successfully joining the cluster.</li><li><strong>Schedule workloads on new nodes</strong>: Make sure workloads are scheduled onto the new managed node group.</li><li><strong>Test in staging</strong>: Validate that everything works in staging before touching production.</li><li><strong>Move to production</strong>: Repeat the same steps in production with added caution.</li><li><strong>Cordon and Drain</strong>: Gradually move workloads off the old nodes.</li><li><strong>Delete the old node group</strong>: Once everything is stable, remove the old node group.</li></ol><h3>Issues I Hit (and How I Fixed Them)</h3><p>No migration is smooth — here’s what went wrong and how I fixed it.</p><h3>1) Nodes Joined but Stayed “NotReady”</h3><p><strong>Problem:</strong> New nodes appeared, but they weren’t ready to schedule workloads.</p><p><strong>Solution:</strong> I checked the IAM role mapping for the node group and confirmed the nodes were correctly authorized. After ensuring the <strong>system pods</strong> (CNI, CoreDNS, kube-proxy) were running, everything settled.</p><h3>2) Pods Stuck Pending Due to Labels/Taints Mismatch</h3><p><strong>Problem:</strong> Some workloads couldn’t be scheduled on the new nodes.</p><p><strong>Solution:</strong> I had to ensure that the <strong>labels</strong> and <strong>taints</strong> on the new nodes matched the requirements of the workloads. I converted the old taints into the correct list format and made sure <strong>tolerations</strong> were applied.</p><h3>3) kubectl drain Blocked by PDBs</h3><p><strong>Problem:</strong> When draining nodes, some workloads wouldn’t evict due to <strong>PodDisruptionBudgets</strong> (PDBs) restricting pod eviction.</p><p><strong>Solution:</strong> I temporarily adjusted <strong>replica counts</strong> and <strong>PDBs</strong> for the affected deployments during the drain process. After successfully draining the node, I reverted the changes.</p><h3>How I Validated Success in Staging</h3><p>I validated staging first to ensure the process was stable before going to production. My checklist included:</p><h3>Cluster and Node Health</h3><ul><li>Verified <strong>new nodes</strong> were Ready.</li><li>Ensured <strong>system pods</strong> (CoreDNS, CNI, kube-proxy) were running smoothly.</li></ul><h3>Scheduling and Workload Behavior</h3><ul><li>Verified workloads were successfully scheduling onto new nodes.</li><li>Ensured there were <strong>no Pending pods</strong> due to configuration issues.</li></ul><h3>Observability</h3><ul><li>Ensured <strong>metrics</strong> and <strong>logging</strong> were functioning as expected.</li><li>Verified no significant changes in error rates or pod health.</li></ul><h3>Disruption Test</h3><ul><li>I cordoned and drained <strong>one old node</strong> in staging to test pod rescheduling and overall system stability.</li></ul><h3>How I Validated Success in Production</h3><p>Once staging was stable, I rolled out the changes to production. Here’s how I validated success in production:</p><h3>Gradual Rollout</h3><ul><li>I <strong>gradually</strong> drained nodes in small batches to avoid causing disruptions.</li><li>I watched for <strong>error rates</strong>, <strong>latency</strong>, and <strong>autoscaling behavior</strong>.</li></ul><h3>What I Monitored Closely</h3><ul><li><strong>Node health</strong> (Ready status)</li><li><strong>Pod rescheduling</strong> (ensuring no workloads were left behind)</li><li><strong>Capacity</strong> (ensuring the right workloads landed on the right nodes)</li></ul><h3>Conclusion</h3><p>The migration from <strong>self-managed</strong> to <strong>EKS managed node groups</strong> was a success. It reduced operational overhead, gave us better scaling control, and simplified node lifecycle management.</p><p>If you’re looking to migrate, follow this approach: start with <strong>staging</strong>, <strong>validate thoroughly</strong>, and <strong>take your time</strong>. With the right steps, you can move to managed node groups with confidence, while avoiding unnecessary downtime or disruptions.</p><h3>Migration Checklist (Copy-Paste)</h3><ul><li>Create new managed node group</li><li>Ensure new nodes are Ready</li><li>Align labels and taints between old and new nodes</li><li>Test scheduling in staging</li><li>Gradually drain and cordon old nodes</li><li>Monitor key metrics during the rollout</li><li>Validate in production (autoscaling, error rates)</li><li>Delete old node group</li></ul><p>💬 <strong>Connect with me on LinkedIn</strong>: <a href="https://www.linkedin.com/in/williams-adebola">www.linkedin.com/in/williams-adebola</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4eb06b6e4af" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Code to Cloud: My Journey to Building a Production-Ready Spring Boot App on AWS EKS with…]]></title>
            <link>https://medium.com/@williamsadebolah/from-code-to-cloud-my-journey-to-building-a-production-ready-spring-boot-app-on-aws-eks-with-efd5b7b8c513?source=rss-b768382e6f27------2</link>
            <guid isPermaLink="false">https://medium.com/p/efd5b7b8c513</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[blue-green-deployment]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Adebola Williams]]></dc:creator>
            <pubDate>Thu, 04 Dec 2025 07:33:20 GMT</pubDate>
            <atom:updated>2025-12-04T07:33:20.417Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>From Code to Cloud: My Journey to Building a Production-Ready Spring Boot App on AWS EKS with Blue-Green Deployments</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s-gz8mKXkA6um8aFr4MziA.png" /></figure><p>In the world of DevOps, getting your application deployed to the cloud with a seamless and automated pipeline is a goal that every developer should strive for. Recently, I took on the challenge of building a complete pipeline for deploying a <strong>Spring Boot</strong> application to <strong>AWS EKS</strong> (Elastic Kubernetes Service), and it was an incredible experience. Not only did I manage to build and deploy the app, but I also implemented a <strong>blue-green deployment strategy</strong> to ensure <strong>zero-downtime updates</strong>.</p><p>And speaking of blue-green, I used to think <strong>blue-green deployments</strong> were just a fancy way of choosing your favorite color for Kubernetes… Turns out, they’re actually a lot more practical than that! 😄</p><h3>The Tech Stack: What I Used</h3><ul><li><strong>Spring Boot 3.2</strong> — A simple REST API that forms the core of the application.</li><li><strong>AWS EKS</strong> — The managed Kubernetes service that orchestrates containerized apps.</li><li><strong>Terraform</strong> — My go-to tool for Infrastructure as Code (IaC). It keeps everything modular and reusable.</li><li><strong>GitLab CI/CD</strong> — A one-stop solution for continuous integration and delivery.</li><li><strong>AWS ECR</strong> — Amazon’s container registry to store Docker images.</li><li><strong>Blue-Green Deployments</strong> — Ensuring zero-downtime updates with a well-tested strategy.</li></ul><h3>Why This Stack?</h3><p>I decided to go with <strong>GitLab CI/CD</strong> because it offers version control, CI/CD pipelines, and container registries all in one place. It’s ideal for my use case, especially with its generous free tier that made it perfect for this side project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WBRxjxuPUHhQwAGBTfemCA.png" /></figure><p>For infrastructure, <strong>Terraform</strong> was a no-brainer. The modular approach lets me break down the infrastructure into reusable pieces: VPC, EKS, ECR, IAM, and Node Groups. This not only makes the setup more manageable but also ensures I can easily replicate it in the future.</p><h3>The Blue-Green Deployment Challenge: A Game Changer</h3><p>The highlight of this project was implementing <strong>blue-green deployments</strong>, which provide a simple and efficient way to deploy new versions without any downtime. Here’s how it works:</p><ol><li>The new version of the app gets deployed to the <strong>green</strong> environment (inactive, no traffic).</li><li>Automated <strong>smoke tests</strong> run to ensure everything is working.</li><li>If tests pass, I approve the switch and traffic is redirected from the <strong>blue</strong> (old) environment to the <strong>green</strong> (new) one.</li><li>If something goes wrong, I can roll back to the blue environment in seconds.</li></ol><p>This approach not only gives me the confidence to deploy without worrying about downtime but also ensures that I can catch issues before they affect users. And if something goes wrong, rolling back is as easy as flipping a switch.</p><h3>Cost Optimization: A Key Focus</h3><p>Running applications in the cloud, especially on AWS, can be expensive if you’re not careful. So, I made sure to focus on <strong>cost optimization</strong> from the very start:</p><ul><li><strong>Right-sized instances</strong>: I used <strong>t3.medium</strong> EC2 nodes with auto-scaling (min: 1, max: 4).</li><li><strong>NAT Gateways</strong>: I initially set up two for high availability but documented how reducing it to one could save around <strong>$32/month</strong>.</li><li><strong>ECR lifecycle policies</strong>: Automated cleaning of old images to save storage.</li><li><strong>CloudWatch log retention</strong>: Reduced the retention to 7 days instead of indefinitely to save on costs.</li></ul><p>The result? A production-like setup for a <strong>monthly cost of ~$135–201</strong>. Since this was a side project, I didn’t need it running 24/7. After deploying and testing everything, I tore it down — thanks to Terraform’s ability to quickly recreate the infrastructure, I can easily bring it back up whenever I need it.</p><h3>What I Learned Along the Way</h3><ol><li><strong>Modular Terraform</strong> is invaluable: Breaking infrastructure down into smaller modules made it so much easier to understand, modify, and share.</li><li><strong>Blue-green deployments</strong> are not as complex as they sound: They’re actually quite simple to implement and provide a huge benefit in terms of risk mitigation.</li><li><strong>Automated smoke tests</strong> are a lifesaver: Running tests before traffic switches ensures that you don’t deploy broken code.</li><li><strong>Documentation is crucial</strong>: Writing down every decision as I went helped me understand my approach better and will serve as a reference in the future.</li></ol><h3>The Result: A Seamless, Cost-Effective Solution</h3><p>After deploying and testing the app end-to-end, I ended up with:</p><ul><li>✅ <strong>Zero-downtime deployments</strong></li><li>✅ <strong>Instant rollback capability</strong></li><li>✅ <strong>Automated testing and deployment</strong></li><li>✅ <strong>Infrastructure as Code (IaC)</strong></li><li>✅ <strong>Cost-optimized setup</strong></li><li>✅ <strong>Production-ready configuration</strong></li></ul><p>It was incredibly satisfying to see everything working perfectly. And thanks to Terraform, I can easily recreate the entire environment in about <strong>15 minutes</strong> whenever I want to experiment or demonstrate it.</p><h3>Check Out the Full Codebase</h3><p>Want to dive deeper? You can find the complete codebase, Terraform modules, and CI/CD pipeline on <strong>GitLab</strong>:</p><p>🔗 <a href="https://gitlab.com/heiswillz-projects/spring-app">Repository Link</a></p><p>The <strong>README</strong> has detailed setup instructions, and the Terraform modules are well-documented. Feel free to fork the repo, use it as a reference, or just browse around to see how everything fits together.</p><h3>What’s Next?</h3><p>There are a few things I’d like to add to this project in the future:</p><ul><li><strong>Monitoring</strong> with Prometheus and Grafana for real-time metrics and visualization.</li><li><strong>SSL/TLS</strong> integration with AWS ACM certificates.</li><li><strong>Horizontal Pod Autoscaling</strong> based on CPU and memory usage.</li></ul><p>But for now, I’m happy with the solid foundation I’ve built. It demonstrates modern DevOps practices, and the best part is, I can recreate it whenever I need to.</p><p>💬 <strong>Connect with me on LinkedIn</strong>: <a href="https://www.linkedin.com/in/williams-adebola">www.linkedin.com/in/williams-adebola</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=efd5b7b8c513" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Multi-Environment Infrastructure with Terraform and HCP: A Real-World Journey]]></title>
            <link>https://medium.com/@williamsadebolah/building-a-multi-environment-infrastructure-with-terraform-and-hcp-a-real-world-journey-69e45ee51514?source=rss-b768382e6f27------2</link>
            <guid isPermaLink="false">https://medium.com/p/69e45ee51514</guid>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Adebola Williams]]></dc:creator>
            <pubDate>Fri, 29 Aug 2025 16:08:50 GMT</pubDate>
            <atom:updated>2025-08-29T16:08:50.175Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How I built a production-ready web application infrastructure that automatically scales across multiple environments</em></p><h3>The Challenge</h3><p>When I started leveraging <strong>Terraform</strong>, my objective was clear: <strong>create a robust, scalable infrastructure</strong> capable of handling <strong>production workloads</strong>. The goal was to build a <strong>multi-environment setup (dev and prod)</strong> with <strong>auto-scaling</strong> and <strong>high availability</strong> that could grow with demand.</p><p>This project wasn’t about following another tutorial or writing just a “Hello World” setup — it was about solving real-world infrastructure challenges and building something <strong>production-ready</strong> from scratch.</p><h3>What I Built</h3><p>This infrastructure wasn’t a simple test project. It was designed to be <strong>production-ready</strong> from the start. The key components of the architecture include:</p><ul><li><strong>Multi-environment setup</strong> for development and production environments</li><li><strong>Auto-scaling capabilities</strong> based on CPU utilization</li><li><strong>Load balancing</strong> with health checks for fault tolerance</li><li><strong>Database infrastructure</strong> with automated backups</li><li><strong>Secure networking</strong> using private subnets and security groups</li><li><strong>Remote state management</strong> with <strong>HashiCorp Cloud Platform (HCP)</strong></li></ul><h3>The Architecture</h3><pre>Internet → Application Load Balancer → Auto Scaling Group → RDS MySQL Database<br>                    ↓<br>              HCP Backend (Remote State)</pre><p>The beauty of this setup is its <strong>modularity</strong>. Each component (networking, compute, database) is independently managed via <strong>Terraform modules</strong>, which can easily be reused across different environments.</p><h3>Key Learning Moments</h3><h3>1. HCP Backend Integration</h3><p>Integrating <strong>HCP Terraform</strong> for remote state management was a pivotal decision. It simplified collaboration, removed the need for local state management, and ensured the infrastructure was <strong>secure</strong> and <strong>versioned</strong>.</p><p>The <strong>HCP backend</strong> gave me peace of mind by eliminating the potential pitfalls of managing state files locally. Additionally, I was able to store sensitive variables securely in HCP instead of using environment variables.</p><h3>2. Multi-Environment Strategy</h3><p>By separating <strong>dev</strong> and <strong>prod</strong> environments, I was able to enforce <strong>environment isolation</strong>. Each environment has its own unique variables, backend configurations, and resource sizing, making it easier to scale up or down based on needs.</p><p>This approach helped ensure a clean, organized infrastructure that adhered to best practices.</p><h3>3. Auto-Scaling Implementation</h3><p>Using <strong>CloudWatch alarms</strong> to trigger <strong>auto-scaling</strong> policies was straightforward and powerful. The infrastructure now <strong>automatically scales</strong> when CPU usage exceeds 80%, and scales down when demand drops below 20%. This <strong>dynamic scaling</strong> ensures we only use resources when necessary, optimizing cost efficiency.</p><h3>The Deployment Experience</h3><p>After completing the Terraform configuration, I was eager to see the deployment in action. Would it scale as expected? Would I hit any AWS limits?</p><p><strong>The result? It worked perfectly.</strong></p><p>Terraform created <strong>32 resources</strong> in about <strong>9 minutes</strong>, including:</p><ul><li>A <strong>VPC</strong> with public and private subnets across two availability zones</li><li><strong>Application Load Balancer</strong> with health checks</li><li><strong>Auto Scaling Group</strong> with EC2 instances</li><li><strong>RDS MySQL database</strong> with encryption enabled</li><li>All the necessary <strong>security groups</strong> and <strong>routing tables</strong></li></ul><h3>What Made This Project Special</h3><p>This project wasn’t just about learning Terraform; it was about building an infrastructure that follows <strong>enterprise best practices</strong>:</p><ul><li><strong>Modular architecture</strong> for scalability and reusability</li><li><strong>Environment-specific configurations</strong> for flexibility</li><li><strong>Security-first approach</strong> with private subnets and stringent access control</li><li><strong>Cost optimization</strong> through instance size variation per environment</li><li><strong>Comprehensive documentation</strong> to make the setup accessible to others</li></ul><h3>The Result</h3><p>I now have a <strong>fully functional, production-ready</strong> infrastructure that demonstrates key DevOps competencies:</p><ul><li>Real-world <strong>Terraform expertise</strong></li><li><strong>Multi-environment deployment strategies</strong></li><li><strong>Auto-scaling implementation</strong></li><li>Focus on <strong>security</strong> and <strong>best practices</strong></li><li><strong>Professional documentation</strong> for easy collaboration</li></ul><h3>Try It Yourself</h3><p>If you’re interested in building your own <strong>multi-environment infrastructure</strong> with <strong>auto-scaling</strong> capabilities, check out the <a href="https://github.com/heiswillz98/multi-environment-webapp-infrastructure?utm_source=chatgpt.com"><strong>GitHub repository</strong></a> with the complete code, documentation, and setup guides.</p><p>The repository contains:</p><ul><li>A comprehensive <strong>README</strong> with setup instructions</li><li><strong>Modular Terraform</strong> code for reusable infrastructure</li><li><strong>Step-by-step</strong> guides for deploying on AWS</li></ul><h3>Final Thoughts</h3><p>This project reinforced that <strong>Terraform</strong> is more than just a tool — it’s an approach to <strong>thinking about infrastructure as code</strong>. The <strong>modular design</strong>, <strong>environment separation</strong>, and <strong>automation</strong> make it possible to build infrastructure that is both powerful and maintainable.</p><p>If you’re learning <strong>Terraform</strong>, I highly recommend building something real. Start with simple components and gradually build a <strong>scalable infrastructure</strong>. Each step builds on the last, and before you know it, you’ll have an infrastructure that rivals what you see in production environments.</p><p><strong>Repository</strong>: <a href="https://github.com/heiswillz98/multi-environment-webapp-infrastructure?utm_source=chatgpt.com">https://github.com/heiswillz98/multi-environment-webapp-infrastructure</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69e45ee51514" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building HCP Ibadan Community Hub: My Terraform + Netlify Journey]]></title>
            <link>https://medium.com/@williamsadebolah/building-hcp-ibadan-community-hub-my-terraform-netlify-journey-3fc7c889ff43?source=rss-b768382e6f27------2</link>
            <guid isPermaLink="false">https://medium.com/p/3fc7c889ff43</guid>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[iac]]></category>
            <category><![CDATA[netlify]]></category>
            <dc:creator><![CDATA[Adebola Williams]]></dc:creator>
            <pubDate>Wed, 20 Aug 2025 00:02:28 GMT</pubDate>
            <atom:updated>2025-08-20T00:02:28.620Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*2ZJ_bNaUgsG_RbhEHw5hJQ.jpeg" /></figure><p><em>How I created a beautiful community website using Infrastructure as Code and learned some valuable lessons along the way</em></p><h3>The Challenge That Started It All</h3><p>When I first saw the <strong>Terraform Challenge</strong> from <strong>HCP Ibadan</strong>, I knew I had to participate. The goal was simple yet powerful: deploy a static website on <strong>Netlify</strong> using <strong>Terraform</strong> while managing state remotely in <strong>HCP Terraform</strong>. But I wanted to make it special.</p><p>Instead of building just another generic site, I decided to create something that actually serves our local <strong>HashiCorp User Group</strong> in <strong>Ibadan, Nigeria</strong>. That’s how the <strong>HCP Ibadan Community Hub</strong> was born.</p><h3>What Makes This Project Unique</h3><h3>🌟 Community-First Approach</h3><p>While most participants might build generic landing pages, I wanted to create something that actually serves our community. The site showcases our mission, upcoming events, and the tools we explore together.</p><h3>🏗️ Modular Architecture (Because I’m Lazy… in a Good Way!)</h3><p>I structured the project using <strong>Terraform best practices</strong> with a <strong>modular approach</strong>:</p><ul><li>modules/netlify-site/ - Reusable Netlify module</li><li>environments/prod/ - Production environment</li><li>site/ - Beautiful static website</li></ul><p>This means I can easily add <strong>staging</strong>, <strong>development</strong>, or even other community sites later. <strong>Future me</strong> will thank <strong>present me</strong> for this!</p><h3>🎨 Beautiful, Modern Design</h3><p>I didn’t just slap together some basic HTML. The site features:</p><ul><li><strong>Responsive design</strong> that works on all devices</li><li>Smooth <strong>animations</strong> and interactions</li><li><strong>Modern gradient backgrounds</strong></li><li>Professional branding for <strong>HCP Ibadan</strong></li><li><strong>Dynamic content</strong> that changes on each deployment</li></ul><h3>The Technical Journey: Netlify + HCP Terraform Integration</h3><h3>The Provider Version Saga</h3><p>Here’s where things got interesting. I initially tried using the latest <strong>Netlify provider versions</strong>, but quickly discovered that the netlify/netlify provider only goes up to version <strong>0.4.0</strong>, and the terraform-providers/netlify provider has similar limitations.</p><p>After some trial and error, I settled on <strong>terraform-providers/netlify</strong> version <strong>~&gt; 0.4</strong> which, while older, provides the core functionality we need. This taught me an important lesson: always <strong>check provider compatibility</strong> before diving deep into implementation.</p><h3>HCP Terraform Remote State Setup</h3><p>Setting up <strong>HCP Terraform</strong> was surprisingly straightforward. I created a workspace called hcp-ibadan-netlify-prod and configured the backend to use the environments/prod working directory. This approach allows <strong>HCP Terraform</strong> to access all the files in the repository while maintaining a clean separation between environments.</p><p>The real magic happened when I configured the netlify_token as a <strong>sensitive variable</strong> in <strong>HCP Terraform</strong> instead of using environment variables. This is much more secure and team-friendly—no more worrying about local environment setup!</p><h3>The Deployment Process</h3><p>The deployment process is beautifully simple:</p><ol><li><strong>Terraform</strong> creates the <strong>Netlify site</strong> with a unique name (using random suffixes).</li><li><strong>Netlify CLI</strong> deploys the static files.</li><li>The site is <strong>live in minut</strong></li></ol><h3>Key Setup Steps (Without the Code Dump)</h3><h3>1. Project Structure</h3><p>I organized everything into a clean, scalable structure:</p><pre>hcp-ibadan/<br>├── modules/netlify-site/     # Reusable module<br>├── environments/prod/        # Production environment<br>├── site/                    # Static website files<br>└── README.md                # Comprehensive documentation</pre><h3>2. HCP Terraform Configuration</h3><ul><li>Created organization and workspace in <strong>HCP Terraform</strong></li><li>Set working directory to <strong>environments/prod</strong></li><li>Added <strong>netlify_token</strong> as a sensitive variable</li><li>Configured backend to point to the workspace</li></ul><h3>3. Netlify Setup</h3><ul><li>Generated <strong>Personal Access Token</strong></li><li>Installed <strong>Netlify CLI</strong></li><li>Deployed static files after Terraform created the site</li></ul><h3>4. Website Development</h3><ul><li>Built <strong>responsive HTML/CSS/JS</strong></li><li>Added <strong>community-focused content</strong></li><li>Implemented <strong>modern design patterns</strong></li><li>Made it <strong>mobile-friendly</strong></li></ul><h3>Lessons Learned</h3><h3>Provider Compatibility Matters</h3><p>Always check what versions are actually available before planning your architecture. The <strong>Netlify provider ecosystem</strong> is more complex than I initially thought.</p><h3>Modular Design Pays Off</h3><p>Even for a “simple” project, the <strong>modular approach</strong> made everything more maintainable and scalable. I can easily add new environments or reuse the module for other projects.</p><h3>Documentation is Everything</h3><p>A comprehensive <strong>README</strong> with clear setup instructions makes the project accessible to others. I spent extra time making sure someone could clone the repo and get it running quickly.</p><h3>Community-First Thinking</h3><p>Building something for a real community made the project more <strong>meaningful</strong> and motivated me to put in the extra effort for quality.</p><h3>The Result</h3><p>The final product is live at: <a href="https://hcp-ibadan-hub-x0eae2kt.netlify.app/"><strong>https://hcp-ibadan-hub-x0eae2kt.netlify.app</strong></a></p><p>It’s a <strong>beautiful</strong>, functional website that showcases our <strong>HCP Ibadan community</strong> and demonstrates solid <strong>Infrastructure as Code</strong> practices. The site includes:</p><ul><li><strong>Community mission</strong> and goals</li><li>Information about <strong>HashiCorp tools</strong> we explore</li><li><strong>Call-to-action</strong> for joining the community</li><li><strong>Modern, responsive design</strong></li><li><strong>Interactive elements</strong></li></ul><h3>Join the Community!</h3><p>If you’re in <strong>Ibadan</strong> or interested in <strong>HashiCorp tools</strong>, check out our community! We’re building something special here, and there’s always room for more passionate developers.</p><p><strong>GitHub Repository</strong>: <a href="https://github.com/heiswillz98/hcp-ibadan-terraform-challenge">https://github.com/heiswillz98/hcp-ibadan-terraform-challenge</a></p><p><em>This project was completed as part of the </em><strong><em>HCP Ibadan Terraform Challenge</em></strong><em>. Special thanks to the </em><strong><em>@hug-ibadan community</em></strong><em> for organizing this amazing learning opportunity!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3fc7c889ff43" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Migrating GitLab Runner from AWS EC2 to Linode LKE: My Complete Journey]]></title>
            <link>https://medium.com/@williamsadebolah/migrating-gitlab-runner-from-aws-ec2-to-linode-lke-my-complete-journey-ca643d29c7e8?source=rss-b768382e6f27------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca643d29c7e8</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[gitlab-runner]]></category>
            <category><![CDATA[linode]]></category>
            <dc:creator><![CDATA[Adebola Williams]]></dc:creator>
            <pubDate>Thu, 14 Aug 2025 11:02:09 GMT</pubDate>
            <atom:updated>2025-08-14T11:02:09.433Z</atom:updated>
            <content:encoded><![CDATA[<h3>Migrating GitLab Runner from AWS EC2 to Linode LKE: My Complete Journey</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ps0TbwhvIX7xcuqMeJK7BA.jpeg" /></figure><p><em>How I solved Docker-in-Docker issues, reduced costs by 50%, and built a more reliable CI/CD pipeline</em></p><h3>The Problem: Why I Needed a Better GitLab Runner Setup</h3><p>It all started when I realized our development team was spending way too much time waiting for builds to complete. We were using GitLab’s shared runners, but they were slow, unreliable, and expensive for our needs. I needed a self-hosted solution that could handle our Docker builds efficiently.</p><p>At first, AWS EC2 seemed like the obvious choice. I mean, it’s AWS, right? Everyone uses it. So I set up a t3.medium instance with Docker and GitLab Runner, thinking this would solve all our problems.</p><p><strong>Spoiler alert: It didn’t.</strong></p><h3>The AWS EC2 Experiment: What Went Wrong</h3><h3>The Setup</h3><p>I created a simple Terraform configuration for an EC2 instance:</p><pre>resource &quot;aws_instance&quot; &quot;gitlab_runner&quot; {<br>  ami           = &quot;ami-0c02fb55956c7d316&quot;  # Ubuntu 22.04<br>  instance_type = &quot;t3.medium&quot;<br>  <br>  user_data = &lt;&lt;-EOF<br>    #!/bin/bash<br>    curl -L &quot;https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh&quot; | sudo bash<br>    sudo apt-get install gitlab-runner<br>    sudo gitlab-runner register --url &quot;https://gitlab.heimdallnexus.com/&quot; --token &quot;YOUR_TOKEN&quot;<br>  EOF<br>}</pre><h3>The Problems Started Immediately</h3><ul><li><strong>Cost and Scalability Issues</strong>: While the AWS setup worked, it had several problems:</li><li><strong>Cost Creep</strong>: The t3.medium was $30/month, but with data transfer, EBS volumes, and the time I was spending on maintenance, the real cost was much higher.</li><li><strong>Scalability Issues</strong>: When multiple developers pushed code simultaneously, builds would queue up and take forever. The single EC2 instance just couldn’t handle the load.</li><li><strong>Maintenance Overhead</strong>: I was constantly SSH-ing into the instance to restart services, check logs, and fix issues. It felt like I was babysitting a server instead of focusing on development.</li><li><strong>Limited Growth</strong>: Adding more capacity meant provisioning new instances, which was time-consuming and expensive.</li></ul><h3>The Breaking Point: When I Knew I Had to Change</h3><p>After weeks of dealing with maintenance overhead and scalability issues, I had a moment of clarity. I was spending more time maintaining our CI/CD infrastructure than actually building features. Something had to change.</p><p>I started researching alternatives and stumbled upon <strong>Linode Kubernetes Engine (LKE)</strong>. The idea of using Kubernetes for GitLab Runner seemed overkill at first, but the more I read about <strong>Kaniko</strong> (a tool for building Docker images without a Docker daemon), the more intrigued I became.</p><h3>The Decision: Why I Chose Linode LKE</h3><h3>Cost Analysis</h3><ul><li><strong>AWS EC2</strong>: $30/month + data transfer + EBS + my debugging time</li><li><strong>Linode LKE</strong>: $24/month for g6-standard-2 (4GB RAM, 2 vCPU)</li><li><strong>Savings</strong>: ~$6/month + countless hours of debugging time</li></ul><h3>Technical Advantages</h3><ul><li><strong>Kubernetes-native</strong>: Better resource management and scaling</li><li><strong>Managed control plane</strong>: Less infrastructure to maintain</li><li><strong>Better isolation</strong>: Each build runs in its own pod</li><li><strong>Modern approach</strong>: Container orchestration instead of server management</li><li><strong>Infrastructure as Code</strong>: Version-controlled, reproducible infrastructure</li></ul><h3>The Migration Plan</h3><p>I decided to migrate over a weekend when the team wasn’t actively developing. The plan was simple:</p><ol><li>Set up Linode LKE cluster</li><li>Deploy GitLab Runner with Kaniko</li><li>Test thoroughly</li><li>Switch over</li><li>Decommission AWS instance</li></ol><h3>The Implementation: Building a Better Runner</h3><h3>Step 1: Setting Up Linode LKE with Terraform</h3><p>First, I created a Linode account and got an API token. Then I set up the entire infrastructure using Terraform, which made the process much more manageable and repeatable.</p><p>Here’s my complete Terraform configuration:</p><pre># Provider configuration<br>terraform {<br>  required_providers {<br>    linode = {<br>      source  = &quot;linode/linode&quot;<br>      version = &quot;~&gt; 2.0&quot;<br>    }<br>    kubernetes = {<br>      source  = &quot;hashicorp/kubernetes&quot;<br>      version = &quot;~&gt; 2.0&quot;<br>    }<br>    helm = {<br>      source  = &quot;hashicorp/helm&quot;<br>      version = &quot;~&gt; 2.0&quot;<br>    }<br>  }<br>}<br># Linode provider<br>provider &quot;linode&quot; {<br>  token = var.linode_token<br>}<br># LKE Cluster<br>resource &quot;linode_lke_cluster&quot; &quot;gitlab_runner&quot; {<br>  label       = &quot;gitlab-runner-cluster&quot;<br>  k8s_version = &quot;1.33&quot;<br>  region      = &quot;us-east&quot;<br>  <br>  pool {<br>    type  = &quot;g6-standard-2&quot;<br>    count = 1<br>  }<br>}<br># GitLab Runner with Helm<br>resource &quot;helm_release&quot; &quot;gitlab_runner&quot; {<br>  name       = &quot;gitlab-runner&quot;<br>  repository = &quot;https://charts.gitlab.io&quot;<br>  chart      = &quot;gitlab-runner&quot;<br>  namespace  = &quot;gitlab-runner&quot;<br>  <br>  values = [<br>    yamlencode({<br>      gitlabUrl = var.gitlab_url<br>      runnerRegistrationToken = var.registration_token<br>      concurrent = 1<br>      runners = {<br>        name = &quot;gitlab-runner-linode&quot;<br>        executor = &quot;kubernetes&quot;<br>        tags = &quot;docker,aws,ecr,shared&quot;<br>        kubernetes = {<br>          privileged = true<br>          volumes = [<br>            &quot;/cache:/cache&quot;,<br>            &quot;/builds:/builds&quot;<br>          ]<br>        }<br>      }<br>    })<br>  ]<br>}</pre><p>The beauty of using Terraform was that I could version control my entire infrastructure. The cluster was ready in about 5 minutes, and I could easily recreate it if needed.</p><h3>Step 2: Infrastructure as Code Benefits</h3><p>Using Terraform for the entire setup gave me several advantages:</p><ul><li><strong>Version Control</strong>: My entire infrastructure was now in Git, making it easy to track changes and roll back if needed.</li><li><strong>Reproducibility</strong>: I could destroy and recreate the entire setup with a single command:</li></ul><pre>terraform apply<br>terraform destroy</pre><ul><li><strong>Team Collaboration</strong>: Other team members could understand and modify the infrastructure by reading the Terraform code.</li><li><strong>Cost Management</strong>: I could easily see what resources were being created and their associated costs.</li><li><strong>Automation</strong>: The entire setup was automated, reducing human error and manual configuration steps.</li></ul><h3>Step 3: The DinD Problem and Kaniko Solution</h3><p>Initially, I tried to use <strong>Docker-in-Docker (DinD)</strong> on Linode LKE, but immediately ran into the same issues I’d heard about from others:</p><pre>docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock</pre><p>I spent days debugging TLS issues, certificate problems, and network connectivity. Every time I thought I had it working, a new build would fail with a different DinD-related error.</p><p>Then I discovered <strong>Kaniko</strong>. Instead of using Docker-in-Docker, I configured our pipelines to use Kaniko:</p><pre># .gitlab-ci.yml<br>build:<br>  image: gcr.io/kaniko-project/executor:debug<br>  script:<br>    - /kaniko/executor <br>      --context $CI_PROJECT_DIR <br>      --dockerfile $CI_PROJECT_DIR/Dockerfile <br>      --destination $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG</pre><p><strong>This was the game-changer. No more DinD issues. No more TLS problems. No more certificate errors.</strong></p><h3>The Results: What Actually Happened</h3><h3>Performance Improvements</h3><ul><li><strong>Build reliability</strong>: 99.9% success rate (vs 85% with AWS)</li><li><strong>Build speed</strong>: Similar, but much more consistent</li><li><strong>Queue times</strong>: Reduced by 60% due to better resource management</li><li><strong>Debugging time</strong>: From hours per week to minutes per month</li><li><strong>DinD issues</strong>: Completely eliminated with Kaniko</li></ul><h3>Cost Savings</h3><ul><li><strong>Infrastructure</strong>: $24/month vs $30+ on AWS</li><li><strong>Developer time</strong>: Priceless — no more DinD debugging</li><li><strong>Total ROI</strong>: The migration paid for itself in the first month</li></ul><h3>Operational Benefits</h3><ul><li><strong>Zero maintenance</strong>: Kubernetes handles pod restarts, scaling, etc.</li><li><strong>Better monitoring</strong>: Built-in Kubernetes monitoring and logging</li><li><strong>Easy scaling</strong>: Can easily add more nodes if needed</li><li><strong>Disaster recovery</strong>: Kubernetes handles node failures automatically</li><li><strong>Infrastructure automation</strong>: Terraform handles provisioning and updates</li></ul><h3>The Challenges: What I Learned the Hard Way</h3><h3>Memory Management</h3><p>The first few builds failed with “Out of Memory” errors. I learned that Kaniko builds can be memory-intensive, especially with large Node.js applications. I solved this by:</p><ol><li><strong>Setting concurrent jobs to 1</strong> initially</li><li><strong>Using multi-stage Dockerfiles</strong> to reduce build context</li><li><strong>Adding proper resource limits</strong> to jobs</li></ol><h3>Configuration Complexity</h3><p>Kubernetes configuration is more complex than a simple EC2 setup, but it’s also more powerful. I spent time learning more about:</p><ul><li><strong>RBAC</strong> (Role-Based Access Control)</li><li><strong>Service accounts</strong> and permissions</li><li><strong>Resource quotas</strong> and limits</li><li><strong>Pod security contexts</strong></li></ul><h3>The Learning Curve</h3><p>The biggest challenge was the mental shift from “server management” to “container orchestration.” But once I got it, everything became much more predictable and manageable.</p><h3>The Current Setup: What It Looks Like Today</h3><h3>Architecture</h3><pre>Linode LKE Cluster (g6-standard-2)<br>├── GitLab Runner Pod<br>├── Kaniko Executor Pods (per build)<br>├── RBAC (Service Account, Cluster Role)<br>└── Persistent Volumes (cache, builds)</pre><h3>Configuration</h3><p>I’ve optimized the setup for our specific needs:</p><pre># Optimized helm-values.yaml<br>concurrent: 1  # Conservative for our node size<br>runners:<br>  kubernetes:<br>    privileged: true<br>    volumes:<br>      - &quot;/cache:/cache&quot;<br>      - &quot;/builds:/builds&quot;<br>    resources:<br>      limits:<br>        memory: &quot;2Gi&quot;<br>        cpu: &quot;1000m&quot;</pre><h3>Pipeline Example</h3><p>Here’s how our builds look now:</p><pre>stages:<br>  - build<br>  - deploy<br>build:<br>  stage: build<br>  image: gcr.io/kaniko-project/executor:debug<br>  tags:<br>    - docker<br>    - shared<br>  script:<br>    - /kaniko/executor <br>      --context $CI_PROJECT_DIR <br>      --dockerfile $CI_PROJECT_DIR/Dockerfile <br>      --destination $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG<br>      --snapshot-mode=redo</pre><h3>Lessons Learned: What I’d Do Differently</h3><h3>1. Start with Kaniko from Day One</h3><p>If I had known about the DinD issues on Kubernetes, I would have skipped Docker-in-Docker entirely and gone straight to Kaniko. The learning curve is minimal, and the payoff is immediate.</p><h3>2. Plan for Resource Usage</h3><p>I underestimated how much memory Kaniko builds would use. Next time, I’d start with a larger node (g6-standard-4) or plan to scale up from the beginning.</p><h3>3. Document Everything</h3><p>I wish I had documented the migration process better. The troubleshooting steps, configuration decisions, and lessons learned would have been valuable for future reference.</p><h3>4. Test More Thoroughly</h3><p>I should have tested more edge cases before switching over. While the migration was successful, I could have avoided some initial hiccups with better testing.</p><h3>The Future: Scaling and Optimization</h3><h3>Immediate Plans</h3><ul><li><strong>Monitor performance</strong> and optimize resource usage</li><li><strong>Consider upgrading</strong> to g6-standard-4 for better performance</li><li><strong>Implement proper monitoring</strong> and alerting</li><li><strong>Enhance Terraform modules</strong> for better reusability</li></ul><h3>Long-term Vision</h3><ul><li><strong>Multi-node cluster</strong> for high availability</li><li><strong>Advanced caching</strong> strategies for faster builds</li><li><strong>Integration with other tools</strong> in our DevOps stack</li><li><strong>Complete infrastructure automation</strong> with Terraform</li></ul><h3>Conclusion: Was It Worth It?</h3><p><strong>Absolutely, yes.</strong></p><p>The migration from AWS EC2 to Linode LKE was one of the best infrastructure decisions I’ve made. Here’s why:</p><h3>The Numbers</h3><ul><li><strong>50% cost reduction</strong> in infrastructure costs</li><li><strong>90% reduction</strong> in debugging time</li><li><strong>99.9% build reliability</strong> vs 85% before</li><li><strong>Zero maintenance overhead</strong> vs hours per week</li></ul><h3>The Intangibles</h3><ul><li><strong>Peace of mind</strong>: No more late-night debugging sessions</li><li><strong>Team productivity</strong>: Developers can focus on code, not infrastructure</li><li><strong>Scalability</strong>: Easy to grow as the team grows</li><li><strong>Learning</strong>: Valuable Kubernetes and Terraform experience</li><li><strong>Infrastructure confidence</strong>: Version-controlled, reproducible setup</li></ul><h3>The Bottom Line</h3><p>If you’re struggling with GitLab Runner on traditional VMs, consider making the jump to Kubernetes with Kaniko. The initial learning curve is worth it for the long-term benefits, and you’ll avoid the DinD headaches entirely.</p><p>The key is to start simple, learn as you go, and don’t be afraid to iterate. My setup today looks nothing like my first attempt, and that’s okay. The important thing is that it works reliably and doesn’t consume my time.</p><h3>Resources and Next Steps</h3><p>If you’re considering a similar migration, here are some resources that helped me:</p><ul><li><a href="https://docs.gitlab.com/runner/executors/kubernetes/">GitLab Runner Kubernetes Executor Documentation</a></li><li><a href="https://github.com/GoogleContainerTools/kaniko">Kaniko Documentation</a></li><li><a href="https://www.linode.com/docs/products/compute/kubernetes/">Linode LKE Documentation</a></li><li><a href="https://helm.sh/docs/">Helm Documentation</a></li><li><a href="https://registry.terraform.io/providers/linode/linode/latest/docs">Terraform Linode Provider</a></li><li><a href="https://www.terraform.io/docs/cloud/guides/recommended-practices/index.html">Terraform Best Practices</a></li></ul><p><strong>Have you migrated your GitLab Runner setup? What challenges did you face? I’d love to hear about your experience in the comments below.</strong></p><p>Let’s also connect on LinkedIn: <a href="https://www.linkedin.com/in/williams-adebola">www.linkedin.com/in/williams-adebola</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca643d29c7e8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ No One Could Enter, No One Could Leave — My VPC Disaster Story ]]></title>
            <link>https://medium.com/@williamsadebolah/no-one-could-enter-no-one-could-leave-my-vpc-disaster-story-640903fbc2b5?source=rss-b768382e6f27------2</link>
            <guid isPermaLink="false">https://medium.com/p/640903fbc2b5</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[vpc]]></category>
            <dc:creator><![CDATA[Adebola Williams]]></dc:creator>
            <pubDate>Tue, 22 Jul 2025 08:07:17 GMT</pubDate>
            <atom:updated>2025-07-22T08:07:17.913Z</atom:updated>
            <content:encoded><![CDATA[<h3>🔒 <strong>No One Could Enter, No One Could Leave — My VPC Disaster Story</strong> 😅</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QGyfllsEdPl34p0K_Ml4fQ.png" /></figure><p>When I started using AWS, a <strong>VPC</strong> felt like one of those “required-but-not-explained” things.<br> So I’d slap one into my Terraform configs and move on.</p><p>No big deal, right?</p><p>Until one day…</p><ul><li>My EC2 instances were stranded</li><li>My RDS was unreachable</li><li>My app was broken — and I had no idea why</li></ul><p>It wasn’t the code.<br> It wasn’t the compute.<br> It was the networking.</p><blockquote><em>I had no idea how VPCs </em>actually<em> worked.</em></blockquote><h3>📍 The City Analogy That Finally Made VPCs Click</h3><p>Think of a VPC like you’re building a city:</p><ul><li>🏙 <strong>The VPC</strong> is your city limit — everything lives within it.</li><li>🏘 <strong>Subnets</strong> are the neighborhoods — some public, some private.</li><li>🛣 <strong>Route tables</strong> control how cars (data) move between neighborhoods.</li><li>✈️ <strong>Internet Gateway (IGW)</strong> is your airport. No IGW? No internet traffic in or out.</li><li>🛵 <strong>NAT Gateway</strong> is your delivery guy — your private servers can reach out, but outsiders can’t reach in.</li></ul><blockquote><em>I forgot the airport.<br> No one could get in. No one could leave.<br> Tragic.</em></blockquote><h3>💡 What I Wish I Knew Earlier</h3><p>✅ <strong>CIDR blocks</strong> define the land — plan them early and don’t overlap<br> ✅ <strong>Public subnets</strong> need an IGW + a route table pointing to it<br> ✅ <strong>Private subnets</strong> need a NAT Gateway to speak to the internet (outbound only)<br> ✅ <strong>Security groups</strong> are bouncers — stateful and precise<br> ✅ <strong>NACLs</strong> are the outer gate — stateless and rule-ordered</p><h3>🚀 Pro Tips I Now Follow Religiously</h3><ul><li>Always <strong>sketch out your architecture</strong> before writing a single line of code</li><li>Separate public and private subnets across <strong>multiple availability zones</strong> for high availability</li><li>Use <strong>tags</strong> everywhere — future you (and your teammates) will thank you</li><li>Never assume default VPCs or security settings are secure</li></ul><h3>🔐 Bonus: If You’re Using Terraform</h3><p>Here’s a mini-snippet of a basic VPC setup pattern:</p><pre>resource &quot;aws_vpc&quot; &quot;main&quot; {<br>  cidr_block = &quot;10.0.0.0/16&quot;<br>}<br><br>resource &quot;aws_subnet&quot; &quot;public&quot; {<br>  vpc_id     = aws_vpc.main.id<br>  cidr_block = &quot;10.0.1.0/24&quot;<br>  map_public_ip_on_launch = true<br>  availability_zone = &quot;us-west-2a&quot;<br>}<br><br>resource &quot;aws_internet_gateway&quot; &quot;igw&quot; {<br>  vpc_id = aws_vpc.main.id<br>}</pre><p>Add a route table, NAT Gateway, private subnets — and your city is open for business.</p><h3>🧠 Final Thoughts</h3><p>Networking seems boring — until it breaks.<br> Then it becomes the only thing that matters.</p><p>If you’re just getting into AWS or Terraform, take the time to understand how VPCs really work.<br> It will save you <em>hours</em> of painful debugging later.</p><h3>✨ Have a networking horror story of your own?</h3><p>Let’s compare notes in the comments — I’d love to hear what taught <em>you</em> the most.</p><p>🧵 Follow me <a href="https://www.linkedin.com/in/williams-adebola">@williamsadebolah</a> for more DevOps, Terraform, and cloud engineering breakdowns.</p><p>Let’s also connect on LinkedIn: <a href="https://www.linkedin.com/in/williams-adebola">www.linkedin.com/in/williams-adebola</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=640903fbc2b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>