CSIT-755: Presentation and analytics layer
[csit.git] / resources / tools / testbed-setup / README.md
index a83fe14..d4e2091 100644 (file)
@@ -27,13 +27,20 @@ is available on the PXE bootstrap server in ~testuser/host-setup.
 ### Prepare the PXE bootstrap server (one-time)
 
   - `sudo apt-get install isc-dhcp-server tftpd-hpa nginx-light ansible`
+  - edit dhcpd.conf and place it to /etc/dhcp/
+  - `sudo cp dhcpd.cfg /etc/dhcp/`
+  - `sudo service isc-dhcp-server restart`
   - `cd ~testuser/host-setup`
-  - `wget 'http://releases.ubuntu.com/14.04/ubuntu-14.04.4-server-amd64.iso'`
+  - `wget 'http://releases.ubuntu.com/16.04.2/ubuntu-16.04.2-server-amd64.iso'`
   - `sudo mkdir /mnt/cdrom`
-  - `sudo mount -o loop ubuntu-14.04.4-server-amd64.iso /mnt/cdrom/`
+  - `sudo mount -o loop ubuntu-16.04.2-server-amd64.iso /mnt/cdrom/`
   - `sudo cp -r /mnt/cdrom/install/netboot/* /var/lib/tftpboot/`
   - `sudo mkdir /usr/share/nginx/html/ubuntu`
   - `sudo cp -r /mnt/cdrom/* /usr/share/nginx/html/ubuntu/`
+  - `sudo cp /mnt/cdrom/ubuntu/isolinux/ldlinux.c32 /var/lib/tftpboot`
+  - `sudo cp /mnt/cdrom/ubuntu/isolinux/libcom32.c32 /var/lib/tftpboot`
+  - `sudo cp /mnt/cdrom/ubuntu/isolinux/libutil.c32 /var/lib/tftpboot`
+  - `sudo cp /mnt/cdrom/ubuntu/isolinux/chain.c32 /var/lib/tftpboot`
   - `sudo umount /mnt/cdrom`
   - edit ks.cfg and replace IP address with that of your PXE bootstrap server
   - `sudo cp ks.cfg /usr/share/nginx/html/ks.cfg`
@@ -41,6 +48,30 @@ is available on the PXE bootstrap server in ~testuser/host-setup.
   - `sudo cp boot-screens_txt.cfg /var/lib/tftpboot/ubuntu-installer/amd64/boot-screens/txt.cfg`
   - `sudo cp syslinux.cfg /var/lib/tftpboot/ubuntu-installer/amd64/boot-screens/syslinux.cfg`
 
+### PREFERED: Prepare the PXE bootstrap server (alternative way without NGINX)
+
+  - `sudo apt-get install isc-dhcp-server tftpd-hpa ansible`
+  - edit dhcpd.conf and place it to /etc/dhcp/
+  - `sudo cp dhcpd.cfg /etc/dhcp/`
+  - `sudo service isc-dhcp-server restart`
+  - `cd ~testuser/host-setup`
+  - `wget 'http://releases.ubuntu.com/16.04.2/ubuntu-16.04.2-server-amd64.iso'`
+  - `sudo mkdir /mnt/cdrom`
+  - `sudo mount -o loop ubuntu-16.04.1-server-amd64.iso /mnt/cdrom/`
+  - `sudo cp -r /mnt/cdrom/install/netboot/* /var/lib/tftpboot/`
+  - `sudo mkdir /var/www/download/ubuntu`
+  - `sudo cp -r /mnt/cdrom/* /var/www/download/ubuntu/`
+  - `sudo cp /mnt/cdrom/ubuntu/isolinux/ldlinux.c32 /var/lib/tftpboot`
+  - `sudo cp /mnt/cdrom/ubuntu/isolinux/libcom32.c32 /var/lib/tftpboot`
+  - `sudo cp /mnt/cdrom/ubuntu/isolinux/libutil.c32 /var/lib/tftpboot`
+  - `sudo cp /mnt/cdrom/ubuntu/isolinux/chain.c32 /var/lib/tftpboot`
+  - `sudo umount /mnt/cdrom`
+  - edit ks.cfg and replace IP address with that of your PXE bootstrap server and subdir in /var/www (in this case /download)
+  - `sudo cp ks.cfg /var/www/download/ks.cfg`
+  - edit boot-screens_txt.cfg and replace IP address with that of your PXE bootstrap server and subdir in /var/www (in this case /download)
+  - `sudo cp boot-screens_txt.cfg /var/lib/tftpboot/ubuntu-installer/amd64/boot-screens/txt.cfg`
+  - `sudo cp syslinux.cfg /var/lib/tftpboot/ubuntu-installer/amd64/boot-screens/syslinux.cfg`
+
 ### New testbed host - manual preparation
 
 - set CIMC address
