This article covers a version of Ubuntu that is no longer supported. If you are currently operate a server running Ubuntu 12.04, we highly recommend upgrading or migrating to a supported version of Ubuntu:
Reason: Ubuntu 12.04 reached end of life (EOL) on April 28, 2017 and no longer receives security patches or updates. This guide is no longer maintained.
See Instead: This guide might still be useful as a reference, but may not work on other Ubuntu releases. If available, we strongly recommend using a guide written for the version of Ubuntu you are using. You can use the search functionality at the top of the page to find a more recent version.
<b>An Article From <a href=“http://saltstack.com”>SaltStack</a> Submitted by: Dave Boucha</b>
Salt is an awesome 100% open source configuration management and remote execution tool. Salt is a new approach to infrastructure management. Easy enough to get running in minutes, scalable enough to manage tens of thousands of servers, and fast enough to communicate with them in seconds.
SaltStack is the awesome and open company behind Salt. All Salt code and features are released under the Apache 2.0 license and can be downloaded at https://github.com/saltstack/salt and your preferred OS’s package manager.
In this article we will accomplish the following:
This article assumes the following:
Ok, the first thing we’re going to do is add the SaltStack ppa:
sudo apt-get install python-software-properties sudo add-apt-repository ppa:saltstack/salt
Enter when prompted.
Now update the apt package database:
sudo apt-get update
Once you’ve added the ppa we can now install the Salt Master and the Salt Minion:
sudo apt-get install salt-master sudo apt-get install salt-minion
Now we just need to tell the Salt Minion where to find its Salt Master. Since we’re running the Salt Master and the Salt Minion on the same host we’re, going to set the
master config option to
localhost. Use your preferred editor to modify the Salt Minion’s config file:
master config option to
localhost and remove the
# to uncomment it.
Now save your changes and then restart the Salt Minion service:
service salt-minion restart
List all the Minion keys your Master knows about:
The Minion’s key should now show up under
Unaccepted Keys. Your droplet’s name should appear where
dave03 appears below:
Accepted Keys: Unaccepted Keys: dave03 Rejected Keys:
The last thing we need to do is have the Master accept the Minion’s public key. Use your droplet’s name instead of ‘dave03’:
salt-key -a 'dave03'
You should see output similar to what’s below:
The following keys are going to be accepted: Unaccepted Keys: dave03 Proceed? [n/Y] y Key for minion dave03 accepted.
You now have a working Salt Master and Salt Minion running on your Ubuntu 12.04 server! Let’s try out some of the commands that you can run.
Check that the Minion responds:
salt '*' test.ping
Let’s list the server’s ip addresses:
salt 'dave03' network.ip_addrs
dave03: - 192.xxx.xxx.xxx
Let’s install nginx:
root@dave03:~# salt 'dave03' pkg.install nginx root@dave03:~# salt 'dave03' service.start nginx
We’ve created some basic Salt formulas that make use of Salt’s built in states to configure our server. This is just the very beginning of what you can do with Salt!
The Official SaltStack Walkthrough is a great way to learn more about Salt.
To learn more about all the ways Salt can help you manage your infrastructure read through the extensive documentation for Salt at http://docs.saltstack.com
Please come join the great Salt community! Our mailing list is [here] (https://groups.google.com/forum/#!forum/salt-users) and our IRC channel is #salt on freenode.
Development of Salt takes place here: https://github.com/saltstack/salt
Please feel free to stop by and ask for help!
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in our Questions & Answers section, find tutorials and tools that will help you grow as a developer and scale your project or business, and subscribe to topics of interest.Sign up
Salt is an open-source configuration management and remote execution tool. This tutorial series serves as an introduction to Salt, and will help beginners to get started with using the application.
Click below to sign up and get $200 of credit to try our products over 60 days!