Tuesday, March 3, 2009

Test Drive Oracle Application Express 3.2 for 60 cents (USD)

Would you like to kick the tires of Oracle Application Express 3.2 on your own instance but do not have the spare hardware? Do you have 60 cents (USD)? Read on.

Amazon has a service called the Elastic Compute Cloud (EC2) where you can fire up virtual machines in the cloud on a whim. They have partnered with other software vendors to provide images with pre-configured software. Oracle is one of those vendors and you can read about the offerings at the Oracle Cloud Computing Center on OTN. Oracle has an image which contains Enterprise Linux and Oracle Database 11g R1.

The purpose of this post is to describe how I started an 11g R1 instance in the cloud, upgraded it to Application Express 3.2, and then completed the "Converting Your Oracle Forms Applications to Application Express 3.2" and "Utilizing Improved Security Enhancements in Application Express 3.2" Oracle By Example tutorials (OBEs). If you can spare 60 cents you may wish to try this yourself at home.

First, you need to get your AWS account in order. Sign up for AWS at the previous link and then sign up for EC2. Review the EC2 pricing and then establish a payment method. If you already are a customer of Amazon.com you can choose one of the credit cards you have on file or establish a new one. Unfortunately, there is no infrastructure in place for you to insert two quarters and a dime for this test drive.

Now you are going to need to get some software to startup an instance, manage it, and transfer files to it. Get the Elasticfox Firefox plug-in and review the Getting Started Guide. The Getting Started Guide will give detailed instructions on associating your AWS EC2 account with Elasticfox and also creating a KeyPair that you can use to identify yourself when connecting to the machine. You need to download Putty & PuttyGen to connect to your instance via SSH. You should download WinSCP to transfer files to your instance. Finally you need to download Application Express 3.2.

The keypair that you created when reviewing the Elasticfox Getting Started Guide needs to be converted to a format that can be used by Putty and WinSCP. You can use PuttyGen to create this key. Simply start PuttyGen, click load and browse to find the .pem keypair file you created with Elasticfox, then click Save private key to save it as a .ppk file.

Figure 1, Creating a .ppk from your .pem with PuttyGen.

You are ready to view Deploying Oracle Database in the Cloud viewlet that is available on the Oracle Cloud Computing Center page on OTN. The viewlet will show you how to find and start image ami-cecb2fa7 which is 32bit Enterprise Linux with 11g. It will take you through creating and configuring the database. I chose to start a c1.medium instance type which costs 20 cents/hr and is described as:

High-CPU Medium Instance 1.7 GB of memory, 5 EC2 Compute Units (2 virtual cores with 2.5 EC2 Compute Units each), 350 GB of instance storage, 32-bit platform

Figure 2, Instance Details

You manage the instance by connecting via SSH and you can use Putty as the viewlet demonstrated. Before you can connect to the machine on port 22 from your computer you will have to specifically allow it from your IP address. In Elasticfox first identify the Security Group used to start the instance. It is most likely called "default" unless you added another Security Group. Click the Security Group tab, highlight default and then click the green checkmark under the Group Permissions pane to add a permission. You can either allow a specific host or a network range. Allow your host to connect on port 22 and then create another permission to allow anyone to connect on port 8080 wich is the default port that EPG will be listening for HTTP requests. You choose Network and allow

Figure 3, Creating a Security Group

Before logging in to Oracle Application Express on this instance, I had to change the password for the Application Express ADMIN account by following these steps (which changed the password to oracle):

su - oracle
sqlplus / as sysdba
SQL> @?/apex/apxxepwd oracle

Login to Oracle Application Express and create a workspace.

Figure 4, Create a Workspace

Now for the fun part. Start WinSCP and connect to your instance and copy apex_3.2.zip there.

Figure 5, Copy apex_3.2.zip to your instance

Return to your Putty terminal session connected to your instance and install Oracle Application Express 3.2:

su - oracle
unzip apex_3.2.zip
cd apex
sqlplus / as sysdba
SQL>@apxldimg /home/oracle

Follow Joel's blog post on making Application Express run faster. You are ready to complete the Converting Your Oracle Forms Applications to Application Express 3.2 and Utilizing Improved Security Enhancements in Application Express 3.2 Oracle by Example (OBE) tutorials. An easy way to get the files for the Forms OBE to your machine is to run the following command in your terminal session:

wget http://www.oracle.com/technology/obe/apex32/files/forms_conversion.zip

Figure 6, Application Express 3.2 in the Cloud!

So there you have it. Test drive your own instance of Oracle Application Express 3.2 for around 60 cents (USD). For a limited time (until my manger finds out), you can try out my cloud instance using the following application linked below. I have configured my cloud instance to use the APEX Listener, which is a Java based HTTP listener that should release with the next version of Oracle Application Express.


Unknown said...

Love it!

I will certainly try this out. It really looks good. Too bad you shut down the instance allready, but I get the point! This just might be the prettiest way to implement an APEX application....


Douwe Pieter van den Bos

Glenn said...


Licensing question for you. A, how is this licensed? Oracle is going to want their dollars per CPU - right?


Glenn said...

I'll answer my own question. I followed the link to Oracle on Cloud computing and they have the answer to my question there:

"For the purposes of licensing Oracle programs in the Cloud environment, customers are
required to count each virtual core as equivalent to a physical core. This policy applies to all
programs available on a processor metric.
Example, for Database Enterprise Edition licensing in Amazon EC2 environment: Licensing
Oracle Database Enterprise Edition on a single EC2 instance of 8 virtual cores (on Intel
multicore chips; see the processor metric definition on the price list), which would require 8
* 0.5 = 4 processor licenses (each virtual core is considered equivalent to a physical core). "

Too much coin for my startup. I'll stick with GAE. But this is still cool that Oracle gets what is happening and is putting some effort and thought into this.

Jason Straub said...

Douwe Pieter van den Bos:

I am working on getting the instance back up.


I am not a licensing expert but you are right, it may be cost prohibitive to run a production application in the cloud if you don't already have the licenses. I think for development purposes, (the subject of this blog) I think the OTN license would apply.

Also, nice job holding your finish on your golf swing.



Stirl said...

interesting post! but for now my tiny app can get hosted much cheaper elsewhere. maybe after make the next facebook...

Dev Singh said...

i like this