Sample Ant files for installing administration and runtime environment
MPF includes a number of Ant sample configuration files for installing MobileFirst Server administration and runtime environment.MPF_HOME/WorklightServer/configuration-samples/
- Pick the appropriate sample configuration file
Derby DB2 MySQL Oracle Create DBs with admin credentials create-database-derby.xml create-database-db2.xml create-database-mysql.xml create-database-oracle.xml Install administration and runtime on Liberty configure-liberty-derby.xml configure-liberty-db2.xml configure-liberty-mysql.xml configure-liberty-oracle.xml Install administration and runtime on WAS full profile, single server configure-was-derby.xml configure-was-db2.xml configure-was-mysql.xml configure-was-oracle.xml Install administration and runtime environment on WAS ND configure-wasnd-cluster-derby.xml
configure-wasnd-server-derby.xml
configure-wasnd-node-derby.xml
configure-wasnd-cell-derby.xmlconfigure-wasnd-cluster-db2.xml
configure-wasnd-server-db2.xml
configure-wasnd-node-db2.xml
configure-wasnd-cell-db2.xmlconfigure-wasnd-cluster-mysql.xml
configure-wasnd-server-mysql.xml
configure-wasnd-node-mysql.xml
configure-wasnd-cell-mysql.xmlconfigure-wasnd-cluster-oracle.xml
configure-wasnd-server-oracle.xml
configure-wasnd-node-oracle.xml
configure-wasnd-cell-oracle.xmlInstall administration and runtime environment on Tomcat configure-tomcat-derby.xml configure-tomcat-db2.xml configure-tomcat-mysql.xml configure-tomcat-oracle.xml Upgrade Worklight V5.0.6 on Liberty redeploy506-liberty-derby.xml redeploy506-liberty-db2.xml redeploy506-liberty-mysql.xml redeploy506-liberty-oracle.xml Upgrade Worklight V5.0.6 on WAS full profile, single server redeploy506-was-derby.xml redeploy506-was-db2.xml redeploy506-was-mysql.xml redeploy506-was-oracle.xml Upgrade Worklight V5.0.6 on WAS ND redeploy506-wasnd-cluster-derby.xml
redeploy506-wasnd-server-derby.xml
redeploy506-wasnd-node-derby.xml
redeploy506-wasnd-cell-derby.xmlredeploy506-wasnd-cluster-db2.xml
redeploy506-wasnd-server-db2.xml
redeploy506-wasnd-node-db2.xml
redeploy506-wasnd-cell-db2.xmlredeploy506-wasnd-cluster-mysql.xml
redeploy506-wasnd-server-mysql.xml
redeploy506-wasnd-node-mysql.xml
redeploy506-wasnd-cell-mysql.xmlredeploy506-wasnd-cluster-oracle.xml
redeploy506-wasnd-server-oracle.xml
redeploy506-wasnd-node-oracle.xml
redeploy506-wasnd-cell-oracle.xmlUpgrade Worklight V5.0.6 on Apache Tomcat redeploy506-tomcat-derby.xml redeploy506-tomcat-db2.xml redeploy506-tomcat-mysql.xml redeploy506-tomcat-oracle.xml MySQL in combination with WAS Liberty profile or WAS full profile is not classified as a supported configuration. Consider using a supported database such as IBM DB2.
- Restrict file access rights
To prevent other users on the same computer from learning passwords, remove the read permissions of the file for users other than yourself. For example...
- On UNIX:
chmod 600 configure-file.xml
- On Windows:
cacls configure-file.xml /P Administrators:F %USERDOMAIN%\%USERNAME%:F
For WAS Liberty profile or Apache Tomcat servers where the server is meant to be started only from the user account, also remove the read permissions for users other than yourself from the following file:
- For WAS Liberty profile:
wlp/usr/servers/<server>/server.xml
- For Apache Tomcat:
conf/server.xml
- Special characters in Ant XML scripts
- The dollar sign ($) must be written as $$, unless to reference an Ant variable through the syntax ${variable}
- The ampersand character (&) must be written as &, unless to reference an XML entity.
- Double quotation marks (") must be written as ", except when inside a string enclosed in single quotation marks.
- In the <configureapplicationserver> and <unconfigureapplicationserver> invocations (in target install and uninstall), define MobileFirst properties.
- publicWorkLightHostname
- publicWorkLightProtocol
- publicWorkLightPort
- Ensure the designated databases exist and contain required MPF tables
ant -f configure-file.xml admdatabases
ant -f configure-file.xml databasesThe target admdatabases must be run before the target databases. This is especially important in the case of an upgrade where management data is migrated from the runtime database to the administration database, which needs to have been initialized first by the target admdatabases.
For an initial installation, and if a DBA has not created the databases manually, use the file in row...
Create databases with database administrator credentials
These files add special parameters to the configuredatabase Ant task (the DBA credentials). The parameters enable the Ant task to create a database and a user if required.
- Install the administration services and operations console components onto the application server.
Run the command:
ant -f configure-file.xml adminstall
To install updated administration services and operations console components (for example, to apply a MobileFirst Server fix pack), run the command:
ant -f configure-file.xml minimal-admupdate
To reverse the installation step, run the command:
ant -f configure-file.xml admuninstall
This command uninstalls the administration services and operations console components.
- Install the runtime environment as a .war file onto the application server
Install the war file...
ant -f configure-file.xml install
To install an updated runtime environment onto the application server...
ant -f configure-file.xml minimal-update
To reverse the installation step, run the command:
ant -f configure-file.xml uninstall
This command uninstalls the runtime environment.
At least for WAS, it is a good idea to keep the modified configure-file.xml for later use when you install updates of the project.s .war file. This file makes it possible to redeploy an updated .war file with the same MobileFirst properties. If we use the WAS administrative console to update the .war file, all properties that are configured for this web application are lost.
Parent topic: Reference