We are asking you to build out an architecture to support multiple instances of a load-balanced sample application
Using a drawing tool of your choice - we use draw.io because it is sharable - create a diagram outlining your approach for creating an environment utilizing Ansible, Docker, and HAProxy. Show how you would use Ansible to provision Docker, deploy multiple Docker containers, and load balance multiple instances of a service using HAProxy.
Some questions to consider
- How will you scale the service?
- How will you support multiple environments (development/production)?
Implement the Ansible/Docker/HAProxy solution that you diagramed.
You should
- Create the Ansible scripts you would want to use to provision Docker and deploy the containers.
- Create the HAProxy configuration to handle the load balancing.
- Create the dockerfile to build the image for the service.
- The
cheese app
is a node application and runs using the 'npm start' command. - The
cheese app
defaults to port 3001 (but can take in the env variable PORT) - Doing a curl or http GET request to the service should return JSON
{
"message":"I like to eat cheese",
"port":"3001"
}
We ask that you use the same technology that we use on a daily basis. This includes
- Ansible
- Docker
- HAProxy
Please fork our repository and use a feature branch workflow while developing your functionality. When you are ready to submit your work make a pull request against our repository.
We use GitFlow on a daily basis - this allows us to build quality control into our development, QA and deployment process.
We are asking that you use a modified Github Flow - sometimes referred to as a feature branch workflow - methodology instead of GitFlow. Conceptually, GitFlow and Github flow are similar.