From d3ba56112cc2c74f3ecfb52dee47787ef664d009 Mon Sep 17 00:00:00 2001 From: Elizabeth Krumbach Date: Fri, 18 Jan 2013 22:52:46 -0800 Subject: [PATCH] Simplify and correct hiera install documentation The documentation for hiera had the user add the repo and then remove it just to install hiera, but that's now done in a previous step to use newer versions of the puppet packages from the puppetlabs repos. The yaml file is also now installed by puppet. Also collapsed all hiera documentation into the puppet master section. Change-Id: I00ab3cd12798295827ae25a623d246f7abf9a8df Reviewed-on: https://review.openstack.org/20077 Reviewed-by: Jeremy Stanley Reviewed-by: James E. Blair Approved: Clark Boylan Reviewed-by: Clark Boylan Tested-by: Jenkins --- doc/source/puppet.rst | 46 ++++++++++--------------------------------- 1 file changed, 10 insertions(+), 36 deletions(-) diff --git a/doc/source/puppet.rst b/doc/source/puppet.rst index 8ce591eebc..94e0b4c83e 100644 --- a/doc/source/puppet.rst +++ b/doc/source/puppet.rst @@ -29,13 +29,16 @@ over the preferences file: git clone git://github.com/openstack-infra/config.git /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: +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 - echo "deb http://apt.puppetlabs.com precise devel" > /etc/apt/sources.list.d/puppetlabs.list + 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 + apt-get install puppet puppetmaster-passenger hiera hiera-puppet Finally, install the modules and use ``puppet apply`` to finish configuration: @@ -44,40 +47,11 @@ Finally, install the modules and use ``puppet apply`` to finish configuration: bash /opt/config/production/install_modules.sh puppet apply --modulepath='/opt/config/production/modules:/etc/puppet/modules' -e 'include openstack_project::puppetmaster' -Hiera ------ - -Hiera is used to maintain secret information on the puppetmaster. - -We want to install hiera from puppetlabs' apt repo, but we don't want to get -on the puppet upgrade train - so the process is as follows: - -.. code-block:: bash - - echo "deb http://apt.puppetlabs.com precise devel" > /etc/apt/sources.list.d/puppetlabs.list - apt-get update - apt-get install hiera hiera-puppet - rm /etc/apt/sources.list.d/puppetlabs.list - apt-get update - -Hiera uses a systemwide configuration file in ``/etc/puppet/hiera.yaml`` -which tells is where to find subsequent configuration files. - -.. code-block:: yaml - - --- - :hierarchy: - - %{operatingsystem} - - common - :backends: - - yaml - :yaml: - :datadir: '/etc/puppet/hieradata/%{environment}' - -This setup supports multiple configuration. The two sets of environments +Note: Hiera uses a systemwide configuration file in ``/etc/puppet/hiera.yaml`` +and this setup supports multiple configurations. The two sets of environments that OpenStack Infrastructure uses are ``production`` and ``development``. -``production`` is the default is and the environment used when nothing else -is specified. Then the configuration needs to be placed into common.yaml in +``production`` is the default is and the environment used when nothing else is +specified. Then the configuration needs to be placed into common.yaml in ``/etc/puppet/hieradata/production`` and ``/etc/puppet/hieradata/development``. The values are simple key-value pairs in yaml format.