Over the past year or so I’ve had a number of conversations about running Oracle RAC on Amazon’s EC2 cloud platform. Chet Justice had suggested a long time ago that I try it, but I never quite found the time. Last fall at the Oak Table Symposium in Michigan, Jeremiah Wilton told me he hadn’t yet done it and I spent the last night scheming with Charles Schultz about getting started. But it wasn’t until this week that I finally found the time to try. (To be fair, I’ve been quite busy lately — our first kid was born on February 2nd, a beautiful little girl!)
RAC on EC2 would be useful. (1) If you’ve never done much with RAC, then you can have a sandbox to play in – try the installer, try some parallel queries, try anything else. (2) You can setup a cluster with any version, any patch level – and see if your pl/sql or query works. (3) You could give each individual student in a class their own cluster.
And of course, the cost is very reasonable:
|2 nodes, 1 SCSI target||$3.08 for 6 hours|
|4 nodes, 2 SCSI targets||$4.68 for 6 hours|
|20 nodes, 5 SCSI targets||$14.37 for 6 hours|
These numbers are based on small instances. In my observation so far the network connection is the bottleneck — and quite likely the 20 node cluster wouldn’t actually work. It would be about $25/hr to run a 10 node cluster with 4 SCSI targets on EC2 “cluster compute” nodes (w/10G network)… probably a little steep but maybe someday I’ll try running a benchmark for an hour or two just to see how fast it is. :)
I’m convinced that this will work. After a few days of working on it in between diapers, I haven’t quite gotten all the way – but I’m very close. I’ve got shared iSCSI-based block storage for ASM and two private networks which I think will support VIPs and multicast. The only two pre-checks that fail are swap space and an optional flag to NTP. The installer completes. I just need iron the kinks out of the post-install/root script execution.
I was initially trying to install 22.214.171.124 but I wimped out and reverted to 126.96.36.199 after wrestling with it for a while. I only have so much time in between diapers… :)
Everything is scripted. When you’re paying by the hour, you don’t want to waste time building the environment! Also, you don’t want to leave the environment running for days after you’ve set it up. Much better if you can start the RAC environment on-demand when you want it, and shut it down if you’re not using it.
Here’s what I’ve got so far:
jeremy@joshua:~/rac-ec2$ ./run-cluster 3 2 EC2-RAC-BUILDER Copyright 2010 Jeremy Schneider This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See included gpl.txt for details. Creating cluster: ID #3 1 storage node(s) 2 compute node(s) time storage network compute ----- -------- -------- -------- 18:21:42 starting starting starting 18:22:18 ec2 load instance ec2 load instance ec2 load instance 18:23:44 boot O.S. 18:23:50 setup iscsi 18:23:55 boot O.S. 18:24:10 finished 18:24:36 wait strg/ntwrk 18:25:27 configure switch 18:25:37 reboot O.S. 18:27:22 finished 18:27:28 boot O.S. 18:27:48 configure O.S. 18:33:17 finished username root/oracle password ec2rac hostname ec2-50-16-23-197.compute-1.amazonaws.com
This part is working pretty well. Right now I’m working on the script to actually install the oracle bits. Like I said – I’m still working out the kinks with the root script… but here’s what it currently looks like:
jeremy@joshua:~/rac-ec2$ ./install-oracle 3 2 >/tmp/ora-inst.out 19:57:19 downloading grid software from Oracle support 19:58:16 extracting grid software (/tmp/oracle/grid) 19:59:10 running cluvfy 20:00:33 installing grid infrastructure 20:28:11 running root scripts 20:30:38 downloading database software from Oracle support 20:36:16 extracting database software (/tmp/oracle/database) 20:38:02 finished!
If you’re interested in running RAC on EC2 then I’d love your help with this. You can download these programs and try them out for yourself. And let me know if you finish the install, and what steps you took. I’d really love to have a public toolkit that anyone can download, which will build RAC environments in EC2 on demand.