Sun Java System Reference Configuration Series: Portal Service on Application Server Cluster

Chapter 6 Implementation Module 3: Portal Server With Portlet Session Failover on Application Server Cluster

This chapter provides an overview of the portal service module in Figure 2–2 and documents the tasks that are required to implement it. The chapter includes the following sections:

Overview of the Portal Service Module

The portal service module of the reference configuration's deployment architecture illustrated in Figure 2–2consists of two instances of Sun Java System Portal Server running on two different computers. The module makes use of a hardware load balancer that is configured to provide service failover capability between the two Portal Server instances. All requests for portal services are addressed to the virtual service name and IP address of the load balancer. The load balancer directs each request to one of the two Portal Server instances.

This module implements portlet session failover. When a user logs in and is authenticated by the Access Manager service, the load balancer routes the portal request to one of the Portal Server instances, which builds and returns a Portal Desktop to the user. As the user accesses various portal channels and portlet applications from the desktop, the requests from the user are routed to the same Portal Server instance. Portlet session state is maintained by the web container supporting the Portal Server instance.

If the Portal Server instance fails, the system recovers as follows:

Portlet session failover depends upon high availability mechanisms provided by the web container. Hence, portlet session failover for the portal service module is achieved by using an Application Server cluster and its High Availability Session Store (HADB).

The architecture of the portal service module is shown in the following illustration.

Figure 6–1 Portal Service Module

Illustration of the portal service module as described
in the text.

The Portal Server instances run in a web container that is provided by Application Server. Each Portal Server instance runs in an Application Server instance on its respective computer. The instances are managed by Application Server node agents that are acting on behalf of the Domain Administration Server (DAS).

As shown in Figure 6–1, the Portal Server instances together constitute a single portal service, pstestPortal.

Also indicated in Figure 6–1 is that the Application Server instances are configured to operate within the context of an Application Server cluster. The cluster provides for high availability through an HADB cluster consisting of an HADB instance on ps1 and ps2.

The module also includes two components that are not replicated and therefore represent single points of failure:

The general approach to implementing this module is to first set up the Application Server cluster (plus an additional Application Server instance in which to deploy the search instance), and then to install, deploy, and configure the pstestPortal portal within the cluster. In setting up the cluster, the Java ES installer is run in Configure Now mode to install and configure Application Server, HADB, and Access Manager SDK. In setting up the pstestPortal portal, the Java ES installer is run in Configure Later mode to install Portal Server, Java DB, and Service Repository libraries. Following these procedures, load balancing is implemented to provide portal service failover. Then portlet session failover is set up.

This module can be scaled horizontally by adding an additional computer like ps2 and its respective components, and following the instructions in this chapter that apply to ps2.


Note –

The procedures in this chapter use the host names, domain name, and IP addresses shown in Figure 3–1 and Figure 6–1. However, you must map these host names, domain name, and IP addresses to equivalent names and addresses in your environment. For this reason, the procedures in this chapter show host names, domain name, and IP addresses as variables.


Setting Up an Application Server Cluster Node on ps1

This task creates the infrastructure for an Application Server cluster and sets up the first node of that cluster. It consists of the following procedures:

ProcedureTo Install Application Server on ps1

This procedure assumes that you are installing Java ES components on Solaris 10 8/07 OS or later version. Hence, no operating system patches need to be installed. The Java ES installer evaluates the state of the operating system and indicates if you need to install a patch. If you are using versions of the operating system older than Solaris 10 8/07 OS, it is better to install any required patches before you begin the actual Java ES installation procedure.

The following procedure installs Application Server, HADB, Java DB, and Access Manager SDK, all of which are needed to support Portal Server on this computer, and all of which can be configured using the Java ES installer's Configure Now capability. Installation of Portal Server requires custom configuration and is performed in a subsequent procedure (see Setting Up Portal Server on ps1).

The procedure runs the Java ES installer without saving a state file. You can choose to run the installer and capture your input in a state file (-saveState state-fileName). You could then use the state file to re-create the installation, if, for example you needed to reinstall these components.

  1. Download the Java ES software distribution to ps1.

    The procedure is documented in To Download the Software Distribution.

  2. Log in as root or become superuser.

    # su -

  3. Start the Java ES installer.

    # cd /portdist_71u2/Solaris_sparc

    # ./installer

    This procedure uses the GUI installer. The installer can also be run in text mode by using the - nodisplay option.

    The Welcome panel opens.

  4. In the Welcome panel, click Next.

    The Software License Agreement panel opens.

  5. In the Software License Agreement Panel, review the license terms and click Yes, Accept License.

    The Choose Software Components panel opens.

  6. In the Choose Software Components panel, select the following components:

    • Application Server Enterprise Edition 8.2 patch 2

      • Domain Administration Server

      • Application Server Node Agent

      • Command Line Administration Tool

    • High Availability Session Store 4.4.3 (automatically selected)

    • Java DB 10.2.2.1 (automatically selected)

      • Java DB Client

      • Java DB Server

    • Access Manager 7.1

      • Access Manager SDK

    • Install Multilingual Package(s) for all selected components (this is selected automatically but optional if using English)

  7. Click Next.

    The Dependency Warning panel opens.

  8. In the Dependency Warning panel, choose Use Access Manager 7.1 Installed on a Remote Machine and click OK.

    The installer evaluates the Java SE Software Development Kit on the computer and determines if an upgrades is required. On a fresh copy of Solaris 10 8/07 OS, an upgrade is needed, and the Java SE Software Development Kit Upgrade Required panel opens.

  9. In the Java SE Software Development Kit Upgrade Required panel select Automatic Upgrade to the Version Included with the Installer and click Next.

    The installer evaluates the Java ES shared components on the computer and determines if any upgrades are required. On a fresh copy of the Solaris 10 8/07 OS, shared component upgrades are needed, and the Shared Components Upgrades Required panel opens.

  10. In the Shared Components Upgrades Required panel, click Next.

    The installer upgrades the shared components. The Specify Installation Directories panel opens.

  11. In the Specify Installation Directories panel, type the following values and click Next.

    Input Field 

    Value 

    Application Server 

    /opt/SUNWappserver

    Application Server Data and Configuration 

    /var/opt/SUNWappserver

    Access Manager 

    /opt

    The installer checks the system, and the System Check panel opens.

  12. In the System Check panel, evaluate the results of the system check.

    If the system check is favorable, click Next.

    The Choose a Configuration Type panel opens.

  13. In the Choose a Configuration Type panel, select Configure Now and click Next.

    The Custom Configuration Panel opens.

  14. In the Custom Configuration Panel, note the following message and click Next.


    The following component products cannot be configured during installation:
    Java DB
    Click Next to configure the other components.

    The Specify Administrator Account Preferences panel opens.

  15. In the Specify Administrator Account Preferences Panel, type the following values and click Next.

    Input Field 

    Value 

    Administrator User ID  

    admin

    Administrator Password 

    app-server-admin-password

    The Common Server Settings Panel opens.

  16. In the Common Server Settings panel, type the following values and click Next.

    Input Field 

    Value 

    Host Name 

    ps1

    DNS Domain Name 

    pstest.com

    Host IP Address 

    10.0.2.3

    System User 

    root

    System Group 

    root

    The High Availability Session Store (HADB) panel opens.

  17. In the Application Server:High Availability Session Store (HADB) panel, type the following values and click Next.

    Input Field 

    Value 

    HADB Management Port 

    1862

    HADB Resource Directory 

    /var/opt

    HADB Administrator Group 

    root

    The Application Server: Domain Administration Server panel opens.

  18. In the Application Server: Domain Administration Server panel, type the following values and click Next.

    Input Field 

    Value 

    Admin Port 

    4849

    JMX Port 

    8686

    HTTP Port 

    8080

    HTTPS Port 

    8181

    Master Password 

    app-server-master-password

    The Application Server: Node Agent panel opens.

  19. In the Application Server: Node Agent panel, type the following values and click Next.

    Input Field 

    Value 

    Admin Host Name 

    ps1.pstest.com

    Master Password 

    app-server-master-password

    Admin Port 

    4849

    Node Agent Name 

    na-ps1

    The Access Manager: Specify Configuration Information panel opens.

  20. In the Access Manager: Specify Configuration Information panel, type the following values and click Next.

    The following values must match the values that were used when Access Manager was installed on am1 and am2).

    Input Field 

    Value 

    Install Type 

    Legacy Mode

    Administrator User ID 

    amAdmin

    Administrator Password 

    access-manager-admin-password

    LDAP User ID  

    amldapuser

    LDAP Password 

    access-manager-LDAP-password

    Password Encryption Key 

    password-enc-key

    The Access Manager: Specify Directory Server panel opens.

  21. In the Access Manager: Specify Directory Server Information panel, type the following values and click Next.

    The following values must match the values that were used when Directory Server was installed on ds1 and ds2, except for the host and port values. Those values must match the directory service load balancer values.

    Input Field 

    Value 

    Directory Server Host 

    ds.pstest.com

    Directory Server Port 

    389

    Access Manager Directory Root Suffix 

    dc=pstest,dc=com

    Directory Manager DN 

    cn=Directory Manager

    Directory Manager Password 

    directory-manager-password

    The Access Manager: Specify Directory Server Data panel opens.

  22. In the Access Manager: Specify Directory Server Data panel, type the following values and click Next.

    Input Field 

    Value 

    Is Directory Server Provisioned With User Data? 

    Yes

    Organization Marker Object Class 

    sunISManagedOrganization

    Organization Naming Attribute 

    o

    User Marker Object Class 

    inetorgperson

    User Naming Attribute 

    uid

    The Access Manager: Specify Web Container for Running Access Manager Services panel opens.

  23. In the Access Manager: Specify Web Container for Running Access Manager Services panel, type the following values and click Next.

    Input Field 

    Value 

    Remote Host 

    am.pstest.com

    Services Deployment URI 

    amserver

    Cookie Domain 

    .pstest.com

    Remote Services Port 

    80

    Remote Services Protocol 

    HTTP

    The Ready to Install panel opens.

  24. In the Ready to Install panel, indicate whether you want to open the software registration window during installation.

    This panel enables you to register the components that you have selected for installation with Sun Connection. Sun Connection is a Sun-hosted service that helps you track, organize, and maintain Sun hardware and software. For example, Sun Connection can inform you of the latest available security fixes, recommended updates, and feature enhancements.

    If you choose to register, information about the installation is sent to the Sun Connection database. You can also register at a later date, after installation has been completed.

  25. Click Install.

    The installer copies files to the computer. The installer also configures the Access Manager SDK to interoperate with the Access Manager service and the Directory Server service. The installer also creates an instance of the Application Server Domain Administration Server (DAS) for the default Application Server domain, which is domain1.

  26. When the installation is complete, review the installation in the Summary field.

  27. Click Exit to exit the installer.

  28. Check the installation log files for any installation errors.

    # cd /var/sadm/install/logs

    # egrep -i 'fail|error' Java*

ProcedureTo Start the Application Server Domain

This procedure starts a Domain Administration Server (DAS) for the default domain (domain1) and the Application Server instance on ps1 in which it runs.

  1. Run the start—domain command:

    # /opt/SUNWappserver/sbin/asadmin start-domain --user admin domain1

    When prompted, type the app-server-admin-password.

    The response should indicate that you successfully started the domain:

    Domain domain1 started

ProcedureTo Start a Node Agent on ps1

This procedure starts the node agent (na-ps1) on ps1 that was specified during Portal Server installation.

  1. Run the start—node—agent command:

    # /opt/SUNWappserver/sbin/asadmin start-node-agent --user admin na-ps1

    When prompted, type the app-server-admin-password.

    The response should indicate that you successfully started a node agent:

    Command start-node-agent executed successfully.

ProcedureTo Create a Cluster Configuration

This procedure creates an Application Server cluster (pscluster) in the default domain (domain1). New Application Server instances will be created as members of this cluster on ps1 and ps2. The cluster configuration file must be created before you create the Application Server instances that constitute the cluster.

  1. On ps1, run the create—cluster command:

    # /opt/SUNWappserver/sbin/asadmin create-cluster --user admin pscluster

    When prompted, type the app-server-admin-password.

    The response should indicate that you successfully created the cluster and its cluster configuration file, pscluster-config:

    Command create-cluster executed successfully.

ProcedureTo Create and Start an Application Server Instance on ps1

This procedure creates and starts a new Application Server instance (as-cluster-inst-ps1) on ps1, which belongs to pscluster.

  1. Create an Application Server instance.

    # /opt/SUNWappserver/sbin/asadmin create-instance --user admin --cluster pscluster --nodeagent na-ps1 --systemproperties HTTP_LISTENER_PORT=80 as-cluster-inst-ps1

    When prompted, type the app-server-admin-password.

    The response should indicate that you successfully created the instance:

    Command create-instance executed successfully.

  2. Start the instance created in Step 1.

    # /opt/SUNWappserver/sbin/asadmin start-instance --user admin as-cluster-inst-ps1

    When prompted, type the app-server-admin-password.

    The response should indicate that you successfully started the instance:

    Command start-instance executed successfully.

Setting Up an Application Server Cluster Node on ps2

This task creates the second node of an Application Server cluster. It consists of the following procedures:

ProcedureTo Install Application Server on ps2

This procedure is very similar to the procedure for installing Application Server on ps1, except that you do not install the Domain Administration Server (DAS) component on ps2 because only one DAS instance is required in an Application Server cluster.

The procedure assumes that you are installing Java ES components on Solaris 10 8/07 OS or later version. Hence, no operating system patches need to be installed. The Java ES installer evaluates the state of the operating system and indicates if you need to install a patch. If you are using versions of the operating system older than Solaris 10 8/07 OS, it is better to install any required patches before you begin the actual Java ES installation procedure.

The following procedure installs Application Server, HADB, Java DB, and Access Manager SDK, all of which are needed to support Portal Server on this computer, and all of which can be configured using the Java ES installer's Configure Now capability. Installation of Portal Server requires custom configuration and is performed in a subsequent procedure (see To Install Portal Server on ps2).

The procedure runs the Java ES installer without saving a state file. You can choose to run the installer and capture your input in a state file (-saveState state-fileName). You could then use the state file to re-create the installation, if, for example you needed to reinstall these components.

  1. Download the Java ES software distribution to ps2.

    The procedure is documented in To Download the Software Distribution.

  2. Log in as root or become superuser.

    # su -

  3. Start the Java ES installer.

    # cd /portdist_71u2/Solaris_sparc

    # ./installer

    This procedure uses the GUI installer. The installer can also be run in text mode by using the - nodisplay option.

    The Welcome panel opens.

  4. In the Welcome panel, click Next.

    The Software License Agreement panel opens.

  5. In the Software License Agreement Panel, review the license terms and click Yes, Accept License.

    The Choose Software Components panel opens.

  6. In the Choose Software Components panel, select the following components:

    • Application Server Enterprise Edition 8.2 patch 2

      • Application Server Node Agent

      • Command Line Administration Tool

    • High Availability Session Store 4.4.3 (automatically selected)

    • Java DB 10.2.2.1 (automatically selected)

      • Java DB Client

      • Java DB Server

    • Install Multilingual Package(s) for all selected components (this is selected automatically but optional if using English)

  7. Click Next.

    The Dependency Warning panel opens.

  8. In the Dependency Warning panel, choose Use Access Manager 7.1 Installed on a Remote Machine and click OK.

    The installer evaluates the Java SE Software Development Kit on the computer and determines if an upgrades is required. On a fresh copy of Solaris 10 8/07 OS, an upgrade is needed, and the Java SE Software Development Kit Upgrade Required panel opens.

  9. In the Java SE Software Development Kit Upgrade Required panel select Automatic Upgrade to the Version Included with the Installer and click Next.

    The installer evaluates the Java ES shared components on the computer and determines if any upgrades are required. On a fresh copy of the Solaris 10 8/07 OS, shared component upgrades are needed, and the Shared Components Upgrades Required panel opens.

  10. In the Shared Components Upgrades Required panel, click Next.

    The installer upgrades the shared components. The Specify Installation Directories panel opens.

  11. In the Specify Installation Directories panel, type the following values and click Next.

    Input Field 

    Value 

    Application Server 

    /opt/SUNWappserver

    Application Server Data and Configuration 

    /var/opt/SUNWappserver

    The installer checks the system, and the System Check panel opens.

  12. In the System Check panel, evaluate the results of the system check.

    If the system check is favorable, click Next.

    The Choose a Configuration Type panel opens.

  13. In the Choose a Configuration Type panel, select Configure Now and click Next.

    The Custom Configuration Panel opens.

  14. In the Custom Configuration Panel, note the following message and click Next.


    The following component products cannot be configured during installation:
    Java DB
    Click Next to configure the other components.

    The Specify Administrator Account Preferences panel opens.

  15. In the Specify Administrator Account Preferences Panel, type the following values and click Next.

    Input Field 

    Value 

    Administrator User ID  

    admin 

    Administrator Password 

    app-server-admin-password

    The Common Server Settings Panel opens.

  16. In the Common Server Settings panel, type the following values and click Next.

    Input Field 

    Value 

    Host Name 

    ps2

    DNS Domain Name 

    pstest.com

    Host IP Address 

    10.0.2.4

    System User 

    root

    System Group 

    root

    The High Availability Session Store (HADB) panel opens.

  17. In the Application Server:High Availability Session Store (HADB) panel, type the following values and click Next.

    Input Field 

    Value 

    HADB Management Port 

    1862

    HADB Resource Directory 

    /var/opt

    HADB Administrator Group 

    root

    The Application Server: Domain Administration Server panel opens.

  18. In the Application Server: Node Agent panel, type the following values and click Next.

    Input Field 

    Value 

    Admin Host Name 

    ps1.pstest.com

    Master Password 

    app-server-master-password

    Admin Port 

    4849

    Node Agent Name 

    na-ps2

    The Ready to Install panel opens.

  19. In the Ready to Install panel, indicate whether you want to open the software registration window during installation.

    This panel enables you to register the components that you have selected for installation with Sun Connection. Sun Connection is a Sun-hosted service that helps you track, organize, and maintain Sun hardware and software. For example, Sun Connection can inform you of the latest available security fixes, recommended updates, and feature enhancements.

    If you choose to register, information about the installation is sent to the Sun Connection database. You can also register at a later date, after installation has been completed.

  20. Click Install.

    The installer copies files to the computer. The installer also configures the Access Manager SDK to interoperate with the Access Manager service and the Directory Server service. The installer also creates an instance of the Application Server Domain Administration Server (DAS) for the default Application Server domain, which is domain1.

  21. When the installation is complete, review the installation in the Summary field.

  22. Click Exit to exit the installer.

  23. Check the installation log files for any installation errors.

    # cd /var/sadm/install/logs

    # egrep -i 'fail|error' Java*

ProcedureTo Start a Node Agent on ps2

This procedure starts the node agent (na-ps2) on ps2 that was specified during Portal Server installation.

  1. Run the start—node—agent command:

    # /opt/SUNWappserver/sbin/asadmin start-node-agent --user admin na-ps2

    When prompted, type the app-server-admin-password.

    When prompted, type the app-server-master-password.

    The response should indicate that you successfully started a node agent:

    Command start-node-agent executed successfully.

ProcedureTo Create and Start an Application Server Instance on ps2

This procedure creates and starts a new Application Server instance (as-cluster-inst-ps2) on ps2, which belongs to pscluster.

  1. Run the create—instance command:

    # /opt/SUNWappserver/sbin/asadmin create-instance --user admin --host ps1.pstest.com --cluster pscluster --nodeagent na-ps2 --systemproperties HTTP_LISTENER_PORT=80 as-cluster-inst-ps2

    When prompted, type the app-server-admin-password.

    The response should indicate that you successfully created the instance:

    Command create-instance executed successfully.

  2. Run the start—instance command:

    # /opt/SUNWappserver/sbin/asadmin start-instance --user admin --host ps1.pstest.com as-cluster-inst-ps2

    When prompted, type the app-server-admin-password.

    The response should indicate that you successfully started the instance:

    Command start-instance executed successfully.

Setting Up a Non-Cluster Application Server Instance on ps1

This task creates an Application Instance on ps1 in which to deploy a Portal Server search instance. The Application Server instance is not part of the Application Server cluster (pscluster) in which the Portal Server instances are to be deployed. The task consists of the following procedure:

ProcedureTo Create and Start a Non-Cluster Application Server Instance on ps1

This procedure creates and starts a new non-cluster Application Server instance (as-inst-ps1) on ps1, in which a search instance is to be deployed.

  1. Create an Application Server instance.

    # /opt/SUNWappserver/sbin/asadmin create-instance --user admin --nodeagent na-ps1 --systemproperties HTTP_LISTENER_PORT=5050 as-inst-ps1

    When prompted, type the app-server-admin-password.

    The response should indicate that you successfully created the instance:

    Command create-instance executed successfully.

  2. Start the instance created in Step 1.

    # /opt/SUNWappserver/sbin/asadmin start-instance --user admin as-inst-ps1

    When prompted, type the app-server-admin-password.

    The response should indicate that you successfully started the instance:

    Command start-instance executed successfully.

Setting Up Portal Server on ps1

This task consists of the following procedures:

ProcedureTo Install Portal Server on ps1

This procedure assumes that you are installing Portal Server on Solaris 10 8/07 OS or later version. Hence, no operating system patches need to be installed. The Java ES installer evaluates the state of the operating system and indicates if you need to install a patch. If you are using versions of the operating system older than Solaris 10 8/07 OS, it is better to install any required patches before you begin the actual Portal Server installation procedure.

This procedure runs the Java ES installer in Configure Later mode. After installation is complete, you manually configure a Portal Server instance to run in the Application Server cluster instance (as-cluster-inst-ps1).

The following procedure runs the Java ES installer without saving a state file. You can choose to run the installer and capture your input in a state file (-saveState state-filename). You could then use the state file to re-create the installation if, for example, you needed to reinstall Portal Server.

  1. On ps1, navigate to the directory with the unzipped installer.

    # cd /portdist_71u2/Solaris_sparc

  2. Start the Java ES installer.

    # ./installer

    This procedure uses the GUI installer. The installer can also be run in text mode by using the - nodisplay option.

    The Welcome panel opens.

  3. In the Welcome panel, click Next.

    The Software License Agreement panel opens.

  4. In the Software License Agreement Panel, review the license terms and click Yes, Accept License.

    The Choose Software Components panel opens.

  5. In the Choose Software Components panel, select the following components:

    • Portal Server 7.1

      • Netlet Proxy

      • Rewriter Proxy

    • Portal Server Secure Remote Access 7.1

    • Service Registry 3.1

      • Service Registry Client Support

    Unselect Access Manager and Directory Server, which are automatically selected by the installer.


    Note –

    Service Registry is used by Portal Server to support the Web Services for Remote Portals (WSRP) standard, in particular the WSRP producer implementation, which enables the publishing of portlets for use by remote WSRP consumers. Because the dependency on Service Registry is for such a specialized capability, installation of Service Registry is optional. For that reason, Service Registry was not included in the logical and deployment architectures of the reference configuration.


  6. Click Next.

    The Dependency Warning panel opens.

  7. In the Dependency Warning panel, choose Use Access Manager 7.1 Installed on a Remote Machine and click OK.

    The Specify Installation Directories panel opens.

  8. In the Specify Installation Directories panel, type the following values and click Next.

    Input Field 

    Value 

    Portal Server 

    /opt

    Service Registry 

    /opt

    The installer checks the system, and the System Check panel opens.

  9. In the System Check panel, evaluate the results of the system check.

    If the system check is favorable, click Next.

    The Choose a Configuration Type panel opens.

  10. In the Choose a Configuration Type panel, select Configure Later and click Next.

    The Ready to Install Panel opens.


    Note –

    When you select the Configure Later option, Portal Server and Service Registry files will be copied to the computer, but no configuration takes place. You must configure these components after installation is complete.

    For example, the Configure Now option would have automatically deployed Portal Server in the default Domain Administration Server instance. However, you want instead to deploy Portal Server in a clustered Application Server instance. Therefore, you install in Configure Later mode, and subsequently create the Portal Server instance and deploy it to the Application Server cluster instance, as-cluster-inst-ps1.


  11. In the Ready to Install panel, indicate whether you want to open the software registration window during installation.

    This panel enables you to register the components that you have selected for installation with Sun Connection. Sun Connection is a Sun-hosted service that helps you track, organize, and maintain Sun hardware and software. For example, Sun Connection can inform you of the latest available security fixes, recommended updates, and feature enhancements.

    If you choose to register, information about the installation is sent to the Sun Connection database. You can also register at a later date, after installation has been completed.

  12. Click Install.

    The installer copies files to the computer.

  13. When the installation is complete, review the installation in the Summary field.

  14. Click Exit to exit the installer.

  15. Check the installation log files for any installation errors.

    # cd /var/sadm/install/logs

    # egrep -i 'fail|error' Java*

ProcedureTo Create a Portal Server Instance on ps1

This procedure uses the psconfig command and a configuration file to create a portal (pstestPortal) as well as a Portal Server instance (ps-inst-ps1) and a search instance (search-inst-ps1) that are both associated with the portal. The procedure deploys the search instance into the non-cluster Application Server instance on ps1 (as-inst-ps1) and the portal Server instance into all instances in Application Server cluster (pscluster).

You begin with an appropriate example configuration file as a template and edit the file to specify parameter values that are needed for the reference configuration.

  1. Create a config-ps1 configuration file.

    Use the example14.xml file as a template.

    # cd /opt/SUNWportal/samples/psconfig

    # cp example14.xml config-ps1.xml

  2. Open the config-ps1.xml file in a text editor.

  3. Modify config-ps1.xml to use the non-default values in the following table:

    Parameter 

    Value 

    AdministratorUserPassword (@ADMIN.PASSWORD@) 

    access-manager-admin-password

    LDAPUserIdPassword (@AMLDAP.PASSWORD@) 

    access-manager-LDAP-password

    DirectoryManagerPassword (@DIRMGR.PASSWORD@) 

    directory-manager-password

    SearchServerID 

    search-inst-ps1

    Host (@HOST.DOMAIN@) 

    ps1.pstest.com

    Port (Search instance) 

    5050

    WebContainerInstanceName (Search instance) 

    as-inst-ps1

    WebContainerInstanceDir (Search instance) 

    /var/opt/SUNWappserver/nodeagents/na-ps1/as-inst-ps1

    WebContainerDocRoot (Search instance) 

    /var/opt/SUNWappserver/nodeagents/na-ps1/as-inst-ps1/docroot

    WebContainerAdminPort (@ADMIN.PORT@) 

    4849

    WebContainerAdminPassword (@PASSWORD@) 

    app-server-admin-password

    WebContainerMasterPassword (@MASTER.PASSWORD@) 

    app-server-master-password

    PortalAccessURL 

    http://ps.pstest.com:80/portal

    PrimaryPortalHost 

    ps1.pstest.com

    PortalID 

    pstestPortal

    InstanceID (Portal Server instance)  

    ps-inst-ps1

    Port (Portal Server instance) 

    80

    WebContainerInstanceName (Portal Server instance) 

    pscluster

    WebContainerInstanceDir (Portal Server instance) 

    /var/opt/SUNWappserver/nodeagents/na-ps1/as-cluster-inst-ps1

    WebContainerDocRoot (Portal Server instance) 

    /var/opt/SUNWappserver/nodeagents/na-ps1/as-cluster-inst-ps1/docroot

  4. Save the modified config-ps1.xml file.

    The modified file is reproduced in Example Configuration File: Portal Server Instance on ps1.

  5. Run the psconfig command.

    # /opt/SUNWportal/bin/psconfig --config /opt/SUNWportal/samples/psconfig/config-ps1.xml

    The response should resemble the following:

    Successfully created PSConfig.properties file
    Copying config templates from: /opt/SUNWportal/template/config
    Successfully created PortalDomainConfig.properties file
    Validating the Input Config XML File
    Configuring Cacao Agent for Portal Software
    Configuring Derby Server Instance
    Connecting to Cacao MBean Server
    Creating Portals
    Domain domain1 started
    Successfully created Portal: pstestPortal
    Configuring Samples

ProcedureTo Modify the Configuration of the Portal Server Instance on ps1

The previous procedure deployed Portal Server by using pscluster as the target Application Server instance. The instance.id entry, however, needs to be targeted to as-cluster-inst-ps1, rather than to the cluster. The following procedure removes this entry from the pscluster configuration and adds it to the as-cluster-inst-ps1 configuration.

  1. Remove the instance.id entry from the cluster configuration.

    # /opt/SUNWappserver/sbin/asadmin delete-jvm-options --user admin --target pscluster "-Dcom.sun.portal.instance.id=ps-inst-ps1"

    When prompted, type the app-server-admin-password.

    The response should indicate that you successfully removed the instance from the cluster configuration:

    Command delete-jvm-options executed successfully.

  2. Add the instance.id entry to the as-cluster-inst-ps1 configuration.

    # /opt/SUNWappserver/sbin/asadmin create-system-properties --user admin --target as-cluster-inst-ps1 com.sun.portal.instance.id=ps-inst-ps1

    When prompted, type the app-server-admin-password.

    The response should indicate that you successfully added Portal Server instance information to the Application Server instance on ps1:

    Command create-system-properties executed successfully.

  3. Restart the pscluster cluster.

    The cluster needs to be restarted for changes in configuration to take effect.

    # /opt/SUNWappserver/sbin/asadmin stop-cluster --user admin pscluster

    # /opt/SUNWappserver/sbin/asadmin start-cluster --user admin pscluster

ProcedureTo Start and Verify Portal Server on ps1

You start the Portal Server instance by restarting the Application Server instance (as-cluster-inst-ps1) in which it is deployed. You then verify that the instance is running by accessing the portal Welcome page in a browser.

  1. Stop the Application Server instance.

    # /opt/SUNWappserver/sbin/asadmin stop-instance --user admin as-cluster-inst-ps1

    When prompted, type the app-server-admin-password.

    The response should indicate that you successfully stopped the instance:

    Command stop-instance executed successfully.

  2. Restart the Application Server instance.

    # /opt/SUNWappserver/sbin/asadmin start-instance --user admin as-cluster-inst-ps1

    When prompted, type the app-server-admin-password.

    The response should indicate that you successfully started the instance:

    Command start-instance executed successfully.

  3. Verify that the Portal Server instance is running.

    1. Start a browser.

    2. Go to the following URL:

      http://ps1.pstest.com:80/portal/welcome

      The portal Welcome page opens, confirming that your Portal Server instance is running.

Setting Up Portal Server on ps2

This task consists of the following procedures:

ProcedureTo Install Portal Server on ps2

To properly set up Portal Server on ps2, Access Manager SDK must be configured manually. As a result, Access Manager SDK is installed with Portal Server on ps2 using the Configure Later option of the installer rather than being installed with Application Server using the Configure Now option (as it was on ps1).

  1. Repeat the procedure that appears in To Install Portal Server on ps1, except for the following:

    In the Choose Software Components panel (Step 5), select the following components:

    • Portal Server 7.1

      • Netlet Proxy

      • Rewriter Proxy

    • Portal Server Secure Remote Access 7.1

    • Access Manager 7.1

      • Access Manager SDK

    • Service Registry 3.1

      • Service Registry Client Support

    Unselect Directory Server, which is automatically selected by the installer.

ProcedureTo Configure Access Manager SDK on ps2

Because Access Manager SDK was installed using the Configure Later option, you need to configure Access Manager SDK by modifying Access Manager configuration files. The standard approach for making these modifications is to run the amconfig command with an input file.

  1. Change to the directory that contains the amconfig input file template, amsamplesilent.

    # cd /opt/SUNWam/bin

  2. Copy the template to a new file.

    # cp amsamplesilent amconfigps2

  3. In a text editor, edit the amconfigps2 file to set the Access Manager SDK configuration parameters.

    Locate the configuration parameters that are listed in the following table, and change their values to the values shown in the table.

    Parameter 

    Value 

    DEPLOY_LEVEL 

    4

    SERVER_Name 

    am

    SERVER_HOST 

    am.pstest.com

    SERVER_PORT 

    80

    ADMIN_PORT 

    4849

    DS_HOST 

    ds.pstest.com

    DS_DIRMGRPASSWD 

    directory-manager-password

    ROOT_SUFFIX 

    "dc=pstest,dc=com"

    ADMINPASSWD 

    access-manager-admin-password

    AMLDAPUSERPASSWD 

    access-manager-LDAP-password

    COOKIE_DOMAIN 

    pstest.com

    AM_ENC_PWD 

    password-enc-key

    NEW_OWNER 

    root

    NEW_GROUP 

    other

    PAM_SERVICE_NAME 

    other

    AS81_INSTANCE 

    pscluster

    AS81_INSTANCE_DIR 

    /var/opt/SUNWappserver/nodeagents/na-ps2/as-cluster-inst-ps2

    AS81DOCS_DIR 

    /var/opt/SUNWappserver/nodeagents/na-ps2/as-cluster-inst-ps2/docroot

  4. Run the amconfig command with the input file you modified in Step 3.

    # /opt/SUNWam/bin/amconfig -s amconfigps2

    The output should show failures after checking if Application Server is already configured with Access Manager. These errors are expected because the Access Manager configuration was already added to the Application Server cluster configuration when Access Manager SDK was installed and configured on ps1.

  5. Verify that the Access Manager SDK is properly configured.

    # /opt/SUNWam/bin/amadmin —u amadmin —m http://am.pstest.com:80

    When prompted, type the access-manager-admin-password.

    The output should show current session information.

ProcedureTo Create a Portal Server Instance on ps2

When you created a Portal Server instance (ps-inst-ps1) on ps1 (see To Create a Portal Server Instance on ps1), you deployed Portal Server to pscluster and created additional portal and instance configuration information on ps1.

To create a Portal Server instance (ps-inst-ps2) on ps2, you need to set up the portal's administrative infrastructure that is needed to copy the portal and instance configuration information from ps1 to ps2.

In addition, before you can use the portal's administrative interface to create ps-inst-ps2, you must remove ps_util.jar from the pscluster classpath, as described in the following procedure. If you try to run the psadmin -create-instance command without first removing ps_util.jar, psadmin will detect the presence of ps_util.jarand exit without creating a new instance.

The following procedure sets up the portal's administrative infrastructure, removes ps_util.jar from the pscluster classpath, creates a custom configuration file for creating ps-inst-ps2, and then uses the psadmin -create-instance command to create the new instance.

You begin with an appropriate example configuration file as a template and edit the file to specify parameter values that are needed for the reference configuration.

  1. Set up the portal's administrative infrastructure.

    1. Create a config-ps2 configuration file.

      Use the example2.xml file as a template.

      # cd /opt/SUNWportal/samples/psconfig

      # cp example2.xml config-ps2.xml

    2. Open the config-ps2.xml file in a text editor.

    3. Modify the config-ps2.xml file to use parameter values that are appropriate for the reference configuration.

      The modified config-ps2.xml file is reproduced in Example Configuration File: Portal Server Instance on ps2.

    4. Run the psconfig command:

      # /opt/SUNWportal/bin/psconfig --config /opt/SUNWportal/samples/psconfig/config-ps2.xml

      The response should resemble the following:

      Logs redirected to /var/opt/SUNWportal/logs/config/portal.fabric.0.0.log
      Creating directory: /etc/opt/SUNWportal
      Successfully created PSConfig.properties file
      Copying config templates from: /opt/SUNWportal/template/config
      Successfully created PortalDomainConfig.properties file
      Validating the Input Config XML File
      Configuring Cacao Agent for Portal Software
      Configuring Derby Server Instance
      Closing MBean Server connection ...
      Resetting log level ...
      Configuration Successful
  2. Remove ps_util.jar from the pscluster classpath.

    1. Start a browser.

    2. Go to the following URL:

      https://ps1.pstest.com:4849

      The Application Server login page opens.

    3. Log in to the Application Server Admin Console by typing the following values and clicking Login.

      Input Field 

      Value 

      User ID 

      admin

      Password 

      app-server-admin-password

      The Application Server Admin Console opens.

    4. Click on the small triangle next to Configurations on the Common Tasks panel.

      The configurations are expanded.

    5. Click on the small triangle next to pscluster-config.

      The pscluster configuration is expanded.

    6. Click on JVM Settings.

      The frame on the right shows the configuration options.

    7. In the right frame, select the Path Settings tab.

      The JVM Classpath Settings panel opens.

    8. Remove /opt/SUNWportal/lib/ps_util.jar from the Classpath Suffix list.

    9. Click Save.

    10. Restart the pscluster cluster.

      The cluster needs to be restarted for the change in configuration to take effect. The following commands are run on ps2, but can also be run on ps1 without using the --host option.

      # /opt/SUNWappserver/sbin/asadmin stop-cluster --user admin --host ps1.pstest.com pscluster

      # /opt/SUNWappserver/sbin/asadmin start-cluster --user admin --host ps1.pstest.com pscluster

  3. Create a custom configuration file to use when creating a new Portal Server instance.

    1. Copy the configuration template to a new file.

      # cd /opt/SUNWportal/template

      # cp Webcontainer.properties.SJSAS81 Webcontainer.properties.ps-inst-ps2

    2. Open Webcontainer.properties.ps-inst-ps2 in a text editor.

    3. Set the parameters that are listed in the following table.

      Parameter 

      Value 

      Host 

      ps2.pstest.com

      Port 

      80

      Scheme 

      http

      WebContainerInstallDir 

      /opt/SUNWappserver/appserver

      WebContainerInstanceName 

      pscluster

      WebContainerDomainName 

      domain1

      WebContainerInstanceDir 

      /var/opt/SUNWappserver/nodeagents/na-ps2/as-cluster-inst-ps2

      WebContainerDocRoot 

      /var/opt/SUNWappserver/nodeagents/na-ps2/as-cluster-inst-ps2/docroot

      WebContainerAdminHost 

      ps1.pstest.com

      WebContainerAdminPort 

      4849

      WebContainerAdminScheme 

      https

      WebContainerAdminPassword 

      app-server-admin-password

      WebContainerMasterPassword 

      app-server-master-password

    4. Save your changes and close the file.

  4. Create a new Portal Server instance.

    Execute the following command on ps2:

    # /opt/SUNWportal/bin/psadmin create-instance -u amadmin -p pstestPortal --instance ps-inst-ps2 --webconfig Webcontainer.properties.ps-inst-ps2

ProcedureTo Modify the Configuration of the Portal Server Instance on ps2

The previous procedure deployed Portal Server by using pscluster as the target Application Server instance. The instance.id entry, however, needs to be targeted to as-cluster-inst-ps2, rather than to the cluster. The following procedure removes this entry from the pscluster configuration and adds it to the as-cluster-inst-ps2 configuration.

The following commands are run on ps2, but can also be run on ps1 without using the --host option.

  1. Remove the instance.id entry from the cluster configuration.

    # /opt/SUNWappserver/sbin/asadmin delete-jvm-options --user admin --target pscluster "-Dcom.sun.portal.instance.id=ps-inst-ps2" --host ps1.pstest.com

    When prompted, type the app-server-admin-password.

    The response should indicate that you successfully removed the instance from the cluster configuration:

    Command delete-jvm-options executed successfully.

  2. Add the instance.id entry to the as-cluster-inst-ps2 configuration.

    # /opt/SUNWappserver/sbin/asadmin create-system-properties --user admin --target as-cluster-inst-ps2 com.sun.portal.instance.id=ps-inst-ps2 --host ps1.pstest.com

    When prompted, type the app-server-admin-password.

    The response should indicate that you successfully added Portal Server instance information to the Application Server instance on ps2:

    Command create-system-properties executed successfully.

  3. Restart the pscluster cluster.

    The cluster needs to be restarted for changes in configuration to take effect.

    # /opt/SUNWappserver/sbin/asadmin stop-cluster --user admin pscluster --host ps1.pstest.com

    # /opt/SUNWappserver/sbin/asadmin start-cluster --user admin pscluster --host ps1.pstest.com

ProcedureTo Start and Verify Portal Server on ps2

You start the Portal Server instance by restarting the Application Server instance (as-cluster-inst-ps2) in which it is deployed. You then verify that the instance is running by accessing the portal Welcome page in a browser.

  1. Stop the Application Server instance.

    # /opt/SUNWappserver/sbin/asadmin stop-instance --user admin as-cluster-inst-ps2

    When prompted, type the app-server-admin-password.

    The response should indicate that you successfully stopped the instance:

    Command stop-instance executed successfully.

  2. Restart the Application Server instance.

    # /opt/SUNWappserver/sbin/asadmin start-instance --user admin as-cluster-inst-ps2

    When prompted, type the app-server-admin-password.

    The response should indicate that you successfully started the instance:

    Command start-instance executed successfully.

  3. Verify that the Portal Server instance is running.

    1. Start a browser.

    2. Go to the following URL:

      http://ps2.pstest.com:80/portal/Welcome

      The portal Welcome page opens, confirming that your Portal Server instance is running.

Implementing Load Balancing for the Portal Service

This task consists of the following procedures:

ProcedureTo Configure the Load Balancer for the Portal Service

This procedure describes how to configure the portal service load balancer (ps.pstest.com at IP address 10.0.3.11). The steps are relatively generic; the details depend on the load balancer you are using.

  1. Populate the load balancer's Hosts Table.

    Add the IP address for ps1.pstest.com and ps2.pstest.com to the load balancer's hosts table.

  2. Populate the load balancer's Real Service Table.

    Add the real services for ps1.pstest.com and ps2.pstest.com. A real service is identified by its IP address and port. Add 10.0.2.3:80 and 10.0.2.4:80.

  3. Populate the load balancer's Service Group Table.

    Add the service group for portal services. The service groups are sets of the real services that you defined in Step 2. The real services in the group must be capable of fulfilling the same type of request. The load balancer will distribute requests among the real services in the service group. When you define the service group for the ps.pstest.com, you add the real services that specify the Portal Server instances, 10.0.2.3:80 and 10.0.2.4.80.

  4. Populate the load balancer's Virtual IP Table

    A virtual service definition includes the outward-facing IP address and the port at which the load balancer accepts requests for a service, as well as the service group that you specified in Step 3, which actually handles the requests. The load balancer will accept requests at the virtual service address and distribute them among the service group. The virtual service definition for the Portal Server service should be ps.pstest.com, with the virtual IP address of 10.0.3.11:80, and with the service group consisting of the computers ps1.pstest.com and ps2.pstest.com.

  5. Configure the load balancer to use Layer-7 (HTTP layer) load balancing.

  6. Configure the load balancer with a scheduling type of either least connections or round robin.

    Both scheduling types initially distribute the connections evenly between the Portal Server instances. Both scheduling types keep the connections evenly distributed if the connections are restarted.

  7. Configure the load balancer for sticky routing.

    The portal service load balancer must maintain session persistence; it must route all user requests subsequent to the first request, to the same Portal Server instance (except in the case of failure).

    There are two options for sticking the user's portal session to the same Portal Server instance:

    • Load balancer passive cookies (also known as managed cookies). If your load balancer has this feature, it is the preferred solution.

    • Portal Server provides a mechanism analogous to the Access Manager's amlbcookie. You can specify the name of a cookie (for example, pslbcookie) in the lb.cookie.name property of the following file on both ps1 and ps2: /var/opt/SUNWportal/portals/pstestPortal/config/desktopconfig.properties

      Each Portal Server instance assigns a value to this cookie at runtime. The value, which identifies the Portal Server instance, has the following syntax:

      <portalID>.<instanceID>

      For example, in the reference configuration, the value of the cookie for ps1.pstest.com will be pstestPortal.ps-inst-ps1 and for ps2.pstest.com the value will be pstestPortal.ps-inst-ps2.

      The load balancer is configured for session persistence using this cookie.

  8. Configure the health-check settings for the load balancer.

    The recommended settings are specified in Table 3–5.

ProcedureTo Verify Load Balancing for the Portal Service

This procedure verifies that you can interact with Portal Server instances through the load balancer and that the load balancer provides service failover when a Portal Server instance fails.

  1. Configure the Portal Server instances on ps1 and ps2 to support session cookies.

    Portal Server provides a mechanism that is analogous to the Access Manager's amlbcookie in which you can specify the name of a session cookie, as follows:

    1. In a text editor, open the following configuration file:

      /var/opt/SUNWportal/portals/pstestPortal/config/desktopconfig.properties

    2. Specify the name of a session cookie, as follows:

      lb.cookie.name=pslbcookie

      Each Portal Server instance assigns a value to this cookie at runtime. The value, which identifies the Portal Server instance, has the following syntax:

      <portal ID>.<instance ID>

  2. Restart the Portal Server instances on ps1 and ps2 by restarting the Application Server instances in which they are deployed.

    See To Start and Verify Portal Server on ps1 and To Start and Verify Portal Server on ps2.

  3. Log in to the DeveloperSample desktop.

    1. Open the portal service in a browser.

      Use the load balancer URL:

      http://ps.pstest.com/portal

      The portal Welcome page opens.

    2. On the Samples box, click on the DeveloperSample.

      The anonymous desktop for the DeveloperSample should be displayed.

    3. Log in by typing the following values and clicking Login.

      Input Field 

      Value 

      User ID 

      developer 

      Password 

      developer 

      The DeveloperSample desktop is displayed.

  4. Determine which Portal Server instance handled the login request in Step 3.

    You can determine the instance by opening the pslbcookie cookie in your browser and checking it's instance ID value. For example in the Firefox browser, do the following:

    1. Choose Edit->Preferences->Privacy->Show Cookies.

    2. Select the pstest.com portal.

    3. Select the pslbcookie cookie.

    4. Note the instance ID in the Content field.

      For example, the value of the cookie for ps1.pstest.com will be pstestPortal.ps-inst-ps1, and for ps2.pstest.com the value will be pstestPortal.ps-inst-ps2.

  5. Simulate a failure of the Portal Server instance that was noted in Step 4.

    Failure of an Portal Server instance can result from a computer failure, a software failure, or a network failure. The method employed for simulating a failure in this service failover verification procedure is to shut down the Portal Server instance (by shutting down the Application Server instance in which it runs). Additionally, you could also simulate failure by unplugging the network cable or disabling the interface.

    Run the following command on the computer (ps1 or ps2) hosting the instance identified in Step 2.

    # /opt/SUNWappserver/sbin/asadmin stop-instance --user admin as-cluster-inst-ps1|ps2

    When prompted, type the app-server-admin-password.

  6. Repeat Step 3, above (log in to the DeveloperSample desktop).

    If service failover is working correctly, the portal Welcome page opens, confirming that the load balancer has routed the login request to the remaining online Portal Server instance.

  7. Recover the simulated failure of your original Portal Server instance.

    Restart the Application Server instance that was shut down in Step 5.

    # /opt/SUNWappserver/sbin/asadmin ststt-instance --user admin as-cluster-inst-ps1|ps2

    When prompted, type the app-server-admin-password.

Implementing Portlet Session Failover

The following procedures use of an example portlet(PortletSessionCounter) to demonstrate how to set up and test portlet session failover. PortletSessionCounter is a portlet that stores session state information. In particular, it counts the number of times a user interacts with the portlet by accessing the developer desktop.

To implement portlet session failover, you first enable high availability for the Application Server cluster in which your Portal Server instances are running. You then deploy and set up high availability for the portlet. As a result, session state information that is created by the portlet will be saved in the Application Server's High Availability Session Store (HADB). If a Portal Server instance fails, the session state information is made available to a failover Portal Server instance.

This section consists of the following procedures.

ProcedureTo Configure the Availability Service for pscluster

To implement portlet session failover, you must first create an HADB cluster and configure Application Server availability service settings for pscluster, as described in this procedure.

  1. Create an HADB cluster and add it to your Application Server cluster.

    Run the following command on either ps1 or ps2:

    # /opt/SUNWappserver/sbin/asadmin configure-ha-cluster --user admin --hosts ps1.pstest.com,ps2.pstest.com pscluster

    When prompted, type the app-server-admin-password.

  2. Start the Application Server Admin Console.

    1. Start a browser.

    2. Go to the following URL:

      https://ps1.pstest.com/4849

      The Application Server Admin Console login page opens.

    3. Log in to the Application Server Admin Console by typing the following values and clicking Login.

      Input Field 

      Value 

      User ID 

      admin

      Password 

      app-server-admin-password?

      The Application Server Admin Console opens.

  3. Modify Availability Service settings.

    1. Click on the small triangle next to Configurations in the left pane under Common Tasks.

      The configurations are expanded.

    2. Click on the small triangle next to pscluster-config.

      The pscluster configuration is expanded.

    3. Click on the Availability Service.

      The Availability Service settings are displayed in the right pane.

    4. Type the Availability Service settings shown in the following table.

      Input Field 

      Value 

      Availability Service 

      Enabled

      Store Pool Name 

      pscluster-hadb-pool

      Ha-agent-hosts 

      10.0.2.3, 10.0.2.4

      Ha-agent-ports 

      1862

      Ha-db-name 

      pscluster

    5. Click Save.

  4. Close the Console.

  5. Verify that HADB is working and that ps1 and ps2 are part of the HADB cluster.

    1. Check the HADB status.

      # /opt/SUNWhadb/4.4.3-5/bin/hadbm status pscluster

      When prompted, type the app-server-admin-password.

      The status of the pscluster high availability database should be FaultTolerant.


      Database  Status 
      pscluster FaultTolerant
    2. Check that ps1 and ps2 are part of the HADB cluster.

      # /opt/SUNWhadb/4.4.3-5/bin/hadbm status --nodes pscluster

      When prompted, type the app-server-admin-password.

      When prompted, type the app-server-master-password.

      All Application Server nodes should be in the running state.


       NodeNo HostName       Port  NodeRole NodeState MirrorNode 
       0      ps1.pstest.com 15200 active   running   1
       1      ps2.pstest.com 15220 active   running   0

ProcedureTo Set Up Session Failover for a Portlet

This procedure uses an example Session Counter portlet to demonstrate how to set up portlet session failover. Using this example, the procedure describes how to deploy a portlet into the pstestPortlet portal, enable high availability for the portlet, and create a desktop channel for the portlet.

  1. Download the Session Counter portlet from the Open Portal Portlet Repository site:

    https://portlet-repository.dev.java.net/public/Download.html

    The sessioncounter.war file is downloaded.

  2. Deploy the Session Counter portlet to DeveloperSample in the pstestPortal portal.

    # /opt/SUNWportal/bin/psadmin deploy-portlet -u amadmin -d o=DeveloperSample,dc=pstest,dc=com -p pstestPortal sessioncounter.war

    When prompted, type the access-manager-admin-password.

  3. Enable high availability for the Session Counter portlet.

    # /opt/SUNWappserver/sbin/asadmin set --user admin "domain.applications.web-module.sessioncounter.availability-enabled=true"

    When prompted, type the app-server-admin-password.

  4. Enable high availability for the Portal web application.

    # /opt/SUNWappserver/sbin/asadmin set --user admin "domain.applications.web-module.portal.availability-enabled=true"

    When prompted, type the app-server-admin-password.

  5. Create a channel for the Session Counter portlet.

    1. Create a display profile for the Session Counter portlet.

      Save the display profile document in Example Display Profile: Session Counter Portlet to /tmp/developer-dp.xml.

    2. Add the display profile to the developer user.

      # /opt/SUNWportal/bin/psadmin add-display-profile -u amadmin -d uid=developer,ou=People,o=DeveloperSample,dc=pstest,dc=com -p pstestPortal /tmp/developer-dp.xml

      When prompted, type the access-manager-admin-password.

ProcedureTo Verify Portlet Session Failover

In this procedure, you exercise the Session Counter portlet by successively reloading the developer desktop page in a browser. You first exercise the portlet while the Portal Server instance on ps2 is shut down, noting the session counter value. You then restart the Portal Server instance on ps2 and simulate a failure of the Portal Server instance on ps1so that the portal service fails over to the instance on ps2.

You then continue to refresh the browser and note the session counter value. If portlet session failover is working properly, the session counter value should continue to increase from its value before the failover occurred. If the session counter value is reset to 1, then session failover is not working.

  1. Make sure that ps-inst-ps1 on ps1 is running and that ps-inst-ps2 on ps2 is shut down.

    1. Start ps-inst-ps1 by starting the Application Server instance on ps1 in which it is deployed.

      # /opt/SUNWappserver/sbin/asadmin start-instance --user admin as-cluster-inst-ps1

      When prompted, type the app-server-admin-password.

    2. Shut down ps-inst-ps2 by shutting down the Application Server instance on ps2 in which it is deployed.

      # /opt/SUNWappserver/sbin/asadmin stop-instance --user admin as-cluster-inst-ps2

      When prompted, type the app-server-admin-password.

  2. Create a portlet session on ps1.

    You create a session by accessing the Session Counter portlet on the Developer Sample desktop, as follows:

    1. Open the portal service in a browser:

      http://ps.pstest.com/portal

    2. On the Samples box, click on the DeveloperSample.

      The anonymous desktop for the DeveloperSample should be displayed.

    3. Log in by typing the following values and clicking Login.

      Input Field 

      Value 

      User ID 

      developer 

      Password 

      developer 

      The DeveloperSample desktop is displayed.

    4. Click the Portlet Samples tab.

    5. Look at the Session Counter channel.

      The channel should show (in addition to other information):

      Counter Value in Session is 1.

  3. Click Reload in your browser.

    Now the Session Counter channel should show:

    Counter Value in Session is 2.

    Every time you reload the desktop page, the counter value will increase.

  4. Start ps-inst-ps2.

    # /opt/SUNWappserver/sbin/asadmin start-instance --user admin as-cluster-inst-ps2

  5. Simulate a failure of ps-inst-ps1.

    In the configuration interface for your load balancer (ps.pstest.com), remove the real server instance, ps-inst-ps1, from the service group.

  6. Click Reload in your browser.

    Now the Session Counter channel should show:

    Counter Value in Session is N.

    Where the value of N is one integer greater than the last value in Step 3.

    If session failover is not working, then the channel would show:

    Counter Value in Session is 1.

  7. Recover the simulated failure of the ps-inst-ps1 instance.

    Return to the configuration interface for your load balancer, and re-enable the instance.

Tuning Portal Server Instances

Consider the following issues when tuning Portal Server instances to maximize performance:

Impact of Java DB on Performance

The Portal Service on Application Server Cluster reference configuration includes an instance of Java DB running on ps1. Java DB is the default database used to store configuration and membership data for Portal Server's community feature. Java DB is also used by portlet applications such as wiki, fileshare, and survey.

However, the use of Java DB has an impact on the overall performance of Portal Server. If you do not need the community feature and are not using a portlet application that requires Java DB, you can improve portal service performance by disabling the use of Java DB by the portal desktop and then shutting down the database.


Caution – Caution –

Be careful not to shut down Java DB without disabling Java DB for the desktop, as this action seriously degrades performance.


This section consists of the following procedures:

ProcedureTo Disable the Use of Java DB by the Desktop

  1. On ps1, change to the following directory:

    # cd /var/opt/SUNWportal/portals/portal-ID/config

  2. Edit the communitymc.properties file.

    Remove the jdo entry from the manager.contributors list.

  3. Restart the Portal Server instance by restarting the Application Server instance in which it is deployed.

    1. Stop the Application Server instance.

      # /opt/SUNWappserver/sbin/asadmin stop-instance --user admin as-cluster-inst-ps1

      When prompted, type the app-server-admin-password.

      The response should indicate that you successfully stopped the instance:

      Command stop-instance executed successfully.

    2. Start the Application Server instance.

      # /opt/SUNWappserver/sbin/asadmin start-instance --user admin as-cluster-inst-ps1

      When prompted, type the app-server-admin-password.

      The response should indicate that you successfully started the instance:

      Command start-instance executed successfully.

  4. Repeat Steps 1 through 3 on ps2, except for the following:

    Replace all occurrences of ps1 with ps2, including the instance ID (replacing ps-inst-ps1 with ps-inst-ps2).

ProcedureTo Shut Down Java DB

This procedure is performed only on ps1 where the Java DB instance is running (see Figure 6–1).

  1. Run the following command on ps1:

    # java -cp /opt/SUNWjavadb/lib/derbynet.jar org.apache.derby.drda.NetworkServerControl shutdown

Tuning Application Server Instances

Portal Server performs best when the web container in which it runs is tuned to optimize Portal Server performance. So, you must tune the Application Server instances that host Portal Server. For this module, Portal Server runs in the Application Server instances in the pstest cluster.

In the portal service reference configuration, no other component or application besides Portal Server runs in the Application Server instance. However, if you run other components or applications in the same Application Server instance, then be aware that optimizing the Application Server instance for Portal Server might negatively impact the performance of other components.

This section consists of the following procedures:

ProcedureTo Tune the Application Server Instance for Portal Server on ps1

Tuning the Application Server instances that host Portal Server is performed by using the perftune utility. This utility runs the amtune utility and also performs some tuning of Portal Server thread usage. For additional information about amtune, see Part I, Basic Performance Tuning, in Sun Java System Access Manager 7.1 Performance Tuning and Troubleshooting Guide.

  1. On ps1, change to the following directory:

    # cd /opt/SUNWam/bin/amtune

  2. Open the amtune-env file in a text editor.

  3. Confirm, or if necessary, modify the following values and save the changes.


    WEB_CONTAINER=AS8
    ASADMIN_PORT=80
    DOMAIN_NAME=pstest.com
    AMTUNE_PCT_MEMORY_TO_USE=100
    AMTUNEAMTU_MIN_PERM_SIZE_AS8=128
    AMTUNE_TUNE_WEB_CONTAINER=false
    AMTUNE_MODE=REVIEW

    Also, change all variables that are named CONTAINER_* to point to the as-cluster-inst-ps1 instance:

    CONTAINER_*=/var/opt/SUNWappserver/nodeagents/ps1.pstest.com/as-cluster-inst-ps1


    Note –

    In a Solaris zones deployment, also set AMTUNE_TUNE_OS=false.


  4. Run the perftune utility.

    # /opt/SUNWportal/bin/perftune directory-manager-password app-server-admin-password

    The utility proposes suggested changes.

  5. Review the suggested changes.

    If no undesired changes are proposed, continue to the next step.

  6. Modify the amtune-env file with the following value and save the changes.


    AMTUNE_MODE=CHANGE
  7. Repeat Step 4.

    The utility will make all the changes proposed in Step 4.

  8. Restart the computer.

    Restarting the computer will affect changes to the operating system.

  9. Start the Portal Server instance.

    Starting Portal Server will affect changes made to the web container. You start Portal Server by starting the Application Server instance in which it is deployed.

    # /opt/SUNWappserver/sbin/asadmin start-instance --user admin as-cluster-inst-ps1

    When prompted, type the app-server-admin-password.

    The response should indicate that you successfully started the instance:

    Command start-instance executed successfully.

ProcedureTo Tune the Application Server Instance for Portal Server on ps2

  1. Repeat the procedure in To Tune the Application Server Instance for Portal Server on ps2, except for the following:

    Replace all occurrences of ps1 with ps2.

Taking a Snapshot of the Module

When you have completed deploying the portal service module of the reference configuration, and before you move on to the next module, it is good practice to take a snapshot of the data in the Directory Server instance. By exporting ds-inst-ds1, you preserve the current state of your deployment in case you subsequently need to roll back directory information to this point in the reference configuration deployment process. The directory serves as the repository for service and user configuration information and therefore changes as each reference configuration module is deployed.

ProcedureTo take a snapshot of the directory on ds1

In this procedure you use the db2ldif command to export the directory to an ldif file. If you want to subsequently restore the directory, use an equivalent procedure with the ldif2db command.

  1. On ds1 change directory as follows:

    # cd /var/opt/SunWdsee/ds-inst-ds1

  2. Stop the Directory Server instance.

    # ./stop-slapd

  3. Export the current state of the pstest directory to an ldif file.

    # ./db2ldif -n pstest

    The output should resemble the following:


    ldiffile: /var/opt/SunWdsee/ds-inst-ds1/ldif/2008_05_20_140750.ldif
    [20/May/2008:14:07:56 +0100] - export pstest: Precessed 1000 entries (26%)
    ...
    [20/May/2008:14:08:02 +0100] - export pstest: Precessed 4165 entries (100%)
  4. Rename the ldif file to something meaningful.

    # mv /var/opt/SunWdsee/ds-inst-ds1/ldif/2008_05_20_140750.ldif /var/opt/SunWdsee/ds-inst-ds1/ldif/ps_module_complete.ldif

  5. Restart the Directory Server instance.

    # ./start-slapd