@@ -51,9 +82,12 @@ is available on the PXE bootstrap server in ~testuser/host-setup.
 From PXE boostrap server:
 
   - `cd ~testuser/host-setup/cimc`
+  - Initialize args.ip: Power-Off, reset BIOS defaults, Enable console redir, get LOM MAC addr
   - `./cimc.py -u admin -p Cisco1234 $CIMC_ADDRESS -d -i`
+  - Adjust BIOS settings
   - `./cimc.py -u admin -p Cisco1234 $CIMC_ADDRESS -d -s '<biosVfIntelHyperThreadingTech rn="Intel-HyperThreading-Tech" vpIntelHyperThreadingTech="disabled" />' -s '<biosVfEnhancedIntelSpeedStepTech rn="Enhanced-Intel-SpeedStep-Tech" vpEnhancedIntelSpeedStepTech="disabled" />' -s '<biosVfIntelTurboBoostTech rn="Intel-Turbo-Boost-Tech" vpIntelTurboBoostTech="disabled" />'`
-  - add MAC address to DHCP
+  - add MAC address to DHCP (/etc/dhcp/dhcpd.conf)
+  - Reboot server with boot from PXE (restart immediately)
   - `./cimc.py -u admin -p Cisco1234 $CIMC_ADDRESS -d -pxe`
 
 While Ubuntu install is running:
@@ -63,29 +97,30 @@ While Ubuntu install is running:
       - `./cimc.py -u admin -p Cisco1234 $CIMC_ADDRESS -d -r -rl 1 -rs <disk size> -rd '[1,2]'`
         Alternatively, create the RAID array manually.
 
+  - Set the next boot from HDD (without restart)
   - `./cimc.py -u admin -p Cisco1234 $CIMC_ADDRESS -d -hdd`
 
 When installation is finished:
 
-  - `ssh-copy-id <>`
+  - `ssh-copy-id 10.30.51.x`
   - `cd ~testuser/host-setup/playbooks`
   - edit /etc/ansible/hosts; add the hosts you are installing. *REMOVE ANY HOSTS YOU ARE NOT CURRENTLY INSTALLING*.
 
     Example for physical testbed hosts:
     ~~~
     [tg]
-    10.30.51.16 hostname=t1-tg1
+    10.30.51.24 hostname=t3-tg1 isolcpus="1-17,19-35" ansible_python_interpreter=/usr/bin/python2.7
 
     [sut]
-    10.30.51.17 hostname=t1-sut1
-    10.30.51.18 hostname=t1-sut2
+    10.30.51.25 hostname=t3-sut1 isolcpus="1-17,19-35" ansible_python_interpreter=/usr/bin/python2.7
+    10.30.51.26 hostname=t3-sut2 isolcpus="1-17,19-35" ansible_python_interpreter=/usr/bin/python2.7
     ~~~
 
     Example for VIRL hosts -- use the "virl" tag and specify the flat network start and end addresses:
 
     ~~~
     [virl]
-    10.30.51.28 hostname=t4-virl1 virl_l2_start=10.30.51.31 virl_l2_end=10.30.51.105
+    10.30.51.28 hostname=t4-virl1 virl_l2_start=10.30.52.2 virl_l2_end=10.30.52.253 virl_l2_network=10.30.52.0/24 virl_l2_ip=10.30.52.254 virl_public_port=eth0
     ~~~
 
   - `ansible-playbook --ask-sudo-pass 01-host-setup.yaml`