Removing a two data center deployment
Convert your 2DCDR deployment to a stand-alone deployment on Kubernetes, OpenShift, and Cloud Pak for Integration.
Ensure that you have read and understand the concepts of 2DCDR. See Two data center warm-standby deployment on Kubernetes and OpenShift and Key concepts of 2DCDR and failure scenarios.
Note: When you convert the warm-standby data center to
stand-alone, all data is deleted from its management database. Data deletion is to prevent an active-active situation, where the warm-standby attempts to
communicate with existing portal, gateway, and analytics subsystems that the formally active data
center is also communicating with.
Note: For OpenShift users: The steps that are detailed in this topic use the
Kubernetes
kubectl
command. On OpenShift, use the equivalent oc
command in its place. If you are using a top-level CR you must edit the multiSiteHA
section for the subsystem in the top-level CR, instead of directly in the subsystem CRs.Note: 2DCDR system endpoints must be changed to standalone when converting to standalone to avoid
new health check issues.
Temporary conversion to stand-alone
Some API Connect maintenance operations, such as management database restore require that 2DCDR is temporarily disabled.
To convert a 2DCDR
management or portal subsystem to stand-alone, follow these steps:
- Take a backup of your current 2DCDR configuration, by backing
up the subsystem CRs.
- On Kubernetes and OpenShift where individual subsystem CRs are used, take the management
subsystem CR backup
with:
and take the portal CR backup with:kubectl get mgmt -o yaml > mgmt_<dr status>_2dcdr_backup.yaml
where <dr status> is the current 2DCDR status of the subsystem, either active or warm-standby.kubectl get ptl -o yaml > portal_<dr status>_2dcdr_backup.yaml
- On Cloud Pak for Integration and OpenShift where
the top-level CR is used,
run:
where <dr status> is the current 2DCDR status of the subsystem, either active or warm-standby. Thekubectl get apiconnectcluster -o yaml > apic_<dr status>_2dcdr_backup.yaml
APIConnectCluster
CR contains the 2DCDR settings for both management and portal subsystems.
- On Kubernetes and OpenShift where individual subsystem CRs are used, take the management
subsystem CR backup
with:
- Remove the 2DCDR configuration from the
management subsystem. The steps to take are different for active and warm-standby:
- Active management subsystem:
- On Kubernetes and OpenShift where individual subsystem CRs are used,
run:
kubectl patch managementcluster <mgmt cr name> --type json -p='[{"op": "remove", "path": "/spec/multiSiteHA"}]'
- On Cloud Pak for Integration and OpenShift where
the top-level CR is
used:
kubectl patch apiconnectcluster <apic cr name> --type json -p='[{"op": "remove", "path": "/spec/management/multiSiteHA"}]'
- On Kubernetes and OpenShift where individual subsystem CRs are used,
run:
- Warm-standby
management subsystem:To convert the management subsystem from warm-standby to stand-alone, you must acknowledge acceptance of this in an annotation in the management CR. The steps to convert warm-standby management to stand-alone are:
- On Kubernetes and OpenShift where individual subsystem CRs are used, create a file that is
called remove-2dcdr-config-from-warm-standby.yaml, and paste in the following
text:
Apply the file to your management CR with:metadata: annotations: apiconnect-operator/dr-data-deletion-confirmation: "true" spec: multiSiteHA: null
kubectl patch managementcluster <mgmt cr name> --type merge --patch "$(cat remove-2dcdr-config-from-warm-standby.yaml)"
- On Cloud Pak for Integration and OpenShift where
the top-level CR is used, create a file that is called
remove-2dcdr-config-from-warm-standby.yaml and paste in the following
text:
Apply the file to your top-level CR with:metadata: annotations: apiconnect-operator/dr-data-deletion-confirmation: "true" spec: management: multiSiteHA: null
kubectl patch apiconnectcluster <mgmt cr name> --type merge --patch "$(cat remove-2dcdr-config-from-warm-standby.yaml)"
- On Kubernetes and OpenShift where individual subsystem CRs are used, create a file that is
called remove-2dcdr-config-from-warm-standby.yaml, and paste in the following
text:
- Active management subsystem:
- Remove the 2DCDR configuration from the
portal subsystem:
- On Kubernetes and OpenShift where individual subsystem CRs are used,
run:
Delete thekubectl patch portalcluster <portal CR name> --type json -p='[{"op": "remove", "path": "/spec/multiSiteHA"}]'
spec.multiSiteHA
section. - On Cloud Pak for Integration and OpenShift where
the top-level CR is used,
run:
kubectl patch apiconnectcluster <apic cr name> --type json -p='[{"op": "remove", "path": "/spec/portal/multiSiteHA"}]'
- On Kubernetes and OpenShift where individual subsystem CRs are used,
run:
- Complete the maintenance operation that required the temporary conversion to stand-alone, such as management database restore.
- Restore the 2DCDR
configuration by adding back the
multiSiteHA
sections to your subsystem CRs. You can restore these sections by copying themultiSiteHA
sections from the backup files you took in step 1, and pasting them into the corresponding CRs:- On Kubernetes and OpenShift where individual subsystem CRs are used:
- Edit the management CR:
and paste in thekubectl edit mgmt
multiSiteHA
section from your backup mgmt_<dr status>_2dcdr_backup.yaml. - Edit the portal CR:
and paste in thekubectl edit ptl
multiSiteHA
section from your backup portal_<dr status>_2dcdr_backup.yaml.
- Edit the management CR:
- On Cloud Pak for Integration and OpenShift where
the top-level CR is used, edit the top-level
CR:
and in thekubectl edit apiconnectcluster
spec.management.multiSiteHA
, paste in the contents from the correspondingmultiSiteHA
sections of your apic_<dr status>_2dcdr_backup.yaml
- On Kubernetes and OpenShift where individual subsystem CRs are used:
Permanently revert to stand-alone
If you want to revert to a single data center topology:
- Decide which data center you want to keep. If this data center is not the current active data center, then complete the failover operation to make it the active: Failing over to the warm-standby.
- Remove the 2DCDR
configuration section from the management subsystem CR on the active data center.
- On Kubernetes and OpenShift where individual subsystem CRs are used,
run:
kubectl patch managementcluster <mgmt cr name> --type json -p='[{"op": "remove", "path": "/spec/multiSiteHA"}]'
- On Cloud Pak for Integration and OpenShift where
the top-level CR is used,
run:
kubectl patch apiconnectcluster <apic cr name> --type json -p='[{"op": "remove", "path": "/spec/management/multiSiteHA"}]'
- On Kubernetes and OpenShift where individual subsystem CRs are used,
run:
- Remove the 2DCDR configuration from the
portal subsystem:
- On Kubernetes and OpenShift where individual subsystem CRs are used,
run:
Delete thekubectl patch portalcluster <portal CR name> --type json -p='[{"op": "remove", "path": "/spec/multiSiteHA"}]'
spec.multiSiteHA
section. - On Cloud Pak for Integration and OpenShift where
the top-level CR is used,
run:
kubectl patch apiconnectcluster <apic cr name> --type json -p='[{"op": "remove", "path": "/spec/portal/multiSiteHA"}]'
- On Kubernetes and OpenShift where individual subsystem CRs are used,
run:
- The next action that you take depends on what you want to do with your warm-standby data center:
- If you want to permanently revert to a single data center topology, then uninstall API Connect on the warm-standby data center. See: Uninstalling API Connect.
- Leave your warm-standby as it is, in case you decide to revert your stand-alone data center to a 2DCDR active.
- Convert your warm-standby
subsystems to stand-alone. This operation erases all data from the management and portal databases.
To convert the management subsystem from warm-standby to stand-alone, you must acknowledge acceptance of this in an annotation in the management CR. The steps to convert warm-standby management to stand-alone are:
- On Kubernetes and OpenShift where individual subsystem CRs are used, create a file that is
called remove-2dcdr-config-from-warm-standby.yaml, and paste in the following
text:
Apply the file to your management CR with:metadata: annotations: apiconnect-operator/dr-data-deletion-confirmation: "true" spec: multiSiteHA: null
kubectl patch managementcluster <mgmt cr name> --type merge --patch "$(cat remove-2dcdr-config-from-warm-standby.yaml)"
- On Cloud Pak for Integration and OpenShift where
the top-level CR is used, create a file that is called
remove-2dcdr-config-from-warm-standby.yaml and paste in the following
text:
Apply the file to your top-level CR with:metadata: annotations: apiconnect-operator/dr-data-deletion-confirmation: "true" spec: management: multiSiteHA: null
kubectl patch apiconnectcluster <mgmt cr name> --type merge --patch "$(cat remove-2dcdr-config-from-warm-standby.yaml)"
To convert portal from warm-standby to stand-alone, manually remove thespec.multiSiteHA
section from the portal CR:- On Kubernetes and OpenShift where individual subsystem CRs are used,
run:
Delete thekubectl edit ptl
spec.multiSiteHA
section. - On Cloud Pak for Integration and OpenShift where
the top-level CR is used, run:
Delete thekubectl edit apiconnectcluster
spec.portal.multiSiteHA
section.
- On Kubernetes and OpenShift where individual subsystem CRs are used, create a file that is
called remove-2dcdr-config-from-warm-standby.yaml, and paste in the following
text: