OnPrem MFP 8.0 (WebSphere Liberty with DB2) to PMF Cloud 9.1 on OpenShift
AUDIENCES
This document can be referred by customers who run their IBM MobileFirst Foundation 8.0 on WebSphere Liberty with DB2 and wants to migrate it Persistent Mobile Foundation (PMF) 9.1 on OpenShift
SCOPE
The document describes the steps that need to be performed to migrate IBM MobileFirst Foundation 8.0 running on WebSphere Liberty with DB2 to Persistent Mobile Foundation 9.1 on OpenShift
OUT OF SCOPE
- The document doesn’t cover OnPrem to OnPrem or Cloud to Cloud migration scenarios.
- The document doesn’t cover DB2 database migration
- The document doesn’t cover OpenShift cluster set up
- The document doesn’t cover any changes in mobile applications resulted due to changes in infrastructure
MIGRATION TYPE
The migration is a fresh install. Existing IBM MobileFirst Foundation 8.0 set up on OnPrem is not affected.
ASSUMPTIONS
- DB2 Database is not migrated. The same database is used for Persistent Mobile Foundation 9.1 as well
- Customers should set up a OpenShift cluster with right number of nodes having sufficient memory and vCPUs
- Recommended OpenShift cluster version for Persistent Mobile Foundation (PMF) 9.1 is 4.15.22
- Customers should use Persistent Systems provided deployment package for Persistent Mobile Foundation 9.1
- Customers need to take care of changes (host & port changes) in mobile client applications (Android, iOS) due to the changes in domain URL as per the new Persistent Mobile Foundation (PMF) 9.1 set up
- Customers need to ensure that their mobile client applications (Android, iOS) and IBM MobileFirst Foundation 8.0 adapters are Java 17 compatible
PREREQUESITE
Ensure to have completed below prerequisites before proceeding further
- DB2 DATABASE SETUP (if not available already) or Existing DB2 is up and running
- OCP CLUSTER 4.15 (A new cluster)
- PMF-OpenShift-Pak-
. Tar.gz (Provided by Persistent Systems)
IMPORTANT NOTES
NOTE: Client application is required to be rebuilt and republished when MobileFirst Server host & port is changed.
MIGRATION STEPS
Update product version from IMF 8.0.0 to PMF 9.1 into database using below 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: Point A and B are mandatory, point C is only required if appcenter component from IMF 8.0.0 is used.
Deployment
Before executing below steps A and B, ensure that you are logged in to PMF 9.1 cluster using OC login command and using correct project namespace. (Steps A & B need to be performed against PMF 9.1 cluster)
A. To pull images using Persistent Systems provided public docker hub registry, please follow these steps,
a. Create image pull secret using below command,
oc create secret docker-registry -n <NAMESPACE> <PULLSECRET-NAME> --docker-server=<REGISTRY> --docker-username=<USERNAME> --docker-password=<PASSWORD>
NOTE: NAMESPACE and PULLSECRET-NAME decided by customer and REGISTRY, USERNAME and PASSWORD provided by Persistent Systems. Also ensure that you have already created a namespace in the PMF 9.1 cluster. If not, then create it using the command: oc new-project
b. If using IMF push notification services, then follow the below step to use the new fcm v1 api, Create a new custom configmap using below command,
oc create configmap <configmap-name> --from-file= fcm-v1-firebase.json
NOTE: File name should be fcm-v1-firebase.json. Follow PMF documentation to see how to generate fcm-v1-firebase.json file
c. Extract the Persistent Systems provided package PMF-OpenShift-Pak-
d. Go inside deploy directory of the above extracted package and modify following deployment yml files as stated
- service_account.yaml (provide created imagePullSecret name (check point a of A for a pull secret name))
- role_binding.yaml (provide namespace name (PMF 9.1 namespace))
- charts_v1_mfoperator_cr.yaml (Refer CR configuration section in PMF documentation for details): Modify followings values:
#1. Enter hostname as per PMF 9.1 documentation. Change the hostname as per the configured ingress.
ingress:
hostname:
#2. Change ‘enabled’ to false
dbinit:
enabled: false
#3. Change below values for all components (Refer existing configure-liberty-db2.xml for DB2 connection details)
db:
type: "db2"
host: ""
port: ""
name: ""
secret: ""
schema: ""
ssl: false
sslTrustStoreSecret : "
driverPvc: ""
adminCredentialsSecret: ""
To find the existing IMF 8.0.0 DB2 connection details, locate the file on your existing IMF 8.0.0 server /opt/IBM/MobileFirst_Platform_Server/MobileFirstServer/configuration-samples/ configure-liberty-db2.xml and look for following properties:
<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="*******"/>
#4. Change below values for all components according to your requirements if required
resources:
requests:
cpu:
memory:
limits:
cpu:
memory:
#5. Change below values for all components according to your requirements
replicas:
autoscaling:
enabled: false
min:
max:
targetcpu:
#6. Change below values for all components according to your requirements (Optional)
tolerations:
enabled: false
key: "dedicated"
operator: "Equal"
value: "ibm-mf-liveupdate"
effect: "NoSchedule"
#7. Change below values for all components according to your requirements (Optional)
pdb:
enabled: true
min: 1
#8. Change below values for all components if keystoreSecret is used (Optional)
keystoreSecret: ""
Refer PMF documentation on how to set up keystoreSecrets
#9. Update pullSecret as created in section step a
pullSecret: "”
#10. 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
#11. Update below values as per the requirements (optional)
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 IMF 8.0.0 to PMF 9.1 as well, follow PMF documentation to see how to create keystoreSecret
B. To pull images using your own private Docker Hub registry, please follow these steps,
a. Extract the persistent system provided package PMF-OpenShift-Pak-
b. If using IMF push notification services, then follow the below step to use the new fcm v1 api, Create a new custom configmap using below command,
oc create configmap <configmap-name> --from-file= fcm-v1-firebase.json
NOTE: File name should be fcm-v1-firebase.json. Follow PMF documentation to see how to generate fcm-v1-firebase.json file
c. Go to image directory and push image to private docker hub registry using command,
for i in <IMAGE-NAME>.tar.gz; do docker load -i $i;done
(Refer PMF documentation on how to push images to private docker repository for details)
d. Go inside deploy directory of the above extracted package and modify following deployment yml files as stated
- service_account.yaml (provide created imagePullSecret name (check point a of A for a pull secret name))
- role_binding.yaml (provide namespace name (PMF 9.1 namespace))
- charts_v1_mfoperator_cr.yaml (Refer CR configuration section in PMF documentation for details): Modify followings values:
#1. Enter hostname as per PMF 9.1 documentation
ingress:
hostname:
Change the hostname as per the configured ingress.
#2. Change ‘enabled’ to false
dbinit:
enabled: false
#3. Change below values for all components (Refer existing configure-liberty-db2.xml for DB2 connection details)
db:
type: "db2"
host: ""
port: ""
name: ""
secret: ""
schema: ""
ssl: false
sslTrustStoreSecret : "
driverPvc: ""
adminCredentialsSecret: ""
To find the existing IMF 8.0.0 DB2 connection details, locate the file on your existing IMF 8.0.0 server /opt/IBM/MobileFirst_Platform_Server/MobileFirstServer/configuration-samples/ configure-liberty-db2.xml and look for following properties:
<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="*******"/>
#4. Change below values for all components according to your requirements if required
resources:
requests:
cpu:
memory:
limits:
cpu:
memory:
#5. Change below values for all components according to your requirements
replicas:
autoscaling:
enabled: false
min:
max:
targetcpu:
#6. Change below values for all components according to your requirements (Optional)
tolerations:
enabled: false
key: "dedicated"
operator: "Equal"
value: "ibm-mf-liveupdate"
effect: "NoSchedule"
#7. Change below values for all components according to your requirements (Optional)
pdb:
enabled: true
min: 1
#8. Change below values for all components if keystoreSecret is used (Optional)
keystoreSecret: ""
Refer PMF documentation on how to set up keystoreSecrets
#9. Update pullSecret as created in section step a
pullSecret: "”
#10. 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
#11. Update below values as per the requirements (optional)
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 IMF 8.0.0 to PMF 9.1 as well, follow PMF documentation to see how to create keystoreSecret
DEPLOYMENT
A. Go to deploy directory and apply below 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>
NOTE: Wait for operator pod to come up with running status. To check operator pod status, use command: oc get pods
oc apply -f crds/charts_v1_mfoperator_cr.yaml --namespace=<NAMESPACE>
NOTE: Wait for all PMF pods to come up with running status. To check pod’s status, use command: oc get pods
TESTING
After the deployment, verify console URL is up and running using: «protocol»://«hostname»/mfpconsole
Mobile Application Refresh
Once PMF 9.1 set up is tested and looks stable customer needs to refresh their mobile applications to point to the new set up. This would require changes in application as well as publishing the application to app stores.
▲