Manual vHost Creation¶
In case the createvm script does not work as expected, here is a bit of documentation about how to do its work manually.
run createvm script: It will provision a new VM and set the name(s) in the DNS. Sadly at this time the machine fails to install on its own, so a manual installation is necessary. Force the machine to shut down and then boot with this CD-ROM iso:
/var/lib/libvirt/images/CentOS-6.5-x86_64-minimal.iso
In boot menu choose "Install system with basic video driver"
Language: english
Keyboard: Swiss German (sg)
Hostname: (Usually defined by the createvm script)
Timezone: Europe/Zurich
Set a root password
Use all space for your installation
remove CD-ROM drive
change IP and gateway
In /etc/sysconfig/network add this line:
GATEWAY=178.250.135.33
In /etc/sysconfig/network-scripts/ifcfg-eth0 set these lines:
BOOTPROTO=none
ONBOOT=yes
IPADDR=178.250.135.XX
NETMASK=255.255.255.224
IPV6ADDR=2a02:16a0:ff00:1::XX/64
In /etc/resolv.conf set these lines:
search production.piratenpartei.ch piratenpartei.ch
nameserver 178.250.135.41
After a reboot you should be able to login as root via SSH.
yum -y install ntpdate
ntpdate 178.250.135.34
yum -y update
chkconfig --del bluetooth
chkconfig --del cups
chkconfig portmap off
rpm --import http://mirror.switch.ch/ftp/mirror/epel/RPM-GPG-KEY-EPEL-6
yum -y --nogpgcheck install http://mirror.switch.ch/ftp/mirror/epel/6/i386/epel-release-6-8.noarch.rpm
rpm --import http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs
yum -y --nogpgcheck install http://yum.puppetlabs.com/el/6/products/i386/puppetlabs-release-6-6.noarch.rpm
yum -y install redhat-lsb
yum -y install --nogpgcheck puppet
mkdir -p /etc/pp/facts.d
echo "pp_loc=rz1" >> /etc/pp/facts.d/puppet
echo "pp_env=production" >> /etc/pp/facts.d/puppet
echo "pp_hostgroup=vserver" >> /etc/pp/facts.d/puppet
echo "pp_businessowner=ag-di" >> /etc/pp/facts.d/puppet
echo " pluginsync = true" >> /etc/puppet/puppet.conf
yum -y remove cups hal dbus abrt audit
puppet agent --test --server=puppet.piratenpartei.ch
puppet agent --test --server=puppet.piratenpartei.ch
puppet agent --test --server=puppet.piratenpartei.ch
Note: Yes, we execute puppet 3 times! The last run should no longer detect any changes.