-
Notifications
You must be signed in to change notification settings - Fork 60
Suggested Deployment
This is a guide to setup a Tango deployment environment using Docker. Make sure you have completed these steps before starting this guide. It uses nginx and supervisord to manage Tango processes and dependencies. All requests to nginx are rerouted to one of the tango processes. See Details for more information.
- nginx default port - 8600
- tango ports - 8610, 8611
- redis port - 6379
- You can change any of these in the respective config files in
deployment/config/
before you build the image.
-
Clone the Tango repo
$ git clone https://github.com/autolab/Tango.git; cd Tango
-
Ensure
config.py
has the settingUSE_REDIS=True
-
Install docker on host machine by following instructions on the docker installation page. Ensure docker is running by doing a
docker ps
. -
Run the following command to build the Tango deployment image. If you see
ERROR
during the supervisor start command, ignore it; the process needs to be started manually.$ docker build --tag="tango_deployment" .
-
Ensure the image was built by running
docker images
. It should appear in the list of images. -
Run the following command to run the image in a container with a bash shell.
$ docker run -it tango_deployment /bin/bash
-
Now, inside the container running the image run the following series of commands. Again, ignore the
ERROR
during thesupervisor start
command.$ service supervisor start
$ service nginx start
-
Run the following command to login to the supervisord shell to start all processes. All four processes (2 tangos, jobManager, and redis) should now be running.
$ supervisorctl
supervisor> start all
supervisor> exit
-
Run
curl localhost:8600
to ensure everything was setup correctly and that nginx is correctly routing requests. You should see a hello world message from Tango. -
Follow these directions to get started with running Tango in the container.