http://docs.saltstack.com/topics/troubleshooting/
http://docs.saltstack.com/en/latest/topics/troubleshooting/yaml_idiosyncrasies.html
http://docs.saltstack.com/topics/tutorials/walkthrough.html
http://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.jinja.html
http://docs.saltstack.com/topics/installation/osx.html
- brew install salt
- sudo launchctl limit maxfiles 4096 8192
- sudo mkdir /etc/salt
- echo "max_open_files: 8192" | sudo tee -a /etc/salt/master
- sudo add-apt-repository ppa:saltstack/salt
- sudo apt-get update
- apt-get install salt-master
- apt-get install salt-cloud
- chmod 0400 /etc/salt/MainKey.pem
- apt-get install python-pip
- pip install GitPython
- ssh -T git@github.com
- start salt-master
See http://docs.saltstack.com/en/latest/topics/targeting/compound.html
# salt '*' sys.doc
# salt -E '.*' cmd.run 'ls -l | grep foo'
# salt -L foo.bar.baz,quo.qux cmd.run 'ps aux | grep foo'
# salt '*' grains.items
# salt -G 'os:Fedora' test.ping
# salt '*' pillar.items
# salt 'supply.*' network.ip_addrs
# salt '*' saltutil.refresh_pillar
# salt '*' pillar.item mine_functions
# salt '*' mine.get '*' grains.items
# salt -C 'G@circle:live and G@data_volume_attached:True'
# salt '*' state.sls sfym.app
# salt -C 'E@^((?!frontline).)*$' cmd.run 'dpkg --purge nginx'
# salt -C 'E@^((?!frontline).)*$' cmd.run 'rm -rf /etc/nginx/'
# salt '*' state.highstate test=True
These are kind of packages for salt http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html all you need to do is include them and their dependencies in gitfs_remotes in /etc/salt/master file.
- salt '*' pkg.list_upgrades
- salt '*' pkg.upgrade
- salt '*' system.reboot
# salt '*' state.show_sls apache
# salt '*' state.show_highstate
for master
# stop salt-master
# salt-master -l debug
for minion
# stop salt-minion
# salt-minion -l debug
http://docs.saltstack.com/en/latest/topics/troubleshooting/
or
- stop master/minion
- rm -rf /var/cache/salt
- start master/minion
or with error "The function "state.highstate" is running as PID 28604 and was started at 2014, Apr 28 13:02:34.845199 with jid 20140428130234845199"
- salt 'server' saltutil.running
- salt 'server' saltutil.kill_job 20140428130234845199
# killall salt-master
# start salt-master
# cat >> /etc/security/limits.conf
root soft nofile 20000
root hard nofile 30000
http://docs.saltstack.com/en/latest/ref/states/highstate.html#state-declaration