Migrating from MFP 8.0 (Cloud)
This topic is meant for existing IBM® MobileFirst Foundation 8.0 users that want to migrate to the PMF 10.x on the Red Hat® OpenShift® Container Platform (ROCP).
This topic considers that the same ROCP cluster is used during the MFP 8.0 to 10.x migration.
Migration scenario
IBM® MobileFirst Foundation 8.0 → Persistent Mobile Foundation 10.x
Prerequisites
Before you begin the migration process, ensure the following.
- You have
PMF-OpenShift-Pak-<version>. tar.gz
(Provided by Persistent Systems) for PMF 10.x. -
Your mobile client applications (Android, iOS) and IBM MobileFirst Foundation 8.0 adapters are Java™ 17 compatible.
Note: PMF 10.x supports only Java™ 17.
- Backup the database.
Procedure
Proceed as follows.
-
Log in to the cluster by using the following command.
oc login https://<openshift_server_url> -u <username> -p <password>
a. Pull images using Persistent Systems provided public docker hub registry by creating image pull secret using below command.
oc create secret docker-registry -n <NAMESPACE> <PULLSECRET-NAME> --docker-server=<REGISTRY> --docker-username=<USERNAME> --docker -password=<PASSWORD>
Specify the NAMESPACE and PULLSECRET-NAME that you created, as well as the values provided by Persistent System for REGISTRY, USERNAME, and PASSWORD.
b. Optional: To pull images using your own private Docker Hub registry, proceed as follows.
Go to the image directory and push image to private docker hub registry by using the following command.
for i in <IMAGE-NAME>.tar.gz; do docker load -i $i;done
Note: The Elasticsearch component has being replaced by OpenSearch in PMF 10.x. For more information, see Installing and configuring OpenSearch.
-
Migrate the Elasticsearch data to OpenSearch. For more information, see Migrating Elasticsearch data to OpenSearch.
a. Go to
tools/elasticsearch-opensearch-migration
directory of the extracted package and install application prerequisites by running the following command.export PATH=/< extracted path>/tools/elasticsearch-opensearch-migration/node-linux-x64/bin:$PATH cd /<extracted path>/tools/elasticsearch-opensearch-migration/analytics-data-migration-tool npm install node -v
b. Update the
config.json
parameters as required.c. Optional: Data exported from Elasticsearch can be imported into a different tenant in OpenSearch, to do so proceed as follows.
i). Create
tenant.xml
file by using following details.<server> <jndiEntry jndiName="analytics/tenant" value='<TENANT-NAME>'/> </server>
ii). Create a ConfigMap using the
tenant.xml
file by using the following command.oc create ConfigMap analytics-custom-config --from-file=tenant.xml
iii). Provide the created ConfigMap to the Analytics component in the
charts_v1_mfoperator_cr.yaml
CR file.customConfiguration: "analytics-custom-config"
d. Export Elasticsearch data by using the following command.
cd /<extracted path>/tools/elasticsearch-opensearch-migration/analytics-data-migration-tool npm run export -- -b 100
e. Migrate data to OpenSearch by using the following command.
npm run migrate -- -b 100
f. Validate migration by using the following command.
npm run migrate -- -v
-
Upgrade components for PMF.
a. Go to deploy directory of the above extracted package and modify following deployment of YML files.
- service_account.yaml - Provide created imagePullSecret.
- role_binding.yaml - Provide namespace.
-
charts_v1_mfoperator_cr.yaml
- Copy the values from the old version of
charts_v1_mfoperator_cr.yaml
to the newcharts_v1_mfoperator_cr.yaml
file. - Add values for VAPT properties as per your requirement. For more information, see config.properties file parameters.
- Add values for OpenSearch properties in the Analytics component.
opensearch: url: "<OpenSearchURL>" username: "<OpenSearchUser>" password: "<OpenSearchPassword>"
-
Provide create push custom ConfigMap, in version 10.x, we introduced support for multiple apps with different FCM accounts. To use the push feature in 10.x, proceed as follows.
-
Create ConfigMap using different fcm accounts JSON files by using the following command.
oc create ConfigMap push-custom-config --from-file=app1.json,app2.json,appx.json...
-
Provide created ConfigMap to push components.
customConfiguration: " push-custom-config"
. -
Create ConfigMap to map environment variable to JSON files by using the following command.
oc create ConfigMap push-fcm-v1-ConfigMap --from-literal=ENV_APP1=/opt/ibm/wlp/usr/servers/mfpf-push/configDropins/overrides/app1.json --from-literal=ENV_APP2=/opt/ibm/wlp/usr/servers/mfpf-push/configDropins/overrides/app2.json --from-literal=ENV_APPx=...
-
- Copy the values from the old version of
b. Go to deploy directory and apply following commands.
oc apply -f crds/charts_v1_mfoperator_crd.yaml oc apply -f service_account.yaml oc apply -f role.yaml oc apply -f role_binding.yaml oc apply -f deploy/operator.yaml
c. Run the following command to upgrade components CR once PMF operator pod is up and running.
oc apply -f crds/charts_v1_mfoperator_cr.yaml
-
Verify that the consoles are up and running by using the following URLs.
<<protocol>>://<<hostname>>/mfpconsole
-
Deploy the compiled Java 17 adapters and perform testing.