After discussing all the aspects of Ansible, environments, nonfunctional testing, and versioning, we are ready to extend the Jenkins pipeline and finalize a simple, but complete, Continuous Delivery pipeline.
We will do it in a the following few steps:
- Create the inventory of staging and production environments
- Use version in the Kubernetes deployment
- Use remote Kubernetes cluster as the staging environment
- Update acceptance tests to use the staging Kubernetes cluster
- Release the application to the production environment
- Add a smoke test that makes sure that the application was successfully released
We have seen the inventory file in the previous chapter while describing Ansible. To generalize this concept, an inventory is a list of environments with the description of how to access them. In this example, we'll use Kubernetes directly, so the Kubernetes configuration file, usually stored in .kube/config
, will mean for as the inventory.