+

Search Tips | Advanced Search

For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.


Install MobileFirst Analytics with Ant tasks

Learn how to use Ant tasks to deploy MobileFirst Analytics to our application server.


Before you begin

Ensure that you have the necessary WAR and configuration files: analytics-ui.war and analytics-service.war. For more information on the installation artifacts, see Install MobileFirst Server to an application server. The analytics-ui.war and analytics-service.war files are found in the MobileFirst_Platform_Server\analytics.

You must run the Ant task on the computer where the application server is installed, or the Network Deployment Manager for WebSphere® Application Server Network Deployment. If you want to start the Ant task from a computer on which MobileFirst Server is not installed, we must copy the file <mf_server_install_dir>/MobileFirstServer/mfp-ant-deployer.jar to that computer.

Note: The mf_server_install_dir placeholder is the directory where you installed MobileFirst Server.


Procedure

  1. Edit the Ant script that we use later to deploy MobileFirst Analytics WAR files.

    1. Review the sample configuration files in Sample configuration files for MobileFirst Analytics.
    2. Replace the placeholder values with the properties at the beginning of the file.

      Note: The following special characters must be escaped when they are used in the values of the Ant XML scripts:

      • The dollar sign ($) must be written as $$, unless you explicitly want to reference an Ant variable through the syntax ${variable}, as described in Properties section of the Apache Ant Manual.
      • The ampersand character (&) must be written as &amp;, unless you explicitly want to reference an XML entity.
      • Double quotation marks (") must be written as &quot;, except when it is inside a string that is enclosed in single quotation marks.

  2. If you install a cluster of nodes on several servers:

    1. You must uncomment the property wl.analytics.masters.list, and set its value to the list of host name and transport port of the master nodes. For example:

        node1.mycompany.com:96000,node2.mycompany.com:96000

    2. Add the attribute mastersList to the elasticsearch elements in the tasks installanalytics, updateanalytics, and uninstallanalytics.

      Note: If you install on a cluster on WebSphere Application Server Network Deployment, and you do not set the property, the Ant task computes the data end points for all the members of the cluster at the time of installation, and sets the masternodes JNDI property to that value.

  3. To deploy the WAR files, run the following command:

      ant -f configure-appServer-analytics.xml install

    We can find the Ant command in mf_server_install_dir/shortcuts. This installs a node of MobileFirst Analytics, with the default type master and data, on the server, or on each member of a cluster if you install on WebSphere Application Server Network Deployment.

  4. Save the Ant file. You might need it later to apply a fix pack or perform an upgrade.

    If you do not want to save the passwords, we can replace them by "************" (12 stars) for interactive prompting.

    Note: If you add a node to a cluster of MobileFirst Analytics, we must update the analytics/masternodes JNDI property, so that it contains the ports of all the master nodes of the cluster.


What to do next

Parent topic: MobileFirst Analytics Server installation guide