The file also includes a shell installation script to install packages and modules and do other customizations tasks. So only installing agent packages “pe-puppet pe-mcollective” can’t setup agent station properly.
It is ideal to have PE agent installed automatically along with OS,the installer script can use answer file to automate the process.
The following codes can be put in RHEL kickstart postrun section to bootstrap PE agent.
#Download Puppet Enterprise(PE) (manage up to 10 nodes free)
#http://puppetlabs.com/puppet/puppet-enterprise/
#e.g puppet-enterprise-2.0.0-el-5-x86_64.tar.gz
...%postPKG=puppet-enterprise-2.0.0-el-5-x86_64cd /tmp && wget -O ${PKG}.tar.gz http://172.16.1.1/boot/os/rhel-5.6-x64/${PKG}.tar.gz && tar -zxf ${PKG}.tar.gz && cd /tmp/${PKG} && \cat >answerfile<<END
q_install=yq_puppet_cloud_install=nq_puppet_enterpriseconsole_install=nq_puppet_symlinks_install=yq_puppetagent_certname=$(hostname -s)q_puppetagent_install=yq_puppetagent_server=puppetq_puppetmaster_install=nq_vendor_packages_install=nq_install=yEND
[ -e answerfile ] && ./puppet-enterprise-installer -a answerfile 2>&1 | tee /tmp/install_${PKG}.logrm -rf /tmp/${PKG}*syncexit 0
Connect to puppet server after installation finished
#Verify puppet agent is running
[Puppet Client]$/etc/init.d/pe-puppet status#Puppet server should be able to see the client’s pending certificate request
[Puppet Master]$puppet cert listweb2 (A1:08:15:EF:1F:5D:F9:C5:D9:A0:F3:F2:FD:FF:CE:09)#Approve the client by signing the cert request
[Puppet Master]$puppet cert sign web2
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.