Test setup: Difference between revisions

From FAIWiki
Jump to navigation Jump to search
(my test setup)
 
(minor update)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
== A nice test setup ==
== A nice test setup ==


This is how I (Mrfai) do tests for FAI.
This is how Mrfai does testing


* Set up a Debian mirror in your local LAN (using debmirror(1) and /usr/share/doc/fai-doc/examples/utils/mkdebmirror)
* Set up a Debian mirror in your local LAN (using debmirror(1) and /usr/share/doc/fai-doc/examples/utils/mkdebmirror)
* 2GB RAM for this mirror should be fine, GBit LAN is required
* 2GB RAM for this mirror should be fine, GBit LAN is nice
* A host on which I run all tests has a Q4 Core i7 960, 3.2GHz, 6GB RAM, GBit LAN
* The host on which I run all tests has a quad-core Core i7-3770T, 2.5GHz, 32GB RAM, GBit LAN
* /etc/default/tmpfs: SHM_SIZE=5g
* my /tmp entry in etc/fstab: tmpfs    /tmp tmpfs     nodev,nosuid,size=85%,mode=1777  0    0
* Set up a software bridge, so kvm can use a tap device (using the script [[File:bridge-on.sh]])
* Set up a software bridge, so kvm can use a tap device (using the script [https://github.com/faiproject/fai/blob/master/dev-utils/fai-mk-network fai-mk-network])
* Install fai packages, create the nfsroot
* Install fai packages, create the nfsroot
* Using [[File:fai-kvm.sh]] you can start a test client via PXE or from FAI CD
* Using [https://github.com/faiproject/fai/blob/master/dev-utils/fai-kvm fai-kvm] you can boot a test client via PXE or from FAI CD
<pre>fai-kvm.sh -n pxe</pre>  
<pre>fai-kvm -n pxe</pre>  
<pre>fai-kvm.sh pxe</pre>  
<pre>fai-kvm pxe</pre>  
<pre>fai-kvm.sh -n faicd</pre>  
<pre>fai-kvm -n cd faicd64-small_5.7.iso</pre>  


* Since a lot of things run in RAM this setup is very fast! A simple installation takes about 30 to 90 seconds.


== Creating a FAI-CD ISO image ==
== Creating a FAI-CD ISO image ==
* Create a partitial mirror containing the packages needed  
* Create a partitial mirror containing the packages needed (16s needed)
<pre>fai-mirror -m9999  -xXEN,I386,CHROOT,LILO,GRUB,GNOME,GERMAN /dev/shm/m1</pre>
<pre>fai-mirror -m9999  -xXEN,I386,CHROOT,GRUB,GNOME,GERMAN /tmp/m1</pre>


* Create the ISO image (run this as root)
* Create the ISO image (run this as root)
<pre>fai-cd -m /dev/shm/m1 /files/scratch/fai-cd.iso</pre>
<pre>fai-cd -m /tmp/m1 /files/scratch/fai-cd.iso</pre>
 
* Run the CD in a VM
<pre>fai-kvm -n cd /files/scratch/fai-cd.iso</pre>

Latest revision as of 14:27, 11 September 2018

A nice test setup

This is how Mrfai does testing

  • Set up a Debian mirror in your local LAN (using debmirror(1) and /usr/share/doc/fai-doc/examples/utils/mkdebmirror)
  • 2GB RAM for this mirror should be fine, GBit LAN is nice
  • The host on which I run all tests has a quad-core Core i7-3770T, 2.5GHz, 32GB RAM, GBit LAN
  • my /tmp entry in etc/fstab: tmpfs /tmp tmpfs nodev,nosuid,size=85%,mode=1777 0 0
  • Set up a software bridge, so kvm can use a tap device (using the script fai-mk-network)
  • Install fai packages, create the nfsroot
  • Using fai-kvm you can boot a test client via PXE or from FAI CD
fai-kvm -n pxe
fai-kvm pxe
fai-kvm -n cd faicd64-small_5.7.iso
  • Since a lot of things run in RAM this setup is very fast! A simple installation takes about 30 to 90 seconds.

Creating a FAI-CD ISO image

  • Create a partitial mirror containing the packages needed (16s needed)
fai-mirror -m9999  -xXEN,I386,CHROOT,GRUB,GNOME,GERMAN /tmp/m1
  • Create the ISO image (run this as root)
fai-cd -m /tmp/m1 /files/scratch/fai-cd.iso
  • Run the CD in a VM
fai-kvm -n cd /files/scratch/fai-cd.iso