Learn how to use Ant tasks to deploy MobileFirst Analytics
to your 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 Installing 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, you 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
- Edit the Ant script that you use later to deploy MobileFirst Analytics
WAR files.
- Review the sample configuration files in Sample configuration files for MobileFirst Analytics.
- 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 &,
unless you explicitly want to reference an XML entity.
- Double quotation marks (") must be written as ",
except when it is inside a string that is enclosed in single quotation marks.
- If you install a cluster of nodes on several servers:
- 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
- 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.
- To deploy the WAR files, run the following command:
ant -f configure-appServer-analytics.xml install
You 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.
- 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, you can replace them by
"************" (12 stars) for interactive prompting.
Note: If you add a node to a cluster of MobileFirst Analytics,
you must update the analytics/masternodes JNDI property, so that it contains
the ports of all the master nodes of the cluster.