Ce contenu nécessite un mot de passe pour y accéder.
Docker-Ansible-Gitlab: Challenge Infra
The purpose of this exercise is to set up a deployment environment and use Docker to build images based on the specified requirements. The first part involves creating an Ansible container, then setting up an SSH server, and finally deploying an Nginx server on the SSH Container. In addition to code clarity, the security and performance measures implemented throughout the exercise will also be taken into account. As a bonus step, the entire process will be replicated and executed within a GitLab CI pipeline
We expect you to deliver a git repository and a short Readme explaning your reflexion. You don’t absolutely need to complete the challenge but it’s important to see you thought process about the automation and securization.
Useful links:
For this step, you need to set up an SSH server that will host a nginx server:
┌──────────────┐ ┌──────────────┐
| (docker) | build | (docker) |
| Debian | ====> | ssh_server |
└──────────────┘ └──────────────┘
At this step, you need to create a Docker container capable of executing an Ansible command or playbook:
┌──────────────┐ ┌────────────────────┐
| (docker) | build | (docker) |
| AlmaLinux | ====> | ansible_controller |
└──────────────┘ └────────────────────┘
Now that we have an Ansible container and an SSH server, we will create a playbook to set up a Nginx server on the SSH container:
┌────────────── docker-compose ────────────────┐
| |
| ansible_controller |
| ║ |
| ║ Deploy Nginx server |
| ║ command: ansible-playbook ... |
| V |
| ssh_server |
| |
└──────────────────────────────────────────────┘
┌────────────── gitlab-ci ──────────────────────────────────┐
| |
| [Build] ---> [Deploy] ---> [Install Nginx] ---> [Test] |
| |
└───────────────────────────────────────────────────────────┘
Useful links: