Complete Continuous Delivery pipeline
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 few steps as follows:
- Create the inventory of staging and production environments
- Update acceptance tests to use the remote host (instead of local)
- Release the application to the production environment
- Add a smoke test which makes sure the application was successfully released
Inventory
In their simplest form, we can have two environments: staging and production, each having one Docker host machine. In real life, we may want to add more host groups for each environment if we want to have servers in different locations or having different requirements.
Let's create two Ansible inventory files. Starting from the staging, we can define the inventory/staging
file. Assuming the staging address is 192.168.0.241
, it would have the following...