Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Continuous Delivery with Docker and Jenkins
Continuous Delivery with Docker and Jenkins

Continuous Delivery with Docker and Jenkins: Create secure applications by building complete CI/CD pipelines , Second Edition

eBook
€20.98 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Continuous Delivery with Docker and Jenkins

Introducing Continuous Delivery

A common problem faced by most developers is how to release the implemented code quickly and safely. The delivery process used traditionally is a source of pitfalls and usually leads to the disappointment of both developers and clients. This chapter presents the idea of the Continuous Delivery (CD) approach and provides the context for the rest of the book.

This chapter covers the following points:

  • Understanding CD
  • The automated deployment pipeline
  • Prerequisites to CD
  • Building the CD process
  • Creating a complete CD system

Understanding CD

The most accurate definition of the CD is stated by Jez Humble and reads as follows:

"Continuous Delivery is the ability to get changes of all types—including new features, configuration changes, bug fixes, and experiments—into production, or into the hands of users, safely and quickly, in a sustainable way."

This definition covers the key points.

To understand it better, let's imagine a scenario. You are responsible for a product, let's say, the email client application. Users come to you with a new requirement: they want to sort emails by size. You decide that the development will take around one week. When can the user expect to use the feature? Usually, after the development is done, you hand over the completed feature first to the QA team and then to the operations team, which takes additional time, ranging from days to months...

The automated deployment pipeline

We already know what the CD process is and why we use it. In this section, we describe how to implement it.

Let's start by emphasizing that each phase in the traditional delivery process is important. Otherwise, it would never have been created in the first place. No one wants to deliver software without testing it first! The role of the UAT phase is to detect bugs and to ensure that what developers created is what the customer wanted. The same applies to the operations team—the software must be configured, deployed to production, and monitored. That's out of the question. So, how do we automate the process so that we preserve all the phases? That is the role of the automated deployment pipeline, which consists of three stages, as presented in the following diagram:

The automated deployment pipeline is a sequence of scripts that...

Prerequisites to CD

The rest of this book is dedicated to technical details on how to implement a successful CD pipeline. The success of the process, however, depends not only on the tools we present throughout this book. In this section, we take a holistic look at the whole process and define the CD requirements in three areas:

  • Your organization's structure and its impact on the development process
  • Your products and their technical details
  • Your development team and the practices you adopt

Organizational prerequisites

The way your organization works has a high impact on the success of introducing the CD process. It's a bit similar to introducing Scrum. Many organizations would like to use the Agile process, but...

Building the CD process

We introduced the idea, benefits, and prerequisites with regard to the CD process. In this section, we will describe the tools that will be used throughout this book and their place in the system as a whole.

If you're interested more in the idea of the CD process, have a look at an excellent book by Jez Humble and David Farley, Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation.

Introducing tools

First of all, the specific tool is always less important than understanding its role in the process. In other words, any tool can be replaced with another one that plays the same role. For example, Jenkins can be replaced with Atlassian Bamboo, and Chef can be...

Creating a complete CD system

You can look at how this book is organized from two perspectives.

The first one is based on the steps of the automated deployment pipeline. Each chapter takes you closer to the complete CD process. If you look at the names of the chapters, some of them are even named like the pipeline phases:

  • The CI pipeline
  • Automated acceptance testing
  • Configuration management with Ansible

The rest of the chapters give the introduction, summary, or additional information complementary to the process.

There is also a second perspective to the content of this book. Each chapter describes one piece of the environment, which, in turn, is well prepared for the CD process. In other words, the book presents, step by step, technology by technology, how to build a complete system. To help you get the feeling of what we plan to build throughout the book, let's now have...

Summary

In this chapter, we introduced the CD process starting from the idea, and discussed the prerequisites, to end up with tools that are used in the rest of this book. The key takeaway from this chapter is as follows: the delivery process currently used in most companies has significant shortcomings and can be improved using modern automation tools. The CD approach provides a number of benefits, of which the most significant ones are fast delivery, fast feedback cycle, and low-risk releases. The CD pipeline consists of three stages: CI, automated acceptance testing, and configuration management. Introducing CD usually requires a change in the organization's culture and structure. The most important tools in the context of CD are Docker, Jenkins, and Ansible.

In the next chapter, we'll introduce Docker and show you how to build a dockerized application.

...

Questions

To verify the knowledge acquired from this chapter, please answer the following questions:

  1. What are the three phases of the traditional delivery process?
  2. What are the three main stages of the CD pipeline?
  3. Name at least three benefits of using CD.
  4. What are the types of tests that should be automated as part of the CD pipeline?
  5. Should we have more integration or unit tests? Explain why.
  6. What does the term DevOps mean?
  7. What are the software tools that will be used throughout this book? Name at least four.

Further reading

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Build reliable and secure applications using Docker containers.
  • Create a highly available environment to scale a Docker servers using Kubernetes
  • Implement advance continuous delivery process by parallelizing the pipeline tasks

