Difference between revisions of "Agile testbed"

From PDP/Grid Wiki
Jump to navigationJump to search
Line 76: Line 76:
 
to pre-generate the ssh keys.
 
to pre-generate the ssh keys.
  
Depending on the purpose of the machine, an X.509 host certificate needs to be issued.
+
* '''Choose a VM host''' to starting the installation on. Peruse the [[#Hardware index|hardware inventory]] and pick one of the available machines in the <nowiki><span style="background-color="#ffc;">yellow</span></nowiki> section.
 +
* '''Choose a storage option''' for the machine's disk image. This choice determines performance and the ability to do live migration later on.
 +
* '''Choose OS, memory and disk space''' as needed.
 +
* '''Figure out the network bridge''' to link to, this is determined by the IP address of the machine
  
* (optional) generate or request an X509 host certificate. For local machines in the .testbed domain, Dutchgrid certificates won't be issued, but a testbed-wide CA is in use, ask Dennis. The certificate and key are stored in
+
{| class="wikitable"
/var/local/hostkeys/pem/<hostname>/hostcert.pem
+
! network
/var/local/hostkeys/pem/<hostname>/hostkey.pem
+
! bridge name
* place a 'firstboot' script on span in
+
|-
/var/local/xen/firstboot/<hostname>
+
| 10.198.0.0/16
(it will be downloaded and run the first time after installation of the machine.)
+
| br0
 +
|-
 +
| 194.171.96.16/28
 +
| br2
 +
|-
 +
| 194.171.96.32/27
 +
| br8
 +
|}
  
==== starting the installation on the dom0 ====
+
These choices tie in directly to the parameters given to the virt-install script; the virt-manager GUI comes with a wizard for entering these parameters in a slower, but more friendly manner. Here is a command-line example:
 
 
The old generate-machine script still works for Xen Dom0. For blade13 and blade14 (and other libvirt machines) this script sort of works:
 
 
 
virt-install --name my-new-machine.testbed --ram 1024 --disk pool=vmachines,size=10 \
 
    --network bridge=br0,mac=52:54:00:48:22:32 --os-type linux --os-variant rhel5.4 \
 
    --location http://spiegel.nikhef.nl/mirror/centos/5/os/x86_64  \
 
    --extra ks=http://bleek.nikhef.nl/mktestbed/kickstart/centos5-kvm.ks
 
 
 
Take into account that the mac address is what is configured in /etc/ethers on bleek.nikhef.nl; the disk pool points to the Compellent Fiber Channel pool.
 
  
 +
virsh vol-create-as vmachines ''name''.img 10G
 +
virt-install --noautoconsole --name ''name'' --ram 1024 --disk vol=vmachines/''name''.img \
 +
    --arch=i386 --network bridge=br0,mac=52:54:00:xx:xx:xx --os-type=linux \
 +
    --os-variant=rhel5.4 --location http://spiegel.nikhef.nl/mirror/centos/5/os/i386 \
 +
    --extra 'ks=http://bleek.testbed/mktestbed/kickstart/centos5-32-kvm.ks'
  
 
A debian installation is similar, but uses preseeding instead of kickstart. The preseed configuration is on bleek.
 
A debian installation is similar, but uses preseeding instead of kickstart. The preseed configuration is on bleek.
  
  virt-install --name debian-builder.testbed --ram 1024 --disk pool=vmachines,size=10 \
+
  virt-install --noautoconsole --name debian-builder.testbed --ram 1024 --disk pool=vmachines,size=10 \
 
     --network bridge=br0,mac=52:54:00:fc:18:dd --os-type linux --os-variant debiansqueeze \
 
     --network bridge=br0,mac=52:54:00:fc:18:dd --os-type linux --os-variant debiansqueeze \
 
     --location http://ftp.nl.debian.org/debian/dists/squeeze/main/installer-amd64/ \
 
     --location http://ftp.nl.debian.org/debian/dists/squeeze/main/installer-amd64/ \
 
     --extra 'auto=true priority=critical url=http://bleek.testbed/d-i/squeeze/./preseed.cfg'
 
     --extra 'auto=true priority=critical url=http://bleek.testbed/d-i/squeeze/./preseed.cfg'
 +
 +
The latter example just specifies the storage pool to create an image on the fly, whereas the first pre-generates it. Both should work.
  
 
A few notes:
 
A few notes:

Revision as of 19:14, 22 February 2013