Migrating MFP 8.0 (WAS Liberty with Db2) on ROCP
This topic is meant for existing IBM MobileFirst Foundation 8.0 with WebSphere® Liberty with Db2 users that want to migrate to the PMF 9.1 on the Red Hat® OpenShift®.
The migration type is fresh install and existing IBM MobileFirst Foundation 8.0 set up on the WebSphere Liberty is not affected.
This topic does not cover the following scenarios.
- On-prem to On-prem or Cloud to Cloud migration.
- Db2 database migration.
- Red Hat® OpenShift® cluster set up.
- Any changes in the mobile applications resulting due to changes in infrastructure.
Prerequisites
Before you begin the migration process, ensure the following.
- You have not migrated Db2 database.
- You are using this same Db2 database for the PMF 9.1.
- You have set up a Red Hat OpenShift cluster with right number of nodes having sufficient memory and vCPUs.
- PMF Version 9.1 requires Red Hat OpenShift cluster Version 4.15.22.
- You are using
PMF-OpenShift-Pak-<version>. tar.gz
(Provided by Persistent Systems) for PMF 9.1. - Your mobile client applications (Android, iOS) and IBM MobileFirst Foundation 8.0 adapters are Java™ 17 compatible.
Note: Client application is required to be rebuilt and republished if the host and port is changed for the MFP Server. To avoid such changes in the client application, it is recommended that client applications use domain name instead of any fixed IP to connect to MFP backend service and after the migration point the domain name to the PMF backend service.
Procedure
Proceed as follows.
-
Update the product version in the database by following queries.
a. UPDATE SERVER_VERSION SET SERVER_VERSION=’9.1.0’;
b. UPDATE MFPADMIN_VERSION SET MFPADMIN_VERSION=’9.1.0’;
c. UPDATE APPCNTR_VERSION SET APPCNTR_VERSION = ‘9.1.0’;
Note: You must update #a and #b. Update #c if appcenter component from IMF 8.0.0 is used.
-
Log in to PMF 9.1 cluster using OC login command and using correct project namespace.
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>
You can specify the
NAMESPACE
andPULLSECRET-NAME
, but specify the values provided by Persistent System forREGISTRY
,USERNAME
andPASSWORD
.Also ensure that you have already created a namespace in the PMF 9.1 cluster. If not, then create by using the command.
oc new-project
b. If using MFP push notification services, then follow this step to use the new fcm v1 api. Create a new custom
configMap
by using the following command. The file name should befcm-v1-firebase.json
file.oc create configmap <configmap-name> --from-file= fcm-v1-firebase.json
c. Extract
PMF-OpenShift-Pak-<version>. tar.gz
package by using the following command.tar -xvzf PMF-Openshift-Pak-<VERSION>.tar.gz
d. Go inside
deploy
directory of the extracted package and modify following deployment YAML files as stated.service_account.yaml
- provide created imagePullSecret.role_binding.yaml
- provide namespace name.charts_v1_esoperator_cr.yaml
- provide all necessary details and modify following values.-
Enter hostname as per PMF documentation. Change the hostname as per the configured ingress.
ingress: hostname:
-
Change the value of ‘enabled’ to false.
dbinit: enabled: false
-
-
Change the following values for all the components. Check the existing
configure-liberty-db2.xml
file for Db2 connection details.db: type: "db2" host: "" port: "" name: "" secret: "" schema: "" ssl: false sslTrustStoreSecret : " driverPvc: "" adminCredentialsSecret: ""
-
Check the existing MFP 8.0.0 components Db2 connection details in the
configure-liberty-db2.xml
file at the/opt/IBM/MobileFirst_Platform_Server/MobileFirstServer/configuration-samples/
folder and note down database connection details .<property name="database.db2.host" value="*********"/> <property name="database.db2.port" value="*********"/> <property name="database.db2.instance" value="********"/> <property name="database.db2.driver.dir" value="*******"/> <property name="database.db2.mfp.dbname" value="********"/> <property name="database.db2.mfp.schema" value="*******"/> <property name="database.db2.mfp.username" value="*******"/>
-
Change following values for all the components according to your requirements, if required.
resources: requests: cpu: memory: limits: cpu: memory:
-
Change following values for all the components according to your requirements.
replicas: autoscaling: enabled: false min: max: targetcpu:
-
(Optional) Change following values for all the components according to your requirements.
tolerations: enabled: false key: "dedicated" operator: "Equal" value: "ibm-mf-liveupdate" effect: "NoSchedule"
-
(Optional) Change following values for all the components according to your requirements.
pdb: enabled: true min: 1
-
(Optional) Change following values for all the components
keystoreSecret
is used.keystoreSecret: ""
-
Update
pullSecret
created above.pullSecret: ""
-
Create console secrets for mpfserver, mpfappcenter and mfpanalytics components and update secrets name values for these components as per the requirements.
consoleSecret: ""
Use below OCP commands to create console secrets, change username and password as per your requirements before running the command.
oc create secret generic serverlogin --from-literal=MFPF_ADMIN_USER=admin --from-literal=MFPF_ADMIN_PASSWORD=admin oc create secret generic appcenterlogin --from-literal=MFPF_APPCNTR_ADMIN_USER=admin --from-literal=MFPF_APPCNTR_ADMIN_PASSWORD=admin oc create secret generic analyticslogin --from-literal=MFPF_ANALYTICS_ADMIN_USER=admin --from-literal=MFPF_ANALYTICS_ADMIN_PASSWORD=admin
-
Optional: Update the following values as required.
adminClientSecret: "" pushClientSecret: "" liveupdateClientSecret: "" analyticsClientSecret: "" receiverClientSecret: "" internalClientSecretDetails: adminClientSecretId: mfpadmin adminClientSecretPassword: nimdapfm pushClientSecretId: push pushClientSecretPassword: hsup
If any confidential clients are used, then create the corresponding secrets and supply secret name in above attributes.
Note: Ensure to create keystoreSecret secrets if you have any in the MFP 8.0.0.
-
(Optional) To pull images using your own private Docker Hub registry, proceed as follows.
a. Complete the Step#2b and Step#2c of the Procedure section.
b. 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
c. Complete the Step#2d of the Procedure section. d. Complete the Step#3 to Step#12 of the Procedure section.
-
Go to
deploy
directory and apply following commands.oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:<NAMESPACE>:mf-operator oc adm policy add-scc-to-group mf-operator system:serviceaccounts:<NAMESPACE> oc create -f crds/charts_v1_mfoperator_crd.yaml --namespace=<NAMESPACE> oc create -f . --namespace=<NAMESPACE>
Wait for the operator pod to be up and running. Check the operator pod status by following command.
oc get pods
oc apply -f crds/charts_v1_mfoperator_cr.yaml --namespace=<NAMESPACE>
Wait for all PMF pods to be up and running. Check the pod status by following command.
oc get pods
-
Verify that the MFP console is up and running by using the following URLs.
<<protocol>>://<<hostname>>/mfpconsole
-
After PMF setup is tested and looks stable, you need to refresh your mobile applications to point to the new set up. This requires changes in the application as well as publishing the application to the App stores.