Home - ml6973/CI-CD_OCI GitHub Wiki

Continuous Integration / Continuous Deployment

The purpose of this documentation is to demonstrate how to implement a Continuous Integration/Continuous Deployment Pipeline utilizing Jenkins, Salt, Selenium, and Terraform on Ubuntu 14.04.

(Index of Wiki Pages with their Descriptions at the Bottom)

Overview Of CI/CD

Daily Development

DailyDevelopment.png

This diagram explains the daily development cycle of a project.

  • 1.) First you pull the integration branch. This is the branch where the current working code for the development version is.
  • 2.) Create a local integration branch to make changes to.
  • 3.) After you finish making changes, push your local integration branch to the remote test/* directory. Giving the branch a name of your choosing.
  • 4.) When Jenkins detects a change in that git directory, it triggers the daily pipeline to run.
  • 5.) It runs the basic smoke tests against the code that got pushed to test/*.
  • 6.) If it passes the tests, it logs it and merges that branch with integration.

Nightly Testing and Merging

NightlyTestAndMerge.png

This diagram represents the integration/deployment process at night in the off peak hours. This would take place after a day of people working on the integration branch.

  • 1.) A nightly trigger(usually a set cron time) initiates and Jenkins pulls the current integration branch.
  • 2.) It runs the smoke Tests against it.
  • 3.) If the smoke tests pass, then it builds and deploys the code.
  • 4.5.6.) Uses the Salt tool to spin up cloud instance with the project running.
  • 7.) This is where the extensive tests and UI tests are used.
  • 6.) If all tests are passsed, it pushes the current integration back up to master as all the new code is working. Thus, becoming the next day's integration branch to be edited.

Release Deployment

ReleaseAndDeploy.png

This is the process of deploying a new release when the master branch is at a point to do so, as determined by the developers. User runs "DEFAULT_PIPELINE_RELEASE" with PROJECT_NAME "ELAB" (or whatever project name is) After deployment completes check the environment for errors. When happy with results update "/srv/pillar/production/haproxy.sls" settings "haproxy -> listens -> myservice -> servers -> web1 -> host" to new IP and run

salt 'elab-haproxy' state.highstate