Changes

Jump to: navigation, search

A managed OpenVZ installation

3,030 bytes added, 13:08, 16 July 2009
no edit summary
After the installation you have to configure the Puppet Master to do things. Typically this means accepting the public private key pair and doing some configuration stuff. At our site use Puppet Master to manage an installation of about 100 servers.
 
 
To get a feeling for it here is an configuration example (only OpenVZ server hosts):
<pre>
 
# ALL----- OPENVZ
node "yourserver1.yourdns.com", "yourserver2.yourdns.com", "yourserver3.yourdns.com", "yourserver4.yourdns.com", "yourserver5.yourdns.com", "yourserver6.yourdns.com", "yourserver7.yourdns.com"{
file { "/etc/aliases":
mode => 644,
owner => root,
group => root,
source => "puppet://yourpuppetmaster/files/openvz-hosts/etc/aliases",
}
exec { "subscribe-newaliases":
command => "/usr/bin/newaliases && /bin/echo NEALIASSES",
subscribe => File["/etc/aliases"],
refreshonly => true,
logoutput => true
}
 
file { "/etc/apt/sources.list":
mode => 644,
owner => root,
group => root,
source => "puppet://yourpuppetmaster/files/openvz-hosts/etc/apt/sources.list"
}
file { "/root/.ssh/authorized_keys2":
mode => 644,
owner => root,
group => root,
source => "puppet://yourpuppetmaster/files/openvz-hosts/root/authorized_keys2"
}
file { "/etc/vim/vimrc":
mode => 644,
owner => root,
group => root,
source => "puppet://yourpuppetmaster/files/openvz-hosts/etc/vim/vimrc"
}
file { "/etc/vz/conf/ve-vps.10.conf-sample":
mode => 644,
owner => root,
group => root,
source => "puppet://yourpuppetmaster/files/openvz-hosts/etc/vz/conf/ve-vps.10.conf-sample"
}
file { "/etc/sysctl.conf":
mode => 644,
owner => root,
group => root,
source => "puppet://yourpuppetmaster/files/openvz-hosts/etc/sysctl.conf"
}
exec { subscribe-sysctl:
command => "/sbin/sysctl -p && /bin/echo SYSCTL EXECUTED",
logoutput => true,
refreshonly => true,
subscribe => file["/etc/sysctl.conf"]
}
file { "/etc/ntp.conf":
mode => 644,
owner => root,
group => root,
source => "puppet://yourpuppetmaster/files/openvz-hosts/etc/ntp.conf"
}
file { "/root/.bashrc":
mode => 644,
owner => root,
group => root,
source => "puppet://yourpuppetmaster/files/openvz-hosts/root/bashrc"
}
file { "/srv/exim_config.sh":
mode => 744,
owner => root,
group => root,
source => "puppet://yourpuppetmaster/files/openvz-hosts/srv/exim_config.sh"
}
exec { subscribe-exim_config:
command => "/srv/exim_config.sh && /usr/sbin/update-exim4.conf && /etc/init.d/exim4 restart && /bin/echo EXIM_CONFIG",
logoutput => true,
refreshonly => true,
subscribe => file["/srv/exim_config.sh"]
}
file { "/etc/default/snmpd":
mode => 644,
owner => root,
group => root,
source => "puppet://yourpuppetmaster/files/openvz-hosts/etc/default/snmpd"
}
exec { subscribe-snmpd_config:
command => "/etc/init.d/snmpd restart && /bin/echo SNMPD_CONFIG",
logoutput => true,
refreshonly => true,
subscribe => file["/etc/default/snmpd"]
}
}
</pre>
==References==
<references/>
41
edits

Navigation menu