Sun GlassFish Enterprise Server v3 Administration Guide

Chapter 10 Extending Enterprise Server

This chapter provides procedures for performing tasks associated with extending and updating the deployed Sun GlassFishTMEnterprise Server v3 by using Update Tool. Procedures for using the pkg command are contained in this chapter. A set of reference pages that contain details on using the pkg command is included with Enterprise Server.

The following topics are addressed here:

Instructions for accomplishing the tasks in this chapter by using the Administration Console are contained in the Administration Console online help for Update Tool. The standalone Update Tool also contains online help. For additional information about Update Tool, see http://wikis.sun.com/display/IpsBestPractices/Screenshots

About Add-on Components

Enterprise Server is designed to provide its functionality in a modular form so that you can choose to include the functionality that you need and leave out the functionality that is not needed. OSGi modules, also called bundles, provide add-on functionality for your deployed Enterprise Server. You can add or remove an add-on component during runtime, with no need to restart the server.

Over time, new add-on components will be developed and existing components will be modified. Enterprise Server provides a set of image packaging system (IPS) tools for updating software on a deployed server. You can install new or updated add-on components by using the Update Tool in the following ways:

Extensive online help is provided for both graphical versions.

Adding Components

This section provides instructions for using the pkg command to install Enterprise Server add-on components on your deployed Enterprise Server.

ProcedureTo Install an Add-on Component

The pkg command enables you to install an add-on component on your system. If multiple versions of a package are available, the latest one is applied unless you specify otherwise. The pkg command, located in the as-install-parent/bin directory,


Note –

If the pkg component, the updatetool component, or any other valid component that you try to invoke from the command line is not yet installed on your deployed Enterprise Server, you will receive a query asking if you want to install the component. Answer Y to install the component.


Before You Begin

Enterprise Server v3 must be fully deployed before you can install additional components. If you need installation instructions, see Sun GlassFish Enterprise Server v3 Installation Guide.

  1. List your installed components:


    pkg list
    

    Information similar to the following is displayed:

    NAME (AUTHORITY)                              VERSION         STATE      UFIX
    glassfishv3-common                            0-1             installed  ----
    glassfishv3-ejb                               0-1             installed  u---
    glassfishv3-nucleus                           0-1             installed  ----
    glassfishv3-web                               0-1             installed  ----
    grails                                        1.0-1.0         installed  ----
    jersey                                        0.7-0.1         installed  u---
    jmaki                                         1.8.0-1.0       installed  ----
    jruby                                         1.1.1-1.0       installed  ----
    metro                                         1.2-1           installed  u---
    pkg                                           0.1.4-6.564     installed  u---
    python2.4-minimal                             2.4.4-6.564     installed  u---
    updatetool (glassfish.org)                    2.0-6.564       installed  u---
    wxpython2.8-minimal                           2.8.7.1-6.564   installed  u---
  2. List all packages that are available:


    pkg list -a
    

    Information similar to the following is displayed from the repository:

    NAME (AUTHORITY)                              VERSION         STATE      UFIX
    glassfishv3-common                            0-1             known      u---
    glassfishv3-common                            0-1             known      u---
    glassfishv3-common                            0-1             installed  ----
    glassfishv3-ejb                               0-1             known      u---
    glassfishv3-ejb                               0-1             known      u---
    glassfishv3-ejb                               0-1             known      u---
    glassfishv3-ejb                               0-1             installed  u---
    glassfishv3-ejb                               0-1             known      ----
    glassfishv3-nucleus                           0-1             known      u---
    glassfishv3-nucleus                           0-1             known      u---
    glassfishv3-nucleus                           0-1             installed  ----
    glassfishv3-web                               0-1             known      u---
    glassfishv3-web                               0-1             known      u---
    glassfishv3-web                               0-1             installed  ----
    grails                                        1.0-1.0         installed  ----
    javadb                                        0-1             known      u---
    javadb                                        0-1             known      u---
    javadb                                        0-1             known      ----
    jersey                                        0.7-0.1         installed  u---
    jersey                                        0.7-0.2         known      u---
    jersey                                        0.7-0.3         known      u---
    jersey                                        0.8-0.1         known      ----
    jmaki                                         1.8.0-1.0       installed  ----
    jruby                                         1.1.1-1.0       installed  ----
    metro                                         1.2-1           installed  u---
    metro                                         1.2-2           known      u---
    metro                                         1.2-3           known      ----
    pkg                                           0.1.4-6.564     installed  u---
    pkg                                           0.1.5-8.724     known      ----
    python2.4-minimal                             2.4.4-6.564     installed  u---
    python2.4-minimal                             2.4.4-8.724     known      ----
    updatetool                                    2.0-6.564       installed  u---
    updatetool                                    2.0-8.724       known      ----
    wxpython2.8-minimal                           2.8.7.1-6.564   installed  u---
    wxpython2.8-minimal                           2.8.7.1-8.724   known      ----
  3. Navigate to the as-install directory.

  4. Install a package from the available packages list.

    Use the following syntax: pkg install package-name. For example:


    pkg install javadb
    

    The most recent version of the component is installed and information similar to the following is displayed:

    DOWNLOAD                                     PKGS       FILES     XFER (MB)
    javadb                                       0/1      61/200     2.10/7.26 
    
    PHASE                                        ACTIONS
    Install Phase                                222/222 
  5. To apply your changes, restart Enterprise Server.

    See To Restart a Domain.

See Also

Full syntax and options for using the pkg command are described in the pages in the as-install/pkg/man/ directory. These reference pages are not displayed by using the man command. Instead, use a command such as more or cat.

Updating Installed Components

This section provides the following instructions for updating Enterprise Server components after they have been installed:

ProcedureTo Update an Installed Component

When you install an updated version of a component, only those files that have been modified are downloaded and installed. Files that have been removed in the updated package are removed during the update process.

  1. Obtain a list of only the installed packages that have available updates:


    pkg list -u
    

    Information similar to the following is displayed:

    NAME (AUTHORITY)                              VERSION         STATE      UFIX
    glassfishv3-ejb                               0-1             installed  u---
    jersey                                        0.7-0.1         installed  u---
    metro                                         1.2-1           installed  u---
    pkg                                           0.1.4-6.564     installed  u---
    python2.4-minimal                             2.4.4-6.564     installed  u---
    updatetool (glassfish.org)                    2.0-6.564       installed  u---
    wxpython2.8-minimal                           2.8.7.1-6.564   installed  u---
  2. Install a new version of a package.

    Use the following syntax: pkg install package-name. For example:


    pkg install metro
    

    Information similar to the following is displayed:

    DOWNLOAD                                     PKGS       FILES     XFER (MB)
    Completed                                    1/1         5/5     0.49/0.49 
    
    PHASE                                        ACTIONS
    Removal Phase                                    2/2 
    Update Phase                                     7/7 
    Install Phase                                    2/2
  3. To apply your changes, restart Enterprise Server.

    See To Restart a Domain.

See Also

Full syntax and options for using the pkg command are described in the pages in the as-install /pkg/man/ directory. These reference pages are not displayed by using the man command. Instead, use a command such as more or cat.

ProcedureTo Update All Installed Components in an Image

Enterprise Server enables you to maintain multiple installation images on a single system. When you update an installation image, all the components that are present in that image are updated to new versions, if new versions are available. When you install updated versions of components, only those files that have been modified are downloaded and installed. Files that have been removed in the updated package are removed during the update process.

  1. Install all packages for the image.

    Use the following syntax: pkg install image-name. For example:


    pkg image-update
    

    Information similar to the following is displayed:

    DOWNLOAD                                     PKGS       FILES     XFER (MB)
    Completed                                    6/6     729/729   21.59/21.59 
    
    PHASE                                        ACTIONS
    
    Removal Phase                                887/887 
    Update Phase                                 253/253 
    Install Phase                                584/584 
  2. To apply your changes, restart Enterprise Server.

    See To Restart a Domain.

See Also

Full syntax and options for using the pkg command are described in the pages in the as-install /pkg/man/ directory. These reference pages are not displayed by using the man command. Instead, use a command such as more or cat.

Removing Installed Components

If you are discontinuing use of a component and want to remove it from your system, you can do this by using the uninstall command. If you need to revert to a prior version of a component, you will need to uninstall the current version and install the prior version by specifying the version number.

ProcedureTo Uninstall an Installed Component

Before You Begin

Verify that there are no dependencies on the installed component before removing it.

  1. Obtain a list of all your installed components:


    pkg list
    
    NAME (AUTHORITY)                              VERSION         STATE      UFIX
    glassfishv3-common                            0-1             installed  ----
    glassfishv3-ejb                               0-1             installed  u---
    glassfishv3-nucleus                           0-1             installed  ----
    glassfishv3-web                               0-1             installed  ----
    grails                                        1.0-1.0         installed  ----
    jersey                                        0.7-0.1         installed  u---
    jmaki                                         1.8.0-1.0       installed  ----
    jruby                                         1.1.1-1.0       installed  ----
    metro                                         1.2-1           installed  u---
    pkg                                           0.1.4-6.564     installed  u---
    python2.4-minimal                             2.4.4-6.564     installed  u---
    updatetool (glassfish.org)                    2.0-6.564       installed  u---
    wxpython2.8-minimal                           2.8.7.1-6.564   installed  u---
  2. Uninstall the component that you want removed from your system.

    Use the following syntax: pkg uninstall package-name. For example:


    pkg uninstall jruby
    
  3. To apply your changes, restart Enterprise Server.

    See To Restart a Domain.

See Also

Full syntax and options for using the pkg command are described in the pages in the as-install /pkg/man/ directory. These reference pages are not displayed by using the man command. Instead, use a command such as more or cat.

ProcedureTo Uninstall and Revert to an Older Version of a Component

If there is a malfunction in an installed component, you might want to revert to an older version of that component. The way to restore an older version of a component is to first uninstall the current version of the component, then install the specific older version that you want to reinstate.

Before You Begin

Be sure to verify that the older version of the component is in the repository before you uninstall your current version.

  1. Verify that the older version of the component is still available:


    pkg list -a
    
  2. Obtain a list of your installed components:


    pkg list
    
  3. Uninstall the currently-installed component that you want to replace.

    Use the following syntax: pkg uninstall package-name. For example:


    pkg uninstall jersey
    
  4. Install the older version of the component.

    Use the following syntax: pkg install package-name —version version-number. For example:


    pkg install jersey -version 0.7-0.2
    
  5. Verify that the older version is installed:


    pkg list
    
See Also

Full syntax and options for using the pkg command are contained in the pages in the as-install /pkg/man/ directory. These reference pages are not displayed by using the man command. Instead, use a command such as more or cat.