Docs: PE 2.0 » Cloud Provisioning » Man » node


PE 2.0 » Cloud Provisioning » Man » node


Cloud Provisioning: Man Page: puppet node_awsIndexCompliance: Basics and UI


Man Page: node

NAME

puppet-node - View and manage node definitions.

SYNOPSIS

puppet node action [--terminus TERMINUS] [--extra HASH]

DESCRIPTION

This subcommand interacts with node objects, which are used by Puppet to build a catalog. A node object consists of the node's facts, environment, node parameters (exposed in the parser as top-scope variables), and classes.

OPTIONS

Note that any configuration parameter that's valid in the configuration file is also a valid long argument, although it may or may not be relevant to the present action. For example, server is a valid configuration parameter, so you can specify --server <servername> as an argument.

See the configuration file documentation at http://docs.puppetlabs.com/references/stable/configuration.html for the full list of acceptable parameters. A commented list of all configuration options can also be generated by running puppet with --genconfig.

--mode MODE
The run mode to use for the current action. Valid modes are user, agent, and master.
--render-as FORMAT
The format in which to render output. The most common formats are json, s (string), yaml, and console, but other options such as dot are sometimes available.
--verbose
Whether to log verbosely.
--debug
Whether to log debug information.
--extra HASH

A terminus can take additional arguments to refine the operation, which are passed as an arbitrary hash to the back-end. Anything passed as the extra value is just send direct to the back-end.

--terminus TERMINUS

Indirector faces expose indirected subsystems of Puppet. These subsystems are each able to retrieve and alter a specific type of data (with the familiar actions of find, search, save, and destroy) from an arbitrary number of pluggable backends. In Puppet parlance, these backends are called terminuses.

Almost all indirected subsystems have a rest terminus that interacts with the puppet master's data. Most of them have additional terminuses for various local data models, which are in turn used by the indirected subsystem on the puppet master whenever it receives a remote request.

The terminus for an action is often determined by context, but occasionally needs to be set explicitly. See the "Notes" section of this face's manpage for more details.

