If you’re new to Puppet Tasks™, here’s a quick primer. Puppet Tasks complements Puppet’s model-driven approach to automation by adding the ability to easily execute ad hoc tasks in an declarative way — doing exactly what you want, when you want it. The goal is to make it simple for you to do things like troubleshoot systems and devices, deploy point-in-time changes, and execute commands in an ordered fashion as part of an application deployment workflow.
Puppet Tasks is available two ways:
- Puppet Bolt, an agentless open source task runner that can can run ad hoc tasks from the command line. This is a good option for smaller infrastructures.
- Puppet Enterprise Task Management, which is available in Puppet Enterprise 2017.3. It’s best suited to large-scale implementations and anyone looking for the benefits of governance with role-based access controls, audit trails and team-oriented workflows.
If you’ve begun to experiment and deploy Puppet Tasks — the declarative way to deploy ad hoc or ordered changes to your systems — you’ll be happy to know that the list of Puppet Approved and Supported modules that support tasks is growing, particularly for some of the most popular modules on the Puppet Forge.
At Puppet, we take pride in the contributions our community makes to the Forge, which now features more than 5,200 modules. We also like to let our users know which modules meet our quality and usability requirements, which is why we tag them as Approved and Supported.
Here’s a quick rundown of modules that can be run as tasks in Puppet Enterprise:
Puppet Supported modules
puppetlabs/apt –– Provides an interface for managing Apt sources, keys and definitions, making it easier to manage Debian, Ubuntu and related operating systems. If, for example, your primary Linux repos are offline or you want to add the latest version to run some tests, you can change your /etc/apt/sources.list files to point to different servers. The module tasks enable you to run apt-get update, upgrade or other apt functions.
puppetlabs/apache –– Installs, configures and manages Apache virtual hosts, web services and modules. You can already standardize vhost settings, including ports, document roots, certs and redirects, but the module tasks enable you to reload the Apache config without restarting the service, which allows you to make changes to a site without bringing it down.
puppetlabs/mysql –– Installs, configures and manages the MySQL service, including the installation of the popular database software. The module gives you broad control over managing MySQL resources, and the new task feature enables you to execute arbitrary SQL so you can create databases and tables, add users, grant permissions on tables, run queries and more.
puppetlabs/aws –– This module allows you to use Amazon Web Services’ powerful API for managing your AWS infrastructure, including creating instances. You can execute tasks to do such things as show VPCs, security groups and EC2 instances in a particular region; purge certs associated with a given instance-ID; install needed gem dependencies; and create new instances.
puppetlabs/docker –– This module installs, configures and manages Docker CE (Community Edition) and Docker EE (Enterprise Edition) on a wide range of platforms, including CentOS, Debian, Fedora, RHEL and Ubuntu platforms. The modules allows you to execute tasks to build and deploy consistent images, containers, networks, and the tasks enable you to get the swarm token from the master, and leave, join or initialize a swarm. Note that this module replaces the now deprecated garethr/docker.
Puppet Approved modules
We launched tasks for the Google Cloud Platform in October. If you missed that, we’ve partnered with Google to provide coverage for five of its core IaaS services, including the following:
google/gcompute –– As with AWS, this module enables you to manage your Google Compute Engine resources, including disk types, certs, compute, firewall, and other attributes. You can execute tasks to create instances, create a snapshot of a GCE disk, or reset a GCE virtual machine instance.
google/gstorage –– Use this module to define your Google Compute Storage buckets with Puppet code, attach entity credentials, user roles and projects, and set a wide range of rules, including ACLs. The task allows you to upload a local file to GCS.
google/gcontainer –– This module enables you to configure your Google Cloud Containers and Kubernetes environment, including defining clusters, monitoring services, and setting up networking and dozens of other environmental parameters. The task enables you to resize a cluster container node pool.
google/gsql –– If you use the Google Cloud Platform to manage and maintain PostgreSQL and MySQL, the Puppet module enables you to create and manage gSQL instances, including creating databases, users and certs. The tasks allow you to reset the CloudSQL password for existing users, and clone a CloudSQL database.
google/gpubsub –– If you want secure and highly available communication between independently written applications in the Google Cloud, Pub/Sub is the answer and it’s more easily managed with the Puppet module. You can create and manage topics and subscriptions on a wide variety of Linux and Windows platforms, and the task allows you to publish a message to a specific topic.
Take a few minutes to head over to the Puppet Forge to learn more, and give these tasks a try and leave your thoughts in the community ratings.
John S. Tonello is a senior technical marketing manager at Puppet.