Welcome!

Java Authors: Maureen O'Gara, Bruce Armstrong, Liz McMillan, Walter H. Pinson, III, Yakov Werde

Related Topics: Java, SOA & WOA, Virtualization

Java: Article

Deploying GlassFish v2 Virtualization in the Solaris Container

OS virtualization is done by enabling multiple isolated and secured systems in one physical server

The information shown above indicates that currently one CPU is designated to pset_glassfish and the other designated to pset_default.

2.  Configure a non-global zone
In order to configure a non-global zone we can use the zone configuration command. In this example we will create a zone called zone_glassfish and assign the pool_glassfish to the zone.

zonecfg -z zone_glassfish

zone_glassfish: No such zone configured
Use 'create' to begin configuring a new zone.

zonecfg:zone_glassfish> create
zonecfg:zone_glassfish> set zonepath=/zones/zone_glassfish/
zonecfg:zone_glassfish> add net
zonecfg:zone_glassfish:net> set address=172.16.20.110
zonecfg:zone_glassfish:net> set physical=rtls0
zonecfg:zone_glassfish:net> end
zonecfg:zone_glassfish> add dataset
zonecfg:zone_glassfish:dataset> set name=diskpool/glassfish
zonecfg:zone_glassfish:dataset> end
zonecfg:zone_glassfish> set pool=pool_glassfish
zonecfg:zone_glassfish> verify
zonecfg:zone_glassfish> commit
zonecfg:zone_glassfish> exit

The configuration above basically indicates the following points:

  • Create a zone with zone_glassfish label
  • Assign the zonepath for the zone repository
  • Add network resources
  • Add the ZFS (Zeta-byte File System)
  • Assign pool_glassfish as the resource pool for the zone
We can list the status of the created zone using the following command:

zoneadm list -icv

3.  Installing a non-global zone
Installing non-global zones can be administered using the zoneadm command. To install the non-global zone we have created in Step-2, follow the command below:

zoneadm -z zone_glassfish install

4.  Boot a non-global zone
After the installation of the zone_glassfish is finished, you can start up the zone using the zoneadm command.

zoneadm -z zone_glassfish boot

You can log in the Solaris Zone using the command below. If you need to log in from a remote place, use ssh or telnet.

zlogin -C zone_glassfish

5.  Installing GlassFish v2 in a non-global zone
Log in to the zone_glassfish and start to copy the GlassFish installation package. To install the GlassFish application server type the following command:

java -Xmx256m -jar glassfish-installer-v2-b58g.jar

For the complete set of instructions for installing the GlassFish application server, go to:

https://glassfish.dev.java.net/downloads/v2-b58g.html

6.  Start up GlassFish v2
Start up the GlassFish application server and monitor the CPU utilization using the prstat command (see Figure 2).

./asadmin start-domain domain1

Figure 3 is the statistic of CPU utilization dedicated to the zone (zone_glassfish).

Summary
With the Solaris Container feature we can isolate the resources for the specific zones and improve the resource utilization for a single physical server. Since the resources are isolated and dedicated to the Solaris Container rather than to the whole system, application disruption is minimal.

Zone Administration Command

  • Zonecfg: Utility command to create and configure a zone
  • Zoneadm: Utility command to administer a system zone
  • Zlogin: Utility command to enter to the system zone
Resource Pool Command
  • Poolcfg: Utility command that provides configuration operation on pools and sets
  • Pooladm: Utility command that provides administration operation on pools and sets
References
  •   Solaris Container data sheet: www.sun.com/software/solaris/ds/containers.jsp
  •   Solaris Container administration: www.sun.com/bigadmin/content/zones/
  •   GlassFish application server: https://glassfish.dev.java.net/

More Stories By Sonny Hastomo

Sonny Hastomo is an IT architect at Sun Microsystems, Indonesia, for the telecommunication industry division. His currently is focusing on providing solution design, sizing, implementation, consulting services, and quality support to customers in their evaluation of their IT challenges.

Comments (1) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
Sathyan Catari 03/26/08 01:54:00 PM EDT

You may want to refer to this Article for Installing GlassFish Application server on Zones.

http://developers.sun.com/appserver/reference/techart/glassfishsolariszo...

Thanks