Upgrading an Existing API Plugin or Template
Update an existing API Plugin template may be needed for new features or critical bug fixes for your on-premise integration.
Upgrade to Version >1.1 of the API Plugin
Versions 1.1 and newer of the API plugin have some key structural changes.
Upgrading the API Plugin requires pieces of the new API Plugin to be moved and configured into your existing instance.
- The introduction of environments to support multiple APIs connected to different environments or databases on different ports.
- Move the "environments" folder of the new API plugin under "files".
- Copy your existing query templates to the "environments/default/queries" folder. You can also add new environments by just copying the "default" directory and renaming.
- Copy the generatedSchema.json file from the "json" directory under your current default directory to the "environments/default/json" folder. This file determines what APIs are shown in the API dashboard.
Upgrade to New Versions of API Plugin Nifi Templates
It is important to test the new template first. Therefore, you will want to reserve a new port for the upgrade testing and then revert back to the existing port after testing and turning the older version of the flow "off".
Here is the upgrade process for the template:
- Download the latest version of the API Plugin template from the installation guide page.
- Import the new template into your Nifi instance by click on the "Upload Template" button on the "Operate" panel on the left side of your screen.
- Drag the template icon from the top navigation onto the screen.
- Choose your new template.
- The goal is to remove all "Yellow" icons from the template. To do so, you typically just need to remap any controller service references in the new flow to those of your current flow.
- Click on the "Summary" link on the upper right hamburger menu to see which processors need to have controller services mapped to your existing controller services. You will notice these by the yellow Yield symbol.
- Click on the arrow next to each processor to go directly to the processor so you can edit the properties.
- Once all controllers are mapped, you should see that all processors in the new processor group are stopped and red.
- Update the ports for the API and the Dashboard to enable testing of the new template (example: use 3002 instead of 3001 for the API).
- Update the Client Credential processor with values from the older API plugin flow.
- Once testing is complete, you can turn off the old template and update the port numbers to the previous template.
- Click the processor group and then click the "Start" button on the Operate panel.
Before you delete your current flow, copy the Client ID and Secret combinations from the Client Credentials processor configuration (you can also retrieve them in the Lingk project console Environments screen).
- Delete your old templates from the Templates list in the Lingk REST Adapter
- Delete any duplicate Controller Services in your process group.