Creating the Cloudant database for MobileFirst Server administration

Learn how to create Cloudant® databases.

General information

To use a Cloudant database, you either need an account at cloudant.com that uses the Cloudant database in the Cloud, or you must install IBM MobileFirst™ Platform Cloudant Data Layer Local Edition on your own hardware, as described in the Cloudant Data Layer Local Edition user documentation. Whether you use cloudant.com or Cloudant Local, the Cloudant database is accessible via http or https, and you must have the URL to access it, as well as a user name and password.

Cloudant account

To create or access a Cloudant database at cloudant.com for the MobileFirst Server administration, you must already have registered a valid account for cloudant.com. The account registration provides you with the following information:
  • The account name: The Cloudant account name is displayed in the URL. For example, the account exampleaccount corresponds to the URL https://exampleaccount.cloudant.com.
    Important: You must always use the https protocol, and not the http protocol, when accessing https://exampleaccount.cloudant.com. Otherwise, your credentials are compromised.
  • A user name: By default, the account name serves also as the administrator user name of the databases that are created in your account. Access is granted per database. By default, all databases that you create are only accessible to your account. If you are using a shared database that is accessible to multiple users, you need a user name that has sufficient permissions to write and read documents of the database.
  • A password to access the account at cloudant.com.
For more information about creating an account at cloudant.com, see the sign up page for IBM® Cloudant.

IBM MobileFirst Platform Cloudant Data Layer Local Edition

If you use a Cloudant Local installation instead of cloudant.com, you must configure the following information:
  • The URL to access your Cloudant Local installation.
  • A user name to access your Cloudant Local installation, which has sufficient permissions to write and read documents in the database.
  • A password for this user in your Cloudant Local installation.
For more information about creating and administering users for Cloudant Local, see Configuring database-level security.

Permissions

The default permissions for a new account at cloudant.com, or at Cloudant Local, are sufficient for the MobileFirst Server administration.

The database can be created through the Cloudant dashboard. The user must have at least the following roles set for your database:
  • _reader: Gives the user permission to read documents from the database.
  • _writer: Gives the user permission to create and modify documents in the database.
  • _admin: Gives the user permission to install and update design documents in the database.

    This permission is needed at least the first time for the application server to access the database after its creation. It is also needed the first time for the application server to access the database after a MobileFirst Server upgrade.

Unlike relational databases, there is no concept of tables in Cloudant, so there is no need to create any tables ahead of time or to set any permissions on tables.

If the database is not already created, it is automatically created when the MobileFirst Server administration is started on the application server. In this case, the user name must be set to the administrator user name of the Cloudant account, because only the administrator has permission to create new databases.

Default database name for MobileFirst Server administration

The default name of the administration database is mfp_admin_db. The database name can be changed through the JNDI property mfp.db.cloudant.adminDbName.