Deploy Puppet on CentOS 5
ObjectivesDeploy a Puppet Master and a Puppet Client on the two Cent OS 5. After the deployment, host "server.pcoe.com" should be the Puppet master and host "client.pcoe.com" should be the Puppet client.
Prerequisite
1. Deploy CentOS with ISO installer.
2. Disable firewall during configuration.
3. Name the machines by FQDN (Full Qualified Domain Name).
4. Update OS to latest packages.
# yum update
5. Add hostnames into hosts file on all the machines.
# echo "xxx.xxx.xxx.xxx master.pcoe.com" >> /etc/hosts
Puppet
1. Download and install EPEL.
URL: http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
# rpm -Uvh /tmp/epel-release-5-4.noarch.rpm
2. Install puppet packages.
# yum install puppet puppet-server facter <-- on master
# yum install puppet facter <-- on agent
3. Modify user puppet as root privilege on master.
** This is a workaround. To find the root cause of "'initialize': Permission denied" issue.
4. Change the owner of the folders to "puppet".
# chown puppet:puppet /var/lib/puppet
5. Start puppet master service.
# puppet master --no-daemonize --verbose OR
# service puppetmaster start
6. Request certification from agent.
# puppetd --test --server master.puppet.com --waitforcert 60
7. Sign the agent on master.
# puppetca -s -a
8. Re-request certification on agent.
# puppetd --test --server master.puppet.com --waitforcert 60
Validation
1. Create a site.pp on master.
# vi /etc/puppet/manifests/site.pp
2. Run it on agent.
# puppetd --test --server master.puppet.com
3. Check the result.
# cat /tmp/test.txt
ISSUES
1. "'initialize': Permission denied" issue
? Phenomenon
Permission denied issue when tried to start puppet master service.
? Analysis
It caused by the user puppet has not sufficient access privilege on some directories when it tried to write on files.
? Solution
Modify user puppet to root role.
TO BE DONE.
2. "Could not request certificate: Connection refused - connect (2)" issue
? Phenomenon
? Analysis
Puppet master service hasn't been started.
? Solution
Waiting for untill puppet master service is started.
页:
[1]