Operations grimoire/Odderon

From Nasqueron Agora
Revision as of 22:03, 9 February 2017 by Dereckson (talk | contribs) (Upgrade procedure)

Odderon is hosted on Eglide, runs as odderon.

Deployment

Deployment is managed by Salt, with code update from Git.

  1. Commit code generic change to master, code specific to Odderon to production
  2. If needed, rebase production against master
  3. To update the repository against production branch: salt eglide state.apply roles/shellserver/odderon/

The darkbot is in written in C, so it must be compiled.

Upgrade code

  1. Forward the production branch against the desired commit.
    1. For example to rebase against the master branch: git fetch && git checkout production && git rebase origin/master
    2. Push to DevCentral: git push origin production
  2. Deploy and restart the bot:
    1. Deploy with salt eglide state.apply roles/shellserver/odderon/code
    2. When happy, you can restart the bot through %restart on IRC or through sudo service restart odderon

Allow user access top code

Users in nasqueron-irc group can sudo -u odderon. This group is managed at pillar/users/shellgroups.sls.

Block deployment

Code update doesn't occur if a LOCKED file exists.

So to block update from Git: touch /opt/odderon/LOCKED

To resume update: rm /opt/odderon/LOCKED