Miles to go ...

Arun Gupta is a Technology Evangelist for Web Services and Web 2.0 Apps at Sun. He was the spec lead for APIs in the Java platform, committer in multiple Open Source projects, participated in standard bodies and contributed to Java EE and SE releases.
« New "Community:... | Main | Rails GlassFish Gem... »

http://blogs.sun.com/arungupta/date/20080624 Tuesday June 24, 2008

JRuby-on-Rails and MySQL on GlassFish on OpenSolaris in Virtual Box VM


My primary development machine is Mac OS Leopard on Intel Core 2 Duo (read osxtips). But the beauty of virtualization is that I can run multiple Operating Systems on a single powerful machine. And what better virtualization product than Virtual Box. And  Open Solaris has crossed leaps and boundaries making installation and getting started extremely simple :)

So here is an application stack that I tried:


Rails 2.1 + My SQL 5.0.51a



JRuby 1.1.2



GlassFish v3 TP2


OpenSolaris 2008.05


Virtual Box 1.6.2



Mac OSX Leopard




Intel 2.4 G Hz Core 2 Duo

You can easily deploy your Rails applications using MySQL database on GlassFish installed on OpenSolaris in a Virtual Box VM on Mac OS Leopard running on an Intel 2 Duo processor machine. Overall a happy experience :)

The complete instructions to install OpenSolaris using Virtual Box are very useful.

Here are basic steps ...

Create a new VM (settings given in the instructions):



Once all the options are chosen, the generated VM settings are shown as below:



Booting the Virtual Machine from the Live CD shows the following GRUB:



Pick the default options (GRUB, Keyboard & Language) and then the following default screen is shown:



Read and Close the license screen. And then click on the "Install Open Solaris" icon to continue the installation process. This step is important otherwise you'll keep booting from LiveCD every time (I messed up on this few times ;).



After choosing the Region, Location & Timezone and taking other defaults, the summarized installation options are shown:



And finally the installation is complete:



After the installation is complete, shutdown the VM by either selecting "System, Shut Down..." or click on the X on the VM window and selecting "Power off the machine". Change the boot sequence order to bring "Hard Disk" at the top by clicking on "Settings", "Advanced" tab and changing the order as shown below.



And finally, you can easily deploy a Rails 2.1 application on this newly configured machine as explained in Rails 2.1 on GlassFish.  TOTD #35 explains how Rails Database connection need to be configured on Solaris.
The final output of the application looks like:




Here are some pointers for you to get started:
Did you know the 3 keywords for GlassFish v3 - Modularity (OSGi compliant), Extensiblity (non-Java apps) & Emebeddability (runs in-VM) ? Read more on GlassFish v3 main page.

Stay in touch with us by posting your questions/comments/concerns to GlassFish Web Tier Forum or webtier@glassfish.

Technorati: rubyonrails jruby ruby opensolaris virtualbox mac glassfish v3

del.icio.us | furl | simpy | slashdot | technorati | digg
Comments:

Hi Arun,

Its a great blog, covering an end to end scenario

Here is one more related blog from Ming on JRuby-on-Rails with JPA on GlassFish V3 TP2 and Eclipse Link
http://blogs.sun.com/quality/entry/ming_s_blog_on_jruby

Thanks,
Gopal

Posted by Gopal Jorapur on June 24, 2008 at 02:11 PM PDT #

Hi Arun,

Did you get networking to work so you can actually access the VM from Leopard. I got trouble getting around that.

Any help is welcome!

Great blog, since it looks familiar to what I did, up to the Ruby bit. :-)

-Davy

Posted by Davy on July 16, 2008 at 04:48 AM PDT #

Davy, I did not try accessing the VM from Leopard. However you can try asking your question on OpenSolaris forums at:

http://opensolaris.org/jive/index.jspa

-Arun

Posted by Arun Gupta on July 21, 2008 at 02:11 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
« New "Community:... | Main | Rails GlassFish Gem... »

Valid HTML! Valid CSS!

This is a personal weblog, I do not speak for my employer.

--> ajax ajaxworld conf eclipse fitness gem glassfish glassfishday hyderabad india indigo interoperability javaone javaone2008 jax-ws jmaki jpa jruby mac marathon metro microsoft mysql netbeans phobos photography presos railsconf ruby rubyonrails running runninglog runsfm screencast siliconvalleymarathon sun suntechdays swdp tango theserverside totd training traveltips v3 vista wcf web2.0 webservices webtier windows wsaddressing wsit youtube
Locations of visitors to this page

calendar

« August 2008
SunMonTueWedThuFriSat
     
1
9
16
23
24
27
28
29
30
31
      
Today
www.flickr.com
This is a Flickr badge showing public photos from ArunGupta. Make your own badge here.
Add to Technorati Favorites

Last 50