Skip to content

Suggested Deployment

Aatish Nayak edited this page Jan 26, 2016 · 17 revisions

Introduction

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.

Details

  • 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.

Steps

  1. Clone the Tango repo

    $ git clone https://github.com/autolab/Tango.git; cd Tango
  2. Ensure config.py has the setting USE_REDIS=True

  3. Install docker on host machine by following instructions on the docker installation page. Ensure docker is running by doing a docker ps.

  4. 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" .
  5. Ensure the image was built by running docker images. It should appear in the list of images.

  6. Run the following command to run the image in a container with a bash shell.

    $ docker run -it tango_deployment /bin/bash
  7. Now, inside the container running the image run the following series of commands. Again, ignore the ERROR during the supervisor start command.

    $ service supervisor start
    $ service nginx start
    
  8. 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
    
  9. 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.

  10. Follow these directions to get started with running Tango in the container.

Clone this wiki locally