Bolt Demo: Puppet’s Open Source Tool Manages Tasks Across Nodes
What Is Bolt?
According to Wyman, at its heart Bolt is a task runner and orchestration tool to run ad-hoc commands and scripts across an infrastructure. Bolt is open source, agentless, and supports multiple platforms (Linux, macOS, and Window) to make the orchestration and automation of tasks easy. Bolt also features:
- The ability to distribute and execute scripts written in Bash, PowerShell, Python and more.
- Scaling to more than 1,000 concurrent connections.
- Support for industry-standard protocols (such as SSH/SCP, WinRM/PSRP) as well as authentication methods (password, public-key).
Bolt makes it easy to patch and update systems, troubleshoot servers, deploy applications, and stop/start services. Bolt can be installed on a standard workstation (Linux, Windows, or macOS) and connects to remote nodes with SSH or WinRM.
With Bolt, admins are able to work with YAML files or Bolt’s own orchestration language, called “Plans,” which allows you to write simple or complex plans. Bolt’s Plan language allows admins to include if statements (for better error handling), making it possible to execute even more complicated tasks. Admins who are already familiar with YAML files can create their tasks in that particular format and then use Bolt’s built-in tool to convert from YAML to Plan.
Created by Puppet engineers, Bolt differs from the Puppet solution in one critical way. Puppet was designed to manage resources over time (such as checking in every 30 minutes to make sure that nothing has changed or your infrastructure hasn’t drifted). Bolt, on the other hand, is more about point-in-time changes. Instead of using declarative statements to say “Here’s how I want my infrastructure to look all the time,” you use Bolt to say, “at this point in time I need to run X command or deploy X database.” Bolt makes the running and/or orchestrating a task once simple.
Using Bolt, Wyman shows how easy it is to execute a simple script across three nodes, using a default Canary plan that ships with Bolt. As she explains in the demo, she also illustrates how easy it is to control numerous aspects of deployment, such as error handling. After the simple script succeeds, a more complicated task to deploy Puppet to three nodes illustrates the power of Bolt.
Finally, Lucy demonstrates how to pass parameters via the command line to print out “Hello NewStack” on three nodes and then explains how to apply Puppet code from within a Bolt plan.
If you know YAML, you shouldn’t have any problem getting up to speed with Bolt. Go to bolt.guide to learn more.
Puppet is a sponsor of The New Stack.