Skip to content

Latest commit

 

History

History
61 lines (38 loc) · 1.66 KB

README.md

File metadata and controls

61 lines (38 loc) · 1.66 KB

Dispatcher's Worker

Save application on a distributed system managed by the Dispatcher Master). This is a service where its main purpose is to process tasks sent by master.

See also:

Installation

Pre-requisites:

  • Install Docker and Docker Compose.
  • Create a new worker in the Dispatcher Web Interface, download the configuration file and put it in the target machine.

Replace the environment variable values and run the following snippet:

export WORKER_CONFIG_FILE=<path to configuration file>

sudo mkdir -p /opt/dispatcher-worker
cd /opt/dispatcher-worker

sudo curl -L https://raw.githubusercontent.com/comnetunb/dispatcher-worker/master/docker-compose.yml -o docker-compose.yml

sudo mv $WORKER_CONFIG_FILE ./config.json
chmod 600 ./config.json

export DISPATCHER_WORKER_CONFIG_FILE=$(readlink -f ./config.json)

sudo docker-compose up -d

Development

Pre requisites

Running

After installing Node, download and run the Worker with:

$ git clone https://github.com/comnetunb/dispatcher-worker
$ cd dispatcher-worker
$ npm install
$ npm run dev

If you'd like to change the Configuration file, open it at dispatcher-worker/config/config.sample.json.

Deploying

For now, here is the checklist:

  • Commit everything
  • Bump package json version and commit again
  • Build the docker image
  • Push both repo and docker image