To migrate Release 22.6 or earlier NSP Flow Collectors and Flow Collector Controllers to an NSP cluster
Purpose
Perform this procedure to move the Release 22.6 NSP Flow Collector and Flow Collector Controller configurations to the containerized Flow Collector functions hosted by an NSP cluster.
Note: You cannot use the procedure to migrate from Release 22.3 or earlier; you must first upgrade each Flow Collector and Flow Collector Controller to at least Release 22.6. If you upgrade to Release 22.9 or later, you must perform To migrate Release 22.9 or later NSP Flow Collectors and Flow Collector Controllers to an NSP cluster for the subsequent migration instead of this procedure.
Note: Before you attempt the migration, the NSP cluster must:
Note: Each Flow Collector and Flow Collector Controller must be at the same release before you attempt a migration to the NSP cluster.
Note: You require root or NSP admin user privileges on the NSP deployer host, and on each NSP Flow Collector and Flow Collector Controller station.
Note: Command lines use the # symbol to represent the RHEL CLI prompt for the root user. Do not type the leading # symbol when you enter a command.
Steps
Prepare for migration | |
1 |
Log in as the root or NSP admin user on the NSP deployer host. |
2 |
Open a console window. |
3 |
Enter the following: # cd /opt/nsp/NSP-CN-DEP-release-ID/NSP-CN-release-ID/tools/fc/fc-k8s-upgrade ↵ where release-ID is the new release of the upgraded NSP cluster, in the following format: MAJOR.minor.patch-rel.version |
4 |
Enter the following to create the required Python virtual environment: # ./createVenv.sh ↵ |
5 |
Enter the following to activate the virtual environment: # source fcenv/bin/activate ↵ |
6 |
Enter the following to install the Python dependency files for the migration scripts: # ./installPyDeps.sh ↵ |
7 |
If the NSP deployer host is unable to reach the Flow Collector and Flow Collector Controller stations during the migration, for example, if the stations are to be decommissioned beforehand, perform one of the following.
|
Download configurations | |
8 |
Perform one of the following to download each Flow Collector and Flow Collector Controller configuration:
|
9 |
View the FC_Config_Download.log file in the current working directory to identify any error messages. |
10 |
If you identify any error messages, resolve the related issues and return to Step 8 to retry any failed transfer operations. |
Upgrade configurations, migrate to NSP cluster | |
11 |
Perform one of the following to upgrade each downloaded configuration. Note: If you are upgrading multiple Flow Collectors and configuration inconsistencies are noted during an upgrade attempt, the upgrade is halted by default. You can use the -f command option to force the upgrade, but must be aware of the following:
|
12 |
View the FC_Config_Upgrade.log file in the current working directory to identify any error messages. The fcupgrade.py script extracts and saves the entire Flow Collection configuration in a file before and after performing the migration. The following log entry names the files, which you can compare to learn how the previous and new configurations differ: INFO - Compare before and after upgrade configuration: ./gen/before_restconfCfgBackup.yaml - ./gen/after_restconfCfgBackup.yaml |
13 |
If you identify any error messages, resolve the related issues and return to Step 11 to retry any failed upgrade operations. |
14 |
If multiple Flow Collectors are migrating to the NSP cluster, check for and resolve configuration inconsistencies, as required.
|
15 |
Enter the following to deactivate the Python virtual environment: # source fcenv/bin/deactivate ↵ |
16 |
Close the open console windows. |
Restore upload-target passwords | |
17 |
Passwords for the FTP and SFTP upload targets are not migrated because the script cannot decrypt the passwords in the configuration files. In order for flow data forwarding to each target server to resume after the migration, you must restore the FTP or SFTP password of each target server. Issue the following RESTCONF API call for each target server to restore the required password: Note: In order to issue a RESTCONF API call, you require a token; see the My First NSP API Client tutorial on the Network Developer Portal for information. PATCH https://address:8545/restconf/data/flowconf:config/policies/upload-target=server where address is the advertised NSP cluster address server is the upload server name The request body is the following: { "upload-target" : [ { "password" : "password" } ] } where password is the FTP or SFTP password |
Reconfigure NFM-P | |
18 |
If the NSP deployment includes the NFM-P, use the samconfig utility on each main database station to replace the existing NSP Flow Collector and Flow Collector Controller addresses in the remote-servers list on each main database station with the following from the flowForwarder section of the NSP cluster configuration file, nsp-config.yml:
|
Perform NFM-P PO data extraction | |
19 |
If the NSP deployment includes the NFM-P, extract the network data model from the NFM-P. Issue the following RESTCONF API call: Note: In order to issue a RESTCONF API call, you require a token; see the My First NSP API Client tutorial on the Network Developer Portal for information. https://address:8545/restconf/operations/flowconf:extract-po where address is the advertised NSP cluster address The message body is the following: { "flowconf:input" : [ { "po-category" : "AA", } ] } The extraction may take considerable time, depending on the size and complexity of the managed network. |
Update NE flow-data targets | |
20 |
On each NE that currently collects flow data, remove the existing Cflowd target addresses and add the following target addresses from the flowForwarder section of the NSP cluster configuration file, nsp-config.yml: Note: Include port 4741 in each address.
|
Decommission existing stations | |
21 |
After you verify that NSP flow collection is functioning as required, remove the NSP Flow Collector and Flow Collector Controller stations from the NSP deployment.
End of steps |