Operations grimoire/Deploy with Salt

From Nasqueron Agora
Revision as of 12:38, 11 August 2016 by Dereckson (talk | contribs) (Created page with "== Where to work? == * We deploy from Ysul /opt/nasqueron-operations * You need to belong to the <code>salt</code> group * You want this alias: <code>alias salt sudo -u salt s...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

📕📁📜 Old technical information :: content warning

⌛ This Nasqueron Operations Grimoire page hasn't been updated for a long time.

☣ As our infrastructure evolves quickly, there is a good chance this information is outdated or now inaccurate. Be careful and consider update it.

➡️ To assert the information is still up-to-date or not, you can check the history of the relevant role in our Operations repository.

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

  1.  On your laptop, prepare and upload a change to Differential against rOPS repository
  2. Get the change on Ysul: arc patch D607
  3. Ask Salt to apply the change
  4.  Log on #nasqueron-operations something like [Eglide] New user account: amj (D607)
  5. 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.