Go to main content

Administering an Oracle® Solaris Cluster 4.4 Configuration

Exit Print View

Updated: March 2019
 
 

Example of Writing a Puppet Site Manifest with Oracle Solaris Cluster

Puppet manifests are used control the nodes that are running the Puppet agent. Puppet manifests are written in a Puppet-specific language that is similar to Ruby, where each manifest uses a .pp file extension.

The site.pp manifest does not exist on the Puppet master by default. You must initially create this file, and it must be stored in the /etc/puppetlabs/code/environments/production/manifests directory on the Puppet master.

Create your own test module directory. For example, testmod on master and create an init.pp file:

Inside testing module manifest directory /usr/puppetlabs/puppet/modules/testmod/manifests, create an init.pp file which contains the desired configurations. For example, adding a quorum disk to cluster.

master:~# mkdir -p /usr/puppetlabs/puppet/modules/testmod/manifests

Edit the init files as shown below.

master:~# cat /usr/puppetlabs/puppet/modules/testmod/manifests/init.pp
class testmod {
ha_cluster_quorum { "d5":
        ensure => 'present',
}

} # class

Edit the main manifest file to specify the cluster node where the Puppet configuration should be applied. Also specify the module name testmod that provides the manifest file for the cluster configuration:

master:~# cat /etc/puppetlabs/code/environments/production/manifests/site.pp
node 'schost1.example.com' {
        include "testmod"
}

After the configuration is applied on the agent schost1.example.com, verify the configuration using the cluster command on agent cluster node.

For more information on Writing Puppet Manifests, Classes, and Modules refer to Writing Puppet Manifests, Classes, and Modules in Oracle Solaris (https://docs.oracle.com/cd/E37838_01/html/E72062/puppet-17.html)