Machine/munin

< Machine
Revision as of 10:16, 5 September 2011 by Nemo (talk | contribs) (nemo is a pywikipediabot)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Data

Name munin.treehouse.su
Description Development VM for Munin
OS Debian Squeeze
Typ Virtual Machine
Location housetree
Service template_SERVICE
Admins Stefan Unterhauser
Monitoring munin

Recipe

 ssh root@housetree 'qemu-img create -f qcow2 /srv/vm/munin.qcow2 20G'
 ssh root@squeeze 'rm /etc/udev/rules.d/70-persistent-net.rules'
 ssh root@squeeze 'sed -i "s/squeeze/munin/" /etc/dhcp/dhclient.conf; sync'
 ssh root@housetree 'virsh suspend template-squeeze'
 ssh root@housetree 'virt-clone --force -o template-squeeze -f /srv/vm/munin.qcow2 -n munin'
 ssh root@housetree 'virsh resume template-squeeze'
 ssh root@squeeze 'sed -i "s/munin/squeeze/" /etc/dhcp/dhclient.conf'
 ssh root@housetree 'virsh start munin'

add "munin" to .ssh/config and to treehouse-DNS

 ssh root@munin 'sed -i "s/squeeze/munin/g" /etc/hostname /etc/hosts /etc/postfix/main.cf'
 ssh root@munin 'ssh-keygen -N "" -f /etc/ssh/ssh_host_rsa_key -t rsa'
 ssh-keygen -f ".ssh/known_hosts" -R munin.treehouse.su
 ssh root@munin 'ssh-keygen -N "" -f /etc/ssh/ssh_host_dsa_key -t dsa'
 ssh root@munin 'ssh-keygen -N "" -f /root/.ssh/id_rsa -t rsa'
 ssh root@munin 'sed "s/squeeze/munin/" </etc/munin/munin-conf.d/squeeze >/etc/munin/munin-conf.d/munin'

helsene's username and public sshkey is missing user "hhardy" name "Henry Edward Hardy" other "hhardy01@gmail.com"

 ssh root@munin 'adduser --disabled-password --add_extra_groups hhardy'
 ssh root@munin 'echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDcvPyaILAJXdOM074kdswcFXLsAJgi34cZmumaOwa/88Uv/4rHBtNLBbRnGNOE7ZnMlW3T+GvgGvAKIunCmK9UpNCBA+zWq8Heosfnemf55ygnCn56ESHKFLV9IH0TZqKFMKH5/LU8CcxxAAmKvbk5nz/xNEbPyUisaBaI/J2ff3q5KQujgfhyPfZGpEUjKCrAXx+IBqcMUrwi7yWQRPaa12AxxNz7YEBMM0MWWbHP90OafnRIjM03v8L+KYjjCw9psRMI9uKWmF0XpD1MO/iqXPGOlj+ouYVXyT8W3PosDpPCDoNr/djIbzr5om8gw0qRgpE4q+a4g9YGP7pJ6CEl hh@hh-hp.bc.edu" >> /home/hhardy/.ssh/authorized_keys'
 ssh root@munin 'reboot'