Skip to main content
Skip table of contents

Migrate to OpenShift

Overview

Installations starting on Docker Compose may be migrated to OpenShift by moving the persistent data store using the following steps. In-place upgrades from Docker Compose to OpenShift are not supported.

During the migration process, there will be a downtime period where the service cannot be used.

Migration Process

Stop DCT services. In order to avoid a situation of losing data, stop serving the upcoming traffic with:

NONE
docker-compose stop

Copy the Postgres Docker volume folder data on a local machine with:

NONE
mkdir database
docker cp {dbcontainer_Id}:/var/lib/postgresql/data ./database

Copy the encryption key Docker volume folder data on a local machine with:

NONE
mkdir data_key
docker cp {gateway_container_id}:/data ./data_key

Copy the masking encryption key Docker volume folder data on a local machine with:

NONE
mkdir masking_data_key
docker cp {masking_container_id}:/data ./masking_data_key

Copy the virtualization-app encryption key Docker volume folder data on a local machine with:

NONE
mkdir virtualization_app_data_key
docker cp {virtualization_app_container_id}:/data ./virtualization_app_data_key
  • Mounted Docker volume folder content for database is copied in database folder on local machine.

  • Mounted Docker volume folder content for encryption key is copied in the data_key folder on local machine.

  • Mounted masking Docker volume folder content for encryption key is copied in the masking_data_key folder on local machine.

  • Mounted virtualization-app Docker volume folder content for encryption key is copied in the virtualization_app_data_key folder on local machine.

Move the copied volume folders (database, data_key, masking_data_key, and virtualization_app_data_key from the previous step) to the Kubernetes host machine where DCT is up and running.

Update the values.yaml file to add the list of certificates which were used in the previous DCT version (present in mounted trustStore). Update the deployment with the new values.yaml file.

Terminate the proxy pod to stop serving external traffic with:

NONE
oc scale --replicas=0 deployment/proxy -n dct-services

Terminate the database to stop internal threads using the database with:

NONE
oc scale --replicas=0 deployment/database -n dct-services

Create a dummy pod to access the Persistent Volume. Use the Pod.yaml as an example:

NONE
apiVersion: v1
kind: Pod
metadata:
Namespace: dct-services  
name: dummy-pod
  labels:
    app: dummy-pod
spec:
  containers:
    - image: ubuntu
      command:
        - "sleep"
        - "604800"
      imagePullPolicy: IfNotPresent
      name: ubuntu
  restartPolicy: Always
  volumes:
    - name: gwdatabase-data
      persistentVolumeClaim:
        claimName: gwdatabase-data

Followed by this command to actually create the dummy pod:

NONE
oc apply -f pod.yaml -n dct-services

Restore previous DCT version volume data with DCT deployed on the Kubernetes setup (in Persistent Volume).

Move the encryption key with:

NONE
cd data_key
oc cp data dct-services/{gateway_pod_name}:/

Move the encryption key with:

NONE
cd masking_data_key
oc cp data dct-services/{masking_pod_name}:/

Move the encryption key with:

NONE
cd virtualization_app_data_key
oc cp data dct-services/{virtualization_app_pod_name}:/

Move the Postgres data with:

NONE
cd database
oc cp data dct-services/{dummy_pod_name}:/var/lib/postgresql

Delete the dummy pod with:

NONE
oc delete pod dummy-pod -n dct-services

Start the database pod (scale to 1) with:

NONE
oc scale --replicas=1 deployment/database -n dct-services

Delete or patch the gateway pod with:

NONE
oc delete pod {gateway_pod_name} -n dct-services

Delete or patch the data-library pod with:

NONE
oc delete pod {data-library_pod_name} -n dct-services

Delete or patch the jobs pod with:

NONE
oc delete pod {jobs_pod_name} -n dct-services

Delete or patch the data-bookmarks pod with:

NONE
oc delete pod {data-bookmarks_pod_name} -n dct-services

Delete or patch the masking pod with:

NONE
oc delete pod {masking_pod_name} -n dct-services

Delete or patch the virtualization-app pod with:

NONE
oc delete pod {virtualization_app_pod_name} -n dct-services

Start the proxy service to serve the external service:

NONE
oc scale --replicas=1 deployment/proxy -n dct-services
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.