GlassFish Server Open Source Edition 3.1 - File Layout One Pager

1. Introduction

1.1. Project/Component Working Name:

GlassFish Server Open Source Edition 3.1 File Layout

1.2. Name(s) and e-mail address of Document Author(s)/Supplier:

Snjezana Sevo-Zenzerovic: snjezana.sevozenzerovic@oracle.com

1.3. Date of This Document:

07/26/2010

2. Project Summary

2.1. Project Description:

This project defines product file layout used to deliver the content of GlassFish Server Open Source Edition 3.1 release as standalone product distribution.

2.2. Risks and Assumptions:

Project assumes that other product features such as OSGi framework integration are able to support file layout proposed in this specification and are also flexible enough to support file layout changes required for alternative distributions such as native package based distributions.

3. Problem Summary

3.1. Problem Area:

GlassFish Open Source Edition 3.1 release has to be delivered as standalone product installation integrated into Update Center 2.x content delivery mechanism based on Image Packaging System (IPS). Product must have well defined file layout interface which both supports the existing product functionality and enables the delivery of additional functional modules.

3.2. Justification:

File layout is an essential product interface.

4. Technical Description:

4.1. Details:

Product file layout will be based on the file layout of current GlassFish v3 release as defined in GlassFish v3 File Layout One Pager and extended to support new 3.1 features. Intent is to keep GlassFish implementation flexible enough to allow for changes in file layout which would enable the delivery of other distributions (see section 4.4 for more details) but only file layout for standalone GlassFish distribution will be specified in this document.

4.2. Bug/RFE Number(s):

8250 - Non-osgi jars present in glassfish/modules directory

4.3. In Scope:

File layout for standalone IPS image based distributions of GlassFish Open Source Edition 3.1 release. This includes web profile distribution and full distribution. This file layout will also be used for other standalone IPS image based distributions directly based on GlassFish Open Source Edition 3.1 such as Java EE SDK 6 Update 2 but extended as needed to support additional content delivered in such distributions.

4.4. Out of Scope:

File layout for any other distributions based on GlassFish Open Source Edition 3.1 release and file layout for any additional product functionality delivered in such distributions or in subsequent GlassFish 3.x update releases. This includes potential delivery of GlassFish in native package formats such as SVR4, RPM, Debian and bundling of GlassFish into OS platform distributions based on such packaging formats. In those scenarios GlassFish file layout will need to follow specific distribution file layout rules and will be covered in separate specification documents as needed.

4.5. Interfaces:

4.5.1 Public Interfaces

Interface: GlassFish 3.1 File Layout
Stability: Uncommitted
Former Stability (if changing): Uncommitted
Comments: Described in section 4.5.1.1
Interface: asenv.conf and asenv.bat Configuration Files
Stability: Uncommitted
Former Stability (if changing): Uncommitted
Comments: Described in section 4.5.1.2

4.5.1.1 GlassFish 3.1 File Layout

Default installation directories are:
$HOME/glassfish3 (non-Windows platforms)
system drive:\glassfish3 (Windows XP platform)
%UserProfile%\glassfish3 (Windows Vista and newer Windows platforms)
User can override default installation directories by providing alternative value to installer or by extracting the zip distribution in different location. Selected installation directory is referenced as

<install-dir>
in the remainder of this document.
File layout for standalone GlassFish 3.1 distributions:

<install-dir>
		bin/ 	    Wrappers/links to commonly used utilities
                            (asadmin, pkg, updatetool)

                glassfish/  GlassFish 
                    bin/	Public utilities (asadmin, startserv, stopserv)	
                    config/	Installation-wide configuration files
		    icons/	Icon files (installer distribution only)
		    lib/	Non-OSGi libraries, including backward compatibility wrapper jars
		        appclient/	Standalone client support files	
                        asadmin/        CLI extension libraries
                        dtds/		DTD files
			embedded/	Embedded shell jar files
			endorsed/	Endorsed jar files
        	        install/applications/	RA files, Admin GUI
			install/templates/ OS service and resource templates	
			monitor/	Monitoring (btrace) client jar files
			registration/	Service tag registry
  			schemas/	Schema files
                        templates/	Template files
                    modules/	OSGi module libraries
			autostart/	Modules loaded by Felix fileinstall
			endorsed/	Endorsed module libraries
                    docs/	Bundled documentation files
		    domains/    Domain configurations
                        domain1/ 	Default domain configuration
                            applications/	Deployed applications
                            autodeploy/		Autodeploy directory		
			    config/		Domain configuration files
			    classes/		Domain specific classes
			    docroot/		Default docroot
			    lib/		Domains specific libraries
                                ext/ 
			    logs/		Log files
			    osgi-cache/
				felix/		Felix cache directory

                    nodes/         
                            <hostname>/         Node agents/server instances configurations
                                agent/
                                    config/     Node agent configuration
                                        das.properties    
                                <server-instance-name>/    Server instance configuration
                                    applications/          Deployed applications
                                    config/                Instance configuration files
                                    docroot/               Default docroot
                                    generated/             Generated content
                                    lib/                   Instance libraries
                                    
		    legal/	Legal files (licences, copyright)
		    osgi/	OSGi framework files	
			    felix/		Felix OSGi framework
				bin/
				conf/ 
			    equinox/
				configuration/	Equinox (configuration only)
		
		javadb/     JavaDB
			  
		mq/	    Message Queue (full profile distribution only)

                pkg/        IPS CLI client

                updatetool/  UC 2.x GUI client

		.org.opensolaris,pkg/ IPS package database (hidden directory)

4.5.1.2 asenv.conf and asenv.bat Configuration Files

asenv file is configuration file containing installation locations of
those components which are either delivered separately of GlassFish
distribution or can be expected to be installed outside of distribution
installation directory in the case of GlassFish distributions delivered in OS
bundled scenario.

GlassFish should, however, continue to function for the default use
case where asenv file contains default values or relative locations and
GlassFish is delivered as zip archive distribution. In other use cases, asenv
file will be updated with alternative values either as part of install time
configuration, or asenv file with prepopulated alternative values will be
shipped as part of particular distribution.

asenv file name/location:

   	<install-dir>/config/asenv.conf (non-Windows platforms)
	<install-dir>\config\asenv.bat	(Windows platforms)

	asenv variables:

AS_INSTALL - defines GlassFish installation directory
AS_CONFIG - defines GlassFish configuration directory
AS_DEF_DOMAINS_PATH - defines GlassFish default domain configuration directory;
override use case for standalone distribution is to enable proper functioning
on Windows systems with enabled User Access Control feature
AS_DEF_NODES_PATH - defines GlassFish default nodes configuration
directory; if undefined defaults to glassfish/nodes
AS_DERBY_INSTALL - defines JavaDB installation directory
AS_IMQ_BIN - defines the location of MQ utilities
AS_IMQ_LIB - defines the location of MQ libraries
AS_JAVA - defines JDK installation directory; if undefined GlassFish falls back
on system environment variable PATH
FELIX_HOME - defines Felix installation directory; if undefined it falls back 
on the default location glassfish/osgi/felix

   
        Default asenv.conf content:

AS_INSTALL=".."
AS_CONFIG="../config"
AS_DEF_DOMAINS_PATH="../domains"
AS_DERBY_INSTALL="../../javadb"
AS_IMQ_LIB="../../mq/lib"
AS_IMQ_BIN="../../mq/bin"

	Default asenv.bat content:

set AS_INSTALL=..
set AS_CONFIG=..\config
set AS_DEF_DOMAINS_PATH=..\domains
set AS_DERBY_INSTALL=..\..\javadb
set AS_IMQ_LIB=..\..\mq\lib
set AS_IMQ_BIN=..\..\mq\bin

4.5.2 Private Interfaces

N/A

4.5.3 Deprecated/Removed Interfaces:

N/A

4.6. Doc Impact:

This project impacts all product documentation since it defines product file layout and naming.

4.7. Admin/Config Impact:

Project defines the location of product files, including those used for product configuration.

4.8. HA Impact:

Project defines the location of domain, node agent and server instance configuration files which will be used to by HA/clustering implementation.

4.9. I18N/L10N Impact:

Additional localized content will be delivered following Java and OSGi guidelines and its file layout will match the layout of corresponding base content.

4.10. Packaging, Delivery & Upgrade:

4.10.1. Packaging

This proposal defines the file layout of all product content delivered in IPS package format.

4.10.2. Delivery

Product installer and installation time product configuration needs to be implemented in such a way that resulting installation file layout conforms to this proposal.

4.10.3. Upgrade and Migration:

File layout changes compared to previous stable releases (v3 and 3.0.1) are minimal and will be automatically handled during in-place upgrade by IPS framework. Domain configuration changes will be handled by upgrade tool.

4.11. Security Impact:

Security considerations will be taken into account while specifying default file/directory access permissions.

4.12. Compatibility Impact

Proposal contains minimal changes to previous v3 and 3.0.1 file layouts and all configuration file layout changes are backward compatible.

4.13. Dependencies:

4.13.1 Internal Dependencies

Proposal depends on all internal and external modules which deliver files into product IPS packages or distributions or create and use configuration files.

4.13.2 External Dependencies

See 4.13.1.

4.14. Testing Impact:

Most of the proposal implementation will be implicitly tested through functional testing of all product areas. New devtests which will compare package or distribution file layout to this proposal will be developed and automated.

5. Reference Documents:

6. Schedule:

6.1. Projected Availability:

  • Feature complete in milestone 5 (09/12/2010)
  • At production quality level in milestone 6 (11/21/2010)