Skip to main content

ABAIR CI CD

What is CI/CD?

Continuous Integration (CD) and Continuous Deployment (CD) is a method for automating the process of building, testing and deploying software to production. A robust CI/CD pipeline enables developers to focus on creating applications for users, rather than spending unnecessary time manually configuring builds, servers, environments, etc.

Why use CI/CD?

CI/CD simplifies the process of release and deployment, it enhances security, and allows for deterministic builds and releases.

For the ABAIR project, CI/CD lowers the threshold for contributing to projects by abstracting and automating much of the back-end tasks necessary for running an application in production.

How does it work?

The technologies at the core of the ABAIR CI/CD pipeline are Github and Docker.

  1. A developer pushes a change to a development/feature branch on Github.
  2. The developer opens a pull request on Github to merge the development or feature branch into the main branch (or 'master')
  3. The pull request is reviewed, approved by a second human author and merged.
  4. A Github Action is configured to run on a commit to the main branch which builds a Docker Image and publishes it to a self-hosted Docker Registry on the Services VM of the host machine.
  5. The Github Action then SSH's into the Services VM using the main 'services' account and calls a bash script for that project. This script stops the running container, pulls the latest from the registry and runs it.

Now the service is running the latest version of our software, and is up to date with the master branch without any human interaction beyond approval of the pull request.

Accounts and Access

On Github, the ABAIR group has an organisation account here. If you do not have access, you will need to email one of the Admins and request to be added.

You will need to request a public key from one of the Admins so the Github SSH Action into the Services VM will update the application.

You will also need an Admin to create a new folder for your project in services, and add a deployment script for your Github Action to call.