I am planning to build test environment using ansible, jenkins and docker together.The plan is like this.
Create ansible playbooks for every tool that you are using in your environment and store them on git. Using jenkins create job to create docker containers on dev server and use ansible playbooks for provisioning the docker containers. Jenkins jobs will be created so that user will have option to select playbooks that they want to use with docker containers and containers will be built accordingly.
whole concept can be summarized as shown is below image.
The benefits i see are
Automatic replication of exact production environments.
Scale your test environment as per requirement.
Provide different platforms for application testing on a single server.
Faster integration testing.
Promote agile methodology.
Freedom to develop and customize the test environment.
Developers and testers can create environments on their own even if they don't know anything regarding OS,configuration.
Test the deployment of the app in a clean environment, a fresh build.
Has any one implemented such type of environment architecture,i would like to discuss the feasibility actual benefits of the same.
Free Course: Introduction to DevOps Tools As mentioned, you can use Ansible to automate Docker and to build and deploy Docker containers. First, you'll need to have Docker SDK for Python installed.
Docker Swarm is more comprehensive and highly customizable, whereas Jenkins is customizable with the help of plugins. Kubernetes and Jenkins provide low fault tolerance unlike Docker. Docker is a container engine that can make and handle containers, whereas Jenkins is a CI/CD model that can build and test applications.
OS User PATH. Ansible can also be added to the PATH user used by the Jenkins executor instead of configured through Global Tool Configuration.
I am using a similar but different approach:
Define Dockerfiles or chef/puppet/ansible/salt provisioning. As in your approach.
Putting those descriptions under version control. As in your approach.
Using Jenkins A to CI- and Nightly Building Images and Uploading them into a registry. In order to manage different versions and keeping old images. This introduces a image registry in your diagram.
Extending those images with Jenkins-Swarm slaves. This enables ad-hoc deployment in your Jenkins environment.
Here I separate between building of the software and the building of the build slaves themselves.
I deploy a Jenkins B in order to build the software on environments.
Now I choose between container that I want to deploy permanently and build containers I want to deploy on demand.
Diagram:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With