Deploying an application from development to a test or production environment

After you have developed an application, you want to move from your development environment and deploy a MobileFirst project to a test or production environment.

Before you begin

You have built a MobileFirst project that contains one or more applications in MobileFirst tools. A WAR file and a set of .wlapp files are created in the bin folder of your MobileFirst project. You now want to deploy the project and the applications to a test or production environment.
  • A WAR file is created by MobileFirst tools for every MobileFirst project, regardless of the number of apps it contains.
  • If you build an entire app, a file that is called app-name.wlapp is created, containing the code and resources of all environments that are supported by your app. For example: myApp-all.wlapp.
  • If you build an app only for specific environments, a file that is called app-name-env-version.wlapp is created per environment. For example: myApp-iphone-1.0.wlapp.

About this task

First, you prepare the application or applications for deployment, and then you deploy them. You can deploy many apps within the same project. The following instructions lead you through this process.

Procedure

  1. Install the MobileFirst Server administration components as described in Installing the MobileFirst Server administration.

    You can have several MobileFirst runtime environments that are managed by the same MobileFirst Operations Console. Verify that you have deployment rights for IBM MobileFirst™ Platform Foundation, such as the role of worklightdeployer or worklightadmin. For more information, see Configuring user authentication for MobileFirst Server administration.

  2. For each application in the project, change the settings in the application-descriptor.xml file to match your production environment.If necessary, depending on the functions and licensing provisions of the app, change the following settings.
    • Settings screen
    • Device provisioning
    • Application license type. (Only applicable if IBM MobileFirst Platform Foundation version 7.1, Fix Pack 1 or later is installed, and token licensing is activated on the MobileFirst Server.) For more information, see Token licensing: setting the license app type.
    • Application authenticity
    • User authentication
    • The Android shared user ID
    For more information about each setting, see the application descriptor file documentation for your target mobile environment or application type.
  3. You might want to look at the settings in the worklight.properties file, which is in server/conf. Those settings define the default values for the configuration properties on the server. When you deploy your MobileFirst project on the server, you can replace the default settings that are in the worklight.properties file with values that are relevant for the production environment. For more information, see Configuring a MobileFirst project in production by using JNDI environment entries.
  4. Create the project WAR file in either of two ways: The project WAR file is created in the bin folder.
  5. Configure a database and deploy the project WAR to the application server with one of these two methods:
  6. If you want to enable extended authenticity checking, follow the steps in Configuring extended app authenticity checking.
  7. Open the MobileFirst Operations Console of the target environment.

    If the MobileFirst 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 your application server, it is the unsecured URL http://your-remote-server:server-port/worklightconsole.

    Important: If you access the MobileFirst Operations Console through HTTP instead of HTTPS, your MobileFirst administration user password is compromised.
  8. From the MobileFirst Operations Console, deploy the relevant .wlapp files from the bin folder of your MobileFirst project. If you enabled extended authenticity checking in step 6, deploy the .wlapp files that resulted from that procedure, instead.
  9. 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 MobileFirst Operations Console, deploy the .adapter files from the bin folder of your project.

Results

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