A Brief Look at Salt
SaltStack, or simply Salt, is a configuration management system used by many people to make managing servers and configuring software much simpler.
- Why is Salt Useful, and How is it Unique?
- How to Install Salt
- Establishing Your Master & Minion
- Getting Salt Up & Running
Why is Salt Useful, and How is it Unique?
Yes, SaltStack Is a configuration management system – but since that term is a little dense, it helps to think of it as a tool that solves specific problems. Basically, it comes in handy when you have more than one server. Without anything to help manage your entire system, you have to log into each machine independently to perform whatever functions you want on each server. Typical tasks you might need to do would be rebooting it or seeing how long it’s been on. You also might want to install a program and set up the configuration to meet your own needs. Or you might want to create additional users and establish their privileges.
That project sounds, at least, reasonable with a handful of servers. But what happens when the system includes a dozen or even a hundred servers? Without a tool to help you with management, you would have to log into each server separately and perform the same task over and over again, explains Ben Hosmer in Linux Journal.
“What a pain!” said Hosmer. “Just updating user password policies would take days, and introducing an error would be quite likely.”
SaltStack allows you to make system-wide updates that apply to all your servers by submitting just one command.
Other configuration management systems include Puppet and Chef. What makes SaltStack stand out is that it was coded in Python and is very efficient with resources. An open source tool, it is also fast, in part because it benefits from the ZeroMQ communication layer. Its user community is well-populated and supportive.
Tools such as Chef, Puppet, and Salt make it possible to command various servers simultaneously, as well as manage application installation and setup.
SaltStack uses the command line. In other words, there isn’t an interface with buttons. The information you get from the server comes back as a line of text. The good thing about this visual simplicity is that it keeps everything streamlined.
There are two main points of focus for Salt, notes Hosmer: remote execution and configuration management. The first feature “allows you to login to a master machine and then execute commands on one or many other machines at once,” he says. “With Salt, you simply type your command once on your master machine, and it executes on every machine or even a targeted group of machines.”
The second feature allows you to store configuration information and then deliver it to specific servers – making it possible, for instance, to install software with certain configurations and get a progress report from the server.
How to Install Salt
Note: Salt is always being changed and improved, so you want to follow the instructions from the most up-to-date official documentation.
There are a few prerequisites you must have in place in order for Salt to work:
- A server running a Linux operating system like Atlantic.Net’s Linux Cloud Hosting option.
- Sudo or root access, meaning that the user has the correct privileges to be able to make certain changes
- Web connection to the machine
- Your IP address (which can be either private or public).
Salt allows you to use numerous servers, but you can set it up initially using just one machine, Hosmer comments. “Use your package manager to install Salt, and follow the installation guide found in the Salt Docs for your particular distribution,” he says. “You’ll also need sudo or root privileges to use Salt and install these packages.”
You may prefer to install from source so that you always get the latest distribution (which is always recommended as the safe choice, assuming you will stay abreast with updates). Some Linux distros will require a source install. To perform installation directly from the source, you can do that through the Salt page on Github.
Hopefully, you’re able to install your salt-master and a salt-minion without any difficulties. If you run into errors, you can typically get a quick response via either the mailing list or the IRC channel, where the community is active.
Establishing Your Master & Minion
The documentation will walk you through the designation of master and minion machines, one that is directing the other, Hosmer advises. “The master essentially is the central coordinator for all of the minions,” he says, “similar to a client/server configuration where the master is the server, and the minion is the client.”
Getting Salt up & Running
In order to use Salt to its full potential, you need high-quality web hosting. With Atlantic.Net, your 100% uptime cloud server will be live in 30 seconds, 100% powered by enterprise solid state drives (SSDs), billed per second so you only pay for actual use.
Cloud hosting services are only one of our offerings – we also offer dedicated hosting, managed hosting, and HIPAA-compliant hosting.
Get a $250 Credit and Access to Our Free Tier!
Free Tier includes:
G3.2GB Cloud VPS a Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year