Deploy Puppet on CentOS 5

本文详细介绍了如何在两台CentOS5服务器上部署Puppet,包括配置ISO安装器、禁用防火墙、主机命名、更新系统、添加主机名等步骤。重点讲解了Puppet的安装过程,涉及下载并安装EPEL、安装Puppet包、修改用户权限等关键操作。还提供了问题解决策略,如初始化权限拒绝问题和证书请求失败问题的分析与解决方案。

Objectives

Deploy 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
    [TEMPORARY]
    Modify user puppet to root role.
    [PERMANENT]
    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.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值