Skip to content
Dan Mushkevych edited this page Jul 11, 2021 · 35 revisions

Scheduler production installation is based on Docker and described in details at scheduler-distro wiki.

Instructions below cover installation of the Synergy Scheduler in development environment.

Synergy Scheduler is written in Python and uses virtual environment for managing its interpreter and dependencies.

OS-level dependencies: sudo apt install python-setuptools python-dev build-essential checkinstall docker.io

Synergy Scheduler level dependencies:

  1. Start MongoDB container: docker run -d --name syn-mongodb -p 27017:27017 mongo:4

  2. Start RabbitMQ container:
    docker run -d --hostname syn-rabbitmq --name syn-rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management

  3. Clone scheduler project into a directory; cd into it

  4. Configure MQ:
    RABBITMQ_HOST="127.0.0.1" ./scripts/rabbitmq_config.sh

  5. Invoke installation: python launch.py install

  6. Create log folder:

    sudo mkdir -p /var/log/synergy-scheduler  
    sudo chmod 777 /var/log/synergy-scheduler  
    
  7. Verify installation, by running: python launch.py test

  8. Initialize Scheduler DB: python launch.py db --reset

  9. Mark current machine with BOX_ID (here as dev):
    sudo python launch.py super --boxid dev

  10. Initialize Supervisor DB: python launch.py super --reset

  11. Start the whole system: python launch.py start Supervisor

  12. Check number of started processes: ps aux | grep Synergy

  13. Monitor the logs in /var/log/synergy-scheduler for errors and navigate to: localhost:5000 for Scheduler MX page.

  14. You can kill all spawn processes with:
    ps aux | grep Synergy | grep -v grep | awk '{print$2}' | xargs kill
    or by executing shell script:
    sh scripts/kill_all.sh