Book Image

Continuous Delivery with Docker and Jenkins - Second Edition

By : Rafał Leszko
Book Image

Continuous Delivery with Docker and Jenkins - Second Edition

By: Rafał Leszko

Overview of this book

Continuous Delivery with Docker and Jenkins, Second Edition will explain the advantages of combining Jenkins and Docker to improve the continuous integration and delivery process of an app development. It will start with setting up a Docker server and configuring Jenkins on it. It will then provide steps to build applications on Docker files and integrate them with Jenkins using continuous delivery processes such as continuous integration, automated acceptance testing, and configuration management. Moving on, you will learn how to ensure quick application deployment with Docker containers along with scaling Jenkins using Kubernetes. Next, you will get to know how to deploy applications using Docker images and testing them with Jenkins. Towards the end, the book will touch base with missing parts of the CD pipeline, which are the environments and infrastructure, application versioning, and nonfunctional testing. By the end of the book, you will be enhancing the DevOps workflow by integrating the functionalities of Docker and Jenkins.
Table of Contents (18 chapters)
Title Page
Dedication
About Packt
Contributors
Preface
Index

Exercises


You learned a lot about Jenkins configuration throughout this chapter. To consolidate your knowledge, we recommend two exercises for preparing the Jenkins images and testing the Jenkins environment:

  1. Create Jenkins master and slave Docker images, and use them to run a Jenkins infrastructure capable of building Ruby projects:
    1. Create the Jenkins master Dockerfile, which automatically installs the Docker plugin
    2. Build the master image and run the Jenkins instance
    3. Create the slave Dockerfile (suitable for the dynamic slave provisioning), which installs the Ruby interpreter
    4. Build the slave image
    5. Change the configuration in the Jenkins instance to use the slave image
  2. Create a pipeline that runs a Ruby script printing Hello World from Ruby:
    1. Create a new pipeline
    2. Use the following shell command to create thehello.rbscript on the fly:
 sh "echo \"puts 'Hello World from Ruby'\" > hello.rb"
    1. Add the command to run hello.rb, using the Ruby interpreter
    2. Run the build and observe the console's output

 

...