ACTIONS

  • classify - Add a node to a console or Dashboard group.: SYNOPSIS

    puppet node classify [--terminus TERMINUS] [--extra HASH] [--enc-ssl] [--enc-server=] [--enc-port=] [--enc-auth-user=] [--enc-auth-passwd=] [--node-group= | --as=] certname

    DESCRIPTION

    Add node certname to a group in Puppet Dashboard, Puppet Enterprise's console, or any external node classifier that provides a similar API.

    Classification of a node will allow it to receive proper configurations on its next Puppet run. This action assumes that you have already created a console or Dashboard group with the classes the node should receive in its configuration catalog.

    This action can be used on both physical and virtual machines, and can be run multiple times for a single node. This action can be safely run before the install action.

    OPTIONS

    --enc-auth-passwd= - PE's console and Puppet Dashboard can be secured using HTTP authentication. If the console or dashboard is configured with HTTP authentication, use this option to supply credentials for accessing it.

    Note: This option will default to the PUPPET_ENC_AUTH_PASSWD environment variable. Please use this environment variable if you are concerned about usernames and passwords being exposed via the Unix process table.

    --enc-auth-user= - PE's console and Puppet Dashboard can be secured using HTTP authentication. If the console or dashboard is configured with HTTP authentication, use this option to supply credentials for accessing it.

    Note: This option will default to the PUPPET_ENC_AUTH_USER environment variable. Please use this environment variable if you are concerned about usernames and passwords being exposed via the Unix process table.

    --enc-port= - The port of the External Node Classifier. This currently only supports Puppet Enterprise's console and Puppet Dashboard as external node classifiers.

    --enc-server= - The hostname of the external node classifier. This currently only supports Puppet Enterprise's console and Puppet Dashboard as external node classifiers.

    --enc-ssl - By default, we do not connect to the ENC over SSL. This option configures all HTTP connections to the ENC to use SSL in order to provide encryption. This option should be set when using Puppet Enterprise 2.0 and higher.

    --node-group= | --as= - The PE console or Puppet Dashboard group to associate the node with. The group must already exist in the ENC, or an error will be returned. If the node has not been registered with the ENC, it will automatically be registered when assigning it to a group.

  • clean - Clean up everything a puppetmaster knows about a node: SYNOPSIS

    puppet node clean [--terminus TERMINUS] [--extra HASH] [--[no-]unexport] host1 [host2 ...]

    DESCRIPTION

    This includes

    • Signed certificates ($vardir/ssl/ca/signed/node.domain.pem)
    • Cached facts ($vardir/yaml/facts/node.domain.yaml)
    • Cached node stuff ($vardir/yaml/node/node.domain.yaml)
    • Reports ($vardir/reports/node.domain)
    • Stored configs: it can either remove all data from an host in your storedconfig database, or with --unexport turn every exported resource supporting ensure to absent so that any other host checking out their config can remove those exported configurations.

    This will unexport exported resources of a host, so that consumers of these resources can remove the exported resources and we will safely remove the node from our infrastructure.

    OPTIONS

    --[no-]unexport - Unexport exported resources

  • destroy - Invalid for this subcommand.: SYNOPSIS

    puppet node destroy [--terminus TERMINUS] [--extra HASH] key

    DESCRIPTION

    Invalid for this subcommand.

  • find - Retrieve a node object.: SYNOPSIS

    puppet node find [--terminus TERMINUS] [--extra HASH] host

    DESCRIPTION

    Retrieve a node object.

    RETURNS

    A hash containing the node's classes, environment, expiration, name, parameters (its facts, combined with any ENC-set parameters), and time. When used from the Ruby API: a Puppet::Node object.

    RENDERING ISSUES: Rendering as string and json are currently broken; node objects can only be rendered as yaml.

  • info - Print the default terminus class for this face.: SYNOPSIS

    puppet node info [--terminus TERMINUS] [--extra HASH]

    DESCRIPTION

    Prints the default terminus class for this subcommand. Note that different run modes may have different default termini; when in doubt, specify the run mode with the '--mode' option.

  • init - Install Puppet on a node and clasify it.: SYNOPSIS

    puppet node init [--terminus TERMINUS] [--extra HASH] --login= | -l= | --username= --keyfile= [--installer-payload=] [--installer-answers=] [--puppetagent-certname=] [--install-script=] [--puppet-version=] [--pe-version=] [--facter-version=] [--enc-ssl] [--enc-server=] [--enc-port=] [--enc-auth-user=] [--enc-auth-passwd=] [--node-group= | --as=]

    DESCRIPTION

    Installs Puppet on an arbitrary node (see "install"), classify it in Puppet Dashboard or Puppet Enterprise's console (see "classify"), and automatically sign its certificate request (using the certificate face's sign action).

    OPTIONS

    --enc-auth-passwd= - PE's console and Puppet Dashboard can be secured using HTTP authentication. If the console or dashboard is configured with HTTP authentication, use this option to supply credentials for accessing it.

    Note: This option will default to the PUPPET_ENC_AUTH_PASSWD environment variable. Please use this environment variable if you are concerned about usernames and passwords being exposed via the Unix process table.

    --enc-auth-user= - PE's console and Puppet Dashboard can be secured using HTTP authentication. If the console or dashboard is configured with HTTP authentication, use this option to supply credentials for accessing it.

    Note: This option will default to the PUPPET_ENC_AUTH_USER environment variable. Please use this environment variable if you are concerned about usernames and passwords being exposed via the Unix process table.

    --enc-port= - The port of the External Node Classifier. This currently only supports Puppet Enterprise's console and Puppet Dashboard as external node classifiers.

    --enc-server= - The hostname of the external node classifier. This currently only supports Puppet Enterprise's console and Puppet Dashboard as external node classifiers.

    --enc-ssl - By default, we do not connect to the ENC over SSL. This option configures all HTTP connections to the ENC to use SSL in order to provide encryption. This option should be set when using Puppet Enterprise 2.0 and higher.

    --facter-version= - The version of facter that should be installed. This only makes sense in open source installation mode.

    --install-script= - Name of the installation template to use when installing Puppet. The current list of supported templates is: gems, puppet-enterprise

    --installer-answers= - Location of the answers file that should be copied to the machine to install Puppet Enterprise.

    --installer-payload= - Location of the Puppet enterprise universal tarball to be used for the installation. Can be a local file path or a URL. This option is only required if Puppet should be installed on the machine. The tarball specified must be gzipped.

    --keyfile= - The filesystem path to a local private key that can be used to SSH into the node. If the node was created with the node_aws create action, this should be the path to the private key file downloaded from the Amazon EC2 interface.

    Specify 'agent' if you have the key loaded in ssh-agent and available via the SSH_AUTH_SOCK variable.

    --login= | -l= | --username= - The name of the user Puppet should use when logging in to the node. This user should configured to allow passwordless access via the SSH key supplied in the --keyfile option.

    This is usually the root user.

    --node-group= | --as= - The PE console or Puppet Dashboard group to associate the node with. The group must already exist in the ENC, or an error will be returned. If the node has not been registered with the ENC, it will automatically be registered when assigning it to a group.

    --pe-version= - Version of Puppet Enterprise to be passed to the installer script. Defaults to 1.1.

    --puppet-version= - Version of Puppet to be installed. This version is passed to the Puppet installer script.

    --puppetagent-certname= - This option allows you to specify an optional puppet agent certificate name to configure on the target system. This option applies to the puppet-enterprise and puppet-enterprise-http installation scripts. If provided, this option will replace any puppet agent certificate name provided in the puppet enterprise answers file. This certificate name will show up in the console (or Puppet Dashboard) when the agent checks in for the first time.

  • install - Install Puppet on a running node.: SYNOPSIS

    puppet node install [--terminus TERMINUS] [--extra HASH] --login= | -l= | --username= --keyfile= [--installer-payload=] [--installer-answers=] [--puppetagent-certname=] [--install-script=] [--puppet-version=] [--pe-version=] [--facter-version=] hostname_or_ip

    DESCRIPTION

    Installs Puppet on an existing node at hostname_or_ip. It uses scp to copy installation requirements to the machine, and ssh to run the installation commmands remotely.

    This action can be used on both physical and virtual machines.

    OPTIONS

    --facter-version= - The version of facter that should be installed. This only makes sense in open source installation mode.

    --install-script= - Name of the installation template to use when installing Puppet. The current list of supported templates is: gems, puppet-enterprise

    --installer-answers= - Location of the answers file that should be copied to the machine to install Puppet Enterprise.

    --installer-payload= - Location of the Puppet enterprise universal tarball to be used for the installation. Can be a local file path or a URL. This option is only required if Puppet should be installed on the machine. The tarball specified must be gzipped.

    --keyfile= - The filesystem path to a local private key that can be used to SSH into the node. If the node was created with the node_aws create action, this should be the path to the private key file downloaded from the Amazon EC2 interface.

    Specify 'agent' if you have the key loaded in ssh-agent and available via the SSH_AUTH_SOCK variable.

    --login= | -l= | --username= - The name of the user Puppet should use when logging in to the node. This user should configured to allow passwordless access via the SSH key supplied in the --keyfile option.

    This is usually the root user.

    --pe-version= - Version of Puppet Enterprise to be passed to the installer script. Defaults to 1.1.

    --puppet-version= - Version of Puppet to be installed. This version is passed to the Puppet installer script.

    --puppetagent-certname= - This option allows you to specify an optional puppet agent certificate name to configure on the target system. This option applies to the puppet-enterprise and puppet-enterprise-http installation scripts. If provided, this option will replace any puppet agent certificate name provided in the puppet enterprise answers file. This certificate name will show up in the console (or Puppet Dashboard) when the agent checks in for the first time.

  • save - Invalid for this subcommand.: SYNOPSIS

    puppet node save [--terminus TERMINUS] [--extra HASH] object

    DESCRIPTION

    Invalid for this subcommand.

  • search - Invalid for this subcommand.: SYNOPSIS

    puppet node search [--terminus TERMINUS] [--extra HASH] query

    DESCRIPTION

    Invalid for this subcommand.

EXAMPLES

classify

Add the agent01.example.com node to the pe_agents group:

puppet node classify \
  --enc-server puppetmaster.example.com \
  --enc-port 3000 \
  --enc-ssl \
  --node-group pe_agents \
  agent01.example.com

find

Retrieve an "empty" (no classes, no ENC-imposed parameters, and an environment of "production") node:

$ puppet node find somenode.example.com --terminus plain --render-as yaml

Retrieve a node using the puppet master's configured ENC:

$ puppet node find somenode.example.com --terminus exec --mode master --render-as yaml

Retrieve the same node from the puppet master:

$ puppet node find somenode.example.com --terminus rest --render-as yaml

NOTES

This subcommand is an indirector face, which exposes find, search, save, and destroy actions for an indirected subsystem of Puppet. Valid termini for this face include:

  • active_record
  • exec
  • ldap
  • memory
  • plain
  • rest
  • store_configs
  • yaml

Copyright 2011 by Puppet Labs Apache 2 license; see COPYING


Cloud Provisioning: Man Page: puppet node_awsIndexCompliance: Basics and UI


↑ Back to top