Add bootstrapping and puppet apply to puppet doc
Updated the puppet documentation to reference usage of puppetlabs repos and basic instructions for bootstrapping the puppetmaster environment so that puppet apply can be used to complete configuration. Change-Id: I250e00c9bc128438378558e39f23109f9880386c Reviewed-on: https://review.openstack.org/20048 Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Approved: Jeremy Stanley <fungi@yuggoth.org> Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Tested-by: Jenkins
This commit is contained in:
parent
086ed8f304
commit
4c6da750a7
@ -13,33 +13,36 @@ Puppet Master
|
|||||||
-------------
|
-------------
|
||||||
|
|
||||||
The puppet master is setup using a combination of Apache and mod passenger to
|
The puppet master is setup using a combination of Apache and mod passenger to
|
||||||
ship the data to the clients. To install this:
|
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:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sudo apt-get install puppet puppetmaster-passenger
|
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/
|
||||||
|
|
||||||
Files for puppet master are stored in a git repo clone at
|
Then we can add the repo and install the packages:
|
||||||
``/opt/config``. We have a ``root`` cron job that automatically
|
|
||||||
populates these from our puppet git repository as follows:
|
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
\*/15 * * * * sleep $((RANDOM\%600)) && cd /opt/config && /usr/bin/git pull -q
|
echo "deb http://apt.puppetlabs.com precise devel" > /etc/apt/sources.list.d/puppetlabs.list
|
||||||
|
apt-get update
|
||||||
|
apt-get install puppet puppetmaster-passenger
|
||||||
|
|
||||||
The ``/etc/puppet/puppet.conf`` file then needs updating to point to the
|
Finally, install the modules and use ``puppet apply`` to finish configuration:
|
||||||
manifest and modules as follows:
|
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: bash
|
||||||
|
|
||||||
[master]
|
bash /opt/config/production/install_modules.sh
|
||||||
# These are needed when the puppetmaster is run by passenger
|
puppet apply --modulepath='/opt/config/production/modules:/etc/puppet/modules' -e 'include openstack_project::puppetmaster'
|
||||||
# and can safely be removed if webrick is used.
|
|
||||||
ssl_client_header = SSL_CLIENT_S_DN
|
|
||||||
ssl_client_verify_header = SSL_CLIENT_VERIFY
|
|
||||||
manifestdir=/opt/config/manifests
|
|
||||||
modulepath=/opt/config/modules
|
|
||||||
manifest=$manifestdir/site.pp
|
|
||||||
|
|
||||||
Hiera
|
Hiera
|
||||||
-----
|
-----
|
||||||
|
Loading…
Reference in New Issue
Block a user