Mobile Foundation service on IBM Cloud
improve this page | report issueOverview
This tutorial provides step-by-step instructions to set up a Mobile Foundation Server instance on IBM Cloud by using the IBM Mobile Foundation on IBM Cloud (Mobile Foundation) service.
Mobile Foundation is a IBM Cloud service that enables quick and easy stand-up of scalable Developer or Production environments of Mobile Foundation v8.0 on Liberty for Java runtime.
The Mobile Foundation service offers the following plan options:
-
Developer: This plan provisions a Mobile Foundation Server as a Cloud Foundry application on a Liberty for Java runtime. Liberty for Java charges are billed separately and are not included in this plan. The plan does not support the use of external databases and is restricted to development and testing. Mobile Analytics is offered at no additional charge with events retained for 6 months. The Mobile Foundation server Developer plan instance allows you to register any number of Mobile applications for development and testing, but it restricts the number of connected devices to 10 per day.
Note: the Developer plan does not offer a persistent database, as such be sure to backup your configuration as explained in the Troubleshooting section.
-
Professional Per Device: This plan allows users to build, test and run up to 5 mobile applications on Mobile Foundation mobile applications in production. Mobile Analytics is offered at no additional charge with events retained for 6 months. This plan supports large deployments and high availability. This plan requires you to have an instance of IBM Db2 (any plan other than the Lite plan) or Compose for PostgreSQL service, which is created and billed separately. This plan provisions a Mobile Foundation server on Liberty for Java, starting with a minimum of 2 nodes of 1 GB. Liberty for Java charges are billed separately and are not included as part of this plan.
-
Professional 1 Application: This plan allows users to build, test and run mobile applications on Mobile Foundation in production. Mobile Analytics is offered at no additional charge with events retained for 6 months. You’re billed based on the number of client devices connected per day. This plan supports large deployments and high availability. This plan requires you to have an instance of IBM Db2 (any plan other than the Lite plan) or Compose for PostgreSQL service, which is created and billed separately. This plan creates a Mobile Foundation server on Liberty for Java, starting with a minimum of 2 nodes of 1 GB. Liberty for Java charges are billed separately and isn’t included as part of this plan.
- Developer Pro: This plan provisions a Mobile Foundation Server as a Cloud Foundry app on a Liberty for Java runtime, and allows users to develop and test any number of mobile applications. This plan requires you to have a Db2 (any plan other than the Lite plan) service instance. The Db2 service instance is created and 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.
The Developer Pro plan is now deprecated.
- 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 Db2 (any plan other than the Lite plan) service instance. The Db2 service instance is created and billed separately. Charges depend on the total size of your environment.
The Professional Per Capacity plan is now deprecated.
See the service details for more information about the available plans and their billing.
Jump to:
- Setting up the Mobile Foundation service
- Using the Mobile Foundation service
- Migrating the Mobile Foundation service plan
- Applying Mobile Foundation server fixes
- Accessing server logs
- Troubleshooting
- Further reading
Setting up the Mobile Foundation service
To set up the available plans, first follow these steps:
- Go to bluemix.net, login, and click on Catalog.
- Search for Mobile Foundation and click on the resulting tile option.
- Optional. Enter a custom name for the service instance, or use the default provided name.
-
Select the desired pricing plan, then click Create.
Setting up the developer plan
Creating the Mobile Foundation service creates the Mobile Foundation Server.
- You can instantly access and work with the Mobile Foundation Server.
- To access the Mobile Foundation Server using CLI you will need the credentials, which are available when you click Service credentials available in the left navigation panel of the IBM Cloud console.
Setting up the Professional 1 Application and Professional Per Device plan
-
These plans require an external Db2 (any plan other than the Lite plan) database instance.
-
If you have an existing Db2 service instance, select the Use Existing Service option, and provide your credentials:
-
If you have an existing Compose for PostgreSQL service instance, select the Use Existing Service option, and provide your credentials:
-
If you do not currently have a Db2 or Compose for PostgreSQL service instance, select the Create New Service option and follow the on-screen instructions:
-
- Start the Mobile Foundation 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 Mobile Foundation environment is being initialized. This step can take between 5 to 10 minutes.
-
With the instance ready, you can now use the service.
Using the Mobile Foundation service
With the Mobile Foundation Server now running, you are presented with the following dashboard:
-
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 in the password field.
-
Click on Analytics Console from the MobileFirst Operations Console to open the Mobile Analytics console and view the analytics data, as shown below.
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
Creating the TrustStore Certificate for Mobile Foundation Service:
-
Take cacerts from the latest fix pack Java 8 JDK of IBM Java or Oracle Java.
-
Import the additional certificate into the TrustStore using the following command:
keytool -import -file firstCA.cert -alias firstCA -keystore truststore.jks
Note : You can choose to create your own TrustStore, but the default certificate needs to made available for Mobile Foundation Service to function properly
-
- VPN
Migrating the Mobile Foundation service plan
Mobile Foundation instances created using the deprecated plans need to be updated to the new plans. Plan update may also be needed based on the instance usage.
Sample scenario: Migrate from the Professional Per Device plan to the Professional 1 Application plan
- From the IBM Cloud dashboard, select the IBM Mobile Foundation instance you want to migrate.
- Select Plan from the left navigation.
- From the listed pricing plans, select Professional 1 Application.
- Click the Save button and confirm the plan migration. Migration to Professional 1 Application is now completed and all the existing data is retained. The billing is changed and there’s no downtime.
- After the plan migration, the Mobile Foundation instance needs to be re-created from the service dashboard for the right configuration to take effect. This update requires a short downtime. You’ll need to plan for the downtime. Select Manage from the left navigation and click Recreate.
Note: If you’re on one of the deprecated plans, you must migrate to a new plan.
Supported plan migrations
- Developer (deprecated) plan can be updated only to the new Developer plan.
- Developer Pro (deprecated) plan can be updated only to Professional Per Device or Professional 1 Application plan.
- Professional Per Capacity (deprecated) plan can be updated only to Professional Per Device or Professional 1 Application plan.
- Professional Per Device plan can be updated only to Professional 1 Application plan.
- Professional 1 Application plan can be updated only to Professional Per Device plan.
- Plan update isn’t supported for the new Developer plan.
Applying Mobile Foundation server fixes
Updates to the Mobile Foundation on IBM Cloud 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, follow the steps described below.
Scenario 1:
- Set up your host machine.
To manage the IBM Cloud Cloud Foundry app, you need to install the Cloud Foundry CLI.
Install the Cloud Foundry CLI. - Open the terminal and log in to your Organization and Space using
cf login
. - Execute the following command in the CLI:
cf ssh <mfp_Appname> -c "/bin/cat logs/messages.log" > messages.log
- Only if trace is enabled, execute the following command:
cf ssh <mfp_Appname> -c "/bin/cat logs/trace.log" > trace.log
Scenario 2:
- To access server logs, open the sidebar navigation and click on Apps → Dashboard → Cloud Foundry Apps.
- Select your App and click on Logs → View in Kibana.
- Select and copy the logs messages.
Tracing
To enable tracing, in order to view DEBUG-level messages in the trace.log file:
- In Runtime → SSH, select your service instance from the combobox (instance IDs start with 0).
- Go to each instance in the console and open the file
/home/vcap/app/wlp/usr/servers/mfp/configDropins/overrides/tracespec.xml
using the vi editor. - Update the following trace statement:
traceSpecification="=info:com.ibm.mfp.*=all"
and save the file.
The trace.log file is now available in the above specified location.
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 Mobile Foundation Server instance is up and running,
- Familiarize yourself with the MobileFirst Operations Console.
- Experience Mobile Foundation with these Quick Start tutorials.
- Read through all available tutorials.
Inclusive terminology note: The Mobile First Platform team is making changes to support the IBM® initiative to replace racially biased and other discriminatory language in our code and content with more inclusive language. While IBM values the use of inclusive language, terms that are outside of IBM's direct influence are sometimes required for the sake of maintaining user understanding. As other industry leaders join IBM in embracing the use of inclusive language, IBM will continue to update the documentation to reflect those changes.