Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose

24,142 views

Published on

Presented by Sandro Cirulli, Platform Tech Lead, Oxford University Press

Oxford University Press (OUP) recently started the Oxford Global Languages (OGL) initiative (http://www.oxforddictionaries.com/words/oxfordlanguages) which aims at providing language resources for digitally under represented languages. In August 2015 OUP launched two African languages websites for Zulu (http://zu.oxforddictionaries.com) and Northern Sotho (http://nso.oxforddictionaries.com). The backend of these websites is based on an API retrieving data in RDF from a triple store and delivering data to the frontend in JSON-LD.

The entire micro-service infrastructure for development, staging, and production runs on Docker containers in Amazon EC2 instances. In particular, we use Jenkins to rebuild the Docker image for the API based on a Python Flask application and Docker Compose to orchestrate the containers. A typical CI workflow is as follows:

- a developer commits code to the codebase
- Jenkins triggers a job to run unit tests
- if the unit tests are successful, the Docker image of the Python Flask application is rebuilt and the container is restarted via Docker Compose
- if the unit tests or the Docker build failed, the monitor view shows the Jenkins jobs in red and displays the name of the possible culprit who broke the build.

A demo of this CI workflow is available at http://www.sandrocirulli.net/continuous-integration-with-jenkins-docker-and-compose

Published in: Technology

DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose

  1. 1. Agenda 1. Introduction 2. Microservices Architecture 3. CI Workflow 4. Benefits of Docker and Compose in CI 5. Future Work
  2. 2. About Me I work as Platform Tech Lead at Oxford University Press (OUP) I deal with system architecture and DevOps (CI, Docker, AWS, deployment) I started using Docker in November 2014 for developing language resources at OUP
  3. 3. About My Employer Oxford University Press (OUP) is a world-renowned dictionary publisher OUP launched the Oxford Global Languages (OGL) initiative to digitize under-represented languages In August 2015 OUP launched two African languages websites for Zulu and Northern Sotho
  4. 4. Zulu and Nothern Sotho Language Websites powered by Docker
  5. 5. System Architecture Challenges We needed to migrate to more powerful servers and eventually to the cloud Some services were only needed for the development environment We wanted to put system configuration under version control and replicate it easily on new machines We wanted to automate building processes
  6. 6. Microservices Architecture dev/staging environments
  7. 7. Microservices Architecture production environment
  8. 8. Continuous Integration Workflow
  9. 9. Walkthrough I will show you: Jenkins jobs to run: unit tests Docker image build and container restart Shell scripts invoked by Jenkins Docker Compose file Simulation of successful build unsuccessful build
  10. 10. Benefits of Docker Docker isolates components and allows their organic growth Docker facilitates the replication of dev/staging/production environments The system architecture is under version control Docker facilitates blue/green deployment
  11. 11. Benefits of Compose Compose facilitates the orchestration of linked containers Compose allows to have a single script for all the environments Developers can start/stop/rebuild containers without any deep knowledge of Docker
  12. 12. Future Work Deploy Docker containers in master/slave architecture Experiment with Amazon EC2 Container Service (ECS) Automate, Automate, Automate!
  13. 13. Summary I hope I managed to show you: How we use Jenkins to build and start applications running on Docker How we orchestrate containers with Docker Compose inside different environments How we automated our CI workflow
  14. 14. Acknowledgements Artemis Parvizi Meritxell Gonz`alez Kal Ahmed Matt Kohl

×