Go to main content

Using Puppet to Perform Configuration Management in Oracle® Solaris 11.4

Exit Print View

Updated: October 2019
 
 

Puppet Features in Oracle Solaris

Puppet is not installed on your Oracle Solaris system by default. You must install the Puppet Image Packaging System (IPS) package on the Puppet master and on all of the nodes that will run the Puppet agent as described in Installing Puppet.

This section introduces Puppet features and functionality that are included in Oracle Solaris.

Puppet Utilities

The following utilities are installed when you install Puppet:

Facter

Facter is a utility that Puppet uses to discover facts about a particular system such as OS type, CPUs, or memory size. The information that Facter gathers about a system is sent to the Puppet master, and the Puppet master then compiles the information into catalogs that describe a desired system state for a specific set of resources. A catalog lists all of the resources that must be managed and any dependencies between those resources. See Gathering Information About a System by Using Facter and Facter documentation on the Puppet web site.

Hiera

Hiera is a cross-platform, key/value lookup tool that you use to manage configuration data. Use Hiera along with Puppet to maintain site-specific data that would normally be included in a Puppet manifest. Storing site-specific data in a Hiera configuration file rather than in a manifest avoids repetition, which enables you to write more generic manifests that you can reuse for multiple systems.

Puppet classes can request the data that is needed, and Hiera acts as a site-wide configuration file. When Puppet loads Hiera, it uses this Hiera configuration file instead of the global file that is located in /etc/puppetlabs/puppet/hiera.yaml. See Hiera documentation on the Puppet web site.

Puppet Modules

When you install the Puppet IPS package, you get the core Puppet modules plus other modules that are specific to the Oracle Solaris release. For example, you get modules to support Oracle Solaris ZFS, networking, services, and zones.

Use the following command to list modules that are installed on this system:

$ puppet module list

Use the following command to list modules that are available, as shown in Searching modules from the command line:

$ puppet module search search_term

Use the following methods to get detailed information about a specific Puppet module:

  • For installed modules, see the README file for that module at the path given by the puppet module list command.

    $ puppet module list
    /usr/puppetlabs/puppet/modules
    ├── oracle-solaris_providers (v2.0.1)
    ├── puppet-staging (v3.0.0)
    ├── puppetlabs-concat (v4.1.1)
    ├── puppetlabs-inifile (v2.1.0)
    ├── puppetlabs-ntp (v7.0.0)
    ├── puppetlabs-rsync (v1.0.0)
    └── puppetlabs-stdlib (v4.23.0)
    $ ls /usr/puppetlabs/puppet/modules
    concat/             ntp/                solaris_providers/  stdlib/
    inifile/            rsync/              staging/
    $ less /usr/puppetlabs/puppet/modules/solaris_providers/README.md
    # solaris_providers Module for Puppet
    ...
  • Search for the module on Puppet web sites. For example, select a module name from the Puppet Supported Modules Compatibility Matrix. Select “Solaris” in the Operating System field at the top of the page and select the Search button.

Puppet SMF Services

When you install the Puppet software package, you get the following Puppet SMF services:

$ svcs puppet
STATE          STIME    FMRI
disabled        8:17:58 svc:/application/puppet:agent
disabled        8:17:58 svc:/application/puppet:main
disabled        8:17:58 svc:/application/puppet:master
disabled        8:17:58 svc:/application/puppet:user
online          8:36:42 svc:/application/puppet:upgrade

See Configuring the Puppet Master and Agents for information about enabling and using these services.

Puppet Configuration File

Puppet provides a configuration file (/etc/puppetlabs/puppet/puppet.conf) for both the master and the agents. Many system resources are defined in the puppet.conf file. The file lists the default values that are used by the Puppet master and all of the nodes that are managed by the master.

The puppet.conf configuration file is generated from svc:/application/puppet service property values. Do not edit the puppet.conf file directly. Instead, use SMF commands to set the appropriate properties in the file as described in Managing System Services in Oracle Solaris 11.4 and the svccfg(8) man page. Changes that you make by setting SMF property values are applied to the puppet.conf file.

Puppet Resources and Resource Types

Puppet uses resources to represent the configuration of a system, such as when and how services are run, which software packages are installed, and certain components of networking and naming service configuration. A resource reflects the desired state of that system configuration.

Each resource has a resource type, which is defined by a name and a set of attributes and values that you can specify within a Puppet manifest. The values that you can specify depend on the type of configuration that you are managing. You can get information about a resource by using the puppet describe command as shown in the following example:

$ puppet describe zone

zone
====
Manages Solaris zones.
...

See Working With Puppet Resources and Resource Types in Oracle Solaris.

Puppet Providers

Puppet providers translate the general definitions for a resource into the actions that are required to implement that resource on a specific platform. These cross-platform capabilities are enabled by the Puppet Resource Abstraction Layer (RAL), which translates configuration settings into the platform-specific commands that are required to apply the specified configuration.

For example, to install a software package on an Oracle Solaris system, Puppet uses IPS, while on an Oracle Linux system, Puppet uses RPM.

    The following are some of the key providers that are supported in Oracle Solaris:

  • IPS package installation, commands, publishers, facets, and mediators

  • Boot environments

  • Datalink properties

  • Aggregations

  • Etherstubs

  • IP network interfaces

  • Naming services

  • Oracle Solaris zones, Oracle Solaris kernel zones, and Zones On Shared Storage (ZOSS) backing stores

  • SMF administrative commands

  • SMF properties

  • TCP/IP tunables

  • Virtual Local Area Networks (VLANs)

  • Virtual Network Interface Cards (VNICs)

  • ZFS dataset creation and property manipulation, including ZFS pool creation and deletion for most virtual device types

See also Puppet Resources and Resource Types.

Puppet Command-Line Interface

    Use the Puppet command-line interface (CLI) to perform tasks such as the following:

  • Initial handshake between the master and agent nodes

  • Trial run for testing purposes

  • Manage certificates

  • Generate and manage reports

  • Access plug-ins

  • Manage resources

  • Display status

  • Troubleshoot and debug issues with Puppet

The Puppet CLI has the following syntax:

# puppet subcommand [options] action [options]

The following command displays all of the available Puppet subcommands and their usage:

# puppet help

The following command displays help for a specific subcommand:

# puppet help subcommand

The following command displays help for a specific action of a subcommand:

# puppet help subcommand action