Warning Livedoc is no longer being updated and will be deprecated shortly. Please refer to https://documentation.tjhsst.edu.

Difference between revisions of "Salt/State list"

From Livedoc - The Documentation Repository
Jump to: navigation, search
(Created page with "= Salt states available for use = All states that the CSL wrote will start with <code>tjcsl.</code> to distinguish them from other organizations states. A list of <code>tjcsl...")
 
m (Managing clustered applications (load balancer, etc): categorize)
 
Line 39: Line 39:
 
     - running</pre>
 
     - running</pre>
 
Drop these kinds of files in <code>tjcsl/cluster/&lt;app&gt;.sls</code>. Config can go in <code>config/cluster/&lt;appname&gt;/conf.ig</code>.
 
Drop these kinds of files in <code>tjcsl/cluster/&lt;app&gt;.sls</code>. Config can go in <code>config/cluster/&lt;appname&gt;/conf.ig</code>.
 +
[[Category:To Update]]

Latest revision as of 00:30, 27 February 2016

Salt states available for use

All states that the CSL wrote will start with tjcsl. to distinguish them from other organizations states. A list of tjcsl. states are below.

Generic states, suitable for all machines

  • tjcsl.ssh - this will make sure that openssh is installed, sshd is running, and manages ssh(d)_config
  • tjcsl.gentools - this makes sure that eix and gentoolkit are installed (for glsa-check, etc)
  • tjcsl.motd - adds the standard CSL banner, with hostname
  • tjcsl.vim - makes sure Vim is installed
  • tjcsl.fish - makes sure the Fish shell is installed

Managing .k5login

/root/.k5login often needs to be managed; this is done with salt. You’ll probably need to create a new state; place it in tjcsl/k5login/<group>.sls, for exampe, tjcsl/k5login/itanium.sls. The state should look something like this:

<group>_k5login:
    file.managed:
    - name: /root/.k5login
    - source: salt://config/k5login/<group>
    - mode: 640

You should then put a list of principals allowed to gain root in config/k5login/<group>. When you’re done, the new state is available as tjcsl.k5login.<group>.

Managing clustered applications (load balancer, etc)

Clusters of applications can also be managed with salt:

cluster_awesome:
    file.managed:
    - name: /etc/awesomething.conf
    - source: salt://config/cluster/awesome/thing.conf
    - mode: 644
    
    pkg.installed:
    - name: app-whatever/my-awesome-cluster-app
    
    service:
    - name: service-of-awesome
    - running

Drop these kinds of files in tjcsl/cluster/<app>.sls. Config can go in config/cluster/<appname>/conf.ig.