Our Slack-Bot (InfraRed) was deployed using Docker. To orchestrate the spin up of all the containers required, we use docker-compose.
Docker Images define the setup required to run each of the application sub-components, namely "application-server", "provisioning-server" and "MongoDB". Containers are spun up for each of these images and the appropriate network connections are established using Docker Links. The trio of containers are sandboxed together in a network partition that is maintained by Docker and the only out of network communication that happens is to the services "api.ai", "slack", "aws" and "digital-ocean".
The entire docker-deployment is done on a Docker-Host VM that we provisioned on the cloud. To setup this host-vm (ubuntu 14.04x64), we have written an Ansible-Playbook (playbook.yml).
ansible-playbook -i inventory playbook.yml
The machine running the playbook must have the following environnment variables "APIAITOKEN" and "ALTCODETOKEN" set.
These environment variables contain API tokens that are propogated to the Host-VM via ansible and then to the Docker containers to be used by the application. This method was utilized to prevent secret tokens from being read by others.
docker-compose build
docker-compose up
The task and issues related to this milestone can be found under Week 7
and Week 8
in WORKSHEET.md
Acceptance tests can be found here ACCEPTANCE.md