Ant tasks for installation of MobileFirst Data Proxy
Reference information for the <installdataproxy>, <updatedataproxy>, and <uninstalldataproxy> Ant tasks.
About the Ant tasks for installing MobileFirst Data Proxy
- a Cloudant® database (either Cloudant Managed or Cloudant Local)
- an Authorization Server that is embedded in a MobileFirst runtime environment.
For a Liberty server, and a stand-alone WebSphere® Application Server, these Ant tasks install a Trust Association Interceptor (TAI), which acts as the front end for performing OAuth authentication of incoming requests to the MobileFirst Data Proxy.
For more information about how to use these Ant tasks, see Installing the MobileFirst Data Proxy with Ant tasks.
For more information about installing a MobileFirst runtime environment, see Installing the MobileFirst runtime environment.
- The MobileFirst Data Proxy is not supported on Apache Tomcat, or on versions of WebSphere Application Server Liberty profile earlier than V8.5.5.0.
- You must install the TAI manually on WebSphere Application Server Network Deployment.
Task effects
- <installdataproxy>
- The <installdataproxy> Ant task configures an application server to run a MobileFirst Data Proxy. This task has the following effects:
- It deploys the MobileFirst Data Proxy WAR file on the application server.
- It configures a TAI on WebSphere Application Server Liberty and WebSphere Application Server standalone, and copies the requested files in the application server in the appropriate locations. On WebSphere Application Server standalone, it creates a configuration file for this TAI if that is required.
- It declares the MobileFirst web application in the specified context root, by default /imf-data-proxy.
- It sets MobileFirst Data Proxy configuration properties through JNDI environment entries.
- On WebSphere Application Server Liberty, it configures the web container.
- <updatedataproxy>
- The <updatedataproxy> Ant task updates the MobileFirst Data Proxy web application, which is already configured, on an application server. This task has the following effects.
- It updates the project WAR file. The file must have the same base name as the project WAR file that was previously deployed.
- It updates the TAI files on WebSphere Application Server Liberty and WebSphere Application Server stand-alone.
- <uninstalldataproxy>
- The <uninstalldataproxy> Ant task undoes the
effects of an earlier <installdataproxy> run.
This task has the following effects.
- It removes the configuration of the MobileFirst Data Proxy web application with the specified context root.
- It removes the MobileFirst Data Proxy WAR file from the application server.
- It removes the associated JNDI environment entries.
Note: It does not remove the TAI JAR and feature manifest files from the application server.
Attributes and elements
The <installdataproxy>, <updatedataproxy>, and <uninstalldataproxy> tasks have the following attributes:
Attribute | Description | Required | Default |
---|---|---|---|
contextroot | Common prefix in URLs to the application (context root) | No | /imf-data-proxy |
id | Distinguishes different deployments | No | Empty |
serviceWar | The WAR file for the MobileFirst Data Proxy. | No | The imf-data-proxy WAR file is in the directory Datastore, at the same level than the WorklightServer directory. |
DBAccount | Cloudant database account, or host name of the MobileFirst Cloudant Local server. | Yes | None |
DBAccountUser | User name for accessing the database. | Yes | None |
DBAccountPassword | Password for accessing the database. | Yes | Queried interactively |
validate | To validate whether the Cloudant database is accessible or not. The possible values are true or false. | No | true |
cloudantPort | Port to access Cloudant. | No | 443 or 80 |
useHttps | To indicate whether the access to Cloudant must use https. The possible values are true or false. | No | true |
- contextroot and id
-
The contextroot and id attributes distinguish different MobileFirst projects.
In WebSphere Application Server Liberty profiles, the contextroot parameter is sufficient for this purpose. In WebSphere Application Server full profile environments, the id attribute is used instead.
- serviceWar
- Use the serviceWar attribute to specify a different directory for the MobileFirst Data Proxy WAR file. You can specify the name of this WAR file with an absolute path or a relative path.
- DBAccount
-
The DBAccount attribute identifies either an Cloudant Managed account name or a user name defined in the configuration of a MobileFirst Cloudant Local database.
- DBAccountUser
- Use the DBAccountUser attribute to specify the
name of a user to connect to Cloudant.
This user name can be an administrator or a non-administrator user. In all cases, the user name you provide must exist in Cloudant as the Ant task does not create it.
- DBAccountPassword
-
Use the DBAccountPassword attribute to specify the password associated to the user specified with attribute DBAccountUser.
- validate
-
When set to true, the validate attribute enables you to check that the Cloudant database identified by attribute DBAccount is on a reachable system and can be accessed using the credentials provided with attributes DBAcountUser and DBAcountPassword. By default, this validation is enabled.
- cloudantPort
-
With the cloudantPort attribute, you can specify a port to access a Cloudant database directly, or a Load Balancer port if a Cloudant haproxy service is used to access the Cloudant database. If this attribute is not specified, the default port is set to 443, unless the useHttps attribute is set to false. In this case, the default port is set to 80.
- useHttps
-
With the useHttps attribute, you can indicate which of the http or https protocol the MobileFirst Data Proxy must use to connect to the Cloudant database. The default protocol used is https.
The <installdataproxy>, <updatedataproxy>, and <uninstalldataproxy> tasks support the following elements:
Element | Description | Count |
---|---|---|
authenticate | TAI | 0 for WebSphere Application Server Network Deployment 1 for WebSphere Application Server Liberty profile and WebSphere Application Server full profile |
applicationserver | application server | 1 |
To install a TAI
Use the <authentication> element to define the TAI and, optionally, the location of the files that implement it. The attributes of this element are described in Table 3.
Attribute | Description | Count | Required | Default |
---|---|---|---|---|
serverURL | The Authorization Server URL | 1 | Yes | None |
taiJAR | The TAI JAR file | 0..1 | No | File com.ibm.worklight.oauth.tai_1.0.0.jar located in a subdirectory external-server-libraries of the directory where you find worklight-ant-deployer.jar |
libertyFeatureManifest | The TAI feature manifest (for Liberty only) | 0..1 | No | File OauthTai-1.0.mf located in a subdirectory external-server-libraries of the worklight-ant-deployer.jar location |
- serverURL
-
Use the serverURL attribute to specify the URL of a MobileFirst project in the form http[s]://hostname:port/context-root, where <context-root> is the context root of a MobileFirst project.
- taiJAR
-
Use the taiJAR attribute to specify a different directory for the MobileFirst Data Proxy TAI JAR file. You can specify the name of this JAR file with an absolute path or a relative path. By default, the Ant task uses the file com.ibm.worklight.oauth.tai_1.0.0.jar that is in a subdirectory external-server-libraries of the directory where worklight-ant-deployer.jar is.
- libertyFeatureManifest
-
Use the libertyFeatureManifest attribute to specify a different directory for the Liberty feature manifest file. You can specify the name of this file with an absolute path or a relative path. By default, the Ant task uses the file OauthTai-1.0.mf that is in a subdirectory external-server-libraries of the worklight-ant-deployer.jar location.
To specify an application server
Element | Description | Count |
---|---|---|
websphereapplicationserver or was | The parameters for WebSphere Application Server. | 1 |