At TestProject we strive to use the most up-to-date best practices, and as part of an upgrade for some components and workflows in our infrastructure, we are partially shifting to Jenkins X. There is a lack of useful material available on Jenkins X serverless setup, so as part of our belief in sharing and giving back to the community we’ve decided to create full-blown step by step tutorial on about it!
Jenkins X serverless and Kubernetes continuous integration solves the following problems:
- Maintaining dedicated servers for various components involved in CI/CD, such as: Build servers, testing environments, orchestrating servers, etc.
- Automatic deployment of concurrent on-demand build and testing environments, allowing testers and developers to release and test dedicated features in parallel.
- Naturally integrates with microservice development and release flows.
In this step by step tutorial, we are going to build a CI/CD solution for a modern cloud application based on microservices with Jenkins X.
Jenkins X is a CI/CD solution for modern cloud applications on Kubernetes. It helps us create great pipelines for our projects and implement a full CI and CD.
Continuous integration (CI) is a software development methodology for automating the integration of code changes from multiple contributors into a single software project. Continuous deployment (CD) is a software development methodology, with this methodology software is automatically, rapidly and safely deployed into the production environment.
Jenkins X automates the management of the environments and the promotion of new versions of applications between environments via GitOps.
GitOps is a software development methodology for Kubernetes cluster management and application delivery. When following this methodology, Git is the single source of truth for both the infrastructure-as-code and the application code. All changes to the desired state are Git commits.
Jenkins X automatically spins up preview environments for our pull requests so we can get fast feedback before changes are merged to master.
Let’s get started! 💥
Tutorial Chapters
- You’re here → Continuous Deployment with Kubernetes and Jenkins X (Overview)
- Jenkins X Serveless Architecture (Chapter 1)
- Install & Setup Jenkins X Serverless (Chapter 2)
- Import Existing Project into Jenkins X (Chapter 3)
- Create Custom Build Pack for Jenkins X (Chapter 4)
- Integration Testing in Jenkins X (Chapter 5)
For the purpose of this tutorial, we’ve created a simple demo project with a microservice design that will be deployed on Kubernetes. Our demo project consists of 3 main services: A frontend application and 2 backend services.
Our demo project displays the current version of the backend services and its own. This will be helpful to illustrate and test the CI/CD pipeline that we are building later.
Our demo project services are written in Python and packaged into a Docker container based on Alpine image. The image below illustrates our demo project:
By the end of this tutorial, we will have a working CI/CD solution that will enable us to develop, test and deliver our application in a fast and reliable way.