App server and Solaris 10 SMF: A Happy Marriage ...
By bloggerkedar on Apr 01, 2006
Ingredients of a Happy MarriageIf the Server Market is a game of Chess, Solaris 10 is the King.
Predictive Self Healing in Solaris 10 is a well thought out feature that's ready for prime time.
When Jonathan speaks, industry listens. According to him, if there is some kind of a race for Open Source Software impact on Enterprises, then GlassFish is the front runner .
It would be a surprise if GlassFish had not leveraged the new way of looking at Services support in Solaris (SMF). The stars were so aligned that this marriage could only be a success
Integration of GlassFish with Solaris 10 SMF is one of those features that makes GlassFish unique in terms of ease of use and system level integration. It is something that developers and serious System Administrators alike are going to like.
Recipe for the ImpatientHere you go:
- Become root. (Remember, you are impatient, it is \*not\* required that you become root).
- Create a directory for domains -- mkdir /glassfish/domains
- Issue the command -- asadmin create-domain --adminport 8080 --instanceport 80 --domaindir /glassfish/domains smfdomain
- Create a file like "/glassfish/domains/smfdomain/passwordfile" to store your password safely ...
- #Required by smfdomain's auto startup ...
- Create the SMF service for this domain -- use asadmin create-service command as below: asadmin create-service --passwordfile /glassfish/domains/smfdomain/passwordfile /glassfish/domains/smfdomain
- As instructed in output of above command, administrator now just needs to enable the service using svcadm enable smfdomain .
- That's it. Your domain, smfdomain is running!
- Note that the moment the service is put into SMF database, its life cycle will be managed by Solaris 10! So, I am going to go to the extreme here and reboot the machine remotely as I write this blog entry From my desk at home, I can hear machine in my office going down and coming back up again. The initial tries to connect fail as the SMF is bringing up my app server instance.
and then ....
Details of the Seamless IntegrationThe idea is that under the covers, we are talking to SMF and asking it to register the GlassFish domain as an SMF managed service! And what you do is a bunch of commands. No text editor is needed to be used by you to edit complex scripts. Agreed that you are a system administrator and that means you are used to all these things. But why not make your life simpler?
SMF manifest for GlassFish domain is created, it is imported into SMF database and enabled by a single command. Ease of use is the order of the day and GlassFish has acted accordingly.
One more \*very\* important thing you'd be able to achieve -- if you are not a root user and still want to use the privileged ports (<1024). SMF provides a hook called "net_privaddr" , you'd be able to listen on privileged ports! You can just pass this flag on --serviceproperties on the create-service command line like: create-service --serviceproperties netaddr_priv ...
Yet another important feature of this GlassFish administrative command is that it helps you get there if you make any mistake. Give it a try and you'll agree with what I say. I am sure when you'll try the command you'll run into problems. Please let me know what the error messages say and whether they are helpful to you. I hope they are. If not, file a bug at the GlassFish IssueTracker .
The smf-iteam folks at Sun were immensely helpful when I implemented this feature.
I have not seen such a seamless integration of an Enterprise Server with SMF. You can let me know if I am wrong.
All the rituals for a long lasting marriage have been performed. GlassFish and S10. Long live the marriage!