Puppet on SuSE/opensuse

There should not be many particular issues with Puppet on SuSE and opensuse linux.

Warning: This was tested on opensuse 10.1 and 10.2. It should work for previous versions and for SLES as well, but I have such no machine available to test.

Installation

To install puppet add the repository for appropriate version at http://software.opensuse.org/download/system:/management/ in yast sources and install puppet.

yast -i install puppet

In opensuse 10.2 I recommend using new package manager zypper

zypper sa http://software.opensuse.org/download/system:/management/openSUSE_10.2
zypper update
zypper install puppet

Note that packages already provide initscripts so you can start puppet and enable it at startup with

service puppet start
chkconfig puppet on

On the server where you want to run puppetmaster, you have to install puppet-server package as well

yast -i puppet-server

and start and enable puppetmaster daemon

service puppetmaster start
chkconfig puppetmaster on

You can now proceed to Installation Guide .

Configuration

There are two places for configuration. Global configuration can be set in /etc/puppet/puppet.conf and this is described in Documentation Start .

To pass parameters to deamons run by the initscripts, you can edit the file /etc/sysconfig/puppet. Most common use is to specify the server.

# /etc/sysconfig/puppet

# puppet server (--server option)
PUPPET_SERVER="puppetmaster.example.com"

# where to log (--logdest option)
PUPPET_LOG=/var/log/puppet.log

For configuring the server edit /etc/sysconfig/puppetmaster

# /etc/sysconfig/puppetmaster

# where to look for the manifests (--manifest option)
PUPPETMASTER_MANIFEST="/etc/puppet/manifests/site.pp"

# where to log (--logdest option)
PUPPETMASTER_LOG="/var/log/puppetmaster.log"

# any other options passed to puppetmasterd directly 
PUPPETMASTER_EXTRA_OPTS=""

Look at Configuration Reference for more configuration options.

Package Providers

The only package providers for SuSE are rpm, yum and rug (from version 0.22.4). Yum seems to be more than sufficient. But if you would like to see some other PM like yast, rug or zypper supported, please file a feature request or better still write and submit a provider, it’s not that difficult :–).

Note: As of version 0.22.4 rug is default provider for SuSE.

Yum

yum is a package manager providing dependency resolving and other advanced features and is supported by puppet. Especially useful is in combination with yumrepo puppet type which allows one to configure package repositories. To use yum, first install it

yast -i yum

On SuSE yum comes without default repository locations, so you have to add that by hand. You can use Type Reference type for that. Include the following into your manifests

Yumrepo { gpgcheck=>true, enabled=>true }

yumrepo {
  "SL-10.2":
    descr=>"openSuSE Linux 10.2",
    baseurl=>"http://download.opensuse.org/distribution/10.2/inst-source/suse/";
  "SL-10.2-update":
    descr=>"openSuSE Linux 10.2 updates",
    baseurl=>"http://download.suse.com/update/10.2/"
}

Here you can find urls for package repositories.

Now you can make yum default PM(package manager) simply by adding

case $operatingsystem {
  suse: {Package{ provider => yum }}
}

somewhere in your site.pp. You can also use Type Reference type to manage package sources.

/etc/init.d script:

If you installed from source and need the init script for puppet-server, you can extract it from the SuSE rpm with this command:

rpm2cpio puppet-server-0.24.8-2.1.x86_64.rpm | cpio -ivd ./etc/init.d/puppet-server

then copy the file to /etc/init.d/.