ReferencePlatforms/Puppet Server: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{ReleaseEngineering Puppet Header}}
{{ReleaseEngineering Puppet Header}}


= CentOS 5 =
= CentOS 5.x =


This page describes how to recreate a Puppet server such as staging-puppet.build.mozilla.org or production-puppet.build.mozilla.org. These machines are based on the [[ReferencePlatforms/Linux-CentOS-5.0 | CentOS 5.0 Reference Platform]] and were originally cloned from Version 19 - but any version should do. The following changes were made to it after cloning:
This page describes how to recreate a Puppet server such as staging-puppet.build.mozilla.org or production-puppet.build.mozilla.org. These machines are based on the [[ReferencePlatforms/Linux-CentOS-5.0 | CentOS 5.0 Reference Platform]] and were originally cloned from Version 19 - but any version should do. The following changes were made to it after cloning:


== Install the EPEL (Extra Packages for Enterprise Linux) Package ==
== Install the EPEL (Extra Packages for Enterprise Linux) Package ==
  su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm'
  su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'


== Install Mercurial ==
== Install Mercurial ==
Line 15: Line 15:
  chkconfig --level 235 puppetmaster on
  chkconfig --level 235 puppetmaster on


== Clone manifests and mount the file share ==
== Clone manifests ==
As root,
As root,
  cd /etc/puppet
  cd /etc/puppet
Line 21: Line 21:
  hg clone http://hg.mozilla.org/build/puppet-manifests manifests
  hg clone http://hg.mozilla.org/build/puppet-manifests manifests


:NOTE - this is not accurate - NFS turned out to be ineffective between datacenters, so each master is now manually synchronized.
== Copy packages from an existing puppet server ==
mkdir /N
cd /N
rsync -navuzb scl-production-puppet.build.scl1.mozilla.com:/N/production .
rsync -navuzb scl-production-puppet.build.scl1.mozilla.com:/N/staging .
 
=== NFS mount (out-of-date) ===
NFS turned out to be ineffective between datacenters, so each master is now manually synchronized using the steps outlined in [[#Copy_packages_from_an_existing_puppet_server]]. These steps are provided for posterity.
 
Mount the puppet-files directory by adding an entry to fstab:
Mount the puppet-files directory by adding an entry to fstab:
  10.2.71.136:/export/buildlogs/puppet-files /N  nfs defaults 0 0
  10.2.71.136:/export/buildlogs/puppet-files /N  nfs defaults 0 0
Line 32: Line 40:
  service puppetmaster start
  service puppetmaster start


= CentOS 5.5 =
== Setup Apache server ==
 
== Install the EPEL (Extra Packages for Enterprise Linux) Package ==
su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
 
== Install Mercurial ==
yum install mercurial

Revision as of 19:45, 21 March 2012

Warning signWarning: This page documents (mostly) the old release engineering puppet deployment. See ReleaseEngineering/PuppetAgain for documentation of the current deployment.
Puppet: Usage | Server Setup | Client Setup | Links | Troubleshooting

CentOS 5.x

This page describes how to recreate a Puppet server such as staging-puppet.build.mozilla.org or production-puppet.build.mozilla.org. These machines are based on the CentOS 5.0 Reference Platform and were originally cloned from Version 19 - but any version should do. The following changes were made to it after cloning:

Install the EPEL (Extra Packages for Enterprise Linux) Package

su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'

Install Mercurial

yum install mercurial

Install puppet

yum install ruby facter puppet-server ruby-shadow augeas-libs ruby-augeas
chkconfig --level 235 puppetmaster on

Clone manifests

As root,

cd /etc/puppet
rm -rf manifests
hg clone http://hg.mozilla.org/build/puppet-manifests manifests

Copy packages from an existing puppet server

mkdir /N
cd /N
rsync -navuzb scl-production-puppet.build.scl1.mozilla.com:/N/production .
rsync -navuzb scl-production-puppet.build.scl1.mozilla.com:/N/staging .

NFS mount (out-of-date)

NFS turned out to be ineffective between datacenters, so each master is now manually synchronized using the steps outlined in #Copy_packages_from_an_existing_puppet_server. These steps are provided for posterity.

Mount the puppet-files directory by adding an entry to fstab:

10.2.71.136:/export/buildlogs/puppet-files /N   nfs	defaults	0 0

And then run,

mkdir /N
mount -a

to mount it.

Start the puppetmaster daemon

service puppetmaster start

Setup Apache server