websages/jarvis — pull request #14 by stahnma (2014-02-01 05:30:24+00:00)
Title: Fix deployments

We're gonna chatops like it's 2004 up in here.

We wanted a way to deploy and reload crunchy from the CLI. In this case
we'll just pass it off to IRC. The helpers makes use of a new script I
wrote on freyr at `/usr/local/bin/legacy-bot-reload`. This script is
pretty basic and has minimal error checking. I haven't included it in
this pull request, because the entire thing is quite a hack.

Right now we must use ssh keys with force-commands (2 keys, one for
deploy and one for reload) authenticating as root, becuase James S White
effed up our sudo on freyr. Until that is fixed, this is the best way I
could think of to solve the problem.

The bot should respond to:

!legacy-bot-deploy

This is congruent to:
cd /opt/local/jarvis && git pull && service jarvis restart

There is also

!legacy-bot-reload

This maps to:
service jarvis restart

The main issue with this commit is that there is no logging of what
happened. The only thing you can really see is the PID change, or you
can watch /var/log/secure for some ssh traffic. Meh. It's legacy.