Description

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.

Who is this book for?

The book targets DevOps engineers, system administrators, docker professionals or any stakeholders who would like to explore the power of working with Docker and Jenkins together. No prior knowledge of DevOps is required for this book.

What you will learn

  • Get to grips with docker fundamentals and how to dockerize an application for the CD process
  • Learn how to use Jenkins on the Cloud environments
  • Scale a pool of Docker servers using Kubernetes
  • Create multi-container applications using Docker Compose
  • Write acceptance tests using Cucumber and run them in the Docker ecosystem using Jenkins
  • Publish a built Docker image to a Docker Registry and deploy cycles of Jenkins pipelines using community best practices

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : May 31, 2019
Length: 350 pages
Edition : 2nd
Language : English
ISBN-13 : 9781838552183
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : May 31, 2019
Length: 350 pages
Edition : 2nd
Language : English
ISBN-13 : 9781838552183
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 126.97
Mastering Kubernetes
€59.99
Learning DevOps
€29.99
Continuous Delivery with Docker and Jenkins
€36.99
Total 126.97 Stars icon
Banner background image

Table of Contents

15 Chapters
Section 1: Setting Up the Environment Chevron down icon Chevron up icon
Introducing Continuous Delivery Chevron down icon Chevron up icon
Introducing Docker Chevron down icon Chevron up icon
Configuring Jenkins Chevron down icon Chevron up icon
Section 2: Architecting and Testing an Application Chevron down icon Chevron up icon
Continuous Integration Pipeline Chevron down icon Chevron up icon
Automated Acceptance Testing Chevron down icon Chevron up icon
Clustering with Kubernetes Chevron down icon Chevron up icon
Section 3: Deploying an Application Chevron down icon Chevron up icon
Configuration Management with Ansible Chevron down icon Chevron up icon
Continuous Delivery Pipeline Chevron down icon Chevron up icon
Advanced Continuous Delivery Chevron down icon Chevron up icon
Best practices Chevron down icon Chevron up icon
Assessment Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3
(11 Ratings)
5 star 63.6%
4 star 18.2%
3 star 9.1%
2 star 0%
1 star 9.1%
Filter icon Filter
Top Reviews

Filter reviews by




jml May 23, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Continuous Delivery with Docker and Jenkins provides not only an excellent tutorial/introduction to the topics of CI/CD but a useful desk reference to those in the DevOps arena. Starting with explanations of the CI/CD process and terminology, this second edition has been updated to focus on Kubernetes container operations rather than the earlier Docker Compose/Swarm engines, and accordingly delivers readable, concise discussions of Kubernetes, Jenkins, Ansible, and GitHub operations. The author presents the information in a consistent question-answer-demonstration format that lends itself well to walking readers through the steps of building and running a viable CI environment. Solid explanations and demonstrations of pipelines, code coverage and static analysis round out the Jenkins sections, while Kubernetes is given a full treatment including clustering and deployment. Theory and practice of smoke/release/acceptance testing and even coverage of database (in-memory and SQL) updates and rollbacks is provided. The book ends with an interesting set of best-practice suggestions that can form the basis of a discussion group or class covering the CI/CD workflow.The author keeps this book extremely readable and avoids the trap of wandering off into esoteric theory explanations. Lots of clear, simple diagrams help the reader visualize concepts and understand the workflow under discussion (as seen in the photo).It’s difficult to find much to quibble with in this book; I might prefer to see a little less focus on Java (as opposed to other languages like Python) for the examples, but the presentation is so clear that few developers will have problems following the flow to implement a small CI/CD system. I’d highly recommend Continuous Delivery with Docker and Jenkins to anyone managing or working in a DevOps-oriented environment.
Amazon Verified review Amazon
Daniel Correa Oct 03, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Excellent book. Very practical. The book presents an example in Java with Spring. I was able to replicate most of the content of the book to design a CI/CD for a Laravel php project. Congratulations to the author.
Amazon Verified review Amazon
Armando Apr 05, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
If you has been started to learn Jenkins and Docker this is your book. Good concepts definitions, code examples are very helpful and easy to follow. This book help me a lot to get a better understanding of CI/CD and practices with technologies like Docker and Jenkins.
Amazon Verified review Amazon
Joseph Aug 21, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is a great crash course in CI/CD pipelines, I would recommend for any DevOps teams that are getting started or that are in the middle of automating their builds.
Amazon Verified review Amazon
Joanna Rybak Oct 24, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I've bought this book out of a need to improve my knowledge about jenkins as I started working with it in my current project and it turn out to be one of the best books that I've ever read. It has a very good structure, the balance between the amount to written part and practical steps which a quite easy to follow, it covers good explanation of the topic. So overall it is easy to read and quickly understand a topic. Actually, after some reading I managed to build up a fully functioning build pipeline without big problems which was pretty amazing.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.