+

Search Tips   |   Advanced Search

Set up IBM MobileFirst Platform Foundation in WAS cluster

We can set up a MobileFirst cluster environment with IBM WAS ND V8.5 and IBM HTTP Server.

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 WAS ND

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

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

Name Description
IBM Installation Manager 1.6 Install IBM WAS ND, IBM HTTP Server , IBM Web Server Plug-ins for WAS, and IBM MobileFirst Platform Foundation.
IBM WebSphere Application Server 8.5 WebSphere Application Server. You need to get the installation repository before we start.
IBM HTTP Server 8.5 IBM HTTP Server. You need to get the installation repository before we start. It is included in the WAS installation repository.
Web Server Plug-ins 8.5 IBM HTTP Server Plugin. You need to get the installation repository before we start. It is included in the WAS installation repository.
IBM MobileFirst Platform Foundation v6.3.0 IBM MobileFirst Platform Foundation runtime. You need to get access to the installation repository before start.
IBM DB2 V9.7 or later DB2 Database. The DB2 server must be available before we start the MPF installation.
Ant 1.8.3 Configure MPF with Liberty Profile Server.

  1. Install WAS ND, 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 WAS ND, IBM HTTP server and Web Server Plugins. This documentation assumes that the applications are installed in the following places:

      WAS ND 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 WAS ND.

  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. We can change the profile name and profile path to suit the 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 -severType DEPLOYMENT_MANAGER

        On Linux:

        ./manageprofiles.sh -create -profileName dmgr -profilePath ../profiles/dmgr506 -templatePath ../profileTemplates/management -severType 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.

        Node names might be different from the profile names we 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 we added to the deployment manager are listed.

      Node names might be different from the profile names we 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 the nodes to the deployment manager.

  4. Install MobileFirst Server on Host1. Ensure that the WAS ND cluster is created without errors before you begin the installation. For installation instructions, see Install MobileFirst Server.

  5. Configure the databases. For instructions, see Create 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 MPF with the WAS ND cluster. For instructions, see Deploy a project WAR file and configuring the application server with Ant tasks. Modify the Ant template to match the 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/WorklightDS and jdbc/WorklightReportsDS exist.

    3. Select the two 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 operations console application is running.

    5. Now we have deployed MPF on the two node servers, we can access the operations console on each host by browsing to the associated URLs:

      • http://Host2:9080/worklight/console

      • http://Host3:9080/worklight/console

      Check that both 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 the 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 the 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 the 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 to set a load-balancing policy.

    12. Optional: On the Plug-in properties page for the "ihs" server, click Caching 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 the IBM HTTP server is running, enter the URL for the operations console in a web browser. For example: http://Host1:80/worklight/console.


Results

IBM MobileFirst Platform Foundation is now installed on an IBM WAS ND cluster, and is ready for use.


Parent topic: Typical topologies