Tutorial for a basic installation of MobileFirst Server

Learn about the MobileFirst Server installation process by walking through a simple configuration, which creates a functional MobileFirst Server for demonstration purposes or tests.

Before you begin

  1. Make sure that the following tool and component are installed:
  2. Use MobileFirst Studio to create a project, which you can then run on MobileFirst Server.

About this task

This tutorial uses a simple configuration to show how to install MobileFirst Server. It is designed as an overview, to show you where to find the following tools and information:
  • Tools to install a MobileFirst Server and the Application Center, and tools to deploy a MobileFirst project.
  • Information about configuring MobileFirst Server and the Application Center.
  • Information about manual MobileFirst Server installation.
    Note: Manual installation provides greater flexibility, but can make the diagnosis of issues more complex, and make the subsequent description of your configuration to IBM Support more difficult.

Installing WebSphere Application Server Liberty Core

About this task

The installer for WebSphere® Application Server Liberty Core is provided as part of the package for IBM MobileFirst Platform Foundation.

Procedure

  1. Load the repository for WebSphere Application Server Liberty Core in IBM Installation Manager and install the product.
    Note: IBM Installation Manager is sometimes referred to as IBM Rational® Enterprise Deployment on the eXtreme Leverage and Passport Advantage® sites, and on the distribution disks. The file names for the images take the form IBM Rational Enterprise Deployment <version number><hardware platform> <language>; for example, IBM Rational Enterprise Deployment V1.6.3.1 Windows Multilingual.

    For more information about loading repositories with IBM Installation Manager, see step 1 of Installing MobileFirst Server. See also the IBM Installation Manager user documentation at https://www.ibm.com/support/knowledgecenter/SSDV2W_1.7.0/com.ibm.cic.agent.ui.doc/helpindex_imic.html.

  2. During the installation process, take note of the installation directory of Liberty.

    You need this information later on in the procedure.

Creating a server for Liberty

About this task

You use this server to install the Application Center and to deploy a MobileFirst project and its console.

Procedure

  1. Go to the installation directory of Liberty. For example, on Windows, if the product is installed with administrator rights, it is located by default in C:\Program Files\IBM\WebSphere\Liberty.
  2. Type the command that creates a server. In this scenario, the server name is simpleServer.
    • On UNIX and Linux systems:
      bin/server create simpleServer
    • On Windows systems:
      bin\server.bat create simpleServer
    The server is created with all default settings. Default settings are sufficient for this tutorial.

    For more information about configuring a Liberty server, read the README.txt file in the Liberty installation directory.

Installing the database management system

About this task

You install a database management system so that you can use this DBMS to install the Application Center and to deploy a MobileFirst project and its console.

Procedure

Proceed as follows, depending on your database system.
  • If you use IBM DB2®, the installer for IBM DB2 is provided as part of the package for IBM MobileFirst Platform Foundation.
    1. Run the installer and follow the instructions.
    2. On Windows, when you are asked whether to install the IBM Secure Shell Server for Windows, say Yes.
    3. In the following steps, you must have a Secure Shell server installed and running so that the MobileFirst tools can create the required databases.
    4. Take note of the user name and password for the DB2 administrator role.
  • If you use MySQL:
    1. Install MySQL on your computer.
    2. Take note of the user name and password for the administrator.
      • By default for some installations, the administrator is root and no password is requested.
      • If no password is requested for the MySQL administrator in your installation, set a password for the administrator. Follow the instructions from the MySQL documentation.
  • If you use Oracle:
    1. Install the Oracle database on your computer.
    2. Install an ssh shell on your computer. On Windows, install cygwin and the openssh package.
    3. Start the ssh server. On Windows, you need administrator rights.
    4. In subsequent steps, you must have that Secure Shell server running.
  • If you use Cloudant®, you can install IBM MobileFirst Platform Cloudant Data Layer Local Edition, which is provided as part of the package for IBM MobileFirst Platform Foundation, or you can use an account at Cloudant.com.
    Important: Application Center does not support Cloudant.

Installing MobileFirst Server

Procedure

  1. Add the MobileFirst Server repository in IBM Installation Manager:
    1. Download the Installation Manager Repository for IBM MobileFirst Platform Server from Passport Advantage.
    2. Extract the file on your disk.
    3. Start IBM Installation Manager.
    4. Select File > Preferences.
    5. In the Preferences dialog, click Add Repositories.
    6. Select the disk1/diskTag.inf file from the repository directory that you extracted.
    7. Click OK and close the Preferences dialog.
  2. Load the repository for MobileFirst Server in IBM Installation Manager and install the product.
    1. In the Configuration Choice panel, select the first choice. This option installs Application Center.
    2. In that Database Choice panel, select the name of the database management system that you installed.
      Restriction: Apache Derby is not supported by the Server Configuration Tool, which is used later in this tutorial.
    3. In the following database panels of the installer:
      • If you use IBM DB2:
        • In the Database Server Properties panel:
          • Enter localhost as the host name.
          • Select the db2jcc4.jar JAR file in the JDBC driver directory (in <DB2InstallDir>/Java).
        • In the Database Server Additional Properties panel:
          • Select Simple Mode.
          • Enter a database user and password. This user must exist.
        • In the Create Database panel:
          • Enter the name and password of a user account on the database server that has DB2 privilege SYSADM or SYSCTRL.
          • The installer creates the database.
      • If you use MySQL:
        • In the Database Server Properties panel:
          • Enter localhost as the host name.
          • Enter the name of the JDBC JAR file for MySQL.
        • In the Database Server Additional Properties panel:
          • Select Simple Mode.
          • Enter a database user and password. This user is already created by the installer.
        • In the Create Database panel:
          • Enter the name and password of a superuser account in your MySQL database server. The default superuser account is root.
          • The installer creates the database.
      • If you use Oracle:
        • In the Database Server Properties panel:
          • Enter localhost as the host name.
          • Enter the name of the JDBC JAR file for Oracle.
        • In the Database Server Additional Properties panel:
          • Select Simple Mode.
          • Enter a password for the user APPCENTER. This user is created by the installer.
          • The installer creates a database if it does not exist.
        • In the Create Database panel:
          • For Administrator Login Name and Passwords, enter an administrator login name and password that can be used to run an ssh session. The default Oracle Administrator Login name is oracle.
          • If the database exists, provide the password of the SYSTEM user that is used to create the user APPCENTER. If the database does not exist, enter the passwords for the SYS and SYSTEM users that are created to manage the database.
    4. In the Application Server Selection panel, select WebSphere Application Server.
    5. In the Application Server Configuration panel, select the installation directory for IBM WebSphere Application Server Liberty Core that is installed in step 2.
    6. Select simpleServer as the server name.
    7. Install the product.
    The files that are described in Distribution structure of MobileFirst Server are installed on your computer.

Exploring Application Center

About this task

Application Center is now functional. The artifacts of the Application Center are deployed into the Liberty server, which now includes the features that Application Center requires, and a demonstration user account exists. The required database also exists.

Procedure

  1. To test the Application Center, start the Liberty server.
    • On UNIX and Linux systems:
      bin/server start simpleServer
    • On Windows systems:
      bin\server.bat start simpleServer
  2. Open the Application Center console by using the program shortcut that the installer creates: IBM MobileFirst Platform Server > Application Center.

    Alternatively, you can enter the URL into a browser window. When a Liberty server is created with default settings, the default URL for Application Center is http://localhost:9080/appcenterconsole/.

  3. Log in to the Application Center with the demonstration account credentials: demo/demo as both the user name and the password.
  4. Explore further by using any of the following resources:

Installing the MobileFirst Server administration components: Administration Services and MobileFirst Operations Console

Procedure

  1. Start the Server Configuration Tool.
    • On Linux, click the desktop menu IBM MobileFirst Platform Server > Server Configuration Tool.
    • On Windows, click Start > IBM MobileFirst Platform Server > Server Configuration Tool.
    • On Mac OS X, in the Finder, double-click the file mf_server_install_dir/shortcuts/configuration-tool.sh.

      The mf_server_install_dir directory is where you installed MobileFirst Server. mf_server is the shortcut for MobileFirst Server.

    Restriction: MobileFirst Server is not supported for production use on Mac OS X.
  2. Select Create a MobileFirst Server Configuration.
  3. Name the configuration My MobileFirst Server.
  4. Do not change the default entries in the Configuration Description panel.
  5. Do not change the default entries in the Console Settings panel, except to create a shortcut file.
  6. To create the mobilefirst-console.url shortcut file, select the Create MobileFirst Server shortcuts checkbox in the Console Settings panel and select a destination directory.
  7. In the Database Properties panel:
    1. Select your database.
    2. Proceed as described in Installing MobileFirst Server when you entered data to create the database for Application Center.
    Note: If you selected Cloudant, you must provide credentials to access an existing valid Cloudant account.
  8. In the Application Server panel:
    1. Proceed as described in Installing MobileFirst Server when you entered data to create the database for Application Center.
    2. Take note of the default password and login: admin (for both).
  9. In the Analytics settings panel, make sure that the check box to connect to MobileFirst Operational Analytics is not selected.
  10. When all the data is entered, click Deploy.
    • The log of the deployment operations is displayed in the console.
    • An Administration - Server deployment folder appears in the tree view under Log Files.
    • After the database operation is completed, an admdatabases log file appears in the tree view.
    • After the deployment to the application server is complete, an admininstall log file appears in the tree view.

Creating a simple MobileFirst project.

You create a MobileFirst runtime environment.

Before you begin

Make sure that MobileFirst Studio is installed. Installing MobileFirst Studio

Procedure

  1. Complete the following steps:
    1. Start MobileFirst Studio.
    2. Create a MobileFirst project by selecting File > New > MobileFirst Project.
    3. Assign the name simpleProject, and accept the default project template Hybrid Application.
    4. In the next panel, name the application simpleApp, and then click Finish.
  2. Build the application.
    1. In the Project Explorer view in MobileFirst Studio, open the project.
    2. Open the apps folder, right-click the subfolder simpleApp, and then click Run As > Run on MobileFirst Development Server.
    3. In the Project Explorer view, open the bin folder that was created by this task.
    4. Right-click simpleProject.war and click Properties.

      The properties show the path to the WAR file. This path is used in Deploying a MobileFirst runtime environment with the Server Configuration Tool. For example, if the path of the Eclipse workspace is C:\workspaces\WorklightStudioWorkspace, the path to the WAR file is C:\workspaces\WorklightStudioWorkspace\simpleProject\bin\simpleProject.war.

Deploying a MobileFirst runtime environment with the Server Configuration Tool

Procedure

  1. In the Server Configuration Tool, click Add a MobileFirst runtime environment to a configuration on the main panel or select Runtime environments > File/Add MobileFirst runtime environment.

    Selecting Runtime environments makes File/Add MobileFirst runtime environment available for selection.

  2. In the dialog box, select the Hello MobileFirst Server configuration that you created in Installing the MobileFirst Server administration components: Administration Services and MobileFirst Operations Console.
  3. In Enter the name of the new runtime, enter First Runtime.
  4. In the MobileFirst runtime environment Configuration Description panel, load the WAR file that you created in the previous part.
  5. In the Database Properties panel, proceed as described in Installing MobileFirst Server when you entered data to create the database for Application Center.

    The database is selected because it is already defined in the configuration.

  6. When all the data is entered, click Deploy.
    • The log of the deployment operations appears in the console.
    • The Runtime appears in the tree view.
    • After the database operation is completed, a databases log file appears in the tree view, under Runtime.
    • After the deployment to the application server is complete, an install log file appears in the tree view, under Runtime.

Restarting the Liberty server and opening the MobileFirst Operations Console

Procedure

  1. Go to the Liberty installation directory and type the following command:
    • On Linux and UNIX systems:
      bin/server stop simpleServer
    • On Windows systems:
      bin\server.bat stop simpleServer
  2. Restart the server by running the following command:
    • On Linux and UNIX systems:
      bin/server start simpleServer
    • On Windows systems:
      bin\server.bat start simpleServer
  3. In the shortcut directory that you specified in the MobileFirst runtime environment Configuration Description panel of the Server Configuration Tool, proceed as follows:
    • On Linux and UNIX systems, run the mobilefirst-console.sh script.
    • On Windows systems, double-click the mobilefirst-console.url file. On Windows 7, this shortcut can appear as mobilefirst-console, with a file type of Internet Shortcut.
    You can see the MobileFirst Operations Console. You can log in with the default user login and password that you created in step Installing the MobileFirst Server administration components: Administration Services and MobileFirst Operations Console (by default admin/admin).

What to do next

For more information about the Server Configuration Tool, see Deploying, updating, undeploying, or upgrading MobileFirst Server by using the Server Configuration Tool.

If you want to use MobileFirst Operational Analytics, see Installing the IBM MobileFirst Platform Operational Analytics.

If you want to explore the MobileFirst Operations Console further, you can complete the following tasks: