Migrating Ingest service customizations
If you have reviewed the recent release changes made to the Ingest service that are described in Keeping Elasticsearch-based search up-to-date, you can proceed to migrate your customizations. Use the following guide.
Before you begin
- Verify that a /connectors node exists inside of Zookeeper container. If the node is empty then there is no need to do anything further.
- If the /connectors node is not empty, then delete all the default connectors from the ZooKeeper /connectors node, except those default connector descriptors that are customized.
- Do not delete the connector descriptors using the Ingest delete API. Doing that will delete the connector pipelines from NiFi as well. Instead, use the Zookeeper command line interpreter (CLI) to perform delete operations.
Note: On every restart of the Ingest service, the
system looks for connectors created on the NiFi console. If any of the connector
pipelines are not present on the NiFi console, but the connector descriptor is
available inside of Zookeeper, then the Ingest service will create the pipeline for
that connectors descriptor in the NiFI console. This check is performed only for
user-created connector descriptors. Ingest will ignore this operation for any
customized connectors descriptor based on default connectors.
About this task
For all versions, perform the following steps before installing the latest NiFi and NiFi Registry images.
Procedure
-
Backup NiFi
If you have any custom connector configurations, you should first backup these settings before proceeding with the migration. Your existing connector descriptor may not be compatible with the latest default provided connectors. After the migration, download (GET using Ingest Service REST API) the latest connector configuration, manually compare and merge the connector JSONs and then re-apply the updated connectors.To backup the connector configuration before migration, use the Ingest Service API endpoint to fetch and download the Connector Descriptor JSON:
Save this response with an appropriate name. For example, if you are using HCL Commerce Version 9.1.10, you could save the response of this API as connectors_v9110.json.GET http://INGEST_HOSTNAME:INGEST_PORT/connectors
-
Backup the NiFi registry
Prior to migration, make a backup of all your existing flows inside of the NiFi Registry by exporting them. For example, go into your existing NiFi Registry container/pod and run the following command on each flow registered in the NiFi Registry:
sh /opt/nifi-registry/scripts/export_flow.sh FLOWNAME > /opt/nifi-registry/FLOWNAME_v9110.json
-
Deploy the latest NiFi and NiFi Registry images
- Docker-compose method with Docker
-
- Update [your docker-compose].yml file to use the latest NiFi/NiFi Registry images. There is no default external mount involved for NiFi and NiFi Registry, however, if you added a custom external mount, you should back up your data and will need to recreate it.
- Bash into your ZooKeeper container, run
zkCli.sh to start the ZooKeeper
command line interface, and perform
deleteall /connectors
to remove the existing connectors. - Start your containers:
docker-compose -f [your docker-compose].yml up -d
- Helm method with Kubernetes
- The following steps are needed to be performed before deploying your NiFi pod to enable your new container to use what is provided with the latest image (instead of re-using the existing NiFi metadata that is currently stored in your persistent volume):
Note: Perform the following steps AFTER deploying the latest
NiFi and NiFi Registry images:
-
Update NiFi
After deploying the latest NiFi image, download (GET using Ingest Service REST API) the latest connector configuration, manually compare and merge the connector JSONs and then re-apply the updated connectors.
-
Update the NiFi registry
Merge any applicable customization back into the NiFi Registry and load them back into the NiFi Console.