Operations grimoire/Odderon: Difference between revisions
From Nasqueron Agora
(Upgrade procedure) |
No edit summary |
||
Line 2: | Line 2: | ||
== Deployment == | == Deployment == | ||
Deployment is managed by | Deployment is managed by SaltStack, with code update from Git. | ||
# Commit code generic change to master, code specific to Odderon to production | # Commit code generic change to master, code specific to Odderon to production | ||
Line 28: | Line 28: | ||
To resume update: <code>rm /opt/odderon/LOCKED</code> | To resume update: <code>rm /opt/odderon/LOCKED</code> | ||
== Reference == | |||
This SaltStack role has been documented: | |||
* https://www.dereckson.be/blog/2017/01/25/deploy-a-darkbot-or-a-simple-generic-service-with-saltstack-part-1/ | |||
* https://www.dereckson.be/blog/2017/02/09/deploy-a-darkbot-or-a-simple-generic-service-with-saltstack-part-2/ |
Revision as of 22:04, 9 February 2017
Odderon is hosted on Eglide, runs as odderon
.
Deployment
Deployment is managed by SaltStack, with code update from Git.
- Commit code generic change to master, code specific to Odderon to production
- If needed, rebase production against master
- 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
- Forward the production branch against the desired commit.
- For example to rebase against the
master
branch:git fetch && git checkout production && git rebase origin/master
- Push to DevCentral:
git push origin production
- For example to rebase against the
- Deploy and restart the bot:
- Deploy with
salt eglide state.apply roles/shellserver/odderon/code
- When happy, you can restart the bot through
%restart
on IRC or throughsudo service restart odderon
- Deploy with
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
Reference
This SaltStack role has been documented: