In this post, I have laid out instructions on installing Appistry CloudIQ on Ubuntu. Since Appistry does not provide a .deb package on it’s download site, I composed these instructions once I converted and installed the .rpm on my Ubuntu OS.
The various steps detailed below are available as a script that you can download and run. See “Download” section below.

Note: These instructions should work with other Debian flavors as well.

What is Appistry CloudIQ?

Appistry CloudIQ is a Cloud Platform that can be installed on-premise in your lab/datacenter OR on public infrastructure cloud offerings such as Amazon EC2, RackSpace cloud, GoGrid, etc.

Appistry CloudIQ not only enables enterprises to deploy/manage applications onto physical or virtualized infrastructure but also provides an environment that allows applications to scale linearly and reliably.

Download Appistry-CloudIQ
Download the rpm package for Appistry-CloudIQ from the Community site. The free Community edition is great to start building a small enterprise cloud on-premise. For the purpose of this post, I’m Appistry-CloudIQ Platform 4.2 Community edition for RHEL 5.x, x86 32-bit version.

After you have downloaded, you should see something like this:

roshan@ubuntuWorkerB:~$ ls -l
total 44988
-rw-r–r– 1 roshan roshan 46015607 2009-12-17 14:57 appistry-cloudiq-4.2.1.2-rhel5.rpm

Create .deb package
Once you have the package downloaded, use alien to convert the rpm to a .deb package using the commands below. The package alien allows you to convert rpm packages to debian packages and then install them via dpkg. See how-to install alienhow-to.

Convert the rpm package to the debian package using the following command:

roshan@ubuntuWorkerB:~$ sudo alien -kc appistry-cloudiq-4.2.1.2-rhel5.rpm 
appistry-cloudiq_4.2.1.2-rhel5_i386.deb generated

Install the .deb pacakge
Now that you have the .deb package, install it using dpkg.

roshan@ubuntuWorkerB:~$ sudo dpkg -i appistry-cloudiq_4.2.1.2-rhel5_i386.deb 
(Reading database … 47465 files and directories currently installed.)
Unpacking appistry-cloudiq (from appistry-cloudiq_4.2.1.2-rhel5_i386.deb) …
Setting up appistry-cloudiq (4.2.1.2-rhel5) …
Adding group ‘fabricuser’
Adding user ‘fabricuser’
Usage: useradd [options] LOGIN

Options:
-b, –base-dir BASE_DIR base directory for the new user account
home directory
-c, –comment COMMENT set the GECOS field for the new user account
-d, –home-dir HOME_DIR home directory for the new user account
-D, –defaults print or save modified default useradd
configuration
-e, –expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE
-f, –inactive INACTIVE set password inactive after expiration
to INACTIVE
-g, –gid GROUP force use GROUP for the new user account
-G, –groups GROUPS list of supplementary groups for the new
user account
-h, –help display this help message and exit
-k, –skel SKEL_DIR specify an alternative skel directory
-K, –key KEY=VALUE overrides /etc/login.defs defaults
-l, do not add the user to the lastlog and
faillog databases
-m, –create-home create home directory for the new user
account
-N, –no-user-group do not create a group with the same name as
the user
-o, –non-unique allow create user with duplicate
(non-unique) UID
-p, –password PASSWORD use encrypted password for the new user
account
-r, –system create a system account
-s, –shell SHELL the login shell for the new user account
-u, –uid UID force use the UID for the new user account
-U, –user-group create a group with the same name as the user

