Copying Fusion Configurations

Introduction

The Zookeeper zkclii tool is recommended for transferring Fusion configurations from one Fusion cluster to another. This article will show how to use the zkcii command line tool for downloading and uploading Fusion collection, indexing and query pipeline configurations.

 

Pre-configuration for using zkcii (Fusion 1.3 and earlier versions) 

These command line steps need to be performed in order to use zkcii for pre Fusion 1.4 environments.

bash> cd <FUSION v1.3 INSTALL DIR>/solr-dist/example/

bash> mkdir solr-webapp

bash> cd solr-webapp

bash> mkdir webapp

bash> cd ../../webapps

bash> unzip solr.war -d <FUSION v1.3 INSTALL DIR>/solr-dist/example/solr-webapp/webapp

 

Transferring Collection Information 

  1. Download a collection configs from source Fusion server:

    bash> <FUSION INSTALL DIR>/solr-dist/example/scripts/cloud-scripts/zkcli.sh -zkhost localhost:9983 -cmd downconfig -confname <collection_name> -confdir <collection_name>

    **In Fusion 2.x the path to the script begin with <FUSION INSTALL DIR>/apps/

    **localhost:9983 is the default Fusion zookeeper address.  This is the case if you ran fusion start-up script as-is, without modifications.

    **Replace <collection_name> above with your collection name

    If the operation is successful, you will see a local directory.  The files in the directory should match what is displayed in the Fusion UI -> Collection -> Solr Config tab, under your collection screen, "SOLR CONFIG" tab.

  2. Create a collection with the same name on target Fusion server via Fusion UI.

  3. Download configs on target Fusion server by performing the #1 steps on target server.

  4. Rename the downloaded config folder to *_orig

  5. Transfer the downloaded config folder from source server to target server.

  6. Upload config folder from #1 up to target Fusion server:

    bash> <FUSION INSTALL DIR>/solr-dist/example/scripts/cloud-scripts/zkcli.sh -zkhost localhost:9983 -cmd upconfig -confname<collection_name> -confdir <collection_name>
     
    **localhost:9983 is the default Fusion zookeeper address.  This is the case if you ran fusion start-up script as-is without modifications.
    **Replace <collection_name> above with your collection name

  7. Log into Fusion UI on target server, goto Admin, select your collection, select "SOLR CONFIG" tab.  Then select solrconfig.xml on left-side panel.  
     
    If you are going from Fusion v1.3 to v1.4, update the following line:
     
    <luceneMatchVersion>4.10.3</luceneMatchVersion>
    to…
    <luceneMatchVersion>4.10.4</luceneMatchVersion>

    click "Save and Reload Collection" even if you did not make any changes to the sorlrconfig.xml


Transferring Indexing and Query Pipelines Configurations

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

    bash> curl -u <Fusion_user>:<password> 'http://<Host>:8764/api/apollo/<pipeline_type>/<pipeline_id>' -o <pipeline_id>
     
    **Replace <Fusion_user>:<password> with the correct loginID:password
    **Replace <Host> with actual host name 
    **Replace <pipeline_type> with index-pipelines or query-pipelines
    **Replace<pipeline_id> above with your index pipeline ID.

    If the operation is successful, you will get a local file containing the index or query pipeline definition (JSON)

  2. Upload the index/query pipeline to the target Fusion server:

    bash> curl -u<Fusion_user>:<password> -X POST -H 'Content-type: application/json' 'http://<Host>:8764/api/apollo/<pipeline_type>' —data-binary @<pipeline_id>
    **Replace <Fusion_user>:<password> with the correct loginID:password
    **Replace <Host> with actual host name 
    **Replace <pipeline_type> with index-pipelines or query-pipelines
    **Replace<pipeline_id> above with your index pipeline ID.
    **IMPORTANT:  If the upload fails, it's mostly likely because there is already a pipeline with same ID in Fusion.  Please go into Fusion UI, delete that pipeline and upload again.
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk