First, Installing ruby for puppet env.
1 install ruby ENV
2 configure hostname with erveyone . (/etc/hosts or DNS create CNAME of "you NS name .")
Deamons of client is puppetd , Deamon of server is puppetmasterd.
Server or Client
1 configure hostname
vim /etc/hostname
puppetmasted
2 configure DNS or Create domain name to file=>hosts with localhost.
vim /etc/hosts
192.168.1.188 puppet.example.com puppetmasted
192.168.1.187 puppet.example.com puppetd
3 If your system softwares version very old, You need update source.list file .
My system softwares available.
4 Install ruby ENV software required
apt-get install libopenssl-ruby rdoc irb libopenssl-ruby libreadline-ruby libruby rdoc ruby
5 First you need create manifests with master server .
cd /etc/puppet/manifests/
vim ./test.pp
cat ./test.pp
# Create task
class test_class {
file { "/tmp/testfile":
ensure => present,
mode => 644,
owner => root,
group => root
}
}
# Allocate node
node puppetd {
incloude test_class
}
6 Test and verify "puppetd.example.com" signed . Exec 6 setp be dependent on client 5 setp.
puppetca -l
puppetca --sign puppetd.example.com
Client
1 configure the same as server setp 1 and 2 3 4
5 Connect to master server with test cert,wait request from master server.
puppetd --server puppet.example.com --waitforcert 60 --test
View /tmp you found testfile in to there.
阅读(673) | 评论(0) | 转发(0) |