Sun GlassFish Web Space Server 10.0 Installation Guide

Performing Upgrades in Offline Mode

In some cases, a Web Space Server installation might be configured such that the server cannot access the public Internet. For example, Web Space Server might be installed behind a restrictive firewall, or it might be installed on a LAN that is physically isolated from other networks for security reasons. In such cases, Update Tool cannot contact a remote repository to download updates, so a local repository server must be configured and the updates installed from there.

Configuring Web Space Server for offline updates comprises four general procedures:

  1. Install and configure Update Tool to work without an Internet connection.

  2. Configure and run a local repository server daemon on a locally accessible host.

  3. Configure Update Tool on the machines to be upgraded to use the local repository.

  4. Install the Web Space Server updates.

Figure Figure 2–3 illustrates this process.

Figure 2–3 Offline Update Procedure

Offline Update Procedure

These procedures are described in the following sections:

ProcedureTo Install Update Tool Without an Internet Connection

GlassFish Enterprise Server and Web Space Server both include bundled versions of the GlassFish Update Tool. However, to reduce the size of the product bundles and provide greater cross-platform compatibility, only stub (bootstrap) installer components for Update Tool are actually provided. As described in Using Update Tool, the first time Update Tool is launched after a fresh installation, the full product bits for Update Tool are automatically downloaded and installed. After installing the full Update Tool product bits, Update Tool can be run in online or offline mode, depending on the location of the repository to which you want to connect.

The above default scenario requires an Internet connection to download the full Update Tool product bits. To get around this requirement in environments where an Internet connection is not possible, you must manually obtain and install Update Tool, as described in this procedure.


Note –

When Update Tool is installed as described in this procedure, it can only be run in command-line (CLI) mode. It is not possible to run the Update Tool GUI when installed using this procedure.


Before You Begin

Access to some Internet-connected machine outside your secure network is required for the first part of this procedure. This Internet-connected machine must be one to which Update Tool can be downloaded and saved to some type of removable media, such as CD, DVD, USB drive, or flash memory card.

  1. Download the pre-installed toolkit image ZIP bundle for your server's operating environment from the Pre-installed Toolkit Images and Starter Repositories wiki page and save it to the location of your choice.

  2. Copy the downloaded toolkit image ZIP file or the expanded archive to the removable medium of your choice.

    For example, you might want to copy the ZIP file to a USB flash drive or SD card, or extract the ZIP and burn the files to a CD. The goal is to copy the toolkit image files onto a medium that you can then physically transport into the secured network area and then copy to a server on that secured network.

    In most cases, the download ZIP file size is approximately 4MB. The size of the expanded ZIP file varies depending on the package you download. On Windows, the expanded ZIP is approximately 11MB; on Linux and Solaris, approximately 13MB.

  3. Copy or expand the toolkit image in the directory of your choice on the following host machines:

    • The server on which the secure network repository server daemon will be run

    • The server(s) on which Web Space Server is running and will be updated

    Depending on your secure network configuration and the number of Web Space Server hosts involved, the repository server daemon and the Web Space Server software may be running on different hosts or the same host.

    Regardless of the host machine used, the directory in which the toolkit image is extracted is referred to for the remainder of these instructions as tookit-dir.

  4. In a command shell on the desired host machine, change to the tookit-dir/pkg/bin directory.

  5. Run the following command to verify that the pkg tool is installed correctly.


    ./pkg --help
    

    A list of available pkg subcommands and options should be displayed.

ProcedureTo Configure a Local Update Repository Server

This procedure describes how to get the standalone Web Space Server repository and then configure a local repository server in a secure (not connected to the Internet or other network) LAN. This local repository server will subsequently be used to provide updates to other Web Space Server hosts within the secure LAN.

Before You Begin

