Operations grimoire/Deploy with Salt
From Nasqueron Agora
Where to work?
- We deploy from Ysul /opt/nasqueron-operations
- You need to belong to the
salt
group - You want this alias:
alias salt sudo -u salt salt
(tcsh syntax) - Check salt-master is run, if not
service salt-master start
Deployment workflow
- On your laptop, prepare and upload a change to Differential against rOPS repository
- Get the change on Ysul:
arc patch D607
- Ask Salt to apply the change
- Log on #nasqueron-operations something like
[Eglide] New user account: amj (D607)
- Once working, you can merge it to master
Salt commands
To apply one state or a directory:
salt eglide state.apply roles/shellserver/users
To apply all:
salt eglide state.highstate
Replace eglide
by the server name, or
*
to target all machines.
When you've a new state, ensure it's called from
top.sls
file, as the repository root.