Adding a Cross-Cluster Connection in Search with OpenSearch

Add a cross cluster connection to enable cross cluster operations for a cluster.

Add cross-cluster connections to perform cross-cluster search (CCS) or cross-cluster replication (CCR) in OCI Search with OpenSearch. First configure the accepting cluster, then create an alias on the connecting cluster. For the cluster roles and complete sequence, see the complete CCS and CCR setup examples.

  • For CCS, the accepting cluster is the remote cluster and the connecting cluster is the coordinator. For CCR, the accepting cluster is the leader and the connecting cluster is the follower.
    1. On the Clusters list page, find the OpenSearch cluster that you want to work with. If you need help finding the list page or the cluster, see Listing Clusters.
      Open the cluster accepting the connection: the CCS remote cluster or CCR leader cluster.
    2. Select Cross cluster connections, then Add connection.
    3. Select Inbound. In Cluster OCID, enter the OCID of the cluster that will connect: the CCS coordinating cluster or CCR follower.
      Tip

      Configure this Inbound allowance before creating the Outbound alias on the connecting cluster.
    4. To allow additional clusters, select Add cluster and enter their OCIDs. Select Submit.
    5. Wait for the work request to succeed and the accepting cluster to return to Active.
    6. Open the connecting cluster: the CCS coordinating cluster or CCR follower. Select Cross cluster connections, then Add connection.
    7. Select Outbound. Enter a Name for the connection and the accepting cluster's OCID in Cluster OCID.
    8. Set Ping schedule and Skip if unavailable as needed.
      Note

      The Mode field does not select CCS or CCR. The OpenSearch operation that you perform with the alias determines whether you search or replicate.
    9. To configure another connection, select Add cluster and enter its settings. Select Submit.
  • Use the configureoutboundcluster command on the accepting cluster to configure the complete list of clusters allowed to connect. This is the remote cluster for CCS or the leader for CCR.

    oci opensearch cluster configureoutboundcluster --inbound-cluster-ids file://<inbound-clusterIDs-file>.json --opensearch-cluster-id <accepting_cluster_ocid> --wait-for-state SUCCEEDED

    The file passed to --inbound-cluster-ids contains a JSON array, not a complete command object. Include all existing OCIDs that you want to retain. For example:

    [
      "ocid1.opensearchcluster.oc1.iad.<connecting_cluster1_unique_id>",
      "ocid1.opensearchcluster.oc1.iad.<connecting_cluster2_unique_id>"
    ]

    A complete command object belongs with --from-json. After the first work request succeeds and the accepting cluster returns to Active, run oci opensearch cluster update on the connecting cluster to create the alias. See the complete CCS and CCR setup examples.

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.

    Run ConfigureOutboundCluster on the accepting cluster: the CCS remote cluster or CCR leader. Set inboundClusterIds to the complete list of connecting cluster OCIDs to retain.

    After the work request succeeds and the accepting cluster returns to Active, run UpdateOpensearchCluster on the connecting cluster: the CCS coordinator or CCR follower. Create the initial alias with the accepting cluster OCID as seedClusterId. See the complete CCS and CCR setup examples.