Skip to content

Sunbird Deployment Pipeline Overview

Kiran G edited this page Sep 28, 2017 · 8 revisions

Purpose

This document explains the Sunbird Deployment Pipeline, the tools and standards used to create the pipeline. The standards make is simple to discover the existing pipelines and also to setup pipelines for new services.

Tools used

Following open-source tools/frameworks have been used

  • Jenkins
  • Ansible
  • Docker Hub (Image Registry)

Deployment Pipeline Architecture

Link

  • Sunbird has two deployment environments, dev and staging.
  • Single Jenkins Master is used for both the environments.
  • Each environment has Jenkins agent service (jenkins agent which runs as a docker container) which is used by the Master to run jobs.
  • Depending on the number of jobs being executed Jenkins agent service could be either scaled up or down.
  • The default Jenkins agent is based on alpine distribution and the jobs are expected to install any dependencies as part of the job run.
  • There is also a Jenkins Build Agent which runs natively (not a docker container) on a VM in dev environment. This could be used for running jobs which cannot be run on Jenkins agent service (docker container). Note: As a best practice we recommend that jobs be run on the container agent, so that scaling is easy, if required. Running the job on a VM agent is discouraged and should be treated as a short term solution only.
  • Depending on the job, Jenkins agents will connect to swarm manager, other VMs (e.g. DBs like ES, Cassandra, etc) or external services like Docker Hub.

Footnotes

[1] For cases where installing dependencies as part of the job run is not possible, a custom image could be built with the required dependencies and this could be used to run a Jenkins agent service where the jobs run. More details could be found in this wiki.