From d6fd7db432cb2cc9ea95d413903828516c2e4a71 Mon Sep 17 00:00:00 2001 From: Robert Collins Date: Thu, 29 Aug 2013 16:27:31 +1200 Subject: [PATCH] Make setting up a Puppetmaster easier. There is a helpful script we can use that avoids the plumbing discussion, and neither raring nor F19 can run a Puppet master, so we should document that to avoid false starts. Change-Id: I72f8767dc3fc7967207c37911e8e45a6d85c6001 --- doc/source/puppet.rst | 29 ++++++++++++----------------- install_puppet.sh | 3 ++- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/doc/source/puppet.rst b/doc/source/puppet.rst index a27544a3b9..b914cb1173 100644 --- a/doc/source/puppet.rst +++ b/doc/source/puppet.rst @@ -35,27 +35,22 @@ ship the data to the clients. The cron jobs, current configuration files and more can be done with ``puppet apply`` but first some bootstrapping needs to be done. -First want to install these from puppetlabs' apt repo, but we typically pin to -a specific version, so you'll want to copy in the preferences file from the git -repository. Configuration files for puppet master are stored in a git repo -clone at ``/opt/config/production`` so we'll just do this checkout now and copy -over the preferences file: +First want to install these from puppetlabs' apt repo. We have not yet migrated +to puppet 3, so we pin puppet to 2.x. There is a script in the root of the +config repository that will setup appropriate pinning and install the puppet +client. After that installing the puppetmaster and hiera (used to maintain +secrets on the puppet master). + +Please note: Fedora F19 and Ubuntu Raring and above cannot successfully run an +OpenStack-CI puppetmaster due to new Ruby and older Puppet not being +compatible, so be sure to use an older release - e.g. Ubuntu Precise. .. code-block:: bash + sudo su - git clone https://git.openstack.org/openstack-infra/config /opt/config/production - cp /opt/config/production/modules/openstack_project/files/00-puppet.pref /etc/apt/preferences.d/ - -Then we can add the repo and install the packages, we'll also install the hiera -packages here which are used to maintain secret information on the -puppetmaster: - -.. code-block:: bash - - apt-add-repository "deb http://apt.puppetlabs.com `lsb_release -cs` devel" - apt-key adv --keyserver pool.sks-keyservers.net --recv - apt-get update - apt-get install puppet puppetmaster-passenger hiera hiera-puppet + /opt/config/production/install_puppet.sh + apt-get install puppetmaster-passenger hiera hiera-puppet Finally, install the modules and use ``puppet apply`` to finish configuration: diff --git a/install_puppet.sh b/install_puppet.sh index 759f21d7e6..7443dedea7 100755 --- a/install_puppet.sh +++ b/install_puppet.sh @@ -54,8 +54,9 @@ EOF yum install -y redhat-lsb-core git puppet else #defaults to Ubuntu + # NB: keep in sync with openstack_project/files/00-puppet.pref cat > /etc/apt/preferences.d/00-puppet.pref <