Using Ansible,Jenkins and docker to build fast test environments

前端 未结 2 1130
温柔的废话
温柔的废话 2021-02-04 18:57

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

2条回答
  •  温柔的废话
    2021-02-04 19:09

    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.

      • Permanent containers, which are heavily used by build jobs, are started as swarm slaves and exchanged daily by nightly builds.
      • Ad-hoc containers are managed by the Jenkins-Docker-Plugin.
      • For more complex environment configurations I use docker-compose to manage ad-hoc availability.
      • For ad-hoc environments, namely VMs for running those configurations, I use docker-swarm.

    Diagram:

提交回复
热议问题