B Adding a Site in Georedundant Deployment
This section describes the procedure to add a site to the Georedundant deployment.
Prerequisites
- NRF connected to a cnDBTier is up and running. This is referred as Site-1.
- NRF version must be same across all the georedundant sites.
- cnDBTier version must be same across all the georedundant sites.
Adding a site
- Add a cnDBTier cluster (Site-2). This cnDBTier must act as a georedundant database to the cnDBTier in Site-1. For more information to install a cnDBTier, see Oracle Communications Cloud Native Core, cnDBTier User Guide.
- Verify the replication channel between the cnDBTier sites by sending
the following request to the dbMonitor service of both the cnDBTier sites. The
responses from both the cnDBTier sites must show the status of replication
channel as
up:
curl http://<mysql-db-monitor-service>:8080/db-tier/status/replication/realtime
Sample command:curl http://mysql-cluster-db-monitor-svc:8080/db-tier/status/replication/realtime
Sample output:[{"localSiteName":"Site-1","remoteSiteName":"Site-2","replicationStatus":"UP","secondsBehindRemote": 0}]
- Update the siteName and nrfInstanceId of the Site-1 NRF in the
global.siteNameToNrfInstanceIdMapping
section in ocnrf_custom_values_24.3.0.yaml before installing Site-2 NRF:global: siteNameToNrfInstanceIdMapping: - siteName: "Site-1" nrfInstanceId: "6faf1bbc-6e4a-4454-a507-a14ef8e1bc5c"
- Install NRF on the Site-2 using the updated ocnrf_custom_values_24.3.0.yaml. For more information on installation procedure, see the Installing NRF section.
- Verify the installation as mentioned in the Postinstallation Tasks.
- After the Site-2 NRF is installed, update the
siteNameToNrfInstanceIdMappingList
ingeoRedundancyOptions
of the Site-1 NRF with the corresponding details of the Site-2 NRF.To updategeoRedundancyOptions
and setsiteNameToNrfInstanceIdMappingList
, send the following request:- On Site-1, send the following
request:
curl http://ocnrf-nrfconfiguration:8080/nrf-configuration/v1/geoRedundancyOptions -X PUT -H 'Content-Type:application/json' -d '{"siteNameToNrfInstanceIdMappingList":[{"siteName":"Site-2","nrfInstanceId":"6faf1bbc-6e4a-4454-a507-a14ef8e1bc5d"}]}'
- On Site-2, send the following
request:
curl http://ocnrf-1-nrfconfiguration:8080/nrf-configuration/v1/geoRedundancyOptions -X PUT -H 'Content-Type:application/json' -d '{"siteNameToNrfInstanceIdMappingList":[{"siteName":"Site-1","nrfInstanceId":"6faf1bbc-6e4a-4454-a507-a14ef8e1bc5c"}]}'
- On Site-1, send the following
request:
- Run the following commands to enable Georedundancy feature on both
the NRFs. Verify if the Georedundancy is working by following the Verifying Georedundancy between sites section.
- On Site-1, send the following request to enable
Georedundancy
feature:
curl http://ocnrf-nrfconfiguration:8080/nrf-configuration/v1/geoRedundancyOptions -X PUT -H 'Content-Type:application/json' -d '{"featureStatus":"ENABLED"}'
- On Site-2, send the following request to enable
Georedundancy
feature:
curl http://ocnrf-1-nrfconfiguration:8080/nrf-configuration/v1/geoRedundancyOptions -X PUT -H 'Content-Type:application/json' -d '{"featureStatus":"ENABLED"}'
- On Site-1, send the following request to enable
Georedundancy
feature:
- After the installation is complete, make sure that the "OcnrfDbReplicationStatusInactive" alert is not raised in the alert dashboard. If the alert exist, verify the above configuration steps. If alert is not present, it means the DBReplication is up and the georedundant deployment of Site-1 and Site-2 is successful.
Note:
To add more sites, repeat the above steps on the new site. Ensure that Step 6 to Step 8 is performed on the new site to establish georedundancy between all the sites.Verifying Georedundancy between sites
- Register an NF in Site-1 NRF:
curl --http2-prior-knowledge -v -X PUT http://ocnrf-ingressgateway:80/nnrf-nfm/v1/nf-instances/6faf1bbc-6e4a-4454-a507-a14ef8e1bd6f -H 'Content-Type:application/json' -d @register_1.json
Here,
register_1.json
consist of a valid NF profile for registration. - Send a profile retrieval request to the remaining NRFs, to fetch the NF registered in
step-1:
curl --http2-prior-knowledge -v -X GET http://ocnrf-1-ingressgateway:80/nnrf-nfm/v1/nf-instances/6faf1bbc-6e4a-4454-a507-a14ef8e1bd6f
- Verify that the profile retrieval request returns the NfProfile registered in
step-1 in REGISTERED state.
Note:
The profileRetrieval request must return the same profile that was used in the registration request. - Repeat step-1 to step-3 in each NRF and send a profile retrieval request for that NF to the remaining NRFs.