lunes, 2 de mayo de 2011

Puppet in Solaris

Instalation


Puppet requires both Facter and Ruby, neither of which will be found in a standard Solaris 8/9/10 installation.

A good and easy way to install Puppet and its dependencies is to use the OpenCSW archive. The first step is to install pkgutil, which enables you to easily retrieve software from the OpenCSW repositories.

With pkgutil installed, you can use it to install Puppet and it’s dependencies:
# /opt/csw/bin/pkgutil --yes --install puppet

Note that this not only installs puppet, it also enables the puppet agent. This installs a SMF(5) service:

# svcs svc:/network/puppetd:default

Once installed you must create de /etc/puppet/puppet.conf, and make sure that the ssldir exist. By default the ssldir point to /var/opt/csw/puppet/ssl, and this location doesn't exist.

Even when client defines ways to provide the puppetmaster, the way it worked for me was adding an entry in /etc/host for puppet, which is the default server the client takes.

Now you can restart you client puppet ;-)

Configuration


Puppet configuration can also be managed via configuration file. Puppet’s configuration file model is in the style of INI files. Each file is divided into namespace sections, and each section name is enclosed in parentheses and named for the Puppet function it configures; for example, the namespace used to configure the Puppet client daemon is called [puppetd]. The use of namespaces means options can be used in multiple namespaces, if the option is relevant to the binary being configured. For example, you can specify the same option twice, with different values, in the [puppetd] and [puppetmasterd] namespaces, and each binary will use only the configuration option contained in its own namespace.

Sections are:
main: General configuration options for multiple elements of Puppet
puppetd: Configuration options related to the Puppet client daemon
puppetmasterd: Configuration options related to the Puppet master daemon

An example:
[main]
vardir = /var/lib/puppet
logdir = /var/log/puppet

[puppetd]
localconfig = $vardir/localconfig

You can also use any configuration option from the Puppet configuration file on the command line by prefixing it with --. So to specify the vardir option on the command line, we would specify --vardir as an argument. Boolean configuration options are specified on the command line using an on/off model like so:

# puppetd --trace
# puppetd --no-trace

No hay comentarios:

Publicar un comentario