radpoint-platform-swarm-healthcheck
v1.0.10
Published
Healthcheck for the Docker swarm to be installed as standalone process on every host that is a worker in a swarm.
Downloads
14
Maintainers
Keywords
Readme
README
This is a healthcheck for the Docker swarm to be installed as standalone process on every host that is a worker in a swarm. It checks that the docker daemon is running on that host and that it is connected to the swarm. The healthcheck will be called by the AWS Application Load Balancer on / port 8999
Build
Just publish to npm:
$ npm run push
Usage
- In the EC2 launch configuration please install necessary stuff:
$ sudo apt-get install -y python-software-properties
$ curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
$ sudo apt-get install -y nodejs
$ sudo npm install pm2 -g
$ sudo npm install radpoint-platform-swarm-healthcheck
- In the EC2 launch configuration also make sure the pm2 is launched when system boots:
$ pm2 startup | grep sudo | bash -
- Run this on each EC2 host that should be part of the swarm in the EC2 startup script:
$ pm2 start /path/to/healthcheck.js
$ pm2 save
Make sure that security group settings on both EC2 instance and ALB allow for the traffic on the 8999 tcp port.
Start locally
- Install docker
- Ensure that docker process is running
- Initilize docker swarm by using command: 'docker swarm init'
- Start local server using 'npm start'
- You are good to go on 'localhost:8999'