Upgrade Notes

The upgrade steps for version 2.0.0 are described below.

High level overview

  • Prepare new OpenShift 4.3 Cluster
  • Install CPD
  • Decide whether to keep using your current GitLab instance or whether you move to a new GitLab installation (migration using non GitLab git servers is not supported)
  • If you switch to a new GitLab instance - backup and restore all your FSW related repositories in the managed-solutions group to the new GitLab instance using the same group managed-solutions as the target

  • Decide whether to keep your MongoDB instance or move to a new instance
  • If you switch to new MongoDB instance backup and restore the relevant databases
  • Install IBM Financial Services Workbench 2.0 on the new cluster providing connection parameters for the new GitLab and MongoDB instances
  • Have all your users (developers and analysts) setup their GitLab access tokens in the Solution Designer
  • Have your developers checkout the solutions they need to work on using FSW cli tools (fss)

Details

Install OpenShift 4.3

To setup OpenShift please follow the instructions in the OpenShift documentation.

Install IBM Cloud Pak for Data

Detailed information on how to install IBM Cloud Pak for Data control plane you can find here.

Designer Migration

In order to migrate all solutions from the Designer to the new OpenShift cluster, do the following steps:

Prepare for Migration

Ensure all developers that implemented something locally pushed the changes to the git repository using `fss push`

Note: All changes of the implementation code will be lost if they are not pushed. Changes in the Solution Designer MUST NOT be pushed - they will be automatically preserved.

All developers should now delete the directories, cloned with the fss CLI

Migrate Git projects
  • Go to your existing GitLab
  • Export GitLab projects
  • Import GitLab projects to your new GitLab into group managed-solutions
  • Alternatively: use GitLab backup and restore functionality to move the data
Migrate Mongo DB (optional)
  • Prepare new MongoDB instance
  • Restore data from a backup obtained from old instance
  • Note new connection details

Install new version of IBM Financial Services Workbench

Note: Expected: A new Git Provider with name GitLab and base URL of your GitLab was automatically created. All solutions are connected to this Git Provider.

Setup for Version 2.0

To have all users properly set up on version 2.0, some additional things need to be done:
  • Each user (both developers and analysts) needs to create a Git Token for the current GitLab in the UserSettings
  • GitLab Admin need to ensure that users have enough access on the Git system
    • to create new solutions: at least developer permissions on the group must be granted
    • to edit the solution content: at least developer permission (on the group or the repository) must be granted
    • to view the solution: at least guest or reporter permission (on the group or the repository) must be granted
    • to delete a solution: at least owner permission on the group must be granted
  • Setting up the developer workspaces
    • Run fss upgrade-cli
    • Download the latest version of the cli-config of a Solution from the Solution Designer
    • Run fss setup using the new downloaded file
    • Run fss clone for all relevant solutions

Backup and Restore of the Local Marketplace

Note: If you already used the Local Marketplace of Fincancial Services Workbench and additional step before and after the Upgrade is necessary. To backup and restore the existing Desing Packs you can choose one of the below described alternatives.
  • Using the Solution Controller API:
    • Before you upgrade: Download the template
      • Open https://<NAMESPACE>/swagger-ui.html -> Local Marketplace Controller API
        • Use GET /api/marketplace/v2/templates to retrieve all available templates
        • Download each template using GET /api/marketplace/v2/templates/ {templateId}
    • After the upgrade: Upload the templates
      • Open https://<NAMESPACE>swagger-ui.html -> Local Marketplace Controller API
        • Use POST /api/marketplace/v2/templates/- to upload each template
  • Direct copy of s3 bucket from s3 storage to s3 storage
    • Requirement: S3 Client e.g. https://github.com/minio/mc
    • Before upgrade
      # Get credentials from secret e.g. ssob-sdo-minio-secret
      > oc project <HUB NAMESPACE>
      > export GITLAB_SECRET=ssob-sdo-minio-secret
      > export GITLAB_ACCESS_KEY=$(oc get secret ${GITLAB_SECRET} -o jsonpath="{.data.accesskey}" | base64 -d)
      > export GITLAB_SECRET_KEY=$(oc get secret ${GITLAB_SECRET} -o jsonpath="{.data.secretkey}" | base64 -d)
      > export GITLAB_ENDPOINT=$(oc get cm solution-controller-application -o 'go-template={{index .data "marketplace.storage.endpoint"}}')
      > export GITLAB_PORT=$(oc get cm solution-controller-application -o 'go-template={{index .data "marketplace.storage.port"}}')
      
      # Open port forward, if the endpoint is internal like http://<SERVICE>.<NAMESPACE>.svc.cluster.local e.g. http://gitlab-minio-svc.gitlab.svc.cluster.local
      > echo ${GITLAB_ENDPOINT}
      > kubectl -n <NAMESPACE> port-forward svc/<SERVICE> ${GITLAB_PORT}:${GITLAB_PORT}
      > export GITLAB_ENDPOINT="http://localhost"
      
      # Retrieve data
      > mkdir -p data
      > set +o history
      > mc config host add gitlab ${GITLAB_ENDPOINT}:${GITLAB_PORT} ${GITLAB_ACCESS_KEY} ${GITLAB_SECRET_KEY}
      > set -o history
      > mc ls gitlab/marketplace-templates/
      > mc cp --recursive gitlab/marketplace-templates/ data
      > ls -la data/
      
    • After upgrade
      # Get credentials from secret e.g. k5-s3-storage-access
      > oc project <DESIGNER NAMESPACE>
      > export K5S3STORAGE_SECRET=k5-s3-storage-access
      > export K5S3STORAGE_ACCESS_KEY=$(oc get secret ${K5S3STORAGE_SECRET} -o jsonpath="{.data.accesskey}" | base64 -d)
      > export K5S3STORAGE_SECRET_KEY=$(oc get secret ${K5S3STORAGE_SECRET} -o jsonpath="{.data.secretkey}" | base64 -d)
      > export K5S3STORAGE_ENDPOINT=$(oc get cm solution-controller-application -o 'go-template={{index .data "marketplace.storage.endpoint"}}')
      > export K5S3STORAGE_PORT=$(oc get cm solution-controller-application -o 'go-template={{index .data "marketplace.storage.port"}}')
      
      # Open port forward, if the endpoint is internal like https://<SERVICE>.<NAMESPACE>.svc.cluster.local e.g. https://k5-s3-storage.designer.svc.cluster.local
      > echo ${K5S3STORAGE_ENDPOINT}
      > kubectl -n <NAMESPACE> port-forward svc/<SERVICE> ${K5S3STORAGE_PORT}:${K5S3STORAGE_PORT}
      kubectl -n dev-designer port-forward svc/k5-s3-storage 9000:9000
      > export K5S3STORAGE_ENDPOINT="https://localhost"
      
      # Upload data (--insecure is required, as the mc will use localhost and the certificate is created for the service hostname)
      > set +o history
      > mc config host add k5s3storage ${K5S3STORAGE_ENDPOINT}:${K5S3STORAGE_PORT} ${K5S3STORAGE_ACCESS_KEY} ${K5S3STORAGE_SECRET_KEY} --insecure
      > set -o history
      > cd data
      > mc --insecure ls k5s3storage/marketplace-templates --recursive
      > mc ls --recursive .
      > mc --insecure cp --recursive . k5s3storage/marketplace-templates
      > mc --insecure ls k5s3storage/marketplace-templates --recursive