Support #136
Install and Configuring Puppet on Debian/Ubuntu
Description
These instructions apply to Debian, Ubuntu, and derived Linux distributions, including
- Debian 6 “Squeeze” (current stable release)
- Debian “Wheezy” (current testing distribution)
- Debian “Sid” (current unstable distribution)
- Ubuntu 12.10 “Quantal Quetzal”
- Ubuntu 12.04 LTS “Precise Pangolin”
- Ubuntu 11.10 “Oneiric Ocelot”
- Ubuntu 10.04 LTS “Lucid Lynx”
- Ubuntu 8.04 LTS “Hardy Heron”
Users of out-of-production versions may have vendor packages of Puppet available, but cannot use the Puppet Labs packages.
1. Choose a Package Source¶
Debian and Ubuntu systems can install Puppet from Puppet Labs’ official repo, or from the OS vendor’s default repo.
Using Puppet Labs’ Packages
Puppet Labs provides an official package repo at apt.puppetlabs.com. It contains up-to-date packages, and can install Puppet and its prerequisites without requiring any other external repositories.
To use the Puppet Labs repo, follow the instructions here.
Using Vendor Packages
Debian and Ubuntu distributions include Puppet in their default package repos. No extra steps are necessary to enable it.
Older OS versions will have outdated Puppet versions, which are updated only with security patches. As of April 2012:- Debian unstable’s Puppet was current.
- Debian testing’s Puppet was nearly current (one point release behind the current version).
- Debian stable’s Puppet was more than 18 months old, with additional security patches.
- The latest Ubuntu’s Puppet was nearly current (one point release behind).
- The prior (non-LTS) Ubuntu’s Puppet was nine months old, with additional security patches.
- The prior LTS Ubuntu’s Puppet was more than two years old, with additional security patches.
2. Install the Puppet Master¶
Skip this step for a standalone deployment.
On your puppet master node, run:
sudo apt-get install puppetmaster
This will install Puppet, its prerequisites, and an init script (
/etc/init.d/puppetmaster
) for running a test-quality puppet master server.
If you are using vendor packages, a puppetmaster-passenger package may be available. If you install this package instead of puppetmaster, it will automatically configure a production-capacity web server for the Puppet master, using Passenger and Apache. In this configuration, do not use the puppetmaster init script; instead, control the puppet master by turning the Apache web server on and off or by disabling the puppet master vhost:
sudo update-rc.d -f puppetmaster remove
3. Install Puppet on Agent Nodes¶
On your other nodes, run:
sudo apt-get install puppet
This will install Puppet and an init script (
/etc/init.d/puppet
) for running the puppet agent daemon.
For a standalone deployment, run:
sudo apt-get install puppet-common
On all nodes instead. This will install Puppet without the agent init script.
4. Configure and Enable¶
Perform the following tasks after you finish installing Puppet.
Configure Puppet
Puppet’s main configuration file is found at /etc/puppet/puppet.conf
. See Configuring Puppet for more details.
Most users should specify the following settings:
On Agent Nodes¶
Settings for agent nodes should go in the [agent]
or [main]
block of puppet.conf
.
server
: The hostname of your puppet master server. Defaults to puppet.report
: Most users should set this to true.pluginsync
: Most users should set this to true.certname
: The sitewide unique identifier for this node. Defaults to the node’s fully qualified domain name, which is usually fine.
On Puppet Masters¶
Settings for puppet master servers should go in the [master]
or [main]
block of puppet.conf
.
Note: puppet masters are usually also agent nodes; settings in [main]
will be available to both services, and settings in the [master]
and [agent]
blocks will override the settings in [main]
.
dns_alt_names
: A list of valid hostnames for the master, which will be embedded in its certificate. Defaults to the puppet master’s certname and puppet, which is usually fine. If you are using a non-default setting, set it before starting the puppet master for the first time.
On Standalone Nodes¶
Settings for standalone puppet nodes should go in the [main]
block of puppet.conf
.
Puppet’s default settings are generally appropriate for standalone nodes. No additional configuration is necessary unless you intend to use centralized reporting or an external node classifier.
Resources¶
http://docs.puppetlabs.com/guides/installation.html
http://docs.puppetlabs.com/guides/configuring.html
http://wiki.debian.org/OpenStackPuppetHowto
Updated by Daniel Curtis over 11 years ago
- Description updated (diff)
- Status changed from New to Closed
After setting up puppetmaster to use MySQL for its storeconfig and configuring it to the correct host, I would get errors connecting to the database. After inspecting the database holding the storeconfigs I found that there were no tables. I had tried to enabling and starting the puppetmaster daemon, and then disabling the puppetmaster daemon and restarting the apache2 daemon instead (I have the puppetmaster set up with Passenger) however the tables were still not created.
I ran:
puppetmasterd
And then the correct tables appeared on the database.