Running Puppet on demand from the console
When you set up a job to run Puppet from the console, the orchestrator creates a job ID to track the job, shows you all nodes included in the job, and runs Puppet on those nodes in the appropriate order. Puppet compiles a new catalog for each node included in the job.
There are two ways to specify the job target (the nodes you want to run jobs on):
-
A static node list
-
A Puppet Query Language (PQL) query
-
A node group
You can't combine these methods, and if you switch from one to the other with the Inventory drop-down list, the target list clears and starts over. In other words, if you create a target list by using a node list, switching to a PQL query clears the node list, and vice versa. You can do a one-time conversion of a PQL query to a static node list if you want to add or remove nodes from the query results.
Before you start, be sure you have the correct permissions for running jobs. To run jobs on PQL queries, you need the "View node data from PuppetDB" permission.
Run Puppet on a node list
Create a node list target for a job when you need to run Puppet on a specific set of nodes that isn't easily defined by a PQL query.
Make sure you have access to the nodes you want to target.
Make sure you have permissions to run jobs and PQL queries.
Run Puppet on a PQL query
For some jobs, you might want to target nodes that meet specific conditions. For such jobs, create a PQL query.
Make sure you have access to the nodes you want to target.
Make sure you have permissions to run jobs and PQL queries.
Add custom PQL queries to the console
Add your own PQL queries to the console and quickly access them when running jobs.
Run Puppet on a node group
Create a node target for a job when you need to run Puppet on a specific set of nodes in a pre-defined group.
Make sure you have access to the nodes you want to target.
Run jobs throughout the console
You don't need to be in the Jobs section of the console to run a Puppet job on your nodes. You might encounter situations where you want to run jobs on lists of nodes derived from different pages in the console.
You can create jobs from the following pages:
Page | Description |
---|---|
Overview | This page shows a list of all your managed nodes, and gathers essential information about your infrastructure at a glance. |
Events | Events let you view a summary of activity in your infrastructure, analyze the details of important changes, and investigate common causes behind related events. For instance, let's say you notice run failures because some nodes have out-of-date code. After you update the code, you can create a job target from the list of failed nodes to be sure you're directing the right fix to the right nodes. You can create new jobs from the Nodes with events category. |
Classification node groups | Node groups are used to automate classification of nodes with similar functions in your infrastructure. If you make a classification change to a node group, you can quickly create a job to run Puppet on all the nodes in that group, pushing the change to all nodes at one time. |
Make sure you have permissions to run jobs and PQL queries.
Schedule a Puppet run
Schedule a job to deploy configuration changes at a particular date and time.
Make sure you have access to the nodes you want to target.
Stop a job in progress
You can stop a job if, for example, you realize you need to reconfigure a class or push a configuration change that the job needs.
When you stop an on-demand Puppet run, runs that are underway finish, and runs that have not started are canceled.
- In the console, go to the Jobs page and select the Puppet run tab. From the list of jobs, find the one you want and click Stop.
- On the command line, press CTRL + C.
Delete a scheduled job
Delete a job that is scheduled to run at a later time.
- In the console, open the Jobs page.
- Click the Scheduled Puppet Run tab.
- From the list of jobs, find the one you want to delete and click Remove.