chown: invalid user: `fabricuser:fabricuser’

The install fails to create the user “fabricuser”. So let’s create it and add it to group “fabricuser”.

roshan@ubuntuWorkerB:~$ sudo useradd -s /bin/bash -g fabricuser fabricuser

You can confirm that the user was created by running the following command:

roshan@ubuntuWorkerB:~$ cat /etc/passwd | grep fabricuser
fabricuser:x:1001:1001::/home/fabricuser:/bin/bash

Change ownership of /usr/local/appistry/cloudiq to fabricuser
Change ownership of the /usr/local/appistry/cloudiq directory recursively to fabricuser using the following command:

roshan@ubuntuWorkerB:~$ sudo chown -R fabricuser:fabricuser /usr/local/appistry/cloudiq

Update scripts and create /bin/arch script
First, update the start-up scripts – fabric_keeper and fabric_system_service to explicitly use the /bin/bash interpreter. These two scripts are located under /etc/init.d directory.

roshan@ubuntuWorkerB:~$ sudo sed -ie 's/\/bin\/sh/\/bin\/bash/g' /etc/init.d/fabric_system_service 
roshan@ubuntuWorkerB:~$ sudo sed -ie 's/\/bin\/sh/\/bin\/bash/g' /etc/init.d/fabric_keeper 

The reason for doing this is because of the bashisms that exist in the two scripts.

Bashisms

Bashisms are bash extensions that are not strictly POSIX compliant. Using some of these extensions can lead to portability issues between different shells.

Appsitry CloudIQ start-up scripts contain some bashisms such as let which cause the scripts to fail when dash runs them. Therefore the explicit change from /bin/sh to /bin/bash. A cleaner approach would be to remove these bashisms which perhaps the Appistry CloudIQ developers will get around to doing so sometime in the near future. If you have a few more minutes on your hand, feel free to remove the bashisms

Next, we need to create an executable script arch under the /bin directory.

roshan@ubuntuWorkerB:~$ echo "uname -m" > arch
roshan@ubuntuWorkerB:~$ sudo mv arch /bin/.; sudo chmod +x /bin/arch

The reason for doing this is because the start-up scripts source in /etc/fabric_env references /bin/arch which does not exist in Ubuntu since version 7.10. This causes the start-up scripts to fail. See https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/148511 for more information.

Set up symlinks for libssl.so.6 and libcrypto.so.6 shared libraries
Since the start up scripts attempt to load the libssl.so.6 and libcrypto.so.6 shared libraries, create symlinks with these names under /usr/lib directory.

roshan@ubuntuWorkerB:~$ cd /usr/lib
roshan@ubuntuWorkerB:~$ ls -l libss*
lrwxrwxrwx 1 root root 20 2009-11-30 15:28 /usr/lib/libssl.so.0.9.8 -> /lib/libssl.so.0.9.8
roshan@ubuntuWorkerB:/usr/lib$ ls -l libcrypto*
lrwxrwxrwx 1 root root 23 2009-11-30 15:28 libcrypto.so.0.9.8 -> /lib/libcrypto.so.0.9.8
roshan@ubuntuWorkerB:/usr/lib$ sudo ln -s libssl.so.0.9.8 libssl.so.6
roshan@ubuntuWorkerB:/usr/lib$ sudo ln -s libcrypto.so.0.9.8 libcrypto.so.6

If you do not create the above symlinks you will get errors like:

Starting Appistry Fabric System Service: ./fabric_system_service: error while loading shared libraries: libssl.so.6: cannot open shared object file: No such file or directory

and

Starting Appistry Fabric System Service: ./fabric_system_service: error while loading shared libraries: libcrypto.so.6: cannot open shared object file: No such file or directory

Set up init script links to start Appistry CloudIQ at boot
Next, we need to set up init scripts links to have Appistry CloudIQ start up at boot. We do this as follows:

roshan@ubuntuWorkerB:~$ sudo update-rc.d fabric_system_service start 99 2 3 4 5 . stop 01 0 1 6 .
roshan@ubuntuWorkerB:~$ sudo update-rc.d fabric_keeper start 99 2 3 4 5 . stop 01 0 1 6 .

Reboot to start Appistry CloudIQ
Reboot Ubuntu. You should see the following messages when Ubuntu is restarting.

Starting Appistry Fabric Keeper:
Starting Appistry Fabric System Service:

Also, start log_monitor. You should see heartbeat messages.

roshan@ubuntuWorkerB:~$ . /etc/fabric_env 
roshan@ubuntuWorkerB:~$ log_monitor 239.255.0.1
Monitor listening on: 239.255.0.1:4000
Jan 02 15:03:49 10.0.2.15 RegionService[I:8011] Location: 10.0.2.15 Region: 239.255.0.1:32000 Heartbeat size: 1
Jan 02 15:03:53 10.0.2.15 RegionService[I:8011] Location: 10.0.2.15 RegionLeaderRegion: Heartbeat size: 1
Jan 02 15:03:56 10.0.2.15 RegionService[I:8011] Location: 10.0.2.15 Region: 239.255.0.1:32000 Heartbeat size: 1
Jan 02 15:04:02 10.0.2.15 RegionService[I:8011] Location: 10.0.2.15 Region: 239.255.0.1:32000 Heartbeat size: 1
Jan 02 15:04:04 10.0.2.15 RegionService[I:8011] Location: 10.0.2.15 RegionLeaderRegion: Heartbeat size: 1
Jan 02 15:04:08 10.0.2.15 RegionService[I:8011] Location: 10.0.2.15 Region: 239.255.0.1:32000 Heartbeat size: 1

You now have the world’s best cloud platform – Appistry CloudIQ – running on Ubuntu.

In future posts, we will see how to create/migrate/manage infrastructure and applications to the “cloud” using Appistry CloudIQ

Downloads
Download the following script and place it alongside the appistry-cloudiq-X.x.rpm that you downloaded from the Appistry Community website.

cloudiq-ubuntu-install.sh

Next, run the script as follows:

roshan@ubuntuWorkerB:~$ sudo sh cloudiq-ubuntu-install.sh appistry-cloudiq-4.2.1.2-rhel5.rpm 

where, appistry-cloudiq-4.2.1.2-rhel5.rpm is the version that I downloaded.