Wednesday, January 10, 2007

Running Domino on an Amazon Elastic Cloud

I was recently accepted into the Amazon EC2 limited beta and was able to create my first instance following the getting started tutorial.
As they currently have no support operating systems for Domino, I asked Daniel Nashed which he thought was most like the supported system. He suggested the CentOS as he has run 4.3 but not 4.4.
I then loaded up that instance using the Amazon tools. It is a very raw image without a web server but came up very quickly. After that I downloaded and installed Domino for Linux to the machine.
I had to authorize the domino port and remote setup port for my machines:

ec2-authorize default -p 1352
ec2-authorize default -p 8585

Then, I created the notes user:

useradd notes

Uploaded the latest rc_domino script and then ran the server in listen mode:

server -listen

The server complained about a missing library (/opt/ibm/lotus/notes/latest/linux/tunekrnl: error while loading shared libraries : libstdc++.so.5: cannot open shared object file: No such file or directory), so I had to install this via yum:

yum install compat-libstdc++-33

This resolved the startup problem, and the Domino setup ran as normal.
I have the server up at:
http://domu-12-31-33-00-03-6c.usma1.compute.amazonaws.com/
(I will probably take the server down after LS2007).
It seems to run as you would expect from 1.7GHz with 1.75Gb RAM. When I pull the statistics through the admin client, it looks perfectly healthy and I can create databases as you would normally.
For the money, it works out at about $73/month (10c/hour) for a small server plus bandwidth and storage. It is in a totally different league to AIX LPARs (you scale by adding more instances rather than making your current instance larger) but for a small business is it a really good alternative to running your own domino server. Looking after a rack in a colocation facility is a lot of work and Amazon gives the technical users a cheap alternative here.

8 comments:

Sean Cull said...

Just accessed the site via the web from the UK and the speed is excellent

Thanks for the write up.

Does the scalability scheme ( more instances rather than more power ) mean that it is not really suitable for a site where the content changes

Presumably a cluster would be possible with two clouds ? Can you back files up to the S3 storage area ?

Exciting stuff

ian connor said...

It feels more like a blade farm and it is suppose to be all based on Xen virtualization with some Amazon tweaks. However, for the user, it just that you have as many of these instance machines as you need and pay per hour for their use.
So it will scale by adding cluster mates rather than giving the current machine more power - so in many respects it is a little more like blade hosting.
For domino this works well up to about 5 to 8 mates maximum before the cluster tasks have to spend too much time keeping themselves in sync versus doing the serving. Also, the way the images work is that you can create your own images and then just run them up with a command like this:
ec2-run-instances ami-25b6534c -k gsg-keypair
(This will boot up a whole new Linux image, assign the IP address, certify it with your RSA key and allow you to ssh to it - then you are charged 10c/hour until you stop it)

You can add it to your cluster. For Domino, I would expect you would have one machine be the load balancer at the front and then have a number of instances ready to go when you need them. Then if you notice your servers get slow (or maybe you have a monitor script that does this), you will run the next instance, force a replication of the key databases to get the cluster up to speed and then add it to the mix for the load balancer.
It might also be good to keep the cluster in sync every once in a while by running up each cluster for an hour and letting replication happen.

If you were to want to put the backups in S3 you can use the NSFBackup Notes API to get read access to the NSF files and there are samples on how to get files attached to and detached from S3.

You could write a Java backup class that calls into NSFBackupStart and NSFBackupStop and you can then put your own Java code in the middle and do something like this:
http://developer.amazonwebservices.com/connect/entry.jspa?externalID=132&categoryID=47

Gary said...

Ian, you're suggesting having servers available to run up as you need them. Do I take it you would have separate images for each server, so that each runs up with it's own pre-created ID (and is already in the domain NAB). So you therefore create a new image of a each running server once installed and configured.

ian connor said...

I was going to load them up, run setup and then leave it for the user to complete the via the Remote Server Setup tool. I have a customer testing this now and it seemed to work for him to get up and running. They could also have the root or notes unix user if they wanted more control.

ian connor said...
This comment has been removed by the author.
Graham Siener said...

Hi Ian,

I've been toying with the idea of setting up an EC2 instance to cluster with our on-site Domino Server. Did you play around with this any further? What were the biggest challenges in your opinion?

Thanks!

Zin Nyein said...

Hi Ian,
Thanks for the article. I was just wondering if it is possible to run domino on EC2.
Now I know that it is possible, a new question came into my mind. Is it possible to use Red Hat and run domino with it on EC2?

ian connor said...

@Zin - I have not tried this but I know IBM is now supporting EC2 so that is probably you best option these days. Remember this posing is over 3 years old now.