Using the Mobile Foundation on Bluemix service

improve this page | report issue

Overview

This tutorial provides step-by-step instructions to set up a MobileFirst Server instance on Bluemix by using the IBM Mobile Foundation on Bluemix (Mobile Foundation) service.
Mobile Foundation is a Bluemix service that enables quick and easy stand-up of scalable Developer or Production environments of MobileFirst Foundation v8.0 on Liberty for Java runtime.

The Mobile Foundation service offers the following plan options:

  1. Developer: This plan provisions a MobileFirst Server as a Cloud Foundry app on a Liberty for Java runtime. The plan does not support the use of external databases or define multiple nodes and is restricted to development and testing only. The server instance allows you to register any number of Mobile application for development and testing.

    Note: the Developer plan does not offer a persistent database, as such be sure to backup your configuration as explained in the Troubleshooting section.

  2. Developer Pro: This plan provisions a MobileFirst Server as a Cloud Foundry app on a Liberty for Java runtime, and allows users to develop and test any number of mobile applications. The plan requires you to have a dashDB OLTP service in place. The dashDB service is created and billed separately. Optionally, you can add a MobileFirst Analytics Server, deployed on IBM Containers. The Container charges are billed separately. This plan is limited in size and is intended to be used for team-based development and testing activities, not production. Charges depend on the total size of your environment.

  3. Professional Per Capacity: This plan allows users to build, test and run any number of mobile applications in production, regardless of the number of mobile users or devices. It supports large deployments and High Availability. The plan requires you to have a dashDB OLTP service in place. The dashDB service is created and billed separately. Optionally, you can add a MobileFirst Analytics Server, deployed on IBM Containers. The Container charges are billed separately. Charges depend on the total size of your environment.

  4. Professional 1 Application: This plan provisions a MobileFirst Server in a scalable Cloud Foundry app on a Liberty for Java runtime. The plan also requires a dashDB database service, which is created and billed separately. The plan allows users to build and manage a single mobile application. A single mobile application can consist of multiple flavors, such as iOS, Android, Windows, and Mobile Web.

See the service page on Bluemix.net for more information about the available plans and their billing.

Jump to:

Setting up the Mobile Foundation service

To set up the available plans, first follow these steps:

  1. Load bluemix.net, login, and click on Catalog.
  2. Search for Mobile Foundation and click on the resulting tile option.
  3. Optional. Enter a custom name for the service instance, or use the default provided name.
  4. Select the desired pricing plan, then click Create.

    Creating a Mobile Foundation service instance

Setting up the developer plan

  1. Start the MobileFirst Server.
    • You can either keep the server configuration at its basic level and click on Start Basic Server, or
    • Update the server configuration in the Settings tab, and click on Start advanced server.

    During this step a Cloud Foundry app is generated for the Mobile Foundation service, and the MobileFirst Foundation environment is being initialized. This step can take between 5 to 10 minutes.

  2. With the instance ready, you can now use the service.

    Image of Mobile Foundation setup

Setting up the Developer Pro, Professional Per Capacity and Professional 1 Application plans

  1. These plans require an external dashDB transactional database instance.

    Learn more about setting up a dashDB database instance.

    If you have an existing dashDB service instance (DashDB Enterprise Transactional 2.8.500 or Enterprise Transactional 12.128.1400), select the Use Existing Service option, and provide your credentials:

    Image of Mobile Foundation setup

    1.b. If you do not currently have a dashDB service instance, select the Create New Service option and follow the on-screen instructions:

    Image of Mobile Foundation setup

  2. Start the MobileFirst Server.
    • You can either keep the server configuration at its basic level and click on Start Basic Server, or
    • Update the server configuration in the Settings tab, and click on Start advanced server.

    During this step a Cloud Foundry app is generated for the Mobile Foundation service, and the MobileFirst Foundation environment is being initialized. This step can take between 5 to 10 minutes.

  3. With the instance ready, you can now use the service.

    Image of Mobile Foundation setup

Using the Mobile Foundation service

Note: The analytics service is available only in the Dallas and UK regions at this time.

With the MobileFirst Server now running, you are presented with the following Dashboard:

Image of Mobile Foundation setup

Click on Add Analytics to add MobileFirst Analytics support to your server instance. Learn more in the Adding Analytics support section.

Click on Launch Console to open the MobileFirst Operations Console. The default user name is “admin” and the password can be revealed by clicking on the “eye” icon.

Image of Mobile Foundation setup

Server configuration

The basic server instance consists of:

  • A single node (server size: “small”)
  • 1GB memory
  • 2GB storage capacity

Advanced server configuration

Through the Settings tab, you can further customize the server instance with

  • Varying node, memory, and storage combinations
  • MobileFirst Operations Console admin password
  • LTPA keys
  • JNDI configuration
  • User registry
  • TrustStore
  • MobileFirst Analytics configuration
  • DashDB Enterprise Transactional 2.8.500 or Enterprise Transactional 12.128.1400 database selection (available in the Professional 1 Application plan)
  • VPN

Image of Mobile Foundation setup

Adding Analytics support

You can add MobileFirst Analytics support to your Mobile Foundation service instance by clicking on Add Analytics from the service’s Dashboard page. This action provisions an IBM Container with an instance of MobileFirst Analytics Server.

  • When using the Developer plan this action will also automatically hook the Analytics service instance to your MobileFirst Server instance.
  • When using the Developer Pro, Professional Per Capacity or Proffessional 1 Application plans, this action will require additional input from you to select: amount of available Nodes, available Memory and a storage volume.

Once the operation finishes, reload the MobileFirst Operations Console page in your browser to access the Analytics Console.

Learn more about MobileFirst Analytics in the MobileFirst Analytics category.

Applying MobileFirst Server fixes

Updates to the Mobile Foundation on Bluemix services are applied automatically without a need for human intervention, other than agreeing to perform the update. When an update is available, a banner is displayed in the service’s Dashboard page with instructions and action buttons.

Accessing server logs

To access server logs, open the sidebar navigation and click on Apps → Cloud Foundary Apps. Select your service and click on Runtime. Then click the Files tab.

You can find the messages.log and trace.log files in the logs folder.

Tracing

To enable tracing, in order to view DEBUG-level messages in the trace.log file:

  1. In Runtime → Memory and Instances, select your service instance (instance IDs start with 0).
  2. Click the Trace action option.
  3. Input the following trace statement: com.worklight.*=debug=enabled and click Submit trace.

The trace.log file is now available in the above specified location.

Server logs for the Mobile Foundation service

Troubleshooting

The Developer plan does not offer a persistent database, which could cause at times loss of data. To quickly onboard in such cases, be sure to follow these best practices:

  • Every time you make any of the following server-side actions:
    • Deploy an adapter or update any adapter configuration or property value
    • Perform any security configuration such scope-mapping and alike

    Run the following from the command-line to download your configuration to a .zip file:

    $curl -X GET -u admin:admin -o export.zip http://<App Name>.mybluemix.net/mfpadmin/management-apis/2.0/runtimes/mfp/export/all
    
  • In case you recreate your server or lose your configuration, run the following from the command-line to import the configuration to the server:

    $curl -X POST -u admin:admin -F file=@./export.zip http://<App Name>.mybluemix.net/mfpadmin/management-apis/2.0/runtimes/mfp/deploy/multi
    

Further reading

Now that the MobileFirst Server instance is up and running,

Last modified on January 20, 2017