How to create a base EC2 image for Oracle Essbase
Oracle has now officially certified 11g, Oracle XE, Enterprise Linux and Oracle Fusion for Amazon Web Services' Elastic Computing Cloud (AWS EC2). Information about AWS and EC2 can be found here.
In essence, Amazon is best known for its e-commerce site, but a few years ago, a team within Amazon began to look at a way to leverage the excess capacity they were seeing in their data centers. Eventually this grew into AWS. What Amazon is providing as a service is the ability to utilize its network, hardware and systems management expertise as a service. This allows us to request virtual pieces of this infrastructure on demand and scale these virtual instances almost without limit.
What is amazing is that you only pay for the compute time and space that you use. These virtual instances are based on templates called Amazon Machine Images (AMI). Oracle has provided free, prebuilt AMIs for the certified products.
They have not yet released Oracle Essbase for the cloud, the following steps show how we built our AMIs for Essbase. We have done the hard work for you and here is a blog post describing how to use it. If you are one of those brave souls that likes to tinker, here's how we did it.
I will not be describing how to setup your Amazon credentials and certificates that you need to start/run/use these images. There are a bunch of articles out there describe the steps. Here is one, and here's another - this includes a lengthy how-to on installing XE.
We went thru the process of building the image from scratch using VMWare. Since Oracle Enterprise Linux 4.0 (not 5 which is what all the oracle AMIs are based on) is what Essbase 9.3.1 is supported on, that is the version we are going to install. It can be downloaded from here and installed on the VMWare image using the minimal configuration (for a small tight image).
Then installed the following (rpm -Uvh <rpm file>):
Install jre (http://java.sun.com/javase/downloads/index_jdk5.jsp)Install curlInstall libaioInstall libidnInstall rubyInstall smart (makes linux soooo much easier to manage) and configure it to use the local rpmsConfigure Smart:
$ smart channel --add local-EL-rpms name="Oracle Enterprise 4 Linux RPMs" \manual=true type=rpm-dir path=/mnt/oel4-rpms/ -y$ smart channel --add Dag-Wieers type=rpm-md priority=-5 \baseurl=http://apt.sw.be/redhat/el4/en/i386/dag/ -y$ smart channel --add VA-Tech-Extras type=rpm-md priority=-5 \baseurl=http://mirror.cs.vt.edu/pub/CentOS/4.4/extras/i386/ -y$ smart channel --add VA-Tech-Base type=rpm-md priority=-5 \baseurl=http://mirror.cs.vt.edu/pub/CentOS/4.4/os/i386/ -y$ smart channel --add Dries type=rpm-md priority=-5 \baseurl=http://ftp.belnet.be/packages/dries.ulyssis.org/redhat/el4/en/i386/dries/RPMS/ -y$ smart channel --add atrpms name="ATrpms Repository" type=rpm-md \priority=-5 baseurl=http://dl.atrpms.net/el4-i386/atrpms/stable/ -y
(AWS virtualization doesn't like tls)
$ mv /lib/tls /lib/tls.disabled
We use s3sync to transfer data to and from s3, so we installed that. S3Sync can be found here
Unfortunately, even the small minimal install starts a bunch of services that are not needed on a cloud based instance, so We turned off the following services (http://fedoranews.org/mediawiki/index.php/Which_Services_Can_I_Disable%3F)
$ chkconfig --level 0123456 nfslock off$ chkconfig --level 0123456 nfs off$ chkconfig --level 0123456 portmap off$ chkconfig --level 0123456 pcmcia off$ chkconfig --level 0123456 smartd off$ chkconfig --level 0123456 rpcidmapd off$ chkconfig --level 0123456 cups off$ chkconfig --level 0123456 gpm off$ chkconfig --level 0123456 isdn off$ chkconfig --level 0123456 rhnsd off$ chkconfig --level 0123456 rpcgssd off$ chkconfig --level 0123456 apmd off$ chkconfig --level 0123456 openibd off
Since AWS is based on Xen virtualization, a few tweaks to the VMWare image are necessary:
$ wget http://s3.amazonaws.com/ec2-downloads/modules-2.6.16-ec2.tgz$ tar -zxvf modules-2.6.16-ec2.tgz -C /$ moddep -a
/etc/sysconfig/network-scripts/ifcfg-eth0 should read:
DEVICE=eth0BOOTPROTO=dhcpONBOOT=yesTYPE=EthernetUSERCTL=yesPEERDNS=yesIPV6INIT=no
After that the ec2 tools are downloaded, and installed in /usr/local/bin
$ wget http://s3.amazonaws.com/ec2-downloads/ec2-api-tools.zip$ wget http://s3.amazonaws.com/ec2-downloads/ec2-ami-tools.zip
Next is to download Oracle XE from oracle; Download the installations for Essbase, Shared Services and whatever else you need for Essbase from edelivery.oracle.com. We uploaded all the rpm's, Essbase Installations to s3
With the certificates and tools setup, the VMware image is bundled and uploaded to S3, and then registered
$ export EC2_PRIVATE_KEY=/mnt/.ec2/pk-XXXX.pem$ export EC2_CERT=/mnt/.ec2/cert-XXXX.pem$ ec2-bundle-vol -d /mnt -k $EC2_PRIVATE_KEY -u XXXXX -c $EC2_CERT -r \ i386 --no-inherit -p oel4-base-v08$ ec2-upload-bundle -b oel4-base-v08 -m /mnt/oel4-base-v08.manifest.xml -a XXXX -s XXXX$ ec2-register oel4-base-v08/oel4-base-v08.manifest.xml
After starting an instance of the image, download all the installations and rpms from s3 that we uploaded earlier to /mnt using S3Sync
a few more installs using smart
$ smart install compat-libstdc++-33-3.2.3-47.3@i386$ smart install xauth$ smart install xfstools$ smart install oracle-xe$ /etc/init.d/oracle-xe configure
We then installed Shared Services, tweaked it a bit for the lack of tls, installed Essbase and the rest of the gang. Then we rebundled and uploaded the image to s3. That results in our ami!
I know there are a few details I have glossed over, but if you get stuck post a comment in our support forum.
Resources
http://www.stevekallestad.com/wiki/Setting_up_an_EC2_instance_using_VMWare
http://craiccomputing.blogspot.com/2007/01/configuring-oracle-database-xe-on-linux.html
Amazon EC2 Technical Documentation
Using s3sync with EC2


Comments
Great work
Post new comment