This procedure assumes that Update Tool has been installed as described in To Install Update Tool Without an Internet Connection. As described in that procedure, access to some Internet-connected machine outside your secure network is required for the first part of the procedure in this section. This Internet-connected machine must be one to which the standalone Web Space Server repository can be downloaded and saved to some type of removable media.

  1. Download the standalone Web Space Server repository and save it to the location of your choice.

    Ask your Web Space Server support representative for the location of the correct repository to use.

  2. Copy the downloaded repository ZIP file or the expanded archive to the removable medium of your choice.

    The goal here is to copy the repository files onto a medium that you can then physically transport into the secure network area and then copy to a server on that secured network.

    The Web Space Server standalone repository ZIP file is approximately 2.6GB, and approximately 3GB when expanded. Because of this large file size, the most practical media format for the standalone repository is, in most cases, either DVD or removable hard drive (USB or hot swappable).

  3. Expand (unzip) the Web Space Server repository archive in the directory of your choice on the server that will be used to run the Update Tool repository server daemon.

    This directory should be different than the directory in which the Update Tool toolkit image was expanded, as described in To Install Update Tool Without an Internet Connection.

    The directory in which the Web Space Server repository image is extracted is referred to for the remainder of these instructions as repository-dir. The directory in which the Update Tool toolkit image is extracted is referred to as toolkit-dir.

  4. Start the repository server daemon from a command prompt on the desired secure network machine.

    Use the following command syntax:


    toolkit-dir/pkg/bin/pkg.depotd  --readonly -d repository-dir -p port
    

    For port, specify the port number of your choosing. The default port is 80.

    Several startup messages are displayed as the repository daemon initializes; for example:


    [date/time] ENGINE Listening for SIGHUP.
    [date/time] ENGINE Listening for SIGTERM.
    [date/time] ENGINE Listening for SIGUSR1.
    [date/time] ENGINE Bus STARTING
    [date/time] ENGINE Started monitor thread '_TimeoutMonitor'.
    [date/time] ENGINE Serving on 0.0.0.0:81
    [date/time] ENGINE Bus STARTED

ProcedureTo Configure Update Tool to Use a Local Repository

After downloading the Web Space Server repository image and starting the repository server daemon on the secure network, as described in To Configure Update Tool to Use a Local Repository, the next step is to configure the secure Web Space Server host on which updates are to be performed. The goal in this procedure is to configure the Web Space Server host to use the local update repository image rather than the default behavior of going out on the Internet to access a remote update repository.

Before You Begin

The Update Tool repository toolkit must be installed on each Web Space Server host for which updates will be performed, as described in To Install Update Tool Without an Internet Connection.

  1. From a command shell on the Web Space Server host you want to upgrade, use the pkg set-publisher command to redirect Update Tool to use the local repository rather than a remote repository.

    Use the following command syntax:


    toolkit-dir/pkg/bin/pkg -R ws-install-dir set-publisher -Pe -O http://repo-host:port/ pubname
    

    Where:

    • ws-install-dir is the path to the directory containing the Web Space Server installation that is to be updated

    • repo-host is the name of the server on which the pkg.depotd repository server daemon is running

    • port is the port use for the pkg.depotd daemon, as specified in To Configure a Local Update Repository Server.

    • pubname is the name of the preconfigured Web Space Server publisher. For Web Space Server, use webspace.sun.com

    For example, to specify a Web Space Server installation directory named /opt/wssonfoo, and a Web Space Server repository server running on port 81 on a host named foo, enter the following command:


    toolkit-dir/pkg/bin/pkg -R /opt/wssonfoo set-publisher -Pe -O http://foo:81 webspace.sun.com

ProcedureTo Install Updates From a Local Repository

The final procedure in the offline update process is to use install the Web Space Server updates on the desired Web Space Server host(s).

Before You Begin

Note the following before you begin the Update installation:

  1. In a command shell on the Web Space Server host on which updates will be installed, enter the following command to install the Update components:


    toolkit-dir/pkg/bin/pkg image-update
    
  2. Restart the application server.

    For example, to restart GlassFish Enterprise Server:


    cd gf-install-dir/bin
    ./asadmin stop-domain domain_name
    ./asadmin start-domain domain_name
    
  3. Change to the ws-install-dir/webspace/application directory.

  4. Run the Ant install.xml script to regenerate and redeploy the Web Space Server WAR files.


    ant -f install.xml
    
  5. Restart the application server once more.

    For example, if using GlassFish:


    cd gf-install-dir/bin
    ./asadmin start-domain domain_name