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.

Agenda
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
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
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,
wget http://cloud-images.ubuntu.com/lucid/current/lucid-server-cloudimg-amd64.tar.gz

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,

http://dl.dropbox.com/u/5458574/initrd.img-3.0.0-31-server
http://dl.dropbox.com/u/5458574/vmlinuz-3.0.0-31-server

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://github.com/AppScale/appscale.git --branch master
cd appscale/debian
bash appscale_build.sh

Install Appscale Tool

git clone git://github.com/AppScale/appscale-tools.git --branch master
cd appscale-tools/debian
bash appscale_build.sh

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

add-apt-repository "deb http://downloads.eucalyptus.com/software/euca2ools/2.1/ubuntu 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 http://10.104.3.129/status

And if we check http://10.104.3.129/status, 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,
https://google-app-engine-samples.googlecode.com/files/simpleajaxchat_10312008.zip

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: http://10.104.3.129:8080

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,
https://github.com/AppScale/

Also you can submit your issues here,
https://github.com/AppScale/appscale/issues

Try out the latest Eucalyptus code from github,
https://github.com/eucalyptus/eucalyptus

We are always open to your comments and feedback,
https://eucalyptus.atlassian.net/
https://engage.eucalyptus.com/

About these ads

4 responses to “Run Appscale on Eucalyptus

  1. Reblogged this on More Mind Spew-age from Harold Spencer Jr. and commented:
    AppScale and Eucalyptus: Great Tag Team for On-Premise Cloud Computing

  2. Reblogged this on Testing Clouds at 128bpm and commented:
    w00T!!!!!

  3. tobias2008@gmx.de

    Hello,
    thanks for this so far, but I still habe problems to get AppScale running. Maybe you could specify on which machine(s) the following Steps are made:
    1. Install Appscale from source
    2. Install Appscale Tool
    3. Bundle Appscale image
    4. Run Appscale
    I’m sorry but in that cloud thing, there’s still a lot of mist around me.
    Greetings
    Tom

    • Install Appscale and tools inside an instance. I think, with proper credential you can install and run the tools command from outside as well.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s