SOA Suite on Amazon EC2
By Demed L'Her on Oct 15, 2009
2010-06-15: this post is now obsolete. Please refer to this new post instead:
2009-11-16 UPDATE: We have now completely scripted the Oracle SOA Suite AMI – users no longer need to manually attach the Amazon EBS snapshot. Updated instructions below.
Last week at Oracle OpenWorld 2009 in San Francisco we announced the availability of a SOA Suite image for developers to deploy on the Amazon EC2 cloud. What does that give you? Access to a fully configured SOA Suite environment (Oracle Service Bus, BPEL PM, Business Activity Monitoring, JDeveloper, Enterprise Manager, etc.), running on a high-end server (8GB RAM, 64-bit Linux). You can now provision new development environment in minutes, without even having to download any Oracle software!
(credits go to Prasen Palvankar for putting that image together)
SIGN-UP FOR AMAZON EC2
You need an Amazon AWS account to test SOA Suite on EC2. If you don’t already have one, go to http://aws.amazon.com/console/ and sign up for EC2. Note that you will need a credit card to set up an EC2 account.
CONFIGURE YOUR LOCAL ENVIRONMENT TO WORK WITH EC2
In order to work effectively with servers running in the cloud you will first need to set up a few things on your local machine:
- Using the AWS Console, create a key pair. This key pair will be used for authentication.
- Using PuTTYGen, convert the key for use in PuTTY
- Configure PuTTY to use this key. PuTTY will eventually be used for console access to your server on the cloud.
- Download NoMachine’s NX Client for Windows. NX will eventually be used for graphical access to your server’s desktop.
PROVISION A SOA SERVER ON AMAZON EC2
When you provision an Oracle SOA Suite server on the Amazon EC2 cloud you will be using two components:
- An Amazon Machine Instance (AMI) for SOA Suite (id = ami-acb557c5). Note that AMIs are volatile: if you terminate an instance you will lose any data that you might have stored on that instance.
- An Elastic Block Store (EBS) volume that will be seeded using a snapshot (id = snap-dd980db4) that we provide. This volume will be used to persist your data across sessions and AMI start/stop.
Start the SOA Suite AMI
- Log in to the AWS console at https://console.aws.amazon.com/ec2/home
- Click on “AMIs” in the left-hand side navigation bar and choose to view “All Images”
- Search for “oracle-soa” or AMI ID ami-acb557c5
- Select the image and click on Launch
- Use the following settings to start the instance:
- Select the keypair previously created.
- Click on “Launch”. This will start the base image. Note that this can take up to a minute. Go to the “Instances” page and refresh the page from time to time until you see the status of your instance change to “running”.
- Take note of some important information about your instance: the zone it runs in and its public DNS address:
You should now have a dedicated server running in the cloud.
SSH to your image & Accept license
- Using the AWS console, navigate to your running instance and find out its public DNS address:
- Using PuTTY, SSH to the image as the root user:
Note that the initial connection might take close to a minute to establish.
If you get a security alert, click Yes to accept to add the host key to PuTTY’s registry:
- As you log in, a script will prompt you to accept the software license
- After the license agreement you will be prompted to set new passwords for “root” and “oracle” (the account you will use when working with the SOA Suite). Make sure to keep track of these passwords.
- Next you are prompted to press Enter to set up an Oracle SOA 11g volume (it’s an EBS Elastic Block Store) for use with your AMI. This volume is unique to your environment and is the workspace you use to persist data across sessions. There are 2 options here:
- This is the first time you start a SOA AMI: provide this ID to create a new volume pre-seeded with a snapshot we have created: snap-dd980db4.
- You already have created an EBS volume for SOA during an earlier session and simply want to reattach it to this AMI: select your volume from the list that the script presents you with.
- As part of the process you will have to provide your Amazon Access Key ID and your Secret Access Key. Both of these can be found from the AWS > Your Account > Security Credentials page.
- If anything goes wrong during that process, you can restart it by typing “add-soa-volume” from the prompt, as root.
WORKING WITH SOA SUITE IN THE CLOUD
Now that everything is up and running on Amazon EC2, it is time to start doing something with it!
You have two main options here:
- Run JDeveloper locally, SOA Suite on the cloud.
- Run everything on the cloud – this is the option we will describe below. For this we use NX as remote desktop technology.
CONNECT TO THE GRAPHICAL ENVIRONMENT USING NX AND START YOUR SERVERS
- To connect to the desktop in the image use NX (download client from http://www.nomachine.com/download.php).
- Start the NX connection wizard, give a name to your session and enter the public DNS address of your AMI as hostname:
- Make sure to choose the GNOME desktop and not KDE (which is the default in the NX client)
- Log in as “oracle” using the password that you set up earlier through SSH:
- Once you log in you should see the following on your desktop:
- Start/stop Oracle DB: double-click on this icon to start the Oracle database
- Start/Stop SOA/OSB servers: double-click on this icon to start the SOA Suite
- Oracle JDeveloper: double-click on this icon to start JDeveloper on the server
- Double-click on this text file to get information about your environment (Middleware home, ports, etc.)
GET TO WORK!
That’s it, you should now be ready to start developing against the Oracle SOA Suite 11g!
USING ELASTICFOX TO STREAMLINE EC2 INTERACTIONS
If you are a regular EC2 user you should definitely look into Elasticfox, a Firefox add-on that really speeds up many of the common tasks that EC2 users will have to perform: shutdown/startup, start SSH, etc.