Run Appscale on Eucalyptus

Cloud computing is the use of computing resources (hardware and software) that are delivered as a service over a network (typically the Internet). – Wikipedia

According to Wikipedia currently there are few popular service models exist.

1. Infrastructure as a service (IaaS)
2. Platform as a service (PaaS)
3. Software as a service (SaaS)

So, I have an Eucalyptus cloud, which is great, serves as AWS-like IaaS platform. But now I want PaaS. And right here Appscale comes into play with full compatibility of Google App Engine (GAE) applications. In this post, we will install the popular open source PaaS framework Appscale on Eucalyptus, the AWS compatible open source IaaS platform.

0. Introduction
1. Resize Lucid image
2. Install Appscale from source
3. Install Appscale Tool
4. Bundle Appscale image
5. Run Appscale
6. Run an application on Appscale

Eucalyptus Cloud platform is open source software for building AWS-compatible private and hybrid clouds. It pools together existing virtualized infrastructure to create cloud resources for compute, network and storage.

AppScale is an open-source framework for running Google App Engine applications. It is an implementation of a cloud computing platform (Platform-as-a-Service), supporting Xen, KVM, Amazon EC2 and Eucalyptus. It has been developed and is maintained by AppScale Systems.

Resize Lucid image

Download the Lucid image,

To install Appscale we need a bigger space than it comes by default with the image. Let’s increase the root size of the image,

dd if=/dev/zero of=lucid-server20g.img bs=1M count=20480

mkfs.ext3 -F lucid-server20g.img

mkdir new
mkdir old

mount -o loop lucid-server-cloudimg-amd64.img old/
mount -o loop lucid-server20g.img new/

(cd old; tar czf - .) | (cd new; tar xzf -)

umount old
umount new

[detail from Eucalyptus knowledge base article]

So, the problem I was facing, the modified image wasn’t working properly with the kernel/ramdisk those came with tar file. My colleague Deependra figured out the problem gets resolved with the latest kernel. So, you can either start up an instance upgrade with the 3.0.0-31 kernel or download the updated kernel and ramdisk from the following link as long as they are there,

Now follow Eucalyptus Administration Guide to add the image.

Run an instance to build the Appscale image,

euca-run-instances -k sshlogin -t m1.large emi-7A453BC1

Install Appscale from source

apt-get install -y git-core
git clone git:// --branch master
cd appscale/debian

Install Appscale Tool

git clone git:// --branch master
cd appscale-tools/debian

export PATH=$PATH:/usr/local/appscale-tools/bin

add-apt-repository "deb lucid main"

Bundle Appscale image

Now bundle the instance and register it,

euca-bundle-vol -p appscale-1-6-7-8g -d ./ -e /var/lib/dhcp3 -s 8192
euca-upload-bundle -b demo -m ./appscale-1-6-7-8g.manifest.xml
euca-register demo/appscale-1-6-7-8g.manifest.xml

Run Appscale

euca-run-instances -k sshlogin -t m1.large emi-D4A33E62

Now login to the Appscale instance. Run the following to create the configuration file,

appscale init cloud

Now modify the AppScalefile file to be used by Appscale.

So for this demo, our minimal configuration file looks like following,

infrastructure : 'euca'
machine : 'emi-D4A33E62'
instance_type : 'c1.xlarge'
table : 'cassandra'
keyname : 'appscalekey'
group : 'appscalegroup'
verbose : True
min : 3
max : 3

The machine would be the emi which has Appscale installed on it, instance_type we prefer to have the biggest possible one, for this demo we will be using default table, we turned on the verbose flag on, since this is a test environment, we also interested in the power of cloud service, so we set min, max to 3, this will spawn three instances and replicate data base 3 times.

So, now we are all set to start the Appscale platform. Run the following to start up Appscale,

appscale up

So after all those verbose output, now we see the following,

AppScale successfully started!
View status information about your AppScale deployment at

And if we check, we should see the healthy status 🙂

Appscale API status
Appscale API status

Run an application on Appscale

We will be running a simple chat application that is available on the google app engine samples. So we save the following app and unzip it,

Run the following command to deploy the first application,

appscale deploy ~/samples/simpleajaxchat/

And the happy line would look like the following,
Your app can be reached at the following URL:

Sample chat application
Sample chat application

And now we have our first application hosted on Appscale PaaS platform. 🙂

For more monitoring, login the the Appscale console and select monitoring data.

Appstale status from command line,

appscale status

For troubleshooting Appscale comes with a nice tool. Run the following to gather all the logs at one place,

appscale logs /path/filename

Login to the master node,

appscale ssh

Shutdown Appscale,

appscale down

There is a lot more available on github,

Also you can submit your issues here,

Try out the latest Eucalyptus code from github,

We are always open to your comments and feedback,