Configuring multiple MobileFirst projects in different environments
Different environments operate independently. For example, with this approach you can host a test environment, a pre-production environment, and a production environment on the same server or in the same WebSphere® Application Server Network Deployment cell.
You can configure multiple projects, either with the same Administration
Services and MobileFirst Operations
Console,
or with separate MobileFirst
environments. An environment consists of the following web applications:
- The Administration Services web application,
- Optionally, the MobileFirst Operations Console web application,
- Some MobileFirst runtime environments or project web applications, each with the appropriate database schemas.
According to your installation method, you specify the environment
as follows:
- If you install with Ant tasks, specify it through the attribute environmentId in the <installworklightadmin> and <configureapplicationserver> invocations.
- If you install manually, specify it through the JNDI property ibm.worklight.admin.environmentid of the Administration Services application, and of the project WAR file.
If you use this approach, you must respect the following constraints:
- Each Administration Services application must use a different administration database or schema.
- Each configuration for a MobileFirst runtime environment must use a different runtime database or schema, and its own reports database or schema.
- Each configuration for a MobileFirst runtime environment must be deployed with the same environmentId attribute as the corresponding Administration Services.
- If the application server is WebSphere Application Server Liberty profile, each MobileFirst project must use a different contextroot attribute and have a different base name for the .war file. But you can rename a .war file before you install it. The id attribute of the Ant tasks is not used in this case.
- If the application server is WebSphere Application Server full profile or WebSphere Application Server Network Deployment, each MobileFirst project must use either a different environmentId attribute or, when installed with Ant tasks and with the same environmentId, a different id attribute. Different deployments with the same contextroot attribute are possible, if they are deployed to separate sets of servers (for example, to different clusters or to different nodes).
- If the application server is Apache Tomcat, each MobileFirst project must use a different contextroot attribute. In addition, the versions of the JDBC drivers must be suitable for all declared data sources of the particular database type.