-
Notifications
You must be signed in to change notification settings - Fork 0
Mark Dock Unhealthy
Steps to manually publish unhealthy job via palantiri
First log into location where palantiri is ran (currently alpha-api-old) and start a bash session inside that container with the following command
ssh alpha-api-old
docker exec -it `docker ps | grep palantiri | awk '{print $1}'` bash
next we start node REPL and require the module in charge of publishing events and use it to create this job docker_host (string) = full docker host url (http://10.0.0.1:4242) org_id (number) = github org if
to get the orgId ask mavis
grep for the ip of the dock you are trying to remove, and look at the number next to tags field, that is your github id. ex curl http://mavis.runnable.io/docks
[{"numContainers":0,"numBuilds":0,"host":"http://10.0.194.149:4242","tags":"6723349,run,build"},
{"numContainers":0,"numBuilds":0,"host":"http://10.0.233.60:4242","tags":"11543906,run,build"},
...
if your dock was 10.0.194.149 then the github ID for it would be 6723349
NOTE: docker_host_uri is of the form http://10.0.194.149:4242 ensure when you make the unhealthy event you are using that fill path. also this value is a String and need to be in quotes. However orgId is a Number and should not be surrounded in quotes
root@palantiri:/palantiri# node
> rabbit = require('./lib/external/rabbitmq')
{"name":"palantiri","environment":"production","hostname":"palantiri","pid":65,"module":"lib/external/rabbitmq.js","level":30,"msg":"RabbitMQ constructor","time":"2015-10-08T00:34:28.982Z","v":0}
{ hermesClient: null }
> rabbit.connect()
{"name":"palantiri","environment":"production","hostname":"10.0.1.253","pid":65,"module":"lib/external/rabbitmq.js","level":30,"password":"6df7983b76a22bbbffee11a29860cda8","port":54321,"username":"a4c1ac709c3bc685a6665fc1d23d737d","queues":["docker-health-check","health-check","on-dock-unhealthy"],"msg":"RabbitMQ .connect","time":"2015-10-08T00:34:33.390Z","v":0}
undefined
> rabbeit.publishOnDockUnhealthy({ host: '<docker_host_uri>', githubId: <orgId>})
undefined