万本电子书0元读

万本电子书0元读

顶部广告

Continuous Delivery with Docker and Jenkins电子书

售       价:¥

2人正在读 | 0人评论 9.8

作       者:Rafał Leszko

出  版  社:Packt Publishing

出版时间:2019-05-31

字       数:38.4万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Create a complete Continuous Delivery process using modern DevOps tools such as Docker, Kubernetes, Jenkins, Docker Hub, Ansible, GitHub and many more. Key Features * 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 Book 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. 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 Who this book is 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.
目录展开

Dedication

About Packt

Why subscribe?

Packt.com

Contributors

About the author

About the reviewer

Packt is searching for authors like you

Preface

Who this book is for

What this book covers

To get the most out of this book

Download the example code files

Download the color images

Conventions used

Get in touch

Reviews

Section 1: Setting Up the Environment

Introducing Continuous Delivery

Understanding CD

The traditional delivery process

Introducing the traditional delivery process

Shortcomings of the traditional delivery process

Benefits of CD

Success stories

The automated deployment pipeline

Continuous Integration (CI)

Automated acceptance testing

The Agile testing matrix

The testing pyramid

Configuration management

Prerequisites to CD

Organizational prerequisites

DevOps culture

Client in the process

Business decisions

Technical and development prerequisites

Building the CD process

Introducing tools

Docker ecosystem

Jenkins

Ansible

GitHub

Java/Spring Boot/Gradle

The other tools

Creating a complete CD system

Introducing Docker

Configuring Jenkins

The CI pipeline

Automated acceptance testing

Clustering with Kubernetes

Configuration management with Ansible

The CD pipeline/advanced CD

Summary

Questions

Further reading

Introducing Docker

Technical requirements

What is Docker?

Containerization versus virtualization

The need for Docker

Environment

Isolation

Organizing applications

Portability

Kittens and cattle

Alternative containerization technologies

Installing Docker

Prerequisites for Docker

Installing on a local machine

Docker for Ubuntu

Docker for Windows, macOS, and Linux

Testing the Docker installation

Installing on a server

Dedicated server

Running Docker hello world

Docker components

Docker client and server

Docker images and containers

Docker applications

Building images

Docker commit

Dockerfile

Completing the Docker application

Writing the application

Preparing the environment

Building the image

Running the application

Environment variables

Docker container states

Docker networking

Running services

Container networks

Exposing container ports

Automatic port assignment

Using Docker volumes

Using names in Docker

Naming containers

Tagging images

Docker cleanup

Cleaning up containers

Cleaning up images

Docker commands overview

Summary

Exercises

Questions

Further reading

Configuring Jenkins

Technical requirements

What is Jenkins?

Installing Jenkins

Requirements for installation

Installing Jenkins on Docker

Installing without Docker

Initial configuration

Jenkins in the cloud

Jenkins Hello World

Jenkins architecture

Master and slaves

Scalability

Vertical scaling

Horizontal scaling

Test and production instances

Sample architecture

Configuring agents

Communication protocols

Setting agents

Permanent agents

Configuring permanent agents

Understanding permanent agents

Permanent Docker agents

Configuring permanent Docker agents

Understanding permanent Docker agents

Jenkins Swarm agents

Configuring Jenkins Swarm agents

Understanding Jenkins Swarm agents

Dynamically provisioned Docker agents

Configuring dynamically provisioned Docker agents

Understanding dynamically provisioned Docker agents

Testing agents

Custom Jenkins images

Building the Jenkins slave

Building the Jenkins master

Configuration and management

Plugins

Security

Backup

The Blue Ocean UI

Summary

Exercises

Questions

Further reading

Section 2: Architecting and Testing an Application

Continuous Integration Pipeline

Technical requirements

Introducing pipelines

The pipeline structure

Multi-stage Hello World

The pipeline syntax

Sections

Directives

Steps

The commit pipeline

Checkout

Creating a GitHub repository

Creating a checkout stage

Compile

Creating a Java Spring Boot project

Pushing code to GitHub

Creating a compile stage

Unit tests

Creating business logic

Writing a unit test

Creating a unit test stage

Jenkinsfile

Creating the Jenkinsfile

Running the pipeline from Jenkinsfile

Code-quality stages

Code coverage

Adding JaCoCo to Gradle

Adding a code coverage stage

Publishing the code coverage report

Static code analysis

Adding the Checkstyle configuration

Adding a static code analysis stage

Publishing static code analysis reports

SonarQube

Triggers and notifications

Triggers

External

Polling SCM

Scheduled builds

Notifications

Email

Group chats

Team spaces

Team development strategies

Development workflows

The trunk-based workflow

The branching workflow

The forking workflow

Adopting Continuous Integration

Branching strategies

Feature toggles

Jenkins multi-branch

Non-technical requirements

Summary

Exercises

Questions

Further reading

Automated Acceptance Testing

Technical requirements

Introducing acceptance testing

Docker registry

The artifact repository

Installing Docker registry

Docker Hub

Private Docker registry

Installing the Docker registry application

Adding a domain certificate

Adding an access restriction

Other Docker registries

Using Docker registry

Building an image

Pushing the image

Pulling the image

Acceptance tests in the pipeline

The Docker build stage

Adding Dockerfile

Adding the Docker build to the pipeline

The Docker push stage

The acceptance testing stage

Adding a staging deployment to the pipeline

Adding an acceptance test to the pipeline

Adding a cleaning stage environment

Writing acceptance tests

Writing user-facing tests

Using the acceptance testing framework

Creating acceptance criteria

Creating step definitions

Running an automated acceptance test

Acceptance test-driven development

Summary

Exercises

Questions

Further reading

Clustering with Kubernetes

Technical requirements

Server clustering

Introducing server clustering

Introducing Kubernetes

Kubernetes features overview

Kubernetes installation

The Kubernetes client

The Kubernetes server

The local environment

Minikube

Docker Desktop

Cloud platforms

On-premise

Verifying the Kubernetes setup

Using Kubernetes

Deploying an application

Deploying Kubernetes Service

Exposing an application

Advanced Kubernetes

Scaling an application

Updating an application

Rolling updates

Kubernetes objects and workloads

Application dependencies

The Kubernetes DNS resolution

Multi-application system overview

Multi-application system implementation

Adding the Hazelcast client library to Gradle

Adding the Hazelcast cache configuration

Adding Spring Boot caching

Building a Docker image

Multi-application system testing

Scaling Jenkins

Dynamic slave provisioning

Jenkins Swarm

Comparing dynamic slave provisioning and Jenkins Swarm

Alternative cluster management systems

Docker Swarm

Apache Mesos

Comparing features

Summary

Exercises

Questions

Further reading

Section 3: Deploying an Application

Configuration Management with Ansible

Technical requirements

Introducing configuration management

Traits of good configuration management

Overview of configuration management tools

Installing Ansible

Ansible server requirements

Ansible installation

The Docker-based Ansible client

Using Ansible

Creating an inventory

Ad hoc commands

Playbooks

Defining a playbook

Executing the playbook

The playbook's idempotency

Handlers

Variables

Roles

Understanding roles

Ansible Galaxy

Deployment with Ansible

Installing Hazelcast

Deploying a web service

Changing the Hazelcast host address

Adding calculator deployment to the playbook

Running the deployment

Ansible with Docker and Kubernetes

Benefits of Ansible

The Ansible Docker playbook

Installing Docker

Running Docker containers

The Ansible Kubernetes playbook

Summary

Exercises

Questions

Further reading

Continuous Delivery Pipeline

Technical requirements

Environments and infrastructure

Types of environment

Production

Staging

QA

Development

Environments in Continuous Delivery

Securing environments

Nonfunctional testing

Types of nonfunctional test

Performance testing

Load testing

Stress testing

Scalability testing

Endurance testing

Security testing

Maintainability testing

Recovery testing

Nonfunctional challenges

Application versioning

Versioning strategies

Versioning in the Jenkins pipeline

Completing the Continuous Delivery pipeline

Inventory

Versioning

Remote staging environment

Acceptance testing environment

Release

Smoke testing

Complete Jenkinsfile

Summary

Exercises

Questions

Further reading

Advanced Continuous Delivery

Technical requirements

Managing database changes

Understanding schema updates

Introducing database migrations

Using Flyway

Configuring Flyway

Defining the SQL migration script

Accessing database

Changing database in Continuous Delivery

Backwards-compatible changes

Non-backwards-compatible changes

Adding a new column to the database

Changing the code to use both columns

Merging the data in both columns

Removing the old column from the code

Dropping the old column from the database

Separating database updates from code changes

Avoiding shared database

Preparing test data

Unit testing

Integration/acceptance testing

Performance testing

Pipeline patterns

Parallelizing pipelines

Reusing pipeline components

Build parameters

Shared libraries

Creating a shared library project

Configure the shared library in Jenkins

Using the shared library in Jenkinsfile

Rolling back deployments

Adding manual steps

Release patterns

Blue-green deployment

Canary release

Working with legacy systems

Automating build and deployment

Automating tests

Refactoring and introducing new features

Understanding the human element

Summary

Exercises

Questions

Further reading

Best practices

Practice 1 – own process within the team!

Practice 2 – automate everything!

Practice 3 – version everything!

Practice 4 – use business language for acceptance tests

Practice 5 – be ready to roll back

Practice 6 – don't underestimate the impact of people

Practice 7 – build in traceability

Practice 8 – integrate often

Practice 9 – only build binaries once

Practice 10 – release often

Assessment

Chapter 1: Introducing Continuous Delivery

Chapter 2: Introducing Docker

Chapter 3: Configuring Jenkins

Chapter 4: Continuous Integration Pipeline

Chapter 5: Automated Acceptance Testing

Chapter 6: Clustering with Kubernetes

Chapter 7: Configuration Management with Ansible

Chapter 8: Continuous Delivery Pipeline

Chapter 9: Advanced Continuous Delivery

Other Books You May Enjoy

Leave a review - let other readers know what you think

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部