Use Homebrew to install saltstack:
http://nathangrigg.net/2012/07/schedule-jobs-using-launchd/
- Install Homebrew:
- Install XCode
- Load it to accept the Terms
- Install Homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - Ensure Homebrew is up to date:
brew update
brew upgrade
brew doctor - Install saltstack
brew install saltstack - Copy the Minion config file to resolve your host:
sudo mkdir /etc/sudo
sudo cp /usr/local/etc/saltstack/minion /etc/salt/minion
sudo vi /etc/salt/minion
Uncomment 'master: salt' and replace 'salt' with your salt hostname - Start the Minion service to resolve the Master:
sudo salt-minion -dIf id doesn't run, try:
sudo salt-minion --log-level=all - Accept the key on the master:
salt-key -L
salt-key -A
To Setup the Salt Minion as a Daemon
- You can run it from terminal:
sudo salt-minion -d - Use the launchd system for OSX:
- Or you can get the plist files from the salt rep eg.
https://github.com/saltstack/salt/tree/develop/pkg/darwin
Copy them to: /Library/LaunchDaemons - Create your own plist file:
- Use LaunchControl to create a plist file
- Move it to
/Library/LaunchDaemons - Use launchctl to enable it:
sudo launchctl load -w /Library/LaunchDaemons/com.saltstack.salt.minion.plist
sudo launchctl unload /Library/LaunchDaemons/com.saltstack.salt.minion.plist
http://nathangrigg.net/2012/07/schedule-jobs-using-launchd/
No comments:
Post a Comment