Photo by Adrian Hartanto on Unsplash

Photo by Adrian Hartanto on Unsplash

Automating command execution across servers

All Together Now

Article from ADMIN 81/2024
By
Ansible is usually the choice when you want to run a task on multiple servers; however, Sake, a lesser known command runner, might do better if your server fleet is large and the tasks to run are simple.

Chances are that any system administrator who governs a meaningful number or servers uses a configuration manager of some sort. Just imagine upgrading the kernel on 20 identical virtual machines manually – you just wouldn't do it. Instead, you run a program that goes through the hard work while you have a nice cup of coffee.

Ansible, a popular software suite written in Python and probably the most popular tool for managing server fleets, is widely used to provision software (i.e., install software in servers) and configure your deployed applications according to required specifications. Because it is an industry standard at this point, aspiring system administrators are likely to learn Ansible because it is a marketable skill, even though it is not the only tool available for server management.

Sake is a command runner written in Go and designed to run tasks on multiple servers at once, allowing you to upgrade your servers' kernels all at once, reboot them all at once, or change their firewall configurations all at once with just a single command. Its advantages are its small size and appealing performance, which make Sake a very lightweight solution for automating tedious tasks. Even more important is that configuring Sake is extremely easy, even for novices.

Getting Started

Say you have three Devuan hosts called horse , donkey , and zebra . They live under domain operationalsecurity.es , and you want to manage them with Sake. As an example, I will show you how to create a task that updates all the installed packages on the three servers.

The first step is, obviously, to install Sake in your workstation. Like Ansible, Sake is agentless and does not require you to install any special software in the servers: Grabbing a recent Sake release [1] from GitHub and installing it in your workstation

...
Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs



Support Our Work

ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.

Learn More”>
	</a>

<hr>		    
			</div>
		    		</div>

		<div class=