Skip to content

demo of rocks cluster boot on blank machine through IPOP

Renato Figueiredo edited this page Oct 2, 2015 · 30 revisions

This tutorial shows the steps for booting up rocks cluster from blank virtual/physical machine through IPOP. I assume you use cloudlab for blank machine.

  1. Login to Cloudlab.
  2. Click “change profile”
  3. Select one profile - “OnePC-Ubuntu14” (a bare metal x86 with Ubuntu 14.04LTS node)
  4. Click “Next”
  5. Change cluster to “Apt UTAH”, where the profile is available to deploy.
  6. Click “Finish”
  7. Click “list View” tap
  8. Use ssh to connect to the machine
  9. Install necessary packages
sudo apt-get update
sudo apt-get install qemu-kvm libvirt-bin
  1. Create a bridge name “br1”
sudo brctl addbr br1
  1. Change the size of MTU of device “br1”
sudo ifconfig br1 mtu 1280
  1. Turn on the bridge device
sudo ifconfig br1 up
  1. Download “ipop 15.01.01 ” latest release
wget https://github.com/ipop-project/downloads/releases/download/v15.01.01/ipop-15.01.01_ubuntu14.tar.gz
  1. Extract the compressed file
tar xzvf ipop-15.01.01_ubuntu14.tar.gz
  1. change to the directory
cd ipop-15.01.01_ubuntu14/
  1. Download the latest development ipop-tincan (or compile it by yourself; you don't need this step after 15.10 release)
wget -O ipop-tincan http://www.acis.ufl.edu/~xetron/koheiichikawa/ipop-tincan
  1. Download the “run.sh” script to run ipop-tincan and controller as daemon
wget https://github.com/ipop-project/ipop-scripts/raw/master/run.sh
  1. change the line in run.sh “./svpn_controller” to “./gvpn_controller” and change the user name “ubuntu” to your username
  2. Make run.sh and ipop-tincan executable.
chmod +x run.sh
chmod +x ipop-tincan
  1. Create config file
vi config.json
  1. Set contents of the config file. Note that you need to set the “ip4” address that in the subnet of IPOP overlay address range and not conflict with other IPOP nodes.
{
       "ip4_mask": 16, 
       "ip4": "10.3.2.5", 
       "xmpp_host": "xmpp.ipop-project.org", 
       "xmpp_username": "kpragma_test_01@xmpp.ipop-project.org", 
       "turn": [
           {
               "server": "128.227.73.142:19302", 
               "user": "turn1", 
               "pass": "ShrR4754shcTr"
           }
       ], 
       "sec": true, 
       "tincan_logging": 2, 
       "xmpp_password": "tuux2ds47jv7vetjo7dx", 
       "controller_logging": "DEBUG", 
       "switchmode": 1,
       "network_ignore_list": ["br1"],
       "xmpp_username_short": "kpragma_test_01"
}
  1. run the script
sudo ./run.sh
  1. Attach the “ipop” tap device to bridge “br1”
sudo brctl addif br1 ipop
  1. create a blank image file. Note that the created file does not take up actual 50GB space. So, you don't need to worry even your blank machine does have only 20GB available(Most provisioned machine have only limited disk space)
qemu-img create -f raw compute-uf.img 50G
  1. create xml file (compute-ufl.xml) for KVM guest. Change <name>, <source file>, <mac address>, <graphic type> stanza for your environment. Note: at the very least, you need to change <source file> to make sure it points to your image file in your directory
<domain type='kvm'>
     <name>compute-uf-1</name>
     <memory unit='KiB'>2097152</memory>
     <currentMemory unit='KiB'>2097152</currentMemory>
     <vcpu placement='static'>2</vcpu>
     <os>
       <type arch='x86_64'>hvm</type>
       <boot dev='network'/>
       <boot dev='hd'/>
     </os>
     <features>
       <acpi/>
       <apic/>
       <pae/>
     </features>
     <clock offset='utc'/>
     <on_poweroff>destroy</on_poweroff>
     <on_reboot>restart</on_reboot>
     <on_crash>restart</on_crash>
     <devices>
       <emulator>/usr/bin/kvm</emulator>
       <disk type='file' device='disk'>
         <driver name='qemu' type='raw' cache='none'/>
         <source file='/users/kyuho/ipop-15.01.01_ubuntu14/compute-uf.img'/>
         <target dev='vda' bus='virtio'/>
       </disk>
       <controller type='usb' index='0'>
       </controller>
       <interface type='bridge'>
         <mac address='52:54:00:11:22:33'/>
         <source bridge='br1'/>
         <model type='virtio'/>
       </interface>
       <serial type='pty'>
         <target port='0'/>
       </serial>
       <console type='pty'>
         <target type='serial' port='0'/>
       </console>
       <input type='mouse' bus='ps2'/>
       <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/>
       <video>
         <model type='cirrus' vram='9216' heads='1'/>
       </video>
       <memballoon model='virtio'>
       </memballoon>
     </devices>
   </domain>
  1. define VM
sudo virsh define compute-uf.xml
  1. start VM
sudo virsh start compute-uf-1
  1. If everything is correct, network interface vnet# is created. If you can see the RX/TX packets increasing in this network interface, the guest is retrieving image from the frontend server. If the packets are only a few, then PXC/BOOTP/DHCP is wrong.

  2. If your CloudLab machine has a public address, you can access just created guest machine through VNC. Run any VNC client machine and enter the public address with port number 5900-. You can see the opened port number with below command.

sudo netstat -nap
  1. It takes around 10 minutes to finish boot up.

Issues

  1. We don't have any credential (username/password) for the newly created guest KVM.

  2. I cannot access to the frontend server even after I put my key on the server.

Clone this wiki locally