Maintaining an active passive fusion and solr data center

This article assumes you have both data centers that have the Fusion, SolrCloud and Zookeeper setup . We want to sync Fusion's pipeline settings, Solr collection configurations and actual indexes.

 

Transferring Indexing and Query Pipelines Configurations

  1. Download index/query pipeline from the source Fusion sever: 

    curl -u <Fusion_user>:<password> -XGET 'http://<host>:8764/api/apollo/<pipeline_type>/<pipeline_id>' -o <pipeline_id>.json
     
    Where:
  • <pipeline_type> can be "index-pipelines" or "query-pipelines"
  • <pipeline_id> is the pipeline id
  • If the operation is successful, you will get a local file containing the index or query pipeline definition (JSON)
    2. Download index/query pipeline from the source Fusion sever:
 
        curl -u<Fusion_user>:<password> -X POST -H 'Content-type: application/json' 'http://<host>:8764/api/apollo/<pipeline_type>' —data-binary @<pipeline_id>
 
        Where:
  • <pipeline_type> can be "index-pipelines" or "query-pipelines"
  • <pipeline_id> is the pipeline id

Transferring Collection Information:

The attached demonstrates to see how many configs have been uploaded to ZK. 

You can use the zk-cli tool to download them on the first data center and upload them to the second data center.

  1. Download the configs:                                                                   <FUSION INSTALL DIR>/solr-dist/example/scripts/cloud-scripts/zkcli.sh -zkhost "<ZK_STRING>" -cmd downconfig -confname <name> -confdir <collection_name>

         Where:

  • "<ZK_STRING>" is the zookeper ensemble address of the first data center. For example "zk1:2181,zk2:2181,zk3:2181" 
  • <name> are the config names uploaded to ZK similar to the one in the attached image.
  • You can run this command from the second data center as the download configurations need to be able to be uploaded to this data center.

    2. Upload the configs:

  1. <FUSION INSTALL DIR>/solr-dist/example/scripts/cloud-scripts/zkcli.sh -zkhost "<ZK_STRING>" -cmd upconfig -confname<collection_name> -confdir <collection_name>

         Where:

  • "<ZK_STRING>" is the zookeper ensemble address of the second data center. For example "zk1:2181,zk2:2181,zk3:2181" 
  • <name> are the config names uploaded to ZK similar to the one in the attached image.

 

Replicating Index Files:

  1. Fire a delete all query with commit on all collections on the second data center. ( If you are on 5.0+ then this step could be skipped )
  2. For all the collections make sure only 1 replica of each shard is up. The others should be shut down during this operation.
  3. For each shard of each collection, pick the replica which is up and fire the following core api call against that replicas core - http://dcb_host:port/solr/<collectioname_shardN_replicaN>/replication?command=fetchindex&masterUrl=dca_host:port/solr/collection1_shard1_replica1/replication. Where "dcb" stands for the second data center and "dca"  is the first data center.
  4. Once the API calls have been made, you can bring up the downed nodes in step 2.
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk