Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
inside front cover
Pipeline as Code
Copyright
brief contents
contents
front matter
preface
acknowledgments
about this book
Who should read this book
How this book is organized
About the code
liveBook discussion forum
Other online resources
about the author
about the cover illustration
Part 1. Getting started with Jenkins
1 What’s CI/CD?
1.1 Going cloud native
1.1.1 Monolithic
1.1.2 Microservices
1.1.3 Cloud native
1.1.4 Serverless
1.2 Defining continuous integration
1.3 Defining continuous deployment
1.4 Defining continuous delivery
1.5 Embracing CI/CD practices
1.6 Using essential CI/CD tools
1.6.1 Choosing a CI/CD tool
1.6.2 Introducing Jenkins
Summary
2 Pipeline as code with Jenkins
2.1 Introducing the Jenkinsfile
2.1.1 Blue Ocean plugin
2.1.2 Scripted pipeline
2.1.3 Declarative pipeline
2.2 Understanding multibranch pipelines
2.3 Exploring the GitFlow branch model
2.4 Test-driven development with Jenkins
2.4.1 The Jenkins Replay button
2.4.2 Command-line pipeline linter
2.4.3 IDE integrations
Summary
Part 2. Operating a self-healing Jenkins cluster
3 Defining Jenkins architecture
3.1 Understanding master-worker architecture
3.2 Managing Jenkins workers
3.2.1 SSH
3.2.2 Command line
3.2.3 JNLP
3.2.4 Windows service
3.3 Architecting Jenkins for scale in AWS
3.3.1 Preparing the AWS environment
3.3.2 Configuring the AWS CLI
3.3.3 Creating and managing the IAM user
Summary
4 Baking machine images with Packer
4.1 Immutable infrastructure
4.2 Introducing Packer
4.2.1 How does it work?
4.2.2 Installation and configuration
4.2.3 Baking a machine image
4.3 Baking the Jenkins master AMI
4.3.1 Configuring Jenkins upon startup
4.3.2 Discovering Jenkins plugins
4.4 Baking the Jenkins worker AMI
Summary
5 Discovering Jenkins as code with Terraform
5.1 Introducing infrastructure as code
5.1.1 Terraform usage
5.2 Provisioning an AWS VPC
5.2.1 AWS VPC
5.2.2 VPC subnets
5.2.3 VPC route tables
5.2.4 VPC bastion host
5.3 Setting up a self-healing Jenkins master
5.4 Running Jenkins with native SSL/HTTPS
5.5 Dynamically autoscaling the Jenkins worker pool
5.5.1 Launch configuration
5.5.2 Auto Scaling group
5.5.3 Autoscaling scaling policies
5.5.4 Workers CPU utilization load
Summary
6 Deploying HA Jenkins on multiple cloud providers
6.1 Google Cloud Platform
6.1.1 Building Jenkins VM images
6.1.2 Configuring a GCP network with Terraform
6.1.3 Deploying Jenkins on Google Compute Engine
6.1.4 Launching automanaged workers on GCP
6.2 Microsoft Azure
6.2.1 Building golden Jenkins VM images in Azure
6.2.2 Deploying a private virtual network
6.2.3 Deploying a Jenkins master virtual machine
6.2.4 Applying autoscaling to Jenkins workers
6.3 DigitalOcean
6.3.1 Creating Jenkins DigitalOcean Snapshots
6.3.2 Deploying a Jenkins master Droplet
6.3.3 Building Jenkins worker Droplets
Summary
Part 3. Hands-on CI/CD pipelines
7 Defining a pipeline as code for microservices
7.1 Introducing microservices-based applications
7.2 Defining multibranch pipeline jobs
7.3 Git and GitHub integration
7.4 Discovering Jenkins jobs’ XML configuration
7.5 Configuring SSH authentication with Jenkins
7.6 Triggering Jenkins builds with GitHub webhooks
Summary
8 Running automated tests with Jenkins
8.1 Running unit tests inside Docker containers
8.2 Automating code linter integration with Jenkins
8.3 Generating code coverage reports
8.4 Injecting security in the CI pipeline
8.5 Running parallel tests with Jenkins
8.6 Improving quality with code analysis
8.7 Running mocked database tests
8.8 Generating HTML coverage reports
8.9 Automating UI testing with Headless Chrome
8.10 Integrating SonarQube Scanner with Jenkins
Summary
9 Building Docker images within a CI pipeline
9.1 Building Docker images
9.1.1 Using the Docker DSL
9.1.2 Docker build arguments
9.2 Deploying a Docker private registry
9.2.1 Nexus Repository OSS
9.2.2 Amazon Elastic Container Registry
9.2.3 Azure Container Registry
9.2.4 Google Container Registry
9.3 Tagging Docker images the right way
9.4 Scanning Docker images for vulnerabilities
9.5 Writing a Jenkins declarative pipeline
9.6 Managing pull requests with Jenkins
Summary
10 Cloud-native applications on Docker Swarm
10.1 Running a distributed Docker Swarm cluster
10.2 Defining a continuous deployment process
10.3 Integrating Jenkins with Slack notifications
10.4 Handling code promotion with Jenkins
10.5 Implementing the Jenkins delivery pipeline
Summary
11 Dockerized microservices on K8s
11.1 Setting up a Kubernetes cluster
11.2 Automating continuous deployment flow with Jenkins
11.2.1 Migrating Docker Compose to K8s manifests with Kompose
11.3 Walking through continuous delivery steps
11.4 Packaging Kubernetes applications with Helm
11.5 Running post-deployment smoke tests
11.6 Discovering Jenkins X
Summary
12 Lambda-based serverless functions
12.1 Deploying a Lambda-based application
12.2 Creating deployment packages
12.2.1 Mono-repo strategy
12.2.2 Multi-repo strategy
12.3 Updating Lambda function code
12.4 Hosting a static website on S3
12.5 Maintaining multiple Lambda environments
12.6 Configuring email notification in Jenkins
Summary
Part 4. Managing, scaling, and monitoring Jenkins
13 Collecting continuous delivery metrics
13.1 Monitoring Jenkins cluster health
13.2 Centralized logging for Jenkins logs with ELK
13.2.1 Streaming logs with Filebeat
13.2.2 Streaming logs with the Logstash plugin
13.3 Creating alerts based on metrics
Summary
14 Jenkins administration and best practices
14.1 Exploring Jenkins security and RBAC authorization
14.1.1 Matrix authorization strategy
14.1.2 Role-based authorization strategy
14.2 Configuring GitHub OAuth for Jenkins
14.3 Keeping track of Jenkins users’ actions
14.4 Extending Jenkins with shared libraries
14.5 Backing up and restoring Jenkins
14.6 Setting up cron jobs with Jenkins
14.7 Running Jenkins locally as a Docker container
Summary
Wrapping up
index
← Prev
Back
Next →
← Prev
Back
Next →