+

Search Tips   |   Advanced Search

Ant tasks for installation of operations console and administration services

The <installworklightadmin>, <updateworklightadmin>, and <uninstallworklightadmin> Ant tasks are provided for the installation of the operations console and administration services.


Task effects

The <uninstallworklightadmin> Ant task undoes the effects of an earlier run of <installworklightadmin>.

This task...


Attributes and elements

The <installworklightadmin>, <updateworklightadmin>, and <uninstallworklightadmin> tasks have the following attributes:

Attribute Description Required Default
contextroot Common prefix for URLs to admin services, to get information about MobileFirst runtime environments, applications, and adapters No /worklightadmin
id Distinguishes different deployments No Empty
environmentId Distinguishes different MobileFirst environments No Empty
servicewar The WAR file for the administration services No The worklightadmin.war file is in the same directory as the worklight-ant-deployer.jar file.
shortcutsDir Directory where to place shortcuts No None
wasStartingWeight Start order for WAS. Lower values start first. No 1

The <installworklightadmin>, <updateworklightadmin>, and <uninstallworklightadmin> tasks support the following elements:

Element Description Count
applicationserver Application server 1
console Administration console 0..1
database Databases 1
jmx Enable Java Management Extensions 1
property Properties 0..*
user User to be mapped to a security role 0..*


To specify a operations console

The <console> element collects information to customize the installation of the operations console. This element has the following attributes:

Attribute Description Required Default
contextroot URI of the operations console No /worklightconsole
install Indicates whether the operations console must be installed No Yes
warfile Console WAR file No The worklightconsole.war file is in the same directory as the worklight-ant-deployer.jar file.

The <property> element supports the following element:

Element Description Count
property Properties 0..∞

By using this element, we can define our own JDNI properties or override the default value of the JNDI properties provided by the administration services and the operations console WAR files.

For more information about the JNDI properties, see Configure a MobileFirst project in production using JNDI environment entries.


To specify an application server

Use the <applicationserver> element to define the parameters that depend on the underlying application server. The <applicationserver> element supports the following elements. The attributes and inner elements of these elements are described in tables 6 through 13 of Ant tasks for installation of MobileFirst runtime environments.

Attribute Description Count
websphereapplicationserver or was The parameters for WAS. 0..1
tomcat The parameters for Apache Tomcat. 0..1


To specify JMX communication between the MobileFirst Server administration and the project.

Use the <jmx> element to ensure that a JMX connection can be established between the MobileFirst Server administration and the MobileFirst runtime projects. The <jmx> element has the following attributes, which depend on the underlying application server.

Attribute Description Required Default
libertyAdminUser The administrator (for Liberty only) No None
libertyAdminPassword The administrator password (for Liberty only). No None
CreateLibertyAdmin Whether the admin user must be created in the basic registry, if it does not exist (for Liberty only). No true
tomcatRMIPort The RMI port that Apache Tomcat uses to connect to MobileFirst projects (for Tomcat only) No 8686
tomcatSetEnvConfig Prevents automatic modification of setenv.bat and setenv.sh scripts. The valid values are manual and auto. No auto

The libertyAdminUser and libertyAdminPassword attributes are not mandatory, but if you define one of these attributes, also define the other.


To specify a connection to the administration database

The <database> element collects the parameters that specify a data source declaration in an application server to access the administration database.

You must declare a single database: <database kind="WorklightAdmin">. You specify the <database> element similarly to the <configuredatabase> Ant task, except that the <database> element does not have the <dba> and <client> elements. It might have <property> elements.

The <database> element has the following attributes:

Attribute Description Required Default
kind The kind of database (WorklightAdmin) Yes None
validate To validate whether the database is accessible No True

The <database> element supports the following elements. For more information about the configuration of these database elements, see 18 through 28 in Ant tasks for installation of MobileFirst runtime environments.

Element Description Count
db2 Parameter for DB2 databases 0..1
derby Parameter for Apache Derby databases 0..1
mysql Parameter for MySQL databases 0..1
oracle Parameter for Oracle databases 0..1
driverclasspath Parameter for JDBC driver class path 0..1


To specify a user and a security role

The <user> element collects the parameters about a user to include in a certain security role for an application.

Attribute Description Required Default
role A valid security role for the application Yes None
name User name Yes None
password Password if the user needs to be created No None

After you defined users using the <user> element, we can map them to any of the following roles for authentication in the operations console.

For information about which authorizations are implied by the specific roles, see the chapter about the REST Services API.

If users exist in an external LDAP directory, set only the role and name attributes but do not define any passwords.


Parent topic: Reference