Setting up IBM MobileFirst Platform Foundation in WebSphere Application Server cluster environment

You can set up a MobileFirst cluster environment with IBM® WebSphere® Application Server Network Deployment V8.5 and IBM HTTP Server.

About this task

This procedure explains how to set up IBM MobileFirst™ Platform Foundation in the topology shown in Figure 1:
Figure 1. MobileFirst cluster topology with IBM WebSphere Application Server Network Deployment

If you install IBM HTTP Server, the administration components require certain JNDI properties to be configured. For more information, see Using a reverse proxy with server farm and WebSphere Application Server Network Deployment topologies and Defining the endpoint of the MobileFirst Administration services.

The instructions are based on the hardware and software that are listed in the following Table 1 and Table 2 tables.

Table 1. Hardware
Host name Operating system Description
Host1 RHEL 6.2 WebSphere Application Server Deployment Manager and IBM HTTP Server.
Host2 RHEL 6.2 WebSphere Application Server cluster node / server 1
Host3 RHEL 6.2 WebSphere Application Server cluster node / server 2
Host4 RHEL 6.2 DB2® server
Table 2. Software
Name Description
IBM Installation Manager 1.8 Install IBM WebSphere Application Server Network Deployment, IBM HTTP Server , IBM Web Server Plug-ins for WebSphere Application Server, and IBM MobileFirst Platform Foundation.
IBM WebSphere Application Server 8.5 WebSphere Application Server. You need to get the installation repository before you start.
IBM HTTP Server 8.5 IBM HTTP Server. You need to get the installation repository before you start. It is also included in the WebSphere Application Server installation repository.
Web Server Plug-ins 8.5 IBM HTTP Server Plugin. You need to get the installation repository before you start. It is also included in the WebSphere Application Server installation repository.
IBM MobileFirst Platform Foundation V7.1.0 IBM MobileFirst Platform Foundation runtime. You need to get access to the installation repository before you start.
IBM DB2 V9.7 or later DB2 Database. Your DB2 server must be available before you start the IBM MobileFirst Platform Foundation installation.
Ant 1.8.3 Configure IBM MobileFirst Platform Foundation with Liberty Profile Server.

Procedure

  1. Install WebSphere Application Server Network Deployment, IBM HTTP Server, and Web Server Plugins.
    1. On the Host1 machine, log on with the "root" user ID and run IBM Installation Manager to install WebSphere Application Server Network Deployment, IBM HTTP server and Web Server Plugins. This documentation assumes that the applications are installed in the following places:
      WebSphere Application Server Network Deployment home
      /opt/WAS85
      IBM HTTP Server home
      /opt/IBM/HTTPServer
      Web Server Plugins home
      /opt/IBM/HTTPServer/Plugins
    2. Repeat step 1a on Host2 and Host3, but install only WebSphere Application Server Network Deployment.
  2. Create a deployment manager and nodes.
    1. To avoid network errors, add the host name and IP mapping to the /etc/hosts file.
      On Windows:
      Add the IP-to-host mapping to C:\Windows\System32\drivers\etc\hosts.
      On Linux:
      Add the IP-to-host mapping to /etc/hosts.
      For example:
      9.186.9.75 Host1
      9.186.9.73 Host2
      9.186.9.76 Host3
    2. Create a deployment manager and IBM HTTP Server node on Host1. You can change the profile name and profile path to suit your environment.
      1. Create the deployment manager profile. The following command creates a profile named "dmgr:"
        On Windows:
        ./manageprofiles.bat -create -profileName dmgr -profilePath ../profiles/dmgr -templatePath ../profileTemplates/management -enableAdminSecurity true -adminUserName wasadmin -adminPassword wasadmin -serverType DEPLOYMENT_MANAGER
        On Linux:
        ./manageprofiles.sh -create -profileName dmgr -profilePath ../profiles/dmgr506 -templatePath ../profileTemplates/management -enableAdminSecurity true -adminUserName wasadmin -adminPassword wasadmin -serverType DEPLOYMENT_MANAGER
      2. Create an IBM HTTP Server node profile. The following command creates a profile named "ihs":
        On Windows:
        ./manageprofiles.bat -create -profileName ihs -profilePath ../profiles/ihs -templatePath ../profileTemplates/managed
        On Linux:
        ./manageprofiles.sh -create -profileName ihs -profilePath ../profiles/ihs506 -templatePath ../profileTemplates/managed
      3. Start the deployment manager:
        On Windows:
        ./startManager.bat
        On Linux:
        ./startManager.sh
      4. Add an IBM HTTP Server node to the deployment manager. The following command adds the node defined by the "ihs" profile to the deployment manager running on Host1 , and assigns port 8879:
        On Windows:
        ./addNode.bat Host1 8879 -profileName ihs
        On Linux:
        ./addNode.sh Host1 8879 -profileName ihs
      5. From the WebSphere Application Server administrative console, click System administration > Nodes and check that the node is added to the deployment manager.
        Note: Node names might be different from the profile names you specify because WebSphere Application Server automatically generates a display name for a new node.
    3. Create MobileFirst node1 on Host2.
      1. Create a profile for the node. The following command creates a profile named node1:
        On Windows:
        ./manageprofiles.bat -create -profileName node1 -profilePath ../profiles/node1 -templatePath ../profileTemplates/managed
        On Linux:
        ./manageprofiles.sh -create -profileName node1 -profilePath ../profiles/node1 -templatePath ../profileTemplates/managed
      2. Add the node to the deployment manager. The following command adds the node defined by the node1 profile to the deployment manager running on Host1, and assigns port 8879:
        On Windows:
        ./addNode.bat Host1 8879 -profileName node1
        On Linux:
        ./addNode.sh Host1 8879 -profileName node1
    4. Repeat step 2c to create MobileFirst node2 on Host3.
    5. From the WebSphere Application Server administrative console, click System administration > Nodes and check that the nodes you added to the deployment manager are listed.
      Note: Node names might be different from the profile names you specify because WebSphere Application Server automatically generates a display name for a new node.
  3. Create a cluster and add MobileFirst nodes as members.
    1. From the WebSphere Application Server administrative console, click Servers > Clusters > WebSphere application server clusters, and then click New to create a new cluster.
    2. For each MobileFirst node, add a member to the cluster: in the fields provided, enter the required information, and then click Add Member.
    3. From the WebSphere Application Server administrative console, click Servers > Server Types > WebSphere application servers to check that the cluster member servers are listed.
    4. If the status column indicates that nodes are not synchronized, click System Administration > Nodes, and then click Synchronize to synchronize your nodes to the deployment manager.
  4. Install MobileFirst Server on Host1. Ensure that the WebSphere Application Server Network Deployment cluster is created without errors before you begin the installation. For installation instructions, see Installing MobileFirst Server.
  5. Configure the databases. For instructions, see Creating and configuring the databases with Ant tasks.
  6. In MobileFirst Studio, create a MobileFirst project and build a MobileFirst project WAR file. See Artifacts produced during development cycle.
  7. Configure IBM MobileFirst Platform Foundation with the WebSphere Application Server Network Deployment cluster. For instructions, see Deploying a project WAR file and configuring the application server with Ant tasks. Modify the Ant template to match your WebSphere Application Server cluster and database server.
  8. Verify the installation.
    1. Restart the WebSphere Application Server cluster.
    2. From the WebSphere Application Server administrative console, click Resources > JDBC > Data sources, and check that the data sources jdbc/WorklightAdminDS, jdbc/WorklightDS and jdbc/WorklightReportsDS exist. If Application Center is installed, check that the data source jdbc/AppCenterDS exists.
    3. Select the data sources and click Test connection to verify the DB2 database connection. Confirmations similar to the ones in the following messages indicate a successful connection.
    4. Go to Applications > Application Types > WebSphere enterprise applications and check that the MobileFirst Operations Console application is running.
    5. Now that you have deployed IBM MobileFirst Platform Foundation on the two node servers, you can access the MobileFirst Operations Console on each host by browsing to the associated URLs:
      • http://Host2:9080/worklightconsole
      • http://Host3:9080/worklightconsole
      Check that both MobileFirst Operations Console are running.
  9. Configure the IBM HTTP Server.
    1. From the WebSphere Application Server administrative console, go to Servers > Server Types > Web servers, and then click New to create a new IBM HTTP server.
    2. Select the "ihs" node you previously created on Host1, then from the Type list, select IBM HTTP Server, and then click Next.
    3. Enter the IBM HTTP Server home and Web Server Plugins home you previously selected on Host1, and then click Next and save your configuration.
    4. In the administrative console, on the Web servers page, click Generate Plug-in to generate the plug-in configuration file.
      A confirmation message is displayed.
    5. Make a note of the plugin-cfg.xml location displayed in the confirmation message.
    6. In the administrative console, on the Web servers page, click ihs, and then in the Configuration file name field, click Edit.
    7. In the editor, add a was_ap22_module and a WebSpherePluginConfig configuration to your http.conf file by adding the following text:
      On Windows:
      LoadModule was_ap22_module {IHS_Plugin_HOME}/bin/{64bits}/mod_was_ap22_http.dll
      WebSpherePluginConfig {path to}/plugin-cfg.xml
      On Linux:
      LoadModule was_ap22_module {IHS_Plugin_HOME}/bin/{64bits}/mod_was_ap22_http.so
      WebSpherePluginConfig {path to}/plugin-cfg.xml
    8. In the administrative console, on the Web servers page for the "ihs" server, click Plug-in properties.
    9. In the Plug-in Configuration file name field, click View.
    10. Search for the cluster node and MobileFirst URI in the plugin-cfg.xml file. For example:
      <ServerCluster CloneSeparatorChange="false"
        GetDWLMTable="false"
        IgnoreAffinityRequests="true"
        LoadBalance="Round Robin"
        Name="Worklight"
        PostBufferSize="0"
        PostSizeLimit="-1"
        RemoveSpecialHeaders="true"
        RetryInterval="60"
        ServerIOTimeoutRetry="-1">
        <Server CloneID="17oi9lu2o"
          ConnectTimeout="5"
          ExtendedHandshake="false"
          LoadBalanceWeight="2"
          MaxConnections="-1"
          Name="topowas1Node01_server1"
          ServerIOTimeout="900"
          WaitForContinue="false">
          <Transport Hostname="topowas1" Port="9080" Protocol="http"/>
          <Transport Hostname="topowas1" Port="9443" Protocol="https">
            <Property Name="keyring" Value="/opt/Plugins/config/ihs/plugin-key.kdb"/>
            <Property Name="stashfile" Value="/opt/Plugins/config/ihs/plugin-key.sth"/>
          </Transport>
        </Server>
        <Server CloneID="17oi9m7kg"
          ConnectTimeout="5"
          ExtendedHandshake="false"
          LoadBalanceWeight="2"
          MaxConnections="-1"
          Name="topowas2Node01_server2"
          ServerIOTimeout="900"
          WaitForContinue="false">
          <Transport Hostname="topowas2" Port="9080" Protocol="http"/>
          <Transport Hostname="topowas2" Port="9443" Protocol="https">
            <Property Name="keyring" Value="/opt/Plugins/config/ihs/plugin-key.kdb"/>
            <Property Name="stashfile" Value="/opt/Plugins/config/ihs/plugin-key.sth"/>
          </Transport>
        </Server>
      
        <PrimaryServers>
          <Server Name="topowas1Node01_server1"/>
          <Server Name="topowas2Node01_server2"/>
        </PrimaryServers>
      </ServerCluster>
      <UriGroup Name="default_host_Worklight_URIs">
          <Uri AffinityCookie="JSESSIONID"
            AffinityURLIdentifier="jsessionid"
            Name="/appcenterconsole/*"/>
          <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/worklight/*"/>
          <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/applicationcenter/*"/>
      </UriGroup>
      If your configuration file does not include cluster servers and URIs, delete the "ihs" server and create it again.
    11. Optional: On the Plug-in properties page for the "ihs" server, click Request Routing if you want to set a load-balancing policy.
    12. Optional: On the Plug-in properties page for the "ihs" server, click Caching if you want to configure caching.
  10. Start the IBM HTTP server and verify that the server is running.
    1. In the WebSphere Application Server administrative console, go to Servers > Server Types > Web servers.
    2. Select the IBM HTTP server you created (in this example, named "ihs"), and then click Start.
    3. If the server fails to start, check the log file. To find the location of the log file:
      1. In the administrative console, on the Web servers page for the "ihs" server, click Log file.
      2. On the log file page, click the Configuration tab.
      3. The location of the log file is displayed in the Error log file name field.
    4. To verify that the IBM HTTP server is running, enter the URL for the MobileFirst Operations Console in a web browser. For example: http://Host1:80/worklightconsole.

Results

IBM MobileFirst Platform Foundation is now installed on an IBM WebSphere Application Server Network Deployment cluster, and is ready for use.