Learning Continuous Integration with Jenkins An End-To-end Guide to Creating Operational, Secure, Resilient, and Cost-effective CI/CD Processes
Integrate Jenkins, Kubernetes, and more on cloud into a robust, GitOps-driven CI/CD system, leveraging JCasC, IaC, and AI for a streamlined software delivery process Key Features Follow the construction of a Jenkins CI/CD pipeline start to finish through a real-world example Construct a continuous d...
Otros Autores: | |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Birmingham, England :
Packt Publishing Ltd
[2024]
|
Edición: | Third edition |
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009799144806719 |
Tabla de Contenidos:
- Cover
- Title Page
- Copyright and Credits
- Contributors
- Table of Contents
- Preface
- Part 1 The Concepts
- Chapter 1: The What, How, and Why of Continuous Integration
- What is continuous integration?
- Defining continuous integration
- Key principles of continuous integration
- How to practice continuous integration
- Using a version control tool
- Verifying every code commit for build errors
- Performing unit testing
- Static code analysis
- Employing a binary repository manager
- Orchestrating using a CI/CD tool
- Parallelizing through distributed builds
- Why is continuous integration crucial?
- A faster time to market (TTM)
- Improved software quality
- Highly secure applications
- Cost-effective system
- Summary
- Questions
- Answers
- Further reading
- Part 2 Engineering the CI Ecosystem
- Chapter 2: Planning, Deploying, and Maintaining Jenkins
- Technical requirements
- Planning your Jenkins setup
- Understanding the Jenkins server architecture
- Jenkins system requirements
- Evaluating Jenkins deployment scenarios
- Understanding JCasC
- Deploying your Jenkins setup
- Deploying Jenkins on a managed Kubernetes cluster
- Deploying Jenkins to a cloud instance
- Maintaining your Jenkins setup
- Following a structured approach to upgrades
- Implementing backup strategies for Jenkins build data
- Summary
- Questions
- Answers
- Further reading
- Chapter 3: Securing Jenkins
- Technical requirements
- Configuring user authentication and permissions
- Registering Jenkins on Azure AD
- Installing the Jenkins plugin for Azure AD
- Configuring Azure AD settings in Jenkins
- Configuring user permissions in Jenkins
- Understanding CSRF protection in Jenkins
- Using Jenkins Credentials
- Types of credentials
- Scope of credentials
- Securing secrets in JCasC
- Summary
- Questions.
- Answers
- Further reading
- Chapter 4: Extending Jenkins
- Technical requirements
- Connecting Jenkins to a version control system
- Installing the Jenkins plugin for GitHub
- Creating a personal access token on GitHub
- Creating a secret text credential inside Jenkins
- Creating a username and password credential inside Jenkins
- Configuring the GitHub plugin
- Connecting Jenkins to SonarQube
- Deploying an Nginx Ingress controller for SonarQube
- Deploying a SonarQube server using a Helm chart
- Deploying an Ingress file for SonarQube
- Installing the Jenkins plugin for SonarQube
- Creating a global analysis token on SonarQube
- Creating a secret text credential inside Jenkins
- Configuring the SonarQube plugin
- Connecting Jenkins to Artifactory
- Deploying an Nginx Ingress controller for Artifactory
- Deploying an Artifactory server using a Helm chart
- Deploying an Ingress file for Artifactory
- Installing the Jenkins plugin for Artifactory
- Creating a user in Artifactory
- Creating a username and password credential inside Jenkins
- Configuring the Artifactory plugin
- Summary
- Questions
- Answers
- Further reading
- Chapter 5: Scaling Jenkins
- Technical requirements
- Understanding Jenkins' distributed build architecture
- An overview of the master-agent model
- Methods for building a distributed farm
- Creating on-demand build agents on Kubernetes
- Understanding the Kubernetes plugin configuration
- Creating on-demand build agents on Azure
- Installing the Jenkins Azure VM Agents plugin
- Creating an Azure service principal in Azure
- Creating an Azure service principal credential inside Jenkins
- Configuring the Azure VM Agents plugin
- Summary
- Questions
- Answers
- Further reading
- Part 3 Crafting the CI Pipeline
- Chapter 6: Enhancing Jenkins Pipeline Vocabulary.
- Technical requirements
- Building vocabulary for pipeline code
- Introducing Jenkins pipeline code
- Understanding the components of Declarative Pipelines
- Managing complexity using nested stages
- Using built-in tools to construct pipeline code
- Introducing the Declarative Directive Generator
- Introducing Jenkins Snippet Generator
- Summary
- Questions
- Answers
- Further reading
- Chapter 7: Crafting AI-Powered Pipeline Code
- Technical requirements
- Introducing AI, language models, and ChatGPT
- Guidelines for effective interaction with ChatGPT
- Describing your pipeline requirements
- Running your pipeline code
- Troubleshooting your pipeline code
- Refining your code
- Constructing a pipeline code using ChatGPT
- Understanding the limitations of ChatGPT
- Summary
- Questions
- Answers
- Chapter 8: Setting the Stage for Writing Your First CI Pipeline
- Technical requirements
- Understanding the software project for CI
- Understanding the architecture
- Understanding the source code
- Understanding the backend code
- Understanding the frontend code
- Understanding the database code
- Creating a repository on GitHub for your project
- High-level CI design
- Source code considerations
- High-level CI pipeline design
- Creating a webhook on the repository
- Setting up a project in SonarQube
- Using Artifactory as a Docker registry
- Creating a Kubernetes Secret on AKS
- Summary
- Questions
- Answers
- Chapter 9: Writing Your First CI Pipeline
- Technical requirements
- Writing CI pipeline code
- Configuring Jenkins agent settings
- Performing unit testing
- Performing static code analysis
- Performing a SonarQube quality gate check
- Building and publishing images to Artifactory
- Publishing build info to Artifactory
- Publishing testing results to Jenkins
- CI in action.
- Creating a Multibranch Pipeline Job in Jenkins
- Visualizing the CI pipeline run and test results
- Visualizing the SCA report and code coverage
- Visualizing build artifacts
- Summary
- Questions
- Answers
- Further reading
- Part 4 Crafting the CD Pipeline
- Chapter 10: Planning for Continuous Deployment
- Technical requirements
- Understanding Continuous Deployment
- Universal CI with master-only CD
- Universal CI and CD
- Understanding GitOps
- Planning Continuous Deployment
- High-level Continuous Deployment design
- Exploring the Helm chart of our web application
- Setting up staging and production environments
- Installing Argo CD
- Creating applications in Argo CD
- Integrating Jenkins with Argo CD
- Summary
- Questions
- Answers
- Further reading
- Chapter 11: Writing Your First CD Pipeline
- Technical requirements
- Writing CD pipeline code
- Updating Jenkins agent settings
- Configuring pipeline options and the environment
- Update Staging Helm Chart Configuration
- Verify Staging Deployment Health
- Run Performance Testing
- Update Production Helm Chart Configuration
- Verify Production Deployment Health
- CD in action
- Verifying changes on the Helm chart
- Verifying the deployment in staging and production
- Visualizing performance testing results
- Summary
- Questions
- Answers
- Further reading
- Chapter 12: Enhancing Your CI/CD Pipelines
- Technical requirements
- Using GitHub Copilot to write pipeline code
- Enabling GitHub Copilot
- Using Copilot to write pipeline code
- Choosing between Copilot and ChatGPT
- Using Jenkins Shared Libraries
- Writing a Jenkins Shared Library
- Configuring a Shared Library inside Jenkins
- Using the Shared Library inside your pipeline
- Discarding old builds in Jenkins
- Catching security vulnerabilities early in code
- Installing JFrog Xray.
- Scanning for vulnerabilities through a CI pipeline
- Adding the Jenkins build to the scans list
- Visualizing the vulnerability report using Xray
- Summary
- Questions
- Answers
- Further reading
- Index
- Other Books You May Enjoy.