May 28, 2025

Quick Insights to Start Your Week


🎧 Listen to the Huddle

This is an AI generated audio, for feedback or suggestions, please click: Here

Share


Welcome to this week’s CICD/DevOps huddle – your go-to source for the latest trends, industry insights, and tools shaping the industry. Let’s dive in! 🔥

⏱️ Estimated Read Time:


How to Set Up CI/CD for Your Django App Using GitHub Actions & Systemd

Deploy your Django app with ease using this comprehensive guide! This walkthrough will show you how to automate deployment via GitHub Actions, SSH, and Systemd. Let’s dive into a real-world example: a Django backend API hosted on api.example.com, deployed to a remote Ubuntu server.

Prerequisites:

  1. Remote Ubuntu server with SSH access 🔑
  2. Gunicorn configured as a systemd service 🧱
  3. GitHub repository secrets setup 🔐

Step 1: Create a Systemd Service for Gunicorn

On your server, create a systemd service file (e.g., /etc/systemd/system/gunicorn.service):

[Unit]
Description=gunicorn daemon

[Service]
ExecStart=/usr/local/bin/gunicorn --access-logfile - --workers 3 --bind unix:/run/gunicorn.sock myproject.wsgi:application
Restart=always
User=deployuser
Group=www-data
Environment="PATH=/home/deployuser/.local/bin"

Reload and enable the service:

sudo systemctl daemon-reload
sudo systemctl enable gunicorn

Check its status:

sudo systemctl status gunicorn

Grant permission for the deployment user (deployuser) to restart Gunicorn without a password by adding:

echo "%deployuser ALL=(ALL) NOPASSWD: /bin/systemctl restart gunicorn" | sudo tee /etc/sudoers.d/deployuser

Step 2: Set Up GitHub Actions

In your repo, create .github/workflows/deploy.yml:

name: CI/CD Pipeline
on:
  push:
    branches:
      - main
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: 3.8

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements.txt

      - name: Deploy to server
        uses: appleboy/ssh-action@master
        with:
          host: $
          username: $
          key: $
          script: |
            cd /path/to/your/project
            git pull
            systemctl restart gunicorn

Now, every push to the main branch will trigger automatic deployment! 🌟

Enjoy your automated deployment!

Read more


Getting Started with Terraform: A Beginner-Friendly AWS Deployment

Terraform is an Infrastructure as Code (IaC) powerhouse that’s transforming how we manage cloud infrastructure! 🚀 Gone are the days of manually configuring servers, networks, and services through web consoles or CLI commands – a process that was not only time-consuming but also prone to errors.

What is Terraform?

Terraform allows you to provision and manage cloud infrastructure declaratively across multiple providers such as AWS, Azure, Google Cloud, and more! You simply write configuration files in HashiCorp Configuration Language (HCL), describing your desired infrastructure state. Terraform takes care of creating, updating, or deleting resources to match that state.

Essential Tools for AWS Deployment with Terraform

To deploy our infrastructure on AWS using Terraform, we need:

  1. Terraform: The main IaC tool used to provision and manage AWS resources through configuration files.
  2. AWS Command Line Interface (CLI): For interacting with AWS services from the terminal, essential for configuring credentials and verifying infrastructure manually if needed.

Authentication

Before running Terraform, authenticate with AWS using:

aws configure

This will prompt you to enter Access Key ID, Secret Access Key, Default region name, and Default output format. These details are stored locally in ~/.aws/credentials and ~/.aws/config.

Basic AWS Architecture with Terraform

Let’s build a simple yet practical AWS architecture using Terraform:

  • Virtual Private Cloud (VPC)
  • Three private subnets
  • Route table and associations
  • Security group
  • Small EC2 instance with Amazon Linux 2023 AMI
  • IAM role for the EC2 instance
  • Versioned S3 bucket
  • CloudWatch monitoring

Terraform Configuration Files

  1. main.tf: Contains all AWS resources definitions.
  2. variables.tf: Defines configurable variables like region, VPC CIDR block, availability zones, etc.
  3. terraform.tfvars: Assigns actual values to each variable (e.g., aws_region = "us-east-1").

Example of main.tf:

provider "aws" {
  region = var.aws_region
}

resource "aws_vpc" "main" {
  cidr_block = var.vpc_cidr
  enable_dns_support = true
  enable_dns_hostnames = true
  tags = {
    Name = "terraform-vpc"
  }
}

# ... more resources

Key Terraform Commands

  1. terraform init: Initializes a new or existing Terraform working directory, downloading necessary provider plugins and setting up the backend to store Terraform’s state file (terraform.tfstate).
  2. terraform plan: Generates an execution plan without changing real infrastructure, showing what actions it will take to reach your desired configuration.
  3. terraform apply: Applies changes required to match the desired state of your configuration, provisioning a complete environment in AWS! 🚀

Next Steps

Expand this beginner setup by adding NAT gateways, EKS clusters, RDS databases, or explore Terraform modules and workspaces for even more power and flexibility.

Read more


Uber’s Mission-Critical Merge Queue: Keeping Monorepos Green**

Monorepos: A Double-Edged Sword

At Uber, a global team of hundreds of engineers collaborates in a single, massive repository—a monorepo. Monorepos, like Google’s, offer simplified dependency management and consistent code standards 📚🔗. But as commit velocity rises and contributors grow, CI challenges emerge:

  • Growing backlogs
  • Frequent conflicts
  • Long land times
  • Critical need to keep the mainline green

A ‘green’ mainline means every build step—compilation, tests—consistently passes. Red means delays and disruptions!

The Problem: Red Mainlines

Red mainlines halt feature releases, impacting business, productivity, and trust:

  • Delayed deployments 💨
  • Wasted time & frustration 🚫
  • Complex rollbacks 🔄

SubmitQueue: The Solution

Introducing SubmitQueue, Uber’s mission-critical merge queue system! It gates all landings to maintain a green mainline at scale:

  • Speculative execution: Builds queued changes, pushes successful ones
  • Build target consideration: Independent changes evaluated in parallel

Before SubmitQueue, red mainlines were common during crunch periods. Now, developers enjoy uninterrupted workflows!

Scaling CI: The Future

Efficient CI at scale demands smart scheduling, predictive modeling, and platform thinking. As more organizations grow, systems like SubmitQueue will become essential!

Read more


🛠️ Tool of the Week

GoCD An open-source CI/CD server that supports advanced deployment pipelines and can be self-hosted or run in cloud environments.


🤯 Fun Fact of the Week

The growing emphasis on agile software development and the urgent need for faster release cycles are driving the adoption of continuous delivery solutions. Consequently, the overall continuous delivery market is projected to reach USD 16.9 billion by 2032, fueled by the increasing demand for reliable software deployment.


Huddle Quiz 🧩

Question 1 of 5
Score: 0

⚡ Quick Bites: Headlines You Can’t Miss!


Share


Subscribe this huddle for weekly updates on CI/CD & DevOps! 🚀