Setup Your Own OpenQRM Cloud On Ubuntu Lucid Lynx.10052010
Setup Your Own OpenQRM Cloud On Ubuntu Lucid Lynx.10052010
Setup Your Own OpenQRM Cloud On Ubuntu Lucid Lynx.10052010
com/]
Document Version : 10.05.2010
openQRM Enterprise GmbH
Berrenrather Straße 188c
50937 Köln / Germany
Telefon : +49 (0) 221 995589-10
Fax : +49 (0) 221 995589-20
Mail : info@openqrm-enterprise.com
This HowTo guides you step-by-step through an openQRM Cloud setup on Ubuntu 10.04 aka Lucid Lynx using the KVM
Virtualization technology. The only hardware required is 1 physical system which has the VT (Virtualization Technology) available
in the CPU and enabled in the BIOS. The technical details of this single-system openQRM Cloud setup are described in the
openQRM Enterprise Documentation at http://www.openqrm-enterprise.com/news/details/article/in-depth-documentation-
of-openqrm-available.html [http://www.openqrm-enterprise.com/news/details/article/in-depth-documentation-of-openqrm-available.html]
section “Configuring a Basic Setup”.
1 of 51
When installing the system with Ubuntu Lucid Lynx select “manual” partitioning. Create 3 Partitions :
1 - primary ext4 mounted at / (the rootfs)
2 - primary swap
3 - primary “do not use” (for the server-image store)
Important is to use a custom partition schema and create a dedicated partition for later storing the server-images. Mark that
partition as “do not use” (in this HowTo it will be /dev/sda3). No need to install any extra software packages in the further
installation procedure.
When the installation finished reboot and login. If you have selected the Ubuntu-Server version please install the “ubuntu-desktop”
package.
Ubuntu Lucid Lynx after a fresh installation.
2 of 51
Install “bridge-utils”
Now edit /etc/network/interfaces and setup a bridge using a static, private ip-address.
Then apply the new network configuration by restarting the network.
Run “brctl show” to check the new network configuration. It should look like below.
Now setup the static ip-address (in this HowTo “192.168.88.3”) and hostname in /etc/hosts. Please make sure that the hostname
(in this Howto “cloud”) does not appear in the line starting with 127.0.0.1.
3 of 51
Install lvm2, nfs-kernel-server, iscsi-target and vblade.
Now prepare the dedicated partition to be used with lvm, then create a logical volume group “vol”.
Edit /etc/default/iscsitarget and set the iscsitarget to be started on boot-up.
Then start the iscsitarget and nfs-kernel-server services.
For the openQRM Server Database backend please install “mysql-server”.
For sake of simplicity in this HowTo we have left the myslq-password empty.
Install the “kvm” package.
4 of 51
We build openQRM from the sources which are available in the openQRM Projects subversion repository. The only requirement for
that is to have “subversion (client)” and “make” available so please install both components.
Now checkout the openQRM sources from the svn repository.
Change to the src/ dir.
matt@cloud:~$ cd openqrm/trunk/src/
matt@cloud:~/openqrm/trunk/src$
And run “make”. Please notice that this step requires a working internet connection. If no internet is available on this system you
can download http://sourceforge.net/projects/openqrm/files/openQRM-4.6/source/openqrm-thirdparty-cache.tgz/download
[http://sourceforge.net/projects/openqrm/files/openQRM-4.6/source/openqrm-thirdparty-cache.tgz/download] and unzip it in your home
directory. This build-cache then will avoid any downloads.
matt@cloud:~/openqrm/trunk/src$ make
.... <snip>
All compilation results are cached by the openQRM build-system. To ensure all components are build correctly simply run “make”
again. The second (and every further “make” run) will just takes a few seconds. Here how the console output looks like for the
second “make” run :
matt@cloud:~/openqrm/trunk/src$ make
Checking requirements for the compilation phase
openqrm-server requires: make, gcc, portmap, rsync, zlib1g-dev, wget, tar, bzip2, unzip, wget, netbase, patch
found make installed
found gcc installed
found portmap installed
found rsync installed
found zlib1g-dev installed
found wget installed
found tar installed
found bzip2 installed
found unzip installed
found wget installed
found netbase installed
found patch installed
openqrm-plugin-aoe-storage requires:
openqrm-plugin-aws requires:
openqrm-plugin-citrix requires:
openqrm-plugin-cloud requires:
openqrm-plugin-collectd requires:
openqrm-plugin-dhcpd requires:
openqrm-plugin-dns requires:
openqrm-plugin-equallogic-storage requires:
openqrm-plugin-highavailability requires:
openqrm-plugin-image-shelf requires:
openqrm-plugin-iscsi-storage requires:
openqrm-plugin-kvm requires:
openqrm-plugin-kvm-storage requires:
openqrm-plugin-linux-vserver requires:
openqrm-plugin-linuxcoe requires:
openqrm-plugin-local-server requires:
openqrm-plugin-local-storage requires:
openqrm-plugin-lvm-storage requires:
openqrm-plugin-nagios2 requires:
openqrm-plugin-nagios3 requires:
openqrm-plugin-netapp-storage requires:
openqrm-plugin-nfs-storage requires:
openqrm-plugin-puppet requires:
openqrm-plugin-sanboot-storage requires:
openqrm-plugin-solx86 requires:
openqrm-plugin-sshterm requires:
openqrm-plugin-tftpd requires:
5 of 51
openqrm-plugin-tmpfs-storage requires:
openqrm-plugin-vbox requires:
openqrm-plugin-vmware-esx requires:
openqrm-plugin-vmware-server requires:
openqrm-plugin-vmware-server2 requires:
openqrm-plugin-windows requires:
openqrm-plugin-xen requires:
openqrm-plugin-xen-storage requires:
openqrm-plugin-zabbix requires:
openqrm-plugin-zfs-storage requires:
Checking for required components to compile openQRM finished successfully
if [ -d ./thirdparty ]; then mkdir -p ../buildtmp; cp -aR ./thirdparty/* ../buildtmp/; fi
-> found component kvm-nic-bios (kvm-nic-bios-1.1.tgz) already downloaded
-> found component gpxe (undionly.kpxe.0.9.9.tgz) already downloaded
-> found component sshterm-component (openqrm-plugin-sshterm-components-1.0.tgz) already downloaded
-> found component openqrm-client.windows (openQRM-Client-4.6.1-setup.exe) already downloaded
Creating the default initrd-template
-> found component busybox (busybox-1.14.2.tar.bz2) already downloaded
-> Found busybox-1.14.2/_install/bin/busybox already in the build-cache
-> Skipping compilation, taking the ready built component from the cache
-> found component pciutils (pciutils-3.1.4.tar.gz) already downloaded
-> Found pciutils-3.1.4/pcimodules already in the build-cache
-> Skipping compilation, taking the ready built component from the cache
-> found component dropbear (dropbear-0.52.tar.gz) already downloaded
-> Found dropbear-0.52/dropbear already in the build-cache
-> Skipping compilation, taking the ready built component from the cache
/lib64/ld-2.11.1.so /lib64/ld-linux-x86-64.so.2
Adding /sbin/portmap to default initrd-template
Adding /sbin/rpc.statd to default initrd-template
Adding /bin/bash to default initrd-template
Adding /usr/bin/rsync to default initrd-template
Adding /usr/bin/wget to default initrd-template
Adding /sbin/modprobe to default initrd-template
Adding /sbin/depmod to default initrd-template
Adding /sbin/insmod to default initrd-template
Adding /sbin/lsmod to default initrd-template
Adding /sbin/mke2fs to default initrd-template
Adding /sbin/sfdisk to default initrd-template
Adding /sbin/udevd to default initrd-template
Adding /sbin/blkid to default initrd-template
/lib64/libnss_files-2.11.1.so /lib64/libnss_files.so.2
-> found component jquery (jquery-1.3.2.tgz) already downloaded
-> found component js-interface (interface_1.2.zip) already downloaded
-> found component openqrm-client.centos.i386 (openqrm-client.4.6.1.centos.i386.tgz) already downloaded
-> found component openqrm-client.centos.x86_64 (openqrm-client.4.6.1.centos.x86_64.tgz) already downloaded
-> found component openqrm-client.debian.i386 (openqrm-client.4.6.1.debian.i386.tgz) already downloaded
-> found component openqrm-client.debian.x86_64 (openqrm-client.4.6.1.debian.x86_64.tgz) already downloaded
-> found component openqrm-client.ubuntu.i386 (openqrm-client.4.6.1.ubuntu.i386.tgz) already downloaded
-> found component openqrm-client.ubuntu.x86_64 (openqrm-client.4.6.1.ubuntu.x86_64.tgz) already downloaded
-> found component openqrm-initrd-template.centos.i386 (openqrm-initrd-template.4.6.1.centos.i386.tgz) already downloaded
-> found component openqrm-initrd-template.centos.x86_64 (openqrm-initrd-template.4.6.1.centos.x86_64.tgz) already download
-> found component openqrm-initrd-template.debian.i386 (openqrm-initrd-template.4.6.1.debian.i386.tgz) already downloaded
-> found component openqrm-initrd-template.debian.x86_64 (openqrm-initrd-template.4.6.1.debian.x86_64.tgz) already download
-> found component openqrm-initrd-template.ubuntu.i386 (openqrm-initrd-template.4.6.1.ubuntu.i386.tgz) already downloaded
-> found component openqrm-initrd-template.ubuntu.x86_64 (openqrm-initrd-template.4.6.1.ubuntu.x86_64.tgz) already download
-> found component kvm-nic-bios (kvm-nic-bios-1.1.tgz) already downloaded
-> found component gpxe (undionly.kpxe.0.9.9.tgz) already downloaded
-> found component sshterm-component (openqrm-plugin-sshterm-components-1.0.tgz) already downloaded
-> found component openqrm-client.windows (openQRM-Client-4.6.1-setup.exe) already downloaded
matt@cloud:~/openqrm/trunk/src$
Then run “sudo make install”.
And finally initialize and start openQRM by “sudo make start”.
6 of 51
Adding system startup for /etc/init.d/openqrm ...
/etc/rc0.d/K24openqrm -> ../init.d/openqrm
/etc/rc1.d/K24openqrm -> ../init.d/openqrm
/etc/rc6.d/K24openqrm -> ../init.d/openqrm
/etc/rc2.d/S98openqrm -> ../init.d/openqrm
/etc/rc3.d/S98openqrm -> ../init.d/openqrm
/etc/rc4.d/S98openqrm -> ../init.d/openqrm
/etc/rc5.d/S98openqrm -> ../init.d/openqrm
Looking for syslinux/pxelinux.0...found: /usr/lib/syslinux/pxelinux.0
Creating custom apache config.../etc/apache2/conf.d/openqrm-httpd.conf
Checking /usr/share/openqrm/etc/openqrm-server.conf for OPENQRM_WEB_PROTOCOL=https.. * Reloading web server config apache2
Adding password for user openqrm
Initializing dropbear...
Will output 1024 bit rsa secret key to '/usr/share/openqrm/etc/dropbear/dropbear_rsa_host_key'
Generating key, this may take a while...
Public key portion is:
ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxroot@cloud
Fingerprint: md5 28:46:66:b4:b7:59:b6:28:70:ec:2b:6f:16:4a:dd:70
Adding public key to /root/.ssh/authorized_keys...
Starting the openQRM-server ver. 4.6.
Initialization complete. Please configure your openQRM Server at: http://[server-ip-address]/openqrm/
-> User: openqrm -> Password: openqrm
matt@cloud:~/openqrm/trunk/src$
“make start” triggers a check for the openQRM runtime-dependencies which will install all additional required packages
automatically. At first start the openQRM Server is initialized.
We are now ready to configure the openQRM Server via the Web-UI.
7 of 51
Login to your openQRM Server at http://localhost/openqrm [http://localhost/openqrm] . User and password is “openqrm”. Please make
sure to change this default credentials after the configuration phase.
8 of 51
The step-by-step Web-based configuration guides you through the setup phase. First select the bridge-interface as the openQRM
management network-device.
9 of 51
Then select “myslq” as the Database to use as the openQRM backend.
10 of 51
And then configure the Database connection credentials.
11 of 51
openQRM is now fully configured and will forward to the Datacenter Dashboard.
12 of 51
The openQRM Datacenter Dashboard
13 of 51
First step is to enable and start the following plug-ins :
cloud
dhcpd
image-shelf
kvm
lvm-storage
tftpd
14 of 51
After that go to Base → Components → Create → Storage and create a new Storage from the type “Lvm Storage Server (NFS)”.
Select the openQRM Server “resource”
15 of 51
Here just give the Storage Server a name and save.
16 of 51
Here how the Storage List looks now.
17 of 51
Click on the “Mgmt” button of the new created “lvm-nfs” Storage Server.
18 of 51
Please select the “vol” volume group.
19 of 51
Now create a new volume with the name “ubuntu64” and the size 5000MB.
20 of 51
Also create another volume with the name “debian64” and the size 5000MB.
21 of 51
Go to Base → Components → Create → Image and create “images” from the just created “volumes”. First step is to select the
Storage Server on which the “image” is physically located.
22 of 51
In the next form give the “image” a name (here “ubuntu64”) and select the “ubuntu64” volume as the root-device identifier.
23 of 51
Repeat the previous 2 steps to create another “image” named “debian64” using the “debian64” volume as its root-device.
24 of 51
Here how the Image List looks like now.
On the console it will now look like this :
matt@cloud:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 38543848 3470824 33115088 10% /
none 1523376 324 1523052 1% /dev
none 1528204 200 1528004 1% /dev/shm
none 1528204 164 1528040 1% /var/run
none 1528204 0 1528204 0% /var/lock
none 1528204 0 1528204 0% /lib/init/rw
none 38543848 3470824 33115088 10% /var/lib/ureadahead/debugfs
/dev/mapper/vol-ubuntu64
5039616 141212 4642404 3% /vol/ubuntu64
/dev/mapper/vol-debian64
5039616 141212 4642404 3% /vol/debian64
matt@cloud:~$ sudo exportfs
/vol/ubuntu64 192.168.88.3
/vol/debian64 192.168.88.3
matt@cloud:~$ ls /vol/ubuntu64/
lost+found
matt@cloud:~$ ls /vol/debian64/
lost+found
matt@cloud:~$
Now we are going to populate the still empty “images” with root-filesystem content via the “image-shelf” plug-in.
25 of 51
Go to Plugins → Deployment → Image-Shelf → Import and select the “openqrm-enterprise” Image-Shelf.
26 of 51
On this screen it will provide a list of available Server-Templates. Please select the “Ubuntu x86_64” Template and click on “get”.
27 of 51
Here select the “image” where to “put” the Server-Template to. Select the “ubuntu64” image created before and click on “put”.
28 of 51
The Image-Shelf is now progressing the request in the background. It will download the selected Server-Template and unpack it
on the Storage Servers “image-location”. Please notice that this process will take some time ! You can check the progress in
the Event List.
Please repeat the same Image-Shelf steps for the “debian64” “image”.
After the Image-shelf finished the download and unpack phase it will now look like this on the console :
matt@cloud:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 38543848 3552184 33033728 10% /
none 1523376 324 1523052 1% /dev
none 1528204 200 1528004 1% /dev/shm
none 1528204 164 1528040 1% /var/run
none 1528204 0 1528204 0% /var/lock
none 1528204 0 1528204 0% /lib/init/rw
none 38543848 3552184 33033728 10% /var/lib/ureadahead/debugfs
/dev/mapper/vol-ubuntu64
5039616 1144532 3639084 24% /vol/ubuntu64
/dev/mapper/vol-debian64
5039616 1084104 3699512 23% /vol/debian64
matt@cloud:~$ sudo exportfs
/vol/ubuntu64 192.168.88.3
/vol/debian64 192.168.88.3
matt@cloud:~$ ls /vol/ubuntu64/
bin cdrom etc initrd.img lib64 media opt root selinux sys usr vmlinuz
boot dev home lib lost+found mnt proc sbin srv tmp var
matt@cloud:~$ ls /vol/debian64/
bin cdrom emul home lib lib64 media opt root selinux sys usr vmlinuz
boot dev etc initrd.img lib32 lost+found mnt proc sbin srv tmp var
matt@cloud:~$
Both “images” are now filled with a valid root-filesystem and we can now continue to configure the openQRM Cloud.
29 of 51
Now we have to tell openQRM which systems are “Virtualization Hosts”.
Please go to Base → Appliances → Create and select the openQRM Server “resource”.
30 of 51
Now provide a name for the new appliance (here we have used “kvm-host”) and set the “resource-type” to “KVM Host”. Click on
save.
31 of 51
Here the Appliance List after we have created the “kvm-host” appliance.
32 of 51
After that please go to Plugins → Cloud → Configuration → Main Config and configure the following items :
cloud_admin_email → your valid email address (may be a local address depending on your postfix setup)
auto_provision → true
external_portal_url → (optional) external Cloud Portal URL
request_physical_systems → false
auto_give_ccus → 100
show_disk_resize → (optional) true
show_private_image → true
cloud_currency → (optional) set to US or Euro
cloud_1000_ccus → How much 1000 CCUs are worh in US/Euro
For all other configuration items you can continue with the defaults. Save your configuration.
Here a screenshot of the Main Cloud Configuration page :
33 of 51
Next step is to configure the Cloud Products via the “Cloud-Selector”.
34 of 51
Go to Plugins → Cloud → Configuration → Products → Kernel and create a new “Ubuntu64” kernel product.
35 of 51
Repeat this step and create a “Debian64” kernel product.
36 of 51
Now create a “KVM VM” virtualization product.
37 of 51
It will look like this :
38 of 51
The next step is to tell the Cloud which “images” to show to the CloudUsers. Go to Plugins → Cloud → Configuration → Private
Images and select “All” in the checkboxes for the ubuntu64 and debian64 “image”.
39 of 51
Following step is to create one or more CloudUser. Go to Plugins → Cloud → User and add a new Clouduser with a valid email
address.
40 of 51
The CloudUser List now looks like the screenshot below :
41 of 51
As the Cloud-Administrator you can simply login as a specific CloudUser by clicking on the CloudUser name.
42 of 51
This is the openQRM Cloud-Portal after login :
43 of 51
Click on the 2. Tab “Visual Cloud Designer”
44 of 51
The Visual Cloud Designer shows all components available in the Cloud. You can now start constructing your Cloud-Appliance by
drag-and-drop.
45 of 51
Then check the costs for this Appliance (hourly, daily and monthly).
46 of 51
And with a single click request this custom system from the openQRM Cloud.
47 of 51
To get access to the KVM VM console please install the “xtightvncviewer” package.
To VNC-Login to the first Cloud-Appliance (KVM VM) please run :
Here a screenshot of the booting Cloud-Appliance starting in a KVM VM.
48 of 51
And here the mail the openQRM Cloud sent to the CloudUser with the ip-address and login credentials.
49 of 51
We can now login and use the requested Cloud-Appliance.
Enjoy your openQRM Cloud !!
Separating Storage, Hypvervisors and openQRM on dedicated Systems
openQRM Server HA Setup
Adding more Virtualization Host from different types
Adding Physical Systems
Adding more Storage Systems
Enabling automatic Monitoring
IP- and Network-Management
Cloud-Billing
Cloud Integration / SOAP WebService
… and more
The best source of informations how to scale your basic openQRM Setup to a distributed, flexible and robust openQRM managed
Datacenter Environment is the detailed technical documentation available at http://www.openqrm-enterprise.com/news/details
/article/in-depth-documentation-of-openqrm-available.html [http://www.openqrm-enterprise.com/news/details/article/in-depth-
documentation-of-openqrm-available.html] .
There is also an active community maintaining the forums and mailing-lists of the openQRM Project.
For professional services and support please contact openQRM Enterprise - http://www.openqrm-enterprise.com
[http://www.openqrm-enterprise.com]
50 of 51
Copyright 2010, Matthias Rechenburg matt@openqrm-enterprise.com [mailto:matt@openqrm-enterprise.com]
This HowTo is brought to you by openQRM Enterprise [http://www.openqrm-enterprise.com/]
openQRM Enterprise GmbH
Berrenrather Straße 188c
50937 Köln / Germany
Telefon : +49 (0) 221 995589-10
Fax : +49 (0) 221 995589-20
Mail : info@openqrm-enterprise.com
51 of 51