Skip to content

Instantly share code, notes, and snippets.

@HashNuke
Last active December 20, 2015 12:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HashNuke/6129613 to your computer and use it in GitHub Desktop.
Save HashNuke/6129613 to your computer and use it in GitHub Desktop.

These are notes for using the "Salt in 60 seconds" tutorial with DigitalOcean - http://www.saltstat.es/posts/quickstart.html

After creating a droplet via their web interface, login with you IP address and the password that is emailed to you.

export IP=your-ip
ssh root@$IP

Install saltstack

curl -L http://bootstrap.saltstack.org | sudo sh -s -- -M stable

Add a deployer user

adduser deployer
sudo usermod -aG sudo deployer

Create required directories for salt and make the deployer owner of the directory

mkdir -p /srv/salt && chown deployer -R /srv/salt

Create saltstack config

echo '''### This is controlled by the hosts file
master: localhost
id: localhost
file_roots:
  base:
    - /srv/salt/states
log_file: /var/log/salt/minion
log_level: debug
log_level_logfile: garbage
''' > /etc/salt/minion

sed -i 's/#master: salt/master: localhost/' /etc/salt/minion

Start saltstack

salt-minion -d

Exit from root and login as deployer for rest of the tutorial.

The rsync deploy command for the rest of the tutorial is now the following:

rsync -azve ssh `pwd`/deploy/salt/ deployer@$IP:/srv/salt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment