Deploying CDL for Geo Replication (GR)

For Geo Replication (GR), you have to create two separate HA systems independently and configure the Geo HA for communications with the remote sites. By default, CDL is deployed with two replicas for db-ep, one slot map (with two replicas per map) and one index map (with two replicas per map).

Important
  • It is recommended to configure CDL containers in YANG model.

  • It is recommended to configure the Geo HA only after the two HA systems become active.

To deploy the CDL GR, use the following configuration:

Procedure


Step 1

Deploy HA on site-1.

Deploy site-1 HA system without any Geo HA related configuration parameters and set the system-id parameter to 1 in the configuration.


configure
     cdl system-id system_id
     cdl node-type node_label
     cdl datastore datastore_name 
     endpoint replica number_of_HA_instances
     index map number_of_index_partitions
     index replica number_of_HA_instances
     slot map number_of_slot_partitions 
     slot replica number_of_HA_instances 
     exit
 

Example:

cdl# configure terminal
cdl(config)# cdl system-id 2
cdl(config)# cdl node-type session
cdl(config)# cdl datastore session
cdl(config-datastore-session)# endpoint replica 2
cdl(config-datastore-session)# slot map 4
cdl(config-datastore-session)# slot replica 2
cdl(config-datastore-session)# index map 3
cdl(config-datastore-session)# index replica 2
cdl(config-datastore-session)# exit
cdl(config)#

Step 2

Apply the HA configuration on site-1.

Commit the configurations and deploy the pods on site-1.

Step 3

Deploy HA on site-2.

Deploy site-2 HA system (in parallel) without any Geo HA related configuration parameters and set the system-id parameter to 2 in the configuration.

configure
     cdl system-id system_id
     cdl node-type node_label
     cdl datastore datastore_name 
     endpoint replica number_of_HA_instances
     index map number_of_index_partitions
     index replica number_of_HA_instances
     slot map number_of_slot_partitions 
     slot replica number_of_HA_instances 
     exit
 

Example:

cdl# configure terminal
cdl(config)# cdl system-id 2
cdl(config)# cdl node-type session
cdl(config)# cdl datastore session
cdl(config-datastore-session)# endpoint replica 2
cdl(config-datastore-session)# slot map 4
cdl(config-datastore-session)# slot replica 2
cdl(config-datastore-session)# index map 3
cdl(config-datastore-session)# index replica 2
cdl(config-datastore-session)# exit
cdl(config)#

Step 4

Apply HA configuration on site-2.

Commit the configuration and deploy the pods on site-2.

Step 5

Verify whether site-1 and site-2 are active.

Verify whether the CDL, Kafka, and Zookeeper pods are active before proceeding to Geo HA configuration.

Step 6

Configure external IP address on site-1 for site-2 communication.

  1. Enable Geo Replication on site-1 and configure the remote site as 2 for site-1.

    
    configure 
         cdl enable-geo-replication true/false 
         cdl datastore session geo-remote-site list_of_geo_replication_sites 
    

    Example:

    cdl# configure terminal
    cdl(config)# cdl enable-geo-replication true
    cdl(config)# cdl datastore session geo-remote-site 2
  2. Configure the external IP address for CDL endpoints so that site-2 can access it.

    
    configure 
        cdl datastore session endpoint external-ip site_1_external_ip_address 
  3. Configure the external IP address and port for all Kafka replicas.

    For instance, if two replicas (default) are configured for Kafka, provide two different pairs of IP address and port numbers.

    configure 
        cdl kafka external-ip site_1_external_ip_address port1 
        cdl kafka external-ip site_1_external_ip_address port2  
    
  4. (Optional) Configure the SSL/TLS certificate to enable TLS support for the local site.

    Configuring TLS certificates enable the local site to accept both secure and non-secure connections. Similarly, configuring SSL certificates enable the local site to establish a secure connection with the remote sites.

    Note
    All the certificates are in multi-line raw text format. If the certificates are invalid, the server continues with the non-secure connection.
    configure
      cdl ssl-config enable true
      cdl ssl-config ip site_1_external_ip_address
      cdl ssl-config certs site_1_external_ip_address ssl-key ssl_key
      cdl ssl-config certs site_1_external_ip_address ssl-crt ssl_crt 

Step 7

Configure external IP address on site-2 for site-1 communication.

  1. Enable Geo Replication on site-2 and configure the remote site as 1 for site-2.

    configure 
        cdl enable-geo-replication true/false 
        cdl datastore session geo-remote-site list_of_geo_replication_sites 
    

    Example:

    cdl# configure terminal
    cdl(config)# cdl enable-geo-replication true
    cdl(config)# cdl datastore session geo-remote-site 1
  2. Configure the external IP address for CDL endpoints so that site-1 can access it.

    configure 
       cdl datastore session endpoint external-ip site_2_external_ip_address 
  3. Configure the external IP address and port for all Kafka replicas.

    For instance, if two replicas (default) are configured for Kafka, provide two different pairs IP addresses and port numbers.

    configure 
        cdl kafka external-ip site_2_external_ip_address port1 
        cdl kafka external-ip site_2_external_ip_address port2  
    
  4. (Optional) Configure the SSL/TLS certificate to enable TLS support for the local site.

    Configuring TLS certificates enable the local site to accept both secure and non-secure connections. Similarly, configuring SSL certificates enable the local site to establish a secure connection with the remote sites.

    Note
    All the certificates are in multi-line raw text format. If the certificates are invalid, the server continues with the non-secure connection.
    configure
      cdl ssl-config enable true
      cdl ssl-config ip site_1_external_ip_address
      cdl ssl-config certs site_1_external_ip_address ssl-key ssl_key
      cdl ssl-config certs site_1_external_ip_address ssl-crt ssl_crt 

Step 8

Add the remote site information in each of the sites.

  1. Configure remote site cdl-ep (CDL endpoint) configuration on site-1.

    configure 
        cdl remote-site 2 db-endpoint host site_2_cdl_ep_ip 
  2. Configure remote site Kafka configuration on site-1.

    
    configure 
        cdl remote-site 2 kafka-server site_2_kafka1_ip_address site_2_kafka1_port 
        cdl remote-site 2 kafka-server site_2_kafka2_ip_address site_2_kafka2_port 
    
  3. (Optional) Configure the SSL certificates to establish a secure connection with remote site on site-1.

    Note
    All the certificates are in multi-line raw text format. If the certificates are invalid, the server continues with the non-secure connection.
    configure
      cdl ssl-config certs site_2_external_ip_address ssl-key ssl_key
      cdl ssl-config certs site_2_external_ip_address ssl-crt ssl_crt 

    Commit the configuration on site-1.

  4. Configure remote site cdl-ep configuration on site-2.

    configure 
        remote-site 1 db-endpoint host site_1_cdl_ep_ip_address 
  5. Configure remote site Kafka configuration on site-2.

    
    configure 
        cdl remote-site 1 kafka-server site_1_kafka1_ip_address site_1_kafka1_port 
        cdl remote-site 1 kafka-server site_1_kafka2_ip_address site_1_kafka2_port 
    
  6. (Optional) Configure the SSL certificates to establish a secure connection with remote site on site-2.

    Note
    All the certificates are in multi-line raw text format. If the certificates are invalid, the server continues with the non-secure connection.
    configure
      cdl ssl-config certs site_1_external_ip_address ssl-key ssl_key
      cdl ssl-config certs site_1_external_ip_address ssl-crt ssl_crt 

    Commit the configuration on site-2.

Step 9

Verify whether Mirror Maker pod is deployed and all the other pods are active.

NOTES:

  • cdl kafka external-ip - Specifies the external IP address and port for all Kafka replicas.

    • site_external_ip_address - Specifies the external IP address of the remote site.

    • port_number - Specifies the port number of the remote site.

  • cdl ssl-config certs - Specifies the SSL certificates to establish a secure connection with remote site.

    • site_external_ip_address - Specifies the external IP address of the remote site.

    • ssl-keyssl_key - Specifies the generated SSL key.