-
Notifications
You must be signed in to change notification settings - Fork 63
Suggested Deployment
This is a guide to setup a Tango deployment environment using Docker. 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.pyhas 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
ERRORduring the supervisor start command, ignore it; the process needs to be started manually.$ docker run --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 -it tango_deployment /bin/bash
-
Now, inside the container running the image run the following series of commands. Again, ignore the
ERRORduring thesupervisor startcommand.$ 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.
$ supervisorctlsupervisor> start allsupervisor> exit -
Run
curl localhost:8600to ensure everything was setup correctly and that nginx is correctly routing requests. You should see a hello world message from Tango.