<?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 Chiemela Umeh on Medium]]></title>
        <description><![CDATA[Stories by Chiemela Umeh on Medium]]></description>
        <link>https://medium.com/@chiemelaumeh1?source=rss-376b2485c51a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*C_bP2QmEWQdVhxgFbY0_Dg.png</url>
            <title>Stories by Chiemela Umeh on Medium</title>
            <link>https://medium.com/@chiemelaumeh1?source=rss-376b2485c51a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 21:59:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chiemelaumeh1/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 504 That Wasn’t: Why Your Istio Timeouts Are Really TIME_WAIT Buildup]]></title>
            <link>https://medium.com/@chiemelaumeh1/how-to-install-terraform-on-linux-os-create-an-ec2-instance-using-terraform-destroy-resources-5ba97e2f52be?source=rss-376b2485c51a------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ba97e2f52be</guid>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[terr]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Chiemela Umeh]]></dc:creator>
            <pubDate>Mon, 09 Jun 2025 16:14:04 GMT</pubDate>
            <atom:updated>2026-10-19T15:36:30.972Z</atom:updated>
            <content:encoded><![CDATA[<h3>A production debugging story about HTTP connection pooling, Linux kernel tuning, and why “the mesh is slow” almost never means what you think.</h3><p>A couple of years ago I spent two weeks chasing a bug on a Viasat SaaS platform that looked, at a glance, like a classic service mesh timeout. By the time I was done I had a kernel-level answer, a one-line Go fix, and a Grafana panel that keeps the whole class of problem visible to the next engineer. This is the post I wish I had read in week one.</p><p>If you run production Kubernetes with Istio or Linkerd in front of your services, you have probably seen the same symptom. Here is what it actually was for me, how I ran it to ground, and what I would do differently.</p><h3>The symptom</h3><p>Our platform ran 20 EKS clusters serving around 50 microservices behind an Istio mesh. Reliability was healthy on paper. p50 and p99 were well inside SLO, error budgets were nowhere near burn, and the on-call pager was quiet.</p><p>But every so often, a user would ping support with a screenshot of a loading spinner that never resolved. The receiving service’s logs showed nothing. The sending service’s logs showed a timeout. The mesh dashboards showed 504s at roughly 1 in 2,000 requests. One in 2,000 is nowhere near our error budget, so no alert ever fired.</p><p>That is the dangerous zone. Not a page, not an alarm, just a slow drip of broken requests that eventually turns into a stand-up slide.</p><h3>Why it mattered</h3><p>Three reasons it was worth chasing even though SLO said it was fine:</p><ol><li><strong>Retry logic hid the real impact.</strong> Browsers do not retry POSTs. Our checkout and provisioning endpoints took the hit, and a 1-in-2,000 failure rate on a POST feels much worse to the user than a 1-in-2,000 failure rate on a background GET.</li><li><strong>The pattern was growing.</strong> When I pulled the Istio access logs over a two-week window, the 504 rate was climbing by about 15 percent week over week. SLO was still green, but the trend line said it would not be in another month.</li><li><strong>Nobody owned it.</strong> Mesh issues sit between the platform team and the application teams. Without someone picking it up, the ticket would have ping-ponged until it was a page.</li></ol><h3>First instinct: the obvious things that did not pan out</h3><p>The first week was spent ruling out the usual suspects.</p><p><strong>Downstream service health.</strong> No pod restarts. No OOMKills. No elevated memory or CPU on either side of the hop. Prometheus showed clean saturation metrics. Horizontal Pod Autoscaler was not even flapping.</p><p><strong>Istio sidecar configuration.</strong> I pulled the Envoy configuration for the affected service pair with istioctl proxy-config and diffed it against a healthy pair. Identical. Same retry policy, same timeouts, same outlier detection. Not a config drift.</p><p><strong>Network path.</strong> Ran mtr between two pods in the pair. Zero packet loss, p99 round-trip under 1 ms. The underlying network was fine.</p><p><strong>Application code.</strong> The sending service was a Go HTTP client calling the receiving service’s REST API. Standard code, standard http.Client, nothing weird on either side. Spent most of a day staring at it.</p><p>None of this led anywhere. That is actually the key moment in any debugging story. When the obvious layers come up clean, the answer is almost always one layer deeper than you want it to be.</p><h3>The useful move: watch the connection, not the request</h3><p>The breakthrough came when I stopped looking at HTTP and started looking at TCP.</p><p>In the Istio access logs, the 504 responses carried a response-flag of UC, not UT. UT means the upstream service timed out. UC means the upstream connection was abruptly closed. That distinction matters. It said the sending service&#39;s connection to the receiving service was being torn down mid-request, not that the receiving service was slow.</p><p>So I exec’d into one of the sending pods and ran:</p><pre>$ ss -tanp state time-wait | wc -l<br>2847</pre><pre>$ nstat -z | grep -i tcpext | grep -E &quot;ListenOverflow|TimeWaitOverflow|TCPReqQOverflow&quot;<br>TcpExtListenOverflows           1831<br>TcpExtListenDrops               1831<br>TcpExtTCPReqQFullDoCookies      0</pre><p>Nearly 3,000 sockets in TIME_WAIT, and the kernel was dropping incoming connection attempts because the listen queue was full. That is a sign that the sending pod is opening and closing TCP connections faster than the kernel can clear them.</p><p>I ran tcpdump on the same pod and watched a request go out:</p><pre>$ tcpdump -nn -i eth0 &#39;host 10.42.17.19 and port 8080&#39;<br>...<br>10.42.3.5.54321 &gt; 10.42.17.19.8080: Flags [S], seq 1234, win 65535<br>10.42.17.19.8080 &gt; 10.42.3.5.54321: Flags [S.], seq 5678, ack 1235, win 65535<br>10.42.3.5.54321 &gt; 10.42.17.19.8080: Flags [.], ack 5679, win 65535<br>...request/response...<br>10.42.3.5.54321 &gt; 10.42.17.19.8080: Flags [F.], seq 2001, ack 7001, win 65535<br>10.42.17.19.8080 &gt; 10.42.3.5.54321: Flags [F.], seq 7001, ack 2002, win 65535</pre><p>Fresh three-way handshake, request, response, four-way FIN teardown. Every single request. The Go HTTP client was opening a brand new TCP connection to the receiving service for every call, closing it, and immediately opening another one. Under modest concurrency, that produced the TIME_WAIT buildup I was seeing in ss.</p><p>The Istio sidecar on the receiving side saw a connection open mid-handshake, start to serve the request, and then get torn down abruptly when the kernel on the receiving side ran out of connection-tracking slots. From the sidecar’s perspective, that is a UC. From the user&#39;s perspective, that is a 504.</p><h3>The actual root cause</h3><p>The Go HTTP client was using http.DefaultClient with no transport tuning. Go&#39;s default http.Transport is reasonable for CLI tools but wrong for high-concurrency service-to-service calls behind a mesh. Specifically:</p><ul><li>MaxIdleConnsPerHost defaults to <strong>2</strong>. Any time the service made more than two concurrent requests to the same downstream, the extras opened and closed brand new connections.</li><li>IdleConnTimeout defaults to <strong>90 seconds</strong>, but with only two idle slots per host, idle connections were constantly being evicted and reopened under traffic.</li><li>HTTP/2 was not being negotiated because the service was behind an HTTP/1.1 sidecar listener, so every request was a separate HTTP/1.1 connection by default.</li></ul><p>The symptom looked like a mesh problem. The cause was application-layer connection pooling.</p><h3>The fix</h3><p>Two changes shipped together.</p><p><strong>Go HTTP client tuning.</strong> We replaced the default transport with an explicit configuration:</p><pre>var sharedTransport = &amp;http.Transport{<br>    MaxIdleConns:          200,<br>    MaxIdleConnsPerHost:   100,<br>    MaxConnsPerHost:       200,<br>    IdleConnTimeout:       90 * time.Second,<br>    TLSHandshakeTimeout:   10 * time.Second,<br>    ExpectContinueTimeout: 1 * time.Second,<br>    ForceAttemptHTTP2:     true,<br>}</pre><pre>var httpClient = &amp;http.Client{<br>    Transport: sharedTransport,<br>    Timeout:   15 * time.Second,<br>}</pre><p>One shared client reused across all callers. No more per-request client, no more default transport.</p><p><strong>Kernel tuning on the node.</strong> We bumped two sysctls through a DaemonSet init container so the node could absorb bursts without dropping connections:</p><pre>net.core.somaxconn = 4096<br>net.ipv4.tcp_max_tw_buckets = 262144<br>net.ipv4.ip_local_port_range = 10240 65535</pre><p>Within a day of rolling the change, the 504 rate dropped from 1 in 2,000 to zero across every pair that had the fix. TIME_WAIT counts on affected pods dropped from thousands to the low double digits.</p><h3>The permanent prevention</h3><p>Fixing the bug is half the job. The other half is making sure it stops being invisible to the next engineer.</p><p>I added a Grafana panel to the shared mesh dashboard that tracks three metrics by pod:</p><ul><li>TcpExtListenOverflows rate</li><li>TIME_WAIT socket count</li><li>Istio response_flag=&quot;UC&quot; rate</li></ul><p>Alerts fire when any of them trends up for more than 10 minutes. The alert routes to the platform team, not the application team, because the usual root cause is a shared transport pattern that affects many services.</p><p>I also wrote a short internal playbook: “If you see UC flags in the mesh and SLO is still green, check connection reuse before you touch mesh config.” That playbook has been used twice since, both times to catch the same class of bug within an afternoon instead of two weeks.</p><h3>What I would do differently</h3><p>Three things, in order of impact.</p><p>First, I would have reached for ss and nstat on day one instead of day eight. Any time the mesh dashboards and the application logs tell different stories, the answer is almost always in the socket layer. That is a reflex I now have but did not have then.</p><p>Second, I would have treated the trend line as more actionable. A 15-percent week-over-week growth in a sub-SLO error class is a leading indicator. Our dashboards were not surfacing it because we tracked error rates, not error growth. We fixed that too.</p><p>Third, I would have paired on the debugging earlier. Pattern recognition for socket-layer bugs is one of those things that spreads fastest through pairing, and the two weeks of solo work was unnecessary.</p><h3>The takeaway</h3><p>A service mesh is a leverage multiplier. It abstracts the network layer so your application teams do not have to think about it. The cost of that leverage is that when something goes wrong, the symptom shows up in the mesh and the cause is usually one or two layers below it.</p><p>If you see sparse UC or UT flags in Istio or Linkerd and SLO is holding, check connection reuse in the sending service before you touch the mesh. Your Go, Java, or Node HTTP clients are probably using defaults that worked fine before you added a mesh in front of them, and the mesh changed the economics of connection pooling without changing the code.</p><p>The fix is almost always a few lines of transport configuration and a sysctl. The hard part is knowing where to look.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ba97e2f52be" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Optimizing Kubernetes CI/CD with Helm, Jenkins, AWS, and Terraform]]></title>
            <link>https://medium.com/@chiemelaumeh1/optimizing-kubernetes-ci-cd-with-helm-jenkins-aws-and-terraform-391bffd321ec?source=rss-376b2485c51a------2</link>
            <guid isPermaLink="false">https://medium.com/p/391bffd321ec</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[terraform]]></category>
            <dc:creator><![CDATA[Chiemela Umeh]]></dc:creator>
            <pubDate>Mon, 09 Jun 2025 16:12:50 GMT</pubDate>
            <atom:updated>2025-06-09T16:12:50.887Z</atom:updated>
            <content:encoded><![CDATA[<p>In a modern DevOps environment, delivering applications reliably at scale requires more than just writing good code. The backbone of scalable, repeatable, and secure deployments lies in infrastructure-as-code (IaC), orchestration, and automation. In this article, I dive deep into integrating <strong>Kubernetes</strong>, <strong>Helm</strong>, <strong>Jenkins</strong>, <strong>AWS</strong>, and <strong>Terraform</strong> to build a resilient CI/CD pipeline capable of supporting multi-cloud production environments — based on challenges and insights I’ve picked up in real-world projects.</p><h3>Architecture Overview</h3><p>Our goal is to set up a CI/CD pipeline that:</p><ul><li>Builds container images via Jenkins</li><li>Provisions AWS infrastructure via Terraform</li><li>Deploys applications to EKS using Helm</li><li>Uses Git as the source of truth for both app code and infra</li></ul><pre>GitHub --&gt; Jenkins --&gt; Docker Image --&gt; ECR --&gt; Terraform --&gt; EKS --&gt; Helm --&gt; App</pre><p>This approach ensures consistency, version control, and repeatability across environments.</p><h3>1. Provisioning AWS Infrastructure with Terraform</h3><h3>EKS Setup</h3><p>Create a modular eks-cluster module in Terraform that provisions:</p><ul><li>VPC with private and public subnets</li><li>EKS Control Plane</li><li>Worker Node Groups (Self-managed, managed, or Fargate)</li><li>IAM roles for service accounts (IRSA)</li><li>Node autoscalinghc</li></ul><pre>module &quot;eks&quot; {<br>  source          = &quot;terraform-aws-modules/eks/aws&quot;<br>  cluster_name    = var.cluster_name<br>  cluster_version = &quot;1.29&quot;<br>  subnets         = module.vpc.private_subnets<br>  vpc_id          = module.vpc.vpc_id<br>  enable_irsa     = true<br>  node_groups = {<br>    default = {<br>      desired_capacity = 3<br>      max_capacity     = 5<br>      min_capacity     = 1<br>      instance_types   = [&quot;t3.medium&quot;]<br>    }<br>  }<br>}</pre><h3>ECR for Docker Images</h3><p>Define a repository for your application images:</p><pre>resource &quot;aws_ecr_repository&quot; &quot;app_repo&quot; {<br>  name = &quot;my-app-repo&quot;<br>  image_scanning_configuration {<br>    scan_on_push = true<br>  }<br>}</pre><h4>Common Mistakes</h4><ul><li>Not enabling versioning and locking for the Terraform backend (use S3 + DynamoDB).</li><li>Forgetting to open the correct ports (e.g., 443 for Kubernetes API).</li><li>Misconfigured IAM roles for Kubernetes service accounts.</li></ul><blockquote><strong><em>From experience</em></strong><em>: I once spent hours debugging a stuck deployment because the worker nodes lacked the correct permissions via IRSA. Since then, I always double-check trust relationships and eks.amazonaws.com/role-arn annotations.</em></blockquote><h3>2. Jenkins Pipeline for CI/CD</h3><h3>Jenkins Setup</h3><p>Ensure Jenkins agents have access to:</p><ul><li>Docker CLI</li><li>AWS CLI (configured via IAM role or credentials)</li><li>kubectl and helm installed</li></ul><h3>Jenkinsfile</h3><p>Create a Jenkinsfile to define stages:</p><pre>pipeline {<br>  agent any<br>  environment {<br>    ECR_REPO = &#39;123456789012.dkr.ecr.us-east-1.amazonaws.com/my-app-repo&#39;<br>    AWS_DEFAULT_REGION = &#39;us-east-1&#39;<br>  }<br>  stages {<br>    stage(&#39;Checkout&#39;) {<br>      steps {<br>        checkout scm<br>      }<br>    }<br>    stage(&#39;Build Docker Image&#39;) {<br>      steps {<br>        sh &#39;docker build -t my-app .&#39;<br>      }<br>    }<br>    stage(&#39;Push to ECR&#39;) {<br>      steps {<br>        sh &#39;&#39;&#39;<br>          aws ecr get-login-password | docker login --username AWS --password-stdin $ECR_REPO<br>          docker tag my-app:latest $ECR_REPO:latest<br>          docker push $ECR_REPO:latest<br>        &#39;&#39;&#39;<br>      }<br>    }<br>    stage(&#39;Deploy to EKS&#39;) {<br>      steps {<br>        sh &#39;helm upgrade --install my-app ./charts/my-app --namespace default --set image.repository=$ECR_REPO,image.tag=latest&#39;<br>      }<br>    }<br>  }<br>}</pre><h4>Common Pitfalls</h4><ul><li>Jenkins workers running inside Docker may not have access to the host Docker daemon.</li><li>Not handling Helm release failures gracefully — use — atomic and — timeout flags.</li><li>Missing credentials or insufficient IAM permissions for ECR and EKS actions.</li></ul><blockquote><strong><em>Lesson learned</em></strong><em>: At one point, I was debugging why Jenkins builds were passing but pods weren’t updating in the cluster. Turned out, the Helm release wasn’t actually upgrading due to a dry-run failure I didn’t notice. Since then, I log Helm output explicitly and added — atomic to ensure proper rollback behavior.</em></blockquote><h3>3. Helm Charts for Kubernetes Deployment</h3><p>Structure your Helm chart like:</p><pre>charts/<br>  my-app/<br>    Chart.yaml<br>    values.yaml<br>    templates/<br>      deployment.yaml<br>      service.yaml<br>      hpa.yaml</pre><h3>Example values.yaml</h3><pre>image:<br>  repository: 123456789012.dkr.ecr.us-east-1.amazonaws.com/my-app-repo<br>  tag: latest<br>replicaCount: 2<br>resources:<br>  requests:<br>    memory: &quot;256Mi&quot;<br>    cpu: &quot;250m&quot;<br>  limits:<br>    memory: &quot;512Mi&quot;<br>    cpu: &quot;500m&quot;</pre><h3>Best Practices</h3><ul><li>Use Helm value overrides per environment (dev, staging, prod).</li><li>Add liveness and readiness probes.</li><li>Use helm test to validate deployments.</li><li>Always pin image tags or use digest hashes to avoid caching issues.</li></ul><blockquote><em>In one case, a teammate used the latest tag during a demo, which led to inconsistent behavior across environments. Since then, I’ve enforced SHA digests in values.yaml to guarantee image immutability.</em></blockquote><h3>4. Security and Best Practices</h3><h3>IAM and RBAC</h3><ul><li>Use <strong>IRSA (IAM Roles for Service Accounts)</strong> instead of access keys.</li><li>Implement Kubernetes <strong>RBAC</strong> to restrict access by user/group/namespace.</li></ul><h3>Secrets Management</h3><ul><li>Use <strong>AWS Secrets Manager</strong> or <strong>External Secrets Operator</strong>.</li><li>Avoid storing secrets in plain text in Helm charts or Terraform variables.</li></ul><h3>Monitoring and Logging</h3><ul><li>Deploy <strong>Prometheus</strong> and <strong>Grafana</strong> using Helm.</li><li>Use <strong>CloudWatch Logs</strong> and <strong>FluentBit</strong> for centralized logging.</li></ul><h3>CI/CD Hardening</h3><ul><li>Use webhooks with authentication for Git triggers.</li><li>Secure Jenkins with role-based access and audit trails.</li><li>Enforce branch protection and PR approval rules.</li></ul><blockquote><em>Based on experience: misconfigured Secrets can be catastrophic. I once saw a pod log a full DB connection string, including password, to CloudWatch. Lesson: always sanitize logs and externalize secrets.</em></blockquote><h3>5. Observability and Rollbacks</h3><ul><li>Enable Helm’s — history-max flag to retain release versions.</li><li>Use helm rollback to revert faulty releases.</li><li>Automate rollback logic in Jenkins for failed health checks.</li><li>Set up alerts in Grafana based on Prometheus metrics (e.g., pod crash loops).</li></ul><blockquote><em>After a bad Helm upgrade led to downtime, I wrote a post-deploy check script in Jenkins to verify pod health. If the app fails readiness probes within 5 minutes, it triggers an auto rollback.</em></blockquote><h3>Conclusion</h3><p>Integrating Helm, Jenkins, AWS, and Terraform enables a highly flexible, infrastructure-as-code-driven deployment pipeline. By combining declarative infrastructure with automated CI/CD workflows, you gain the ability to scale applications securely and efficiently.</p><p>This article is based on real deployments I’ve managed — some smooth, some with painful lessons — but all valuable. Hopefully this guide helps you build cleaner, safer pipelines.</p><blockquote><em>Want to take it further? Add ArgoCD or FluxCD for GitOps and progressive delivery, or replace Jenkins with GitHub Actions or Tekton for a cloud-native pipeline.</em></blockquote><p><em>Follow me on Medium for more DevOps engineering deep dives and Kubernetes guides.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=391bffd321ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Install SonarQube using Docker-Compose on Ubuntu Linux| Perform code analysis using…]]></title>
            <link>https://medium.com/@chiemelaumeh1/how-to-install-sonarqube-using-docker-compose-on-ubuntu-linux-perform-code-analysis-using-15ea990e60f3?source=rss-376b2485c51a------2</link>
            <guid isPermaLink="false">https://medium.com/p/15ea990e60f3</guid>
            <dc:creator><![CDATA[Chiemela Umeh]]></dc:creator>
            <pubDate>Fri, 25 Oct 2024 08:16:55 GMT</pubDate>
            <atom:updated>2024-10-25T08:16:55.256Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Install SonarQube using Docker-Compose on Ubuntu Linux| Perform code analysis using SonarQube (integration with Jenkins)</h3><h4>Part 5. DevOps Zero To Hero.</h4><h4>Introduction</h4><p>In this guide, we will perform code analysis on a <a href="https://github.com/chiemelaumeh/pipeline-job_postboard-client">Node.js</a> project using SonarQube. SonarQube is a static code analysis tool that analyzes source code, and provides code quality reports of your project. It is open source Java based tool. We will setup SonarQube using docker compose which allows us to run multiple containers simultaneously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*13uWlhsMOrAXeD-MRsGn0w.png" /></figure><p><strong>What is Docker Compose?</strong></p><p>Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration. Since Docker Compose lets you configure related containers in a single YAML file, you get the same Infrastructure-as-Code abilities as Kubernetes. However, they come in a simpler system that is more suited to smaller applications, and do not require Kubernetes’ resiliency and scaling.</p><p>The purpose of docker-compose is to function as docker cli but to issue multiple commands much more quickly. To make use of docker-compose, you need to encode the commands you were running before into a docker-compose.yml file</p><p>Run <strong>docker</strong>-<strong>compose</strong> up and <strong>Compose</strong> starts and runs your entire app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*nb41Kfw3iwQwdW4FaatVrw.png" /></figure><p>SonarQube has three components namely</p><p>1. Scanner — This contains scanner and analyzer to scan application code.</p><p>2. SonarQube server — contains Web server(UI) and search server</p><p>3. DB server — used for storing the analysis reports.</p><p>Now that we understand SonarQube and Docker compose, lets get started.</p><p><strong>Prerequisites</strong></p><ul><li><em>Create Ubuntu EC2 up and running with </em><strong><em>at least t2.medium (4 GB RAM) -</em></strong><a href="https://medium.com/@chiemelaumeh1/how-to-set-up-aws-ec2-server-for-jenkins-ci-cd-pipeline-8e6ee073d2d3"><em>here</em></a></li><li><em>Port 9000 is opened in security firewall rule on the above instance — </em><a href="https://medium.com/@chiemelaumeh1/how-to-open-ports-inaws-ec2-server-68e576c641d6"><em>here</em></a></li><li><em>SSH Client (</em><a href="https://www.iterm2.com/downloads.html."><em>iterm</em></a><em>, terminal, </em><a href="http://www.git-scm.com/download"><em>git client)</em></a></li></ul><h3>Task A — Install SonarQube using Docker-Compose on Ubuntu Linux</h3><ol><li><strong>SSH into your EC2 instance and run the command below</strong></li></ol><pre>sudo vi /etc/sysctl.conf</pre><p><strong>2. Add the following lines to the bottom of that file</strong></p><pre>vm.max_map_count=262144<br>fs.file-max=65536</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MLHz74OlW67BTuG3SfjZrQ.png" /></figure><p>To make sure changes are getting into effect run this command</p><pre>sudo sysctl -p</pre><p>3. <strong>Change Host Name to SonarQube</strong></p><pre>sudo hostnamectl set-hostname SonarQube</pre><p>4.<strong> Perform System update</strong></p><pre>sudo apt update</pre><p>5.<strong> Install Docker-Compose</strong></p><pre>sudo apt install docker-compose-v2 -y</pre><p>6.<strong> Add current user to Docker group</strong></p><pre>sudo usermod -aG docker $USER</pre><p><strong>7. Create docker-compose.yml</strong></p><pre>sudo vi docker-compose.yml</pre><p>This yml will have all the configuration for installing Nexus on Ubuntu EC2.</p><p><strong>8. Paste this configuration in the yml file</strong></p><pre>version: &quot;3&quot;<br>services:<br>  sonarqube:<br>    image: sonarqube:community<br>    restart: unless-stopped<br>    depends_on:<br>      - db<br>    environment:<br>      SONAR_JDBC_URL: jdbc:postgresql://db:5432/sonar<br>      SONAR_JDBC_USERNAME: sonar<br>      SONAR_JDBC_PASSWORD: sonar<br>    volumes:<br>      - sonarqube_data:/opt/sonarqube/data<br>      - sonarqube_extensions:/opt/sonarqube/extensions<br>      - sonarqube_logs:/opt/sonarqube/logs<br>    ports:<br>      - &quot;9000:9000&quot;<br>  db:<br>    image: postgres:12<br>    restart: unless-stopped<br>    environment:<br>      POSTGRES_USER: sonar<br>      POSTGRES_PASSWORD: sonar<br>    volumes:<br>      - postgresql:/var/lib/postgresql<br>      - postgresql_data:/var/lib/postgresql/data<br>volumes:<br>  sonarqube_data:<br>  sonarqube_extensions:<br>  sonarqube_logs:<br>  postgresql:<br>  postgresql_data:</pre><p>Save the file by entering :wq!</p><p><strong>9. Execute the compose file using Docker compose command to start SonarQube Containers</strong></p><pre>sudo docker compose up -d</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*wyOEjs6k7EL9Z3caigup8g.png" /></figure><p><strong>10. Make sure SonarQube is up and running by checking the logs</strong></p><pre>sudo docker compose logs --follow</pre><p>Once you see the message, that’s it. SonarQube is been installed successfully. press control C and enter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*vWEbbOakaxOOu69xFd1UBg.png" /></figure><p><strong>11. Login to SonarQube</strong></p><p>Now access SonarQube UI by going to browser and enter public dns name with port 9000</p><p>Now to go to browser →</p><p><a href="http://change/"><em>http://change</em></a><em> to_sonarqube_publicdns_name:9000 </em><strong>OR </strong><a href="http://change/"><em>http://</em></a>public_IP<em>:9000</em></p><p>Your default username will be “admin”</p><p>Your default password will be “admin”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GeUHkUetZvPldwoYbEyLGg.png" /></figure><p>You will be prompted to choose a new password</p><h3>Task B — Integrate SonarQube with Jenkins 2. Install SonarQube plugin</h3><p>In Jenkins, go to Manage Jenkins -&gt; Plugins and search for “SonarQube Scanner”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fB9JpQ1lNgNBEVl7UigwKg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9VMFpN2gLBClJsc-Qmtgmg.png" /></figure><p><strong>1. Integrate SonarQube and Jenkins</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OOxhTsFqBJOzoxEO3uIjCA.png" /></figure><p>In Jenkins, go to Manage Jenkins → System</p><p>Scroll down to SonarQube Servers</p><p>Fill in <strong>name</strong> as “SonarQube”</p><p>Fill in <strong>server URL</strong> as *<em>your-server -public -IP-address:9000</em>*</p><p>Click in “Add” to attach SonarQube credentials</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ioEYT7Iho52l6WhR4BY7LQ.png" /></figure><p><strong>2. Add SonarQube Token using the credentials from step 1</strong></p><p>Select “Secret text” as kind</p><p>Paste the copied credentials in into the secret</p><p>Add a description, click on Save and apply</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iVfb8l8bYe4tBgdymUe5iQ.png" /></figure><p><strong>We only added a credential to Jenkins, now you must have Select this credential using the description you provided</strong></p><p>Now we have given Jenkins the authorization to use SonarQube to perform analysis on our code, the only task left if to configure sonarqube on our node.js project.</p><h3>Task C — Configure Node.js project for SonarQube</h3><ol><li><strong>Sonar-project.properties file</strong></li></ol><p>In the root of your project folder, create a file called “sonar-project.properties”, paste the lines below in the file and edit the corresponding fields to match your own project.</p><p>For example <em>sonar.projectKey, sonar.projectName, sonar.host.url</em></p><pre>sonar.projectKey=pipeline-job_postboard-CLIENT<br>sonar.projectName=pipeline-job_postboard-CLIENT<br>sonar.projectVersion=1.0<br>sonar.sources=.<br>sonar.sourceEncoding=UTF-8<br>sonar.host.url=http://3.139.68.104:9000/<br>sonar.exclusions=**/node_modules/**,/coverage/lcov-report/*,test/*.js<br>sonar.javascript.lcov.reportPaths=coverage/lcov.info</pre><p><strong>2. In the jenkins file, add the following lines in the pipleline</strong></p><pre>stage (&quot;Code Quality&quot;) {<br>            steps {<br>                withSonarQubeEnv(&quot;SonarQube&quot;) {<br>                    sh &quot;npm install sonar-scanner&quot;<br>                    sh &quot;npm run sonar&quot;<br>                }<br>            }<br>        }</pre><p>This step informs jenkins to use the SonarQube environment we configured in Task B, step 1, installs sonar-scanner from npm, then runs the scanner</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kySlAcI-nNMrln4WDbbCHA.png" /></figure><p><strong>3. Push Changes to GitHub</strong></p><p>Since Jenkis will build our pipeline from our GitHub repo, these changes have to reflect there.</p><p><strong>4. Run Jenkins build</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fk_UqT4q7XsNhor0ciFD8g.png" /></figure><p><strong>5. Visit the SonarQube UI</strong></p><p>Now you will see a detailed report and analysis of your code including bugs, code smells, coverage, duplications, vulnerabilities etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QjOuxHNCfKb0fF2ApCp6_g.png" /></figure><p>That’s it! This was an extensive but important guide, I hope you learned something from it. In the next guide, we will automatically trigger Jenkins builds on every code push to Github, and also set up slack notifications for Jenkins</p><p>If you found this post helpful, please like, share, and follow me.</p><p>Thank you for reading and for your support!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15ea990e60f3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cloud System Design on AWS: The Decision Tree I Use for ECS, EKS, EC2, Lambda, and S3]]></title>
            <link>https://medium.com/@chiemelaumeh1/install-sonatype-nexus-3-using-docker-compose-setup-nexus-repository-manager-for-node-js-project-47a3c5efe1ee?source=rss-376b2485c51a------2</link>
            <guid isPermaLink="false">https://medium.com/p/47a3c5efe1ee</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[nexus]]></category>
            <category><![CDATA[ec2]]></category>
            <dc:creator><![CDATA[Chiemela Umeh]]></dc:creator>
            <pubDate>Thu, 02 Nov 2023 02:54:41 GMT</pubDate>
            <atom:updated>2026-10-19T15:52:32.741Z</atom:updated>
            <content:encoded><![CDATA[<h3>A practical framework for picking the right AWS compute, storage, and edge services for a given workload, with worked examples and the anti-patterns I keep seeing.</h3><p>Every AWS architecture decision I regret has the same shape. Someone picked a service because it was familiar, not because it fit the workload. Six months later the bill is wrong, the operational burden is wrong, or the scaling model is wrong, and the only fix is a rewrite.</p><p>What follows is the decision framework I actually use when a team hands me a new workload. It is not a reference architecture. It is the sequence of questions I ask, in the order I ask them, and the AWS primitives I reach for based on the answers.</p><h3>Why this matters more than people think</h3><p>Bad compute choices compound. Pick EC2 for a workload that should have been Lambda and you inherit patching, autoscaling, and OS lifecycle for the life of the service. Pick Lambda for a workload that should have been ECS and you pay cold-start tax on every long-running request and run into memory ceilings mid-production.</p><p>The second-order cost is worse than the first-order cost. A wrong compute choice usually drags the storage and networking choices with it, and the whole thing becomes expensive and brittle at the same time. Fixing it in production is a quarter of engineering time you did not budget for.</p><p>That is why the decision tree matters. Spending 20 minutes on these questions at the start saves months later.</p><h3>The four questions I ask before anything else</h3><p>Before I pick a single AWS service, I pin down four things about the workload. If the team cannot answer these, we are not ready to pick a service yet.</p><ol><li><strong>Request shape.</strong> Is this a long-running web service, a batch job, an event-driven function, or a stream processor? Each has a different natural home.</li><li><strong>Latency and runtime budget.</strong> Does a single request need to finish in milliseconds, seconds, or minutes? Can it tolerate cold-start latency? Is there a hard p99 target?</li><li><strong>State and data gravity.</strong> Is the service stateless, does it need session affinity, or does it operate on data that lives in a specific store? Data gravity usually dictates compute placement.</li><li><strong>Scale pattern.</strong> Steady traffic, bursty, cyclic (daily/weekly), or event-driven spikes? The scaling pattern narrows the compute choice more than most people realize.</li></ol><p>Only after I have those four answers do I open the AWS service list.</p><h3>Compute: the decision tree</h3><p>I treat AWS compute as a short list, not a long one. The honest options are: Lambda, Fargate (via ECS or EKS), ECS on EC2, EKS, and raw EC2. Everything else is either a specialization of one of those (Batch, SageMaker, Elastic Beanstalk) or a managed service that happens to run compute underneath (RDS, OpenSearch).</p><p>The decision tree I follow:</p><h3>Start with Lambda. Rule it out.</h3><p>If the workload is event-driven, finishes in under 15 minutes per invocation, has no hard sub-100ms p99 requirement that cold start would blow, and does not need persistent connections, <strong>Lambda is the default</strong>. Nothing else gives you zero infrastructure to manage, pay-per-invocation economics, and native integration with every AWS event source.</p><p>Lambda is wrong when:</p><ul><li>You need to hold a WebSocket, SSE, or long-lived HTTP connection open</li><li>You need more than 15 minutes of execution time</li><li>You need more than 10 GB of memory or sustained GPU</li><li>Your traffic is high and steady enough that Lambda’s per-request price exceeds a reserved compute equivalent (usually above ~100 req/s continuous)</li><li>Your cold start matters and the workload has large dependencies you cannot package efficiently</li></ul><p>If any of those apply, move to the next step.</p><h3>If Lambda is out, consider Fargate on ECS.</h3><p>Fargate on ECS is my next default for anything that looks like a service: long-running, listens on a port, scales up and down with load. You get:</p><ul><li>No node management (no OS, no patching, no autoscaling group)</li><li>Per-task billing (billed by the second)</li><li>Clean integration with ALB, Service Connect, Secrets Manager, IAM</li><li>ECS’s task definition model is simpler than Kubernetes manifests for most teams</li></ul><p>Fargate on ECS is a sweet spot for most microservices that would be overkill on Kubernetes. The surface area is small enough that a team of two can own it, and the operational model is “redeploy the task definition.”</p><p>Reasons to pass on Fargate ECS:</p><ul><li>You already have Kubernetes expertise and a shared cluster, in which case EKS on Fargate (or on EC2 nodes) is the natural home</li><li>You need DaemonSet-style per-node agents (Datadog Agent, Fluent Bit) that are easier to run on EKS</li><li>You need Istio or Linkerd service mesh features that ECS Service Connect does not yet cover</li><li>Your workload is cost-sensitive at high scale, where EC2-backed ECS or EKS gives you Reserved Instances, Savings Plans, and Spot that Fargate cannot match</li></ul><h3>Reach for EKS when the shared platform is the point.</h3><p>EKS is the right answer when the <em>platform</em> is the deliverable, not the individual service. The signal is: you have more than two or three teams shipping into the same environment, and they need shared primitives (service mesh, GitOps, policy-as-code, standardized observability).</p><p>EKS is wrong when:</p><ul><li>You have one team and five services. The platform cost per service is too high.</li><li>You do not have anyone who wants to own Kubernetes operationally. The abstractions are powerful but not free.</li><li>Your workload fits Lambda or Fargate ECS cleanly and you are reaching for Kubernetes because of resume-driven architecture</li></ul><h3>Keep ECS on EC2 or raw EC2 as targeted tools, not defaults.</h3><p>ECS on EC2 is the right call when you need per-container billing precision at scale, Spot adoption with your own Capacity Providers, or workloads that need GPU, enhanced networking, or placement groups that Fargate does not expose.</p><p>Raw EC2 is the right call for exactly three things in a modern stack:</p><ul><li>Workloads that need bare-metal access (NIC tuning, DPDK, SR-IOV)</li><li>Licensed software that is billed per host and will not run in containers</li><li>Legacy applications you are migrating in-place before refactoring</li></ul><p>If someone proposes raw EC2 for a greenfield workload and none of the three apply, push back.</p><h3>Storage: the decision tree</h3><p>Storage is simpler than compute, and most of the mistakes are also simpler.</p><p>Workload shapeDefaultWhen to pick something elseObject storage, API-accessed, large-ish objects<strong>S3 Standard</strong>Infrequent access → S3 Standard-IA; archival with 12+ hour retrieval → S3 Glacier Deep ArchiveBlock storage attached to a single EC2<strong>EBS gp3</strong> (not gp2 anymore)High-IOPS databases → io2 Block Express; throughput-bound analytics → st1 for sequential HDDShared POSIX filesystem across many instances<strong>EFS</strong> for most casesHPC or ML training → FSx for Lustre; Windows SMB → FSx for WindowsTransactional database<strong>RDS Aurora PostgreSQL or MySQL</strong>Serverless scale-to-zero → Aurora Serverless v2; multi-region active-active → DynamoDB Global TablesKey-value or wide-column at scale<strong>DynamoDB</strong>Analytical scans → S3 + Athena; graph → NeptuneFull-text search<strong>OpenSearch Service</strong>Lightweight embedded search → S3 + Lambda + in-memory indexCaching layer<strong>ElastiCache Redis</strong>Session storage with TTL only → DynamoDB TTL; sidecar cache per pod → in-process (Caffeine, Ristretto)</p><p>Two storage rules I never break.</p><p><strong>EBS gp3 by default, not gp2.</strong> gp3 is cheaper and gives you independent IOPS and throughput provisioning. There is almost no case in 2026 where gp2 is the right answer.</p><p><strong>S3 lifecycle policies on day one.</strong> Every S3 bucket gets a lifecycle policy configured in Terraform at creation time. Standard for 30 days, Standard-IA for 60, Glacier Instant Retrieval for 90, Deep Archive for the long tail. Not setting lifecycle is how companies end up with a six-figure S3 bill from log files no one reads.</p><h3>Edge and routing: the decision tree</h3><p>This is where the most expensive mistakes compound, because the edge choice touches every service downstream.</p><h3>API Gateway</h3><p>Pick API Gateway when:</p><ul><li>Your backend is Lambda-first and you want tight IAM integration</li><li>You need built-in request validation, throttling, and usage plans without writing them yourself</li><li>You are building a public API where API keys and quotas matter</li><li>You want native OIDC/Cognito authorizers without running your own auth layer</li></ul><p>Skip API Gateway when:</p><ul><li>Your backend is container-based and your traffic is high and steady (ALB is cheaper per request)</li><li>You need gRPC, WebSockets at high scale, or binary protocols (ALB handles these better)</li><li>You need custom routing logic beyond path-based (write a service, do not fight the gateway)</li></ul><h3>Application Load Balancer</h3><p>ALB is the default for anything HTTP/HTTPS that routes to containers or EC2. Signals I look for:</p><ul><li>Backend is ECS, EKS, or EC2 target groups</li><li>You need path-based or host-based routing with up to a few dozen rules</li><li>You want WAF integration without extra plumbing</li><li>You need HTTP/2 and gRPC (ALB does both well)</li></ul><p>ALB is wrong when:</p><ul><li>You need raw TCP/UDP or extreme throughput (use NLB)</li><li>You need global anycast IPs (use Global Accelerator in front)</li><li>Your routing rules exceed what ALB supports natively — do not stack 200 rules, write a routing service</li></ul><h3>Network Load Balancer</h3><p>NLB is the right pick for TCP, UDP, or TLS-passthrough workloads: database proxies, VPN endpoints, custom protocols, or anything where you need source IP preservation and sub-millisecond processing.</p><p>NLB is also the right pick when you need PrivateLink in front of a service you own, since PrivateLink requires NLB on the service side.</p><h3>CloudFront</h3><p>CloudFront belongs in front of two things: static assets served from S3, and public APIs or websites that benefit from edge caching, TLS termination close to the user, and AWS Shield Standard protection.</p><p>I always put CloudFront in front of a public ALB or API Gateway when the service has a user-facing component. The latency wins alone justify it.</p><h3>Three worked examples</h3><h3>Example 1: Public SaaS web application</h3><p>Request shape: long-running HTTP. Latency budget: p99 under 300ms. State: Postgres-backed with Redis session cache. Scale: steady traffic with daily peaks.</p><p>My pick:</p><ul><li>Compute: ECS Fargate (or EKS if we already have a cluster) with Argo Rollouts for canary</li><li>Edge: CloudFront → ALB → ECS target group</li><li>Data: Aurora PostgreSQL (Serverless v2 for lower-traffic environments, provisioned for prod), ElastiCache Redis for sessions</li><li>Object storage: S3 for user uploads, CloudFront in front with signed URLs</li></ul><h3>Example 2: Image processing pipeline</h3><p>Request shape: event-driven, fires on S3 upload. Latency budget: minutes acceptable. State: stateless function + S3 I/O. Scale: bursty, 10x spikes during marketing campaigns.</p><p>My pick:</p><ul><li>Compute: Lambda (sized to the heaviest image), triggered by S3 event notifications via EventBridge</li><li>Edge: none (internal pipeline)</li><li>Data: input bucket → Lambda → output bucket, with DynamoDB for job state</li><li>Fallback for jobs that exceed 15 min: Step Functions orchestrating ECS Fargate tasks for the long tail</li></ul><h3>Example 3: Clinical AI model inference service</h3><p>Request shape: HTTP, sometimes long-running (5–30s inference time). Latency budget: p99 under 30s, cold start under 10s acceptable. State: stateless, pulls model weights from S3 at boot. Scale: steady with scheduled training runs.</p><p>My pick:</p><ul><li>Compute: EKS with Karpenter, GPU node pool for inference, CPU for API orchestration</li><li>Edge: ALB → EKS, no API Gateway (gRPC between internal services)</li><li>Data: S3 for model weights (versioned prefix), DynamoDB for inference job metadata, OpenSearch for audit logs</li><li>Observability: Datadog APM with custom instrumentation around the inference call</li></ul><h3>The anti-patterns I keep seeing</h3><p>Three mistakes that come up in every architecture review:</p><p><strong>Lambda for a background worker that should have been SQS plus ECS.</strong> If you have more than 100 messages per second going through Lambda, you are usually paying 3–5x what the same workload would cost on ECS Fargate consuming from SQS. Lambda is for bursty, not sustained.</p><p><strong>EKS for one team and five services.</strong> You are paying the operational cost of a cluster to run workloads that would fit comfortably on ECS Fargate. The cluster is not the product.</p><p><strong>API Gateway in front of ALB in front of ECS.</strong> Pick one. Both is almost always a sign that someone did not want to delete the API Gateway when they moved to containers. You are paying twice and adding a hop.</p><h3>The checklist I actually use</h3><p>Before I sign off on an AWS architecture, I run through these questions one more time:</p><ul><li>Have I picked compute based on the four questions, or because of familiarity?</li><li>Does the storage choice fit the access pattern, or is it the default I always reach for?</li><li>Is there a lifecycle policy on every S3 bucket?</li><li>Is there an SLO defined for this workload, with a dashboard that measures it?</li><li>Can this workload be deployed and rolled back without a human in the loop?</li><li>Will this cost model still make sense at 10x the current traffic?</li><li>Is there a plan for how this gets decommissioned?</li></ul><p>The last two matter the most. Cost model at 10x tells you if you picked the right compute tier. A decommission plan tells you if you believed your own architecture.</p><h3>The takeaway</h3><p>Picking AWS services is not a trivia test. It is a design discipline. The right answer is almost always a short list of boring choices: Lambda or Fargate for compute, S3 and Aurora for state, ALB or CloudFront at the edge. Reach for the exotic services only when the common ones genuinely do not fit.</p><p>The decision tree above is not the only one that works. But if you have a repeatable framework, review it with the team at the start, and come back to the checklist before you sign off, you will skip 80% of the architecture mistakes that eat quarters of engineering time to unwind.</p><p>Boring is a feature.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47a3c5efe1ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy A nodejs App on AWS EC2 instance — Step by Step]]></title>
            <link>https://medium.com/@chiemelaumeh1/deploy-a-nodejs-app-on-aws-ec2-instance-step-by-step-ac4c27d2f52a?source=rss-376b2485c51a------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac4c27d2f52a</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[ec2]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Chiemela Umeh]]></dc:creator>
            <pubDate>Tue, 24 Oct 2023 01:55:25 GMT</pubDate>
            <atom:updated>2023-10-24T02:27:28.724Z</atom:updated>
            <content:encoded><![CDATA[<h3>Deploy A nodejs App on AWS EC2 instance — Step by Step</h3><h4>Part 3. DevOps Zero To Hero.</h4><h4>Introduction</h4><p>Hello friends 👋🏾</p><p>Welcome to part three of DevOps Zero to Hero. We will leverage the power of EC2 to deploy a simple application and make it available to the public web. First, we must install node on our linux machine and open port 3000 on EC2. After this, we will generate and upload ssh keys to Github, this will allow us clone the repository. Finally, we will run the application and see it in action. Here’s an introduction to the technologies we will be using today.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tkv94QDoWUZbKJYVU4fbZA.png" /></figure><h3>Node.js</h3><p>It is a JavaScript runtime environment, written in C++. It allows users to run JavaScript on the server and to create server side applications with JavaScript.</p><h3>AWS (Amazon Web Services)</h3><p>AWS is a cloud computing platform which provided by Amazon.</p><h3>AWS EC2(Elastic Compute Cloud)</h3><p>EC2 is simply a virtual server that represents a physical server for you to deploy your applications. It offers businesses the ability to run applications on the public cloud.</p><p><strong>!important! To see the demo, you must open Port 3000, learn how to </strong><a href="https://medium.com/@chiemelaumeh1/how-to-open-ports-inaws-ec2-server-68e576c641d6"><strong>here</strong></a></p><p>To be better prepared, complete the prerequisites. I have provided step by step guides on my <a href="https://medium.com/@chiemelaumeh1">medium profile</a>.</p><p><strong>Prerequisites</strong></p><ul><li>Create a EC2 instance. Feel free took at my previous articles on how to do so <a href="https://medium.com/@chiemelaumeh1/how-to-set-up-aws-ec2-server-for-jenkins-ci-cd-pipeline-8e6ee073d2d3">here</a>.</li><li>Connect to EC2 instance. Learn how to do so <a href="https://medium.com/@chiemelaumeh1/how-to-connect-to-ec2-instance-and-setup-jenkins-on-linux-server-a79a5896c8cc">here</a></li><li>SSH Client (<a href="https://www.iterm2.com/downloads.html.">iterm</a>, terminal, <a href="http://www.git-scm.com/download">git client)</a></li><li><a href="https://git-scm.com/download">Git installed</a></li><li><a href="https://github.com/">Github account</a></li></ul><p>Now we will start performing deployment steps one by one :</p><p><strong>1.Install Node on ubuntu linux</strong></p><p>Install node for ubuntu linux by typing the following in the command line</p><pre>sudo apt-get update<br>sudo apt-get install -y ca-certificates curl gnupg<br>sudo mkdir -p /etc/apt/keyrings<br>curl -fsSL <a href="https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key">https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key</a> | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg<br>NODE_MAJOR=16<br>echo &quot;deb [signed-by=/etc/apt/keyrings/nodesource.gpg] <a href="https://deb.nodesource.com/node_$NODE_MAJOR.x">https://deb.nodesource.com/node_$NODE_MAJOR.x</a> nodistro main&quot; | sudo tee /etc/apt/sources.list.d/nodesource.list<br>sudo apt-get update<br>sudo apt-get install nodejs -y</pre><p>run “node -v”, you will see a node version indicating you have node installed.</p><pre>node -v</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*83edXdL19UwAZa0xauAwYQ.png" /></figure><p><strong>2. Generate SSH keys</strong></p><p>We have to make a secure SSH connection between our server and our SCM tool (Github). Type this command below (and then click on enter four button times, do not give any password). This will generate you ssh key</p><pre>ssh-keygen -t rsa -m PEM</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KH2DeVAC06gAM8D4edpyog.png" /></figure><p>Run this command to view your public ssh key, copy the entire key</p><pre>sudo cat ~/.ssh/id_rsa.pub</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N6YKN7f2bJCUEJUB1IKMjw.png" /></figure><p><strong>3. Upload SSH keys</strong></p><p>Go to Github , click settings -&gt; SSH and GPG keys -&gt; New SSH key. Paste your SSH key here and save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*35yvlUtRtrRgMHBkiNsaDA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B9nQYroPM-rmidZtluGqYQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FqsHfJTS01o5o5pLvZPZmg.png" /></figure><p>5. <strong>Fork the repository</strong></p><p>Go to the application Github repo and create a fork <a href="https://github.com/chiemelaumeh/pipeline-job_postboard-client">https://github.com/chiemelaumeh/pipeline-job_postboard-client</a></p><p>A will fork create your own independent copy of this repository in Github</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WAwTlPHZ6Uy8mhrzGRRsKg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7whdkW2dZFDaATNOgDyG0Q.png" /></figure><p>6. Now Go to your new repo, click code, then copy the SSH URL</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O3G_g9qp_p09NP7vjreXUw.png" /></figure><p><strong>6. Clone Repository</strong></p><p>Go back to your the command line and type “git clone<strong> your_SSH_URL</strong>”</p><pre>git clone &lt;paste-your ssh url here&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NQWcNBQhFWm3eywmX5PbyA.png" /></figure><p>Type yes to connect, this will make a clone of the repository on your local machine.</p><p><em>A clone is dependent on the remote repository on Github and you may push and pull changes from it.</em></p><p><strong>7. Install Application dependencies</strong></p><p>The clone command creates a new directory called <strong>pipeline-job_postboard-client,</strong> this is where the web application lives, cd into this newly cloned directory.</p><pre>cd pipeline-job_postboard-client/</pre><p>Use the command below to install the necessary dependencies required for the application to run.</p><pre>npm install</pre><p><strong>8. Run application</strong></p><p>After the installation, enter the command below to run the application on port 3000.</p><pre>npm start</pre><p><strong>9. Access the application in browser</strong></p><p>Now go to the public DNS of your EC2 and <strong>attach port 3000</strong> at the end, of the URL. The application will be live.</p><p><strong>!important! For application to run you must open Port 3000, learn how to </strong><a href="https://medium.com/@chiemelaumeh1/how-to-open-ports-inaws-ec2-server-68e576c641d6"><strong>here</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bv-B4uLryAU2KrmS8Daafw.png" /></figure><pre>http://ec2-18-222-205-94.us-east-2.compute.amazonaws.com:8080/</pre><p>Example:<em> https://ec2–18–222–205–94.us-east-2.compute.amazonaws.com:</em><strong><em>3000</em></strong></p><p>You can also use the public DNS of the machine to get the access</p><p>Example: <em>18.222.205.94:3000</em></p><p>You will see the Application on your browser</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LxOzJPFm-uhX2EwNB5x1eA.png" /></figure><p>Congratulation, you deployed this application on the AWS cloud!</p><p>If you found this post helpful, please like, share, and follow me.</p><p>Thank you for reading and for your support!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac4c27d2f52a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Shipping a Production Platform on AWS, Terraform, and Kubernetes: The Pattern I Reach For]]></title>
            <link>https://medium.com/@chiemelaumeh1/how-to-open-ports-inaws-ec2-server-68e576c641d6?source=rss-376b2485c51a------2</link>
            <guid isPermaLink="false">https://medium.com/p/68e576c641d6</guid>
            <category><![CDATA[ec2]]></category>
            <category><![CDATA[cicd]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Chiemela Umeh]]></dc:creator>
            <pubDate>Mon, 23 Oct 2023 23:58:48 GMT</pubDate>
            <atom:updated>2026-10-19T15:45:22.107Z</atom:updated>
            <content:encoded><![CDATA[<h3>How I wire AWS accounts, VPCs, EKS, GitHub Actions, and ArgoCD together so product teams can ship 50+ safe production deploys per day, from day zero to day two.</h3><p>When a company asks me to stand up or inherit a platform, they usually have the same question. “Can you make it so our engineers can ship without us?” The honest answer is yes, but only if you lay the foundation in a specific order. This is the pattern I reach for every time, from a greenfield AWS account to product teams running their own canary rollouts in production.</p><p>I will walk through it in the sequence I actually build it, not the sequence a reference architecture would suggest. The order matters. If you build the GitOps layer before the account structure is right, you end up ripping it out six months later. Same with observability, same with CI/CD.</p><h3>The problem this pattern solves</h3><p>Most platform engineering problems look like one of these three shapes:</p><ol><li><strong>“Our deploys take all day.”</strong> A deploy involves half a dozen manual steps, three people on a Slack huddle, and a rollback plan that nobody has actually tested. Deploy frequency is low, change failure rate is high.</li><li><strong>“Our environments drift.”</strong> Dev looks like dev did six months ago. Staging looks like a frozen snapshot from last quarter. Prod looks like whatever the last on-call engineer typed into the console. Nothing is reproducible.</li><li><strong>“We cannot ship compliance evidence.”</strong> SOC 2, HIPAA, FedRAMP, or whichever audit shows up next quarter. Someone has to screenshot IAM policies and secret rotation records out of the console, by hand, for every control.</li></ol><p>The pattern below fixes all three at once. Not because it is clever, but because it refuses to let any of those problems exist in the first place.</p><h3>Day 0: Account structure and state</h3><p>Everything starts with a Terraform-managed multi-account AWS Organization. Not a single account with VPC tags, not a two-account dev/prod split. A real Organization with Control Tower guardrails and at least these accounts:</p><ul><li>management: the Org root, billing, Control Tower, SSO</li><li>audit: CloudTrail aggregation, Config conformance packs, Security Hub</li><li>log-archive: write-only S3 for CloudTrail and VPC Flow Logs</li><li>network: Transit Gateway, Route 53 private hosted zones, shared VPC endpoints</li><li>shared-services: ECR, Terraform state, Jenkins or GitHub Actions self-hosted runners</li><li>workload-dev, workload-impl, workload-prod: the actual EKS clusters</li></ul><p>Six to nine accounts out the gate. More if you have strict workload isolation needs. The goal is that a mistake in one workload cannot reach another, period.</p><p>The Terraform state backend lives in shared-services. One S3 bucket per environment, versioning on, encryption with a KMS key you own, and a DynamoDB table for state locking. Backend config in HCL files per environment, not Terraform workspaces. I have never seen workspaces survive contact with a real audit.</p><pre># backend/prod.hcl<br>bucket         = &quot;mycorp-tfstate-prod&quot;<br>key            = &quot;eks/terraform.tfstate&quot;<br>region         = &quot;us-east-1&quot;<br>dynamodb_table = &quot;mycorp-tflock-prod&quot;<br>encrypt        = true<br>kms_key_id     = &quot;arn:aws:kms:us-east-1:525226811263:key/...&quot;</pre><pre># init<br>terraform init -reconfigure -backend-config=backend/prod.hcl</pre><p>The one rule I enforce from day zero: no state file is ever touched by a human. All changes flow through the pipeline. Breaking that rule is how teams end up with state that nobody dares to apply from.</p><h3>The network foundation</h3><p>Next: VPCs. One VPC per workload account, provisioned by a reusable Terraform module that produces:</p><ul><li>Three private subnets across three AZs for workloads</li><li>Three public subnets for load balancers only (nothing else lives here)</li><li>Three private subnets dedicated to EKS control-plane ENIs</li><li>NAT Gateways per AZ (zonal, not single-point)</li><li>VPC endpoints for S3, ECR, STS, Secrets Manager, SSM, EC2, EKS, Logs</li><li>Flow Logs to the log-archive account</li></ul><p>VPC endpoints matter. Without them, every pod in your EKS cluster pulls container images and secrets over NAT, which costs money and introduces a dependency on your internet gateway. With them, the traffic stays inside the AWS backbone.</p><pre>module &quot;vpc&quot; {<br>  source  = &quot;terraform-aws-modules/vpc/aws&quot;<br>  version = &quot;~&gt; 5.0&quot;</pre><pre>  name = &quot;workload-prod&quot;<br>  cidr = &quot;10.42.0.0/16&quot;</pre><pre>  azs             = [&quot;us-east-1a&quot;, &quot;us-east-1b&quot;, &quot;us-east-1c&quot;]<br>  private_subnets = [&quot;10.42.1.0/24&quot;, &quot;10.42.2.0/24&quot;, &quot;10.42.3.0/24&quot;]<br>  public_subnets  = [&quot;10.42.101.0/24&quot;, &quot;10.42.102.0/24&quot;, &quot;10.42.103.0/24&quot;]<br>  intra_subnets   = [&quot;10.42.201.0/24&quot;, &quot;10.42.202.0/24&quot;, &quot;10.42.203.0/24&quot;]</pre><pre>  enable_nat_gateway     = true<br>  single_nat_gateway     = false<br>  one_nat_gateway_per_az = true</pre><pre>  enable_flow_log                                 = true<br>  flow_log_destination_arn                        = var.log_archive_bucket_arn<br>  create_flow_log_cloudwatch_log_group            = false</pre><pre>  tags = local.common_tags<br>}</pre><p>The private subnets get tagged with kubernetes.io/role/internal-elb = 1, the public ones with kubernetes.io/role/elb = 1, and both with kubernetes.io/cluster/${cluster_name} = shared. The AWS Load Balancer Controller uses those tags to figure out where to place ALBs and NLBs. If you forget this, you will spend a frustrating afternoon wondering why Ingress resources never provision.</p><h3>The EKS cluster</h3><p>EKS gets its own Terraform module. I use terraform-aws-modules/eks/aws as the base and layer our standards on top. The important choices:</p><ul><li><strong>Control plane private endpoint only.</strong> Public endpoints are a liability you do not need in prod.</li><li><strong>IRSA from day one.</strong> IAM Roles for Service Accounts, not node IAM. Pods get their own identity, not the node’s.</li><li><strong>Managed node groups for the system tier.</strong> CoreDNS, kube-proxy, AWS Load Balancer Controller, External DNS, External Secrets Operator all run on a small system node group that is isolated with taints.</li><li><strong>Karpenter for everything else.</strong> No HPA-plus-ASG dance. Karpenter is faster, cheaper, and simpler to reason about once you get past the learning curve.</li><li><strong>Addons as EKS addons, not Helm.</strong> VPC CNI, CoreDNS, kube-proxy, EBS CSI driver, Pod Identity Agent. Managed addons give you a clean upgrade path tied to the control plane version.</li></ul><p>The cluster module produces the kubeconfig and the OIDC provider ARN. Those outputs feed every other Terraform module downstream.</p><h3>The GitOps layer: ArgoCD and Helm</h3><p>Once the cluster is up, I install exactly one thing by hand: ArgoCD. After that, everything else is a Git commit.</p><p>The repo layout:</p><pre>platform-gitops/<br>├── bootstrap/<br>│   └── argocd-app-of-apps.yaml<br>├── apps/<br>│   ├── aws-load-balancer-controller/<br>│   ├── external-dns/<br>│   ├── external-secrets/<br>│   ├── karpenter/<br>│   ├── kube-prometheus-stack/<br>│   ├── loki/<br>│   ├── tempo/<br>│   ├── cert-manager/<br>│   └── argo-rollouts/<br>└── envs/<br>    ├── dev/<br>    │   └── apps-of-apps.yaml<br>    ├── impl/<br>    │   └── apps-of-apps.yaml<br>    └── prod/<br>        └── apps-of-apps.yaml</pre><p>One Argo Application that owns a tree of other Applications, scoped per environment. New shared platform tooling is a pull request. No one runs helm install in prod.</p><p>For application workloads, each product team gets their own Argo Project, scoped to their namespace, with RBAC that only lets them deploy to that namespace. The team&#39;s deploy manifest is a Helm chart in their own repo, and their pipeline opens a PR against the platform-gitops repo to bump the image tag. ArgoCD reconciles.</p><p>This is the piece most people get wrong. If product teams can run kubectl apply directly in prod, you do not have a platform. You have a shared console. GitOps is the discipline that stops you from being on the wrong end of a 3am &quot;I was just testing something&quot; page.</p><h3>CI/CD: GitHub Actions, in-cluster or self-hosted</h3><p>The CI/CD layer sits in front of GitOps. Every product repo has a standard pipeline, which I ship as a reusable workflow in a central platform-workflows repo:</p><pre># .github/workflows/ship.yml in a product repo<br>jobs:<br>  ship:<br>    uses: mycorp/platform-workflows/.github/workflows/ship.yml@v3<br>    with:<br>      service_name: checkout-api<br>      helm_chart_path: deploy/chart<br>      environments: dev,impl,prod<br>    secrets: inherit</pre><p>The reusable workflow runs these stages in order:</p><ol><li><strong>Lint and unit test.</strong> Fast, cheap, fail-first.</li><li><strong>Build container.</strong> Kaniko in a Kubernetes-hosted runner (no privileged DinD). SBOM generated via Syft. Image signed with cosign.</li><li><strong>Scan.</strong> Trivy for vulnerabilities, Checkov for IaC in the Helm chart, SonarQube for SAST on application code. All three gate the pipeline.</li><li><strong>Push to ECR.</strong> Immutable tag with the git SHA. No :latest, ever.</li><li><strong>Open GitOps PR.</strong> Bot opens a PR against platform-gitops bumping the image tag for the target environment.</li><li><strong>Progressive rollout.</strong> Argo Rollouts handles canary at 10%, 25%, 50%, 100% with Datadog SLO burn-rate as the pass/fail signal.</li><li><strong>Rollback.</strong> If burn-rate breaches, Argo Rollouts flips the service back to the previous revision automatically. No human in the loop.</li></ol><p>Product teams write app.py or main.go. The pipeline handles everything else.</p><h3>Security and policy-as-code</h3><p>Policy enforcement happens in two places.</p><p><strong>Pre-apply, in the pipeline.</strong> Checkov runs against the Helm chart and any Terraform diffs. OPA runs against the generated Kubernetes manifests. Policies are written once, versioned in the platform-policies repo, and consumed by every pipeline. Examples: no privileged containers, no hostNetwork, every workload must have resource requests and limits, every ingress must have a WAF binding.</p><p><strong>At admission, in the cluster.</strong> Kyverno or Gatekeeper enforces the same policies at the API server, as a backstop. If a pipeline is somehow bypassed, admission still catches the violation.</p><p>Secrets are managed through External Secrets Operator pointing at AWS Secrets Manager, with IRSA for authentication and 30-day rotation enforced through Secrets Manager rotation lambdas. No secret ever lives in a Git repo, in a ConfigMap, or in an environment variable set at pod spec level.</p><h3>Observability</h3><p>Four pillars, two provisioning sources.</p><ul><li><strong>Metrics</strong>: kube-prometheus-stack via ArgoCD, with Datadog as the long-term backend via the remoteWrite endpoint.</li><li><strong>Logs</strong>: Fluent Bit DaemonSet shipping to CloudWatch Logs for raw retention and to Datadog Logs for query.</li><li><strong>Traces</strong>: OpenTelemetry Collector running as a DaemonSet, exporting to Datadog APM via OTLP.</li><li><strong>Alerts</strong>: Datadog monitors defined in Terraform via the Datadog provider, versioned alongside the service code. Every monitor is tied to an SLO.</li></ul><p>SLOs are the key organizational contract. Every service has a documented SLO for availability and latency, every SLO has an error budget, and the Argo Rollouts canary gate reads the burn rate directly. If a deploy threatens the budget, it rolls back on its own.</p><h3>The paved path for product teams</h3><p>All of the above adds up to a paved path the product teams follow without thinking about it:</p><ol><li>Fork the service template repo (Helm chart skeleton, GitHub Actions workflow, Datadog SLO manifest, OPA policy stubs).</li><li>Write the application code.</li><li>Open a PR. Pipeline builds, scans, pushes, opens a GitOps PR.</li><li>Approve the GitOps PR. ArgoCD reconciles, Argo Rollouts canaries.</li><li>Watch the Datadog service page. If an SLO burns, rollback is automatic.</li></ol><p>No kubectl in product teams’ hands. No console access for prod. No one on the platform team acting as a human CI tool.</p><h3>What this unlocks</h3><p>The numbers I care about, after this pattern has been in place for a quarter:</p><ul><li>Deploy frequency: multiple times per day per service, up from weekly.</li><li>Lead time for changes: minutes, not days.</li><li>Change failure rate: under 10%, down from 25% or worse.</li><li>MTTR: minutes for rollback, hours for root cause, down from a day or more.</li><li>Audit evidence: a Terraform plan and a Git log. No screenshots.</li></ul><p>These are the DORA metrics. The pattern is designed to improve all four at once because they are coupled: faster deploys with better safety unlock faster recovery, which unlocks higher deploy frequency, which keeps the pipeline exercised and the muscles sharp.</p><h3>What I would skip</h3><p>A few things I used to include and no longer do.</p><ul><li><strong>Service mesh on day one.</strong> Istio and Linkerd both deliver real value, but adding them before you have ArgoCD, GitHub Actions, and observability in place is premature. Add the mesh when you have mTLS requirements the platform cannot otherwise meet, or when traffic shaping becomes a bottleneck.</li><li><strong>Multi-cluster from the start.</strong> One cluster per environment per region is enough until it is not. Multi-cluster adds operational cost that is rarely worth it in year one.</li><li><strong>Custom Backstage portal.</strong> A README in the service template repo and a Slack channel do most of the work. Backstage is a project of its own, not a free lunch.</li></ul><h3>The takeaway</h3><p>This pattern is boring. That is the point. Every piece is a well-known tool used in a well-known way. The leverage comes from assembling them in an order that forces discipline instead of relying on it, so your product teams get a paved path without having to think about Terraform state, VPC endpoints, SBOMs, or Datadog monitors.</p><p>Start with the account structure. Build the network before the cluster. Install ArgoCD before you install anything else. Make CI/CD a reusable workflow. Enforce policy in two places. Define SLOs as the contract between the platform and the product.</p><p>Do that in order, and the “can engineers ship without us” question answers itself.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68e576c641d6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to connect to EC2 Instance and setup Jenkins on Linux Server]]></title>
            <link>https://medium.com/@chiemelaumeh1/how-to-connect-to-ec2-instance-and-setup-jenkins-on-linux-server-a79a5896c8cc?source=rss-376b2485c51a------2</link>
            <guid isPermaLink="false">https://medium.com/p/a79a5896c8cc</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[ec2]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Chiemela Umeh]]></dc:creator>
            <pubDate>Mon, 16 Oct 2023 15:34:10 GMT</pubDate>
            <atom:updated>2023-10-16T18:21:26.422Z</atom:updated>
            <content:encoded><![CDATA[<h4>Part 2. DevOps Zero To Hero.</h4><h4>Introduction</h4><p>Welcome! You are either here for part two of this series, or you just want to connect to and setup Jenkins on your server. Either way lets get it done.</p><p><strong>Prerequisites</strong></p><ul><li><em>Running EC2 instance</em></li><li><em>SSH Client (</em><a href="https://www.iterm2.com/downloads.html."><em>iterm</em></a><em>, terminal, </em><a href="http://www.git-scm.com/download"><em>git client)</em></a></li><li><a href="https://git-scm.com/download"><em>Git installed</em></a></li><li><a href="https://www.udemy.com/topic/linux-administration/"><em>Linux basics</em></a></li></ul><h3>Task A — Connect to EC2 Instance</h3><ol><li>On your AWS console, click on the EC2 instance you want to connect to, then click “Connect” on the top right side of this page.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wsxd86ePyfrmwH5kq8RMPg.png" /></figure><p><strong>2.</strong> Click on the SSH client tab, and make your keys private</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2olSFsIXOa-JCvM1Qhyijg.png" /></figure><p>In your SSH client (iterm, terminal, PuTTY), cd into the directory where your key pair is saved, copy and paste the command on step 3. This will make your key pair private.</p><p><strong>3. Connect to server</strong></p><p>To connect to your server, enter your ssh command in the CLI. You may copy and paste it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BCf8WUb_mLseBcu3eFtdjQ.png" /></figure><p>It takes this format — “ssh -i “<em>somekeypair” ubuntu@……….amazonaws.com”</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qiyiowcp7mJz7wnOWpjj6A.png" /></figure><p>You will be prompted to continue connecting, type “yes” and enter.</p><p>4. You will be connected to the server and you can will see the private IP address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*snWXUtFvnYZkEhMUnuwU-w.png" /></figure><h3>Task B— Setup Jenkins on Linux Server</h3><p>Jenkins is an open source continuous integration/continuous delivery and deployment (CI/CD) automation software DevOps tool written in the Java programming language, so we will install a Java Runtime Environment before we set up Jenkins.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NZTWnlFjT85FyPwuaruL_Q.jpeg" /></figure><ol><li>Change Host Name to Jenkins1</li></ol><pre>sudo hostnamectl set-hostname Jenkins1</pre><p>You may have to restart the server to see the updated hostname.</p><p>2. Perform update</p><pre>sudo apt update</pre><p>3. Install Java 11</p><pre>sudo apt install default-jdk -y</pre><p>confirm Java installation using</p><pre>java -version</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xqiCIZFxH8eEcX68KR19EA.png" /></figure><p>4. Add Jenkins Repository key to the system</p><pre>curl -fsSL https://pkg.jenkins.io/debian/jenkins.io-2023.key | sudo tee \<br>  /usr/share/keyrings/jenkins-keyring.asc &gt; /dev/null</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QTeuKEKpx2WIz80K5QojgA.png" /></figure><p>5. Append binaries to the system</p><pre>echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \<br>  https://pkg.jenkins.io/debian binary/ | sudo tee \<br>  /etc/apt/sources.list.d/jenkins.list &gt; /dev/null</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Iipscth4UCb-K2-i2tLnRA.png" /></figure><p>6. Update Ubuntu package</p><pre>sudo apt-get update</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sxAhtAhMj-RENDEAEbAEuw.png" /></figure><p>7. Install Jenkins</p><pre>sudo apt install jenkins -y</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Erl8smWfbKkyQvvd5UD0jA.png" /></figure><p>8. Access Jenkins in Web browser</p><p>Go to AWS console, click on EC2, click on running instances link. Select the checkbox of EC2 you are installing Java and Jenkins. Click on Connect. Copy the value from step 4 that says → Connect to your instance using its Public DNS:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gBn3tY7ftIZhcu9rHflb_g.png" /></figure><p>Now go to browser. Enter the public DNS or public IP address with port no 8080.</p><p><a href="http://public_dns_name:8080/">http://EC2_public_dns_name<strong>:8080</strong></a></p><p>9. Unlock Jenkins</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t0MWkURIMSnSPTHvli-6Mg.png" /></figure><p>To unlock Jenkins, <strong>get the initial password from the below file</strong></p><pre><br>sudo cat /var/lib/jenkins/secrets/initialAdminPassword</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xhc40L_vJX5O695Wrrer-Q.png" /></figure><p>Copy the password and paste in the browser, then click on install suggested plug-ins.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LegddvlY5BEbMARt3MlCZg.png" /></figure><p>10. Create Username and password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ialc1BJ2RwzwcJtWS_bynw.png" /></figure><p>After this, click Save and continue</p><p>You may be prompted to verify your Jenkins URL, just click Save and Continue / Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MlRpEDTS9f8HeczzdMv5dw.png" /></figure><p>That’s it! These steps will help you connect to an EC2 instance and setup Jenkins on that server. In the next guide, we will fork and clone our GitHub project into our local machine, then checkout our first job on Jenkins.</p><p><strong>Video tutorial here</strong> 👉🏼 <a href="https://www.youtube.com/watch?v=r0xHJhxtvJ4">https://www.youtube.com/watch?v=r0xHJhxtvJ4</a></p><p><strong>Prerequisites for step 3</strong></p><ul><li><em>SSH Client (</em><a href="https://www.iterm2.com/downloads.html."><em>iterm</em></a><em>, terminal, </em><a href="http://www.git-scm.com/download"><em>git client)</em></a></li><li><a href="https://git-scm.com/download"><em>Git installed</em></a></li><li><a href="https://www.udemy.com/topic/linux-administration/"><em>Linux basics</em></a></li><li><em>SCM account (Github, bitbucket)</em></li></ul><p>If you found this post helpful, please like, share, and follow me.</p><p>Thank you for reading and for your support!</p><p><em>Note: EC2 instance and EC2 server may be used interchangeably.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a79a5896c8cc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to set up AWS EC2 server for Jenkins CI/CD pipeline]]></title>
            <link>https://medium.com/@chiemelaumeh1/how-to-set-up-aws-ec2-server-for-jenkins-ci-cd-pipeline-8e6ee073d2d3?source=rss-376b2485c51a------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e6ee073d2d3</guid>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cicd]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[ec2]]></category>
            <dc:creator><![CDATA[Chiemela Umeh]]></dc:creator>
            <pubDate>Tue, 10 Oct 2023 00:54:35 GMT</pubDate>
            <atom:updated>2026-10-19T15:13:50.024Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to create AWS EC2 Instance and set up Jenkins.</h3><h4>Part 1. DevOps Zero To Hero.</h4><h4>Introduction</h4><p>This article is the first of ten guides that will demonstrate how to use Jenkins as a CI/CD tool to test, build, deploy, and monitor a simple JavaScript application. My goal is to also give readers an idea of working with microservices. To achieve this, I have split the application into two smaller parts; <a href="https://github.com/chiemelaumeh/pipeline-job_postboard-client">A React web app</a> and a <a href="https://github.com/chiemelaumeh/pipeline-job_postboard-server">node.js server</a>. While we are only scratching the surface Of DevOps, this guide covers the fundamentals of CI/CD and how it may be implemented. In subsequent publications, we will master principles like automation, shift left, Infrastructure as a Code (Iac), containerization, and orchestration.</p><p>What is CI/CD? And why should we practice it?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uk-IPnuI3c78vP7A.jpg" /></figure><p><strong>Continuous integration</strong> is a DevOps practice that frequently merges new code changes into a central repository to undergo necessary tests and production builds that will ensure stability. This way, we can find bugs quicker, and deliver products into market place sooner.</p><p><strong>Continuous delivery</strong> is an extension of the foundation laid by CI. It automates the manual steps needed to release a build of your software to production.</p><p><strong>Benefits of CI/CD::</strong></p><ul><li>Deliver products into market place sooner</li><li>Automate the Software Release Process</li><li>Find bugs early in the software development stage</li><li>Improve Developer Productivity</li><li>It reduces handoff between teams which mitigates human error</li></ul><p><strong>Prerequisites</strong></p><ul><li><a href="https://aws.amazon.com/"><em>AWS account</em></a></li></ul><h3>Task A— Create an AWS EC2 instance</h3><p>EC2 is simply a virtual server that represents a physical server for you to deploy your applications. It offers businesses the ability to run applications on the public cloud.</p><p><strong>1.</strong> After creating an AWS account, search for “EC2” and click “Launch instance”.</p><p><strong>2.</strong> You will be greeted by this page. Here you will choose the specifications for your EC2 server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rz8IDfhFdNybG1pPybkuCw.png" /></figure><p><strong>3. Name and tags.</strong> Type a tag name for your EC2 instance. Your name will be “Jenkins1”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NFww6XxHmeCSyaCbLM2pdA.png" /></figure><p><strong>4. Application and OS Image. </strong>Choose Ubuntu. Ubuntu is linux distribution and the operating system our server will run on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CRe9MCHb0jvMEgoL48BChQ.png" /></figure><p>5.<strong> Amazon Machine Image (AMI).</strong> For this tutorial will Ubuntu Server 22.04 LTS. This may be change based on needs of the applications that will run on an EC2 instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6uHvt2QVDzrTZSGPxhcpig.png" /></figure><p>6. <strong>Instance type. </strong>Go with t2.medium</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ipohdI0x8uzWXx4f79U-_Q.png" /></figure><p>7. Choose an existing key pair or create one. (Avoid spaces in key pair names). Download the key pair to your local machine. You will need this key pair to connect to your EC2. I recommend choosing a simple key par name like “myJenkins1Key”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V6o6q1ptt4yzgGQBNQfCdw.png" /></figure><p>8. Under network settings, we will open port 8080. This is where jenkins UI will run by default. Click “Edit”, scroll down and click “Add security group”. Add port range as 8080 and select Anywhere as Source Type. This should enter 0.0.0.0/0 as Source.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i07IFADFxC2i8GPMPRtBIw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HUFfejmpN4ePEzwQzHl2sQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tkh59DhGpvAG2HPWw-Msog.png" /></figure><p><strong>9. Configure Storage.</strong> Enter 32GB as root volume</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZPyLzQBGRYobwx8yxPIvFA.png" /></figure><p><strong>10. Launch instance</strong> to initialize your new Ec2 server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E5pqcH21M1MdtpU_82pi2g.png" /></figure><p>That’s it! These steps will create a new server on AWS cloud. In the next article, we will connect to, and setup Jenkins on the EC2 Ubuntu instance.</p><p>The Github repos for the application can be found <a href="https://github.com/chiemelaumeh/reddit-server">here</a> and <a href="https://github.com/chiemelaumeh/reddit-client">here</a>. Feel free to fork and clone them.</p><p><strong>Prerequisites for step 2</strong></p><ul><li><em>SSH Client (</em><a href="https://www.iterm2.com/downloads.html."><em>iterm</em></a><em>, terminal, </em><a href="http://www.git-scm.com/download"><em>git client)</em></a></li><li><a href="https://git-scm.com/download"><em>Git installed</em></a></li><li><a href="https://www.udemy.com/topic/linux-administration/"><em>Linux basics</em></a></li><li><em>SCM account (Github, bitbucket)</em></li></ul><p>If you found this post helpful, please like, share, and follow me.</p><p>Thank you for reading and for your support!</p><p><em>Note: EC2 instance and EC2 server may be used interchangeably.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e6ee073d2d3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>