+

Search Tips   |   Advanced Search

Deploy apps from dev to test and prod


Overview

We have built a MobileFirst project containing applications. A WAR file and a set of .wlapp files are created in the bin folder of the project. We now want to deploy the project to a test or production environment. A WAR file is created for every project, regardless of the number of apps it contains.

If we build an entire app, a file named app-name.wlapp is created, containing the code and resources for supported environments. For example...

If we build an app only for specific environments, a file named app-name-env-version.wlapp is created per environment. For example...


Deploy apps

  1. Install administration services and the operations console.

    We can have several MobileFirst runtime environments managed by the same operations console. Verify we have deployment rights for MPF, such as the role of worklightdeployer or worklightadmin. See Assign administration roles to users and groups.

  2. For each application in the project, change the settings in application-descriptor.xml to match the target environment.

    • Settings screen
    • Device provisioning
    • Application authenticity
    • User authentication
    • The Android shared user ID

  3. We may want to look at the settings in...

    Those settings define the default values for the configuration properties on the server. When we deploy the projects on the server, we can replace the default settings in worklight.properties with values relevant for the target environment.

  4. Build each application in either of two ways:

    If we use MobileFirst tools, the project WAR file is named...

      \bin\projectName.war

    This file contains the project configuration that was done in steps 1 and 2 and any classes built from Java code in...

      server/java

  5. Configure a database and deploy the project WAR to the application server with one of these two methods:

  6. Open the operations console of the target environment.

    If the operations console is installed with the default context root, its URL is of the form https://your-remote-server:server-port/worklightconsole. If HTTPS is not supported in the application server, it is the unsecured URL http://your-remote-server:server-port/worklightconsole.

    Important: If we access the operations console through HTTP instead of HTTPS, the MobileFirst administration user password is compromised.

  7. From the operations console, deploy the relevant .wlapp files from the bin folder of the project.

  8. Deploy the adapters from the development environment.

    1. Navigate to the bin folder in your project.

    2. Copy the .adapter file or files.

    3. From the operations console, deploy the .adapter files from the bin folder of the project.


Results

A message is displayed, indicating whether the deployment action succeeded or failed.


Parent topic: Deploy MobileFirst applications to test and production environments