Operations grimoire/Odderon: Difference between revisions
From Nasqueron Agora
(Created page with "Odderon is hosted on Eglide, runs as <code>odderon</code>. == Deployment == Deployment is managed by Salt, with code update from Git. # Commit code generic change to master,...") |
(Upgrade procedure) |
||
Line 9: | Line 9: | ||
The darkbot is in written in C, so it must be compiled. | 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 <code>master</code> branch: <code>git fetch && git checkout production && git rebase origin/master</code> | |||
## Push to DevCentral: <code>git push origin production</code> | |||
# Deploy and restart the bot: | |||
## Deploy with <code>salt eglide state.apply roles/shellserver/odderon/code</code> | |||
## When happy, you can restart the bot through <code>%restart</code> on IRC or through <code>sudo service restart odderon</code> | |||
== Allow user access top code == | == Allow user access top code == |
Revision as of 22:03, 9 February 2017
Odderon is hosted on Eglide, runs as odderon
.
Deployment
Deployment is managed by Salt, 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