IBM Worklight v5.0.5 > Develop IBM Worklight applications > Transport Worklight applications to test and production environmentsTransport an application from development to another environment
Overview
You have built an application in Worklight Studio, with a set of .wlapp files in the bin folder of the project. You now want to deploy the applications to a test or production environment.
- If you build an entire app, a file called app-name.wlapp is created, containing the code and resources of all environments that are supported by your app. For example:
myApp.wlapp
- If you build an app only for specific environments, a file called app-name-env-version.wlapp is created per environment. For example:
myApp-android-1.0.wlapp
Transport an application from development to another environment
- For each application in the project, configure application-descriptor.xml to match new environment.
- Context root
- Settings screen
- WL server root URL.
- Push notification certificates
- Device provisioning
- Application authenticity
- User authentication
- The Android shared user ID
- Change the settings in worklight.properties to match the new environment.
Specify the database by setting...
wl.db.type
...to either...
- MYSQL
- DB2
- DERBY
- ORACLE
...depending on the database.
Set wl.db.jndi.name to the JNDI name for the database as follows:
- On WebSphere Application Server, Full Profile or Liberty Profile:
wl.db.jndi.name=jdbc/WorklightDS- On Apache Tomcat:
wl.db.jndi.name=java:comp/env/jdbc/WorklightDSSpecify the settings for the report database by setting...
wl.reports.db.type
...to...
- MYSQL
- DB2
- DERBY
- ORACLE
Set wl.reports.db.jndi.name to the JNDI name for the database...
- On WAS, Full Profile or Liberty Profile:
wl.reports.db.jndi.name=jdbc/WorklightReportsDS
- On Apache Tomcat:
wl.db.jndi.name=java:comp/env/jdbc/WorklightReportsDS
Specify the properties that describe public WL server access by setting...
- publicWorkLightProtocol
- publicWorkLightPort
- context
You might want to look at worklight.properties that was created during installation. Extract
installation_directory/WorklightServer/worklight.war
...and examine...
WEB-INF/classes/conf/worklight.properties
- Build each application in either of two ways:
- Right-click the application and click...
Run As | Build All and Deploy
- Use the Ant script tool
This creates a projectName.war file in the \bin folder. This file contains the project configuration that was done in steps 1 and 2 and any classes built from Java code in the server/java folder.
- Rename the .war file to context_root.war, where context_root is as set in application-descriptor.xml.
- Deploy the .war file to the remote server
- Open the IBM Worklight Console of the target environment...
http://your-remote-server:server-port/context_root/console
- From the IBM Worklight Console, deploy the relevant .wlapp files from the bin folder of your IBM Worklight project.
You can also deploy the app to the target environment using an Ant task that is provided by IBM Worklight.
- Obtain the adapters from the development environment.
- Navigate to the bin folder in your project.
- Copy the .adapter file or files.
- From the IBM Worklight Console, deploy the .adapter files from the bin folder of your project.
You can also deploy the adapter to the target environment using an Ant task provided with IBM Worklight.
Parent Transport Worklight applications to test and production environments