Continuous Integration and Continuous Delivery (CI/CD) takes a holistic approach to software development to ensure faster time-to-market which improves ROI.
Continuous integration is a process of integrating the source code with the repository branches so that we can build, test and deploy early so that the development process is done in a short span and bugs can be identified in no time.
Continuous delivery (CD) is a set of practices outlined to make sure that code can be swiftly and safely deployed to production by providing every change to a production-like environment and ensuring business applications and services function as expected through meticulous automated testing.
Below provided is the guideline for how we can achieve Continuous Integration and Continuous Delivery with Jenkins and Kubernetes.
We can configure a pipeline in Jenkins listening to a particular branch of a repository. If the Developer commits code under that branch, the build job will be triggered which starts building the image. Once it is successful, it will be pushed to elastic container service in Amazon web services so that we can maintain different versions of that image. When Build job becomes successful, deploy job will be triggered which will pull the latest image from the elastic container registry and deploy it in Kubernetes. The developer will be notified about the status of the deployment through the slack channel.
Each time when an image is updated it has to be updated in the deployment as well. Kubernetes has a feature to upgrade the implementations using kubeclt CLI. So, the implementation gets updated to a particular service with this below command.
Config Maps are used to have a different set of properties for an app depending upon the environment so that the code is completely decoupled from the properties. Deployments will be attached with these config maps using the volumes that we create in the deployment.
Deploying, updating and having multiple sets of properties of deployment is made easier using automated workflow using the jenkins server and kubectl CLI.
Royal Cyber helps customers take the Continuous Integration and Continuous Delivery (CI/CD) approach by automating the build and deployment process, thereby reducing the dependency on physical resources and help customers save money.For more information, click here
By Ajay Kumar