Thursday, November 22, 2012

Changing Discoverer to run in Amazon EC2 AWS

Installing Discoverer in Amazon EC2 on linux is straightforward with only a few problems so we won't go into that here.
What I want to talk about is how to make Discoverer deal with instance restarts. This is a problem because usually in EC2 public when the instance restarts it will get a new hostname, and so Discoverer will stop working.

Disco Version :  NOT CHECKED AND PROBABLY DOESN'T work for WLS Disco 11+

So how do we solve this ?

There is a number of things to fix.

  1. Database
  2. Middle Tier
  3. Apache 

The intent is to fix these in a repeatable, scriptable way ; we're not quite there yet but we have simple steps to fix them all; it's just a question of scripting the damn things. 

1. Database :  
Easy - we assume no DB control, Grid Control, or agent.  In this case all that needs fixing is the local hostname in listener.ora 
Use  curl
to find out the local hostname and sub it into listener. ora

2. Middle Tier 
We need to run 
Source the AS environment and cd $ORACLE_HOME/chgipost/scripts

oracle@ip-foonew scripts]$ ./  -mid
Oracle Home set to /u01/oracle/as
Starting Change Hostname/IP...

Enter fully qualified hostname (hostname.domainname) of destination
Enter fully qualified hostname (hostname.domainname) of source
Enter valid IP Address of destination
Enter valid IP Address of source
Change Hostname/IP completed successfully.

( In the above foonew and foold stand for the actuals from my environment.  chgipghost is a neat little script that figures out the new and old IP addresses 

3.  Apache. 

 In order to make Disco serve up properly over the Internet we had had to configure Apache to return the correct servername

Now that the name has changed we need to fix it again. 
So we need the existing public hostname


in httpd.conf change 


All should be OK now

startup db and ias 

$ORACLE_HOME/opmn/bin/opmnctl startall

All works  !  Tea and biscuits for everyone 

More later ! 

1 comment:

mounika said...

This blog gives very important info about AWS,Thanks for sharing
AWS Online Course