Nov 10, 2014

Install puppet on centos linux 6

Install puppet yum repo
rpm -ivh https://yum.puppetlabs.com/el/6.5/products/x86_64/puppetlabs-release-6-10.noarch.rpm
rpm -ivh https://yum.puppetlabs.com/el/7/products/x86_64/puppetlabs-release-7-10.noarch.rpm

Install Puppet Client
yum -y install puppet
chkconfig puppet on
service puppet restart

Install Puppet Master
yum -y install puppet-server
chkconfig puppetmaster on
service puppetmaster restart

Setup Firewall Exception
iptables -I INPUT 4 -m state --state NEW -m tcp -p tcp --dport 8140 -j ACCEPT
service iptables save
service iptables restart

Request a New Certificate (on Client)
puppet agent --ca_server puppet1.lan

Sign the Certificate Request (on Server)
puppet ca sign tomcat1.lan

Setup Puppet Master Location (on Client)
echo "server = puppet1.lan" >> /etc/puppet/puppet.conf
service puppet restart

Install First Manifest (on Server)
cat << EOF > /etc/puppet/manifests/site.pp
# site.pp
    cron { yum-update:
      command => "/usr/bin/yum -y update",
      user    => root,
      minute  => "*/1"
    }
EOF

Validate Syntax of Manifest (on Server)
puppet parser validate /etc/puppet/manifests/site.pp

Pull, and Apply Manifest (on Client)
puppet agent  --verbose –test

No comments: