Need suggestion on how to create a CI/CD pipeline for my dockerized app

twitter logo github logo ・1 min read

Hi all, I've been working as a Python based backend engineer for quite a while and recently I've become obsessed with DevOps and SRE related technology. I have started learning docker and also dockerized my first django app using docker-compose. But now I'm a bit lost on how to make this better.

As far as my limited knowledge goes, I should at least set up a CI/CD pipeline and try for a zero downtime deployment using Kubernetes. However I don't have any clue about any of these things apart from a few names (e.g Ansible, Terraform, Kubernetes, Docker Swarm etc.)

Can any courageous adventurer help this lost wanderer to find his way? :p

twitter logo DISCUSS (3)
markdown guide
 

You can use DroneCI, BitBucket Pipelines or GitHub Actions. If you would like to learn more about them or require any kind of help in setting up your pipeline, feel free to reach out to me.

 

Hi! I am currently using Bitbucket Pipelines. What I'm doing right now is this:

image: python:3.6

pipelines:
  branches:
    stage:
      - step:
          name: 'Stage Deployment'
          deployment: 'stage'
          caches:
            - pip
          script:
            - echo "Deploying to Stage - Start"
            - pip install fabric python-decouple
            - fab -c pipelines-fabfile connect stage
            - echo "Deploying to Stage - End"
    master:
      - step:
          name: 'Live Deployment'
          deployment: 'live'
          caches:
            - pip
          script:
            - echo "Deploying to Live - Start"
            - pip install fabric python-decouple
            - fab -c pipelines-fabfile connect live
            - echo "Deploying to Live - End"

Basically I'm using pipelines-fabfile to ssh into my server (like regular fabric) and pull my code from git and restart my docker containers using compose. Although this works but I'm pretty sure this is not the appropriate approach. Can you shed some light on this? It'd be really helpful. Thanks!

 

On AWS you would use CodePipeline in conjunction with EKS

Classic DEV Post from Sep 19 '18

Demystifying Array.reduce(): How to understand it and when to use it in your code

Let's clarify, once and for all, how reduce works and when to use it.

Mehran Kader profile image
A competitive gamer turned programmer.