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 <fungi@yuggoth.org>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
This commit is contained in:
Elizabeth Krumbach 2013-01-18 22:52:46 -08:00 committed by Jenkins
parent b453bdcac3
commit d3ba56112c

View File

@ -29,13 +29,16 @@ over the preferences file:
git clone git://github.com/openstack-infra/config.git /opt/config/production 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/ 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 .. 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 <KEY_ID>
apt-get update 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: 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 bash /opt/config/production/install_modules.sh
puppet apply --modulepath='/opt/config/production/modules:/etc/puppet/modules' -e 'include openstack_project::puppetmaster' puppet apply --modulepath='/opt/config/production/modules:/etc/puppet/modules' -e 'include openstack_project::puppetmaster'
Hiera Note: Hiera uses a systemwide configuration file in ``/etc/puppet/hiera.yaml``
----- and this setup supports multiple configurations. The two sets of environments
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
that OpenStack Infrastructure uses are ``production`` and ``development``. that OpenStack Infrastructure uses are ``production`` and ``development``.
``production`` is the default is and the environment used when nothing else ``production`` is the default is and the environment used when nothing else is
is specified. Then the configuration needs to be placed into common.yaml in specified. Then the configuration needs to be placed into common.yaml in
``/etc/puppet/hieradata/production`` and ``/etc/puppet/hieradata/development``. ``/etc/puppet/hieradata/production`` and ``/etc/puppet/hieradata/development``.
The values are simple key-value pairs in yaml format. The values are simple key-value pairs in yaml format.