Skip to content

GasStationTV/docker-ansible-coding-exercise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

GSTV Docker/Ansible Coding Exercise

Overview

We are asking you to build out an architecture to support multiple instances of a load-balanced sample application

Architecture Diagram

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)?

Technical Implementation

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.

Notes

  • 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"
}

Technology

We ask that you use the same technology that we use on a daily basis. This includes

  • Ansible
  • Docker
  • HAProxy

Submitting Your Work

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.

Version Control

GitFlow and GithubFlow

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.

About

An exercise using Ansible, Docker, and HAProxy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors