Upgrading from Pre-4.3 NorthStar with Analytics
The special upgrade procedure described in this topic is only necessary if you use NorthStar Analytics and you are upgrading to NorthStar Release 5.1 from a version of NorthStar earlier than Release 4.3.
In all other cases, you can install NorthStar using the procedure described in Installing the NorthStar Controller.
Export Existing Data (Recommended)
This procedure involves running a utility called es_export_import_util.py on the NorthStar application server to export and save your existing data prior to upgrade.
The utility exports data to a file called exportdata.tar.Z in
the /opt/northstar/northstar_bundle_5.1.0/db_migration
directory.
db_migration directory will be created after RPM bundle is installed (Step 3 in Step-by-Step Procedure).
Ensure that this directory has available space equivalent to
at least 10% the size of your Elasticsearch database. For example,
a 10GB Elasticsearch database would require 1GB in the /opt/northstar/northstar_bundle_5.1.0/db_migration
directory.
Elasticsearch (ES) data is stored on NorthStar Analytics
server (if analytics is installed on a separate server than the application)
under /opt/northstar/data/elasticsearch/
directory. You can measure the space of this directory as an estimate
of ES DB size using the following command:
du -hs /opt/northstar/data/elasticsearch/
When you begin this procedure, the script will tell you how much disk space is required and give you the option to stop the procedure if you do not have enough space to continue.
The amount of time required for the export utility to complete
depends on the number of export days and Elasticsearch cache memory/CPU
cores you have. You can use the utility’s -l
option to reduce the number of export days.
You can use the following command to see the utility’s full set of supported export options:
es_export_import_util.py --help
To export and save your existing data, use the following procedure:
- Download the NorthStar 5.1.0 software from the NorthStar Controller Software Download page.
- Transfer the downloaded tar.gz file to the NorthStar application server.
- Untar the Northstar_bundle:
[root ~]# tar zxf <filename.tar.gz>
- Install the RPM bundle:
[root ~]# rpm -Uvh northStar_bundle_5_1_0/<rpm-filename>
- Navigate to the db_migration directory:
[root ~]# cd /opt/northstar/northstar_bundle_5.1.0/db_migration
- Launch the export utility and type yes to continue if you agree with the setup information provided. An
example follows:
[root db_migration]# ./es_export_import_util.py -exp Warning 1: Time taken for export util depends on number of export days and ES cache memory/CPU cores. Reduce the considered number of days using -l option. Warning 2: Total indexes=6 and total DB indexes size=599MB. Average DB size of an index=99MB and max export DB limit=50000MB. Considering export data for last 6 days, requires disk space of 59.4MB under current dir Please enter 'yes' or 'no' to proceed:yes Starting ES data export Logs stored at /opt/northstar/logs/es_export_import.log Export required for datatype=jvision-lsp for the last 6 days Export required for datatype=jvision-ifd for the last 6 days Export required for datatype=jvision-ifl for the last 6 days Export required for datatype=demands for the last 6 days Export required for datatype=as_demands for the last 6 days Export required for datatype=rpm-ifl for the last 6 days Export required for datatype=jnx-cos for the last 6 days Starting 2 EsExportWorker process with total ES query count in queue=144 Starting process EsExportWorker-0 Starting process EsExportWorker-1 Total rollups data added=13187( jvision-lsp=743 jvision-ifd=8136 jvision-ifl=3230 demands=0 as_demands=0 rpm-ifl=1079 jnx-cos=0) EsExportWorkers-1 completed in minutes=1 Total rollups data added=13378( jvision-lsp=637 jvision-ifd=8424 jvision-ifl=3325 demands=0 as_demands=0 rpm-ifl=993 jnx-cos=0) EsExportWorkers-0 completed in minutes=1 All EsExportWorker processes completed. Rollup data exported to ./exportdata.tar.gz . Total time taken in minutes=1
Next, upgrade the NorthStar server. Do one of the following:
If NorthStar Application and NorthStar Analytics are on the same server, see Upgrade Procedure with NorthStar Application and NorthStar Analytics on the Same Server.
If NorthStar Application and NorthStar Analytics are on separate servers, see Upgrade Procedure with NorthStar Application and NorthStar Analytics on Separate Servers.
Upgrade Procedure with NorthStar Application and NorthStar Analytics on the Same Server
NorthStar analytics must be reinstalled on each NorthStar application server. Use the following procedure:
Do one of the following:
If Junos VM is present on the same server as the NorthStar application and NorthStar analytics, back up your JunosVM configuration. (Restoration of the JunosVM configuration is performed automatically after the upgrade is complete as long as you use the
net_setup.py
utility to save your backup):- Launch the
net_setup.py
script:[root@hostname~]# /opt/northstar/utils/net_setup.py
- Type D and press Enter to select Maintenance and Troubleshooting.
- Type 1 and press Enter to select Backup JunosVM Configuration.
- Confirm the backup JunosVM configuration is stored at
'/opt/northstar/data/junosvm/junosvm.conf'
.
- Launch the
If Junos VM is present on a different server, separate from the NorthStar application and NorthStar analytics, proceed to Step 2.
- Save the iptables.
iptables-save > /opt/northstar/data/iptables.conf
- On the NorthStar application server, navigate to the NorthStar
5.1.0 directory:
[root ~]# cd /opt/northstar/northstar_bundle_5.1.0
- Uninstall NorthStar analytics:
[root northstar_bundle_5.1.0]# ./uninstall-analytics.sh
- If Junos VM is present on the same server as the NorthStar
application and NorthStar analytics, uninstall the NorthStar JunosVM
RPM:
[root northstar_bundle_5.1.0]# rpm -e NorthStar-JunosVM
- Uninstall Python and its dependency RPMs, and upgrade
the NorthStar application:
[root northstar_bundle_5.1.0]# rpm -e --quiet NorthStar NorthStar-Utils NorthStar-Python
[root northstar_bundle_5.1.0]# ./install.sh
- Reinstall NorthStar analytics:
[root northstar_bundle_5.1.0]# ./install-analytics.sh
Upgrade Procedure with NorthStar Application and NorthStar Analytics on Separate Servers
- On the NorthStar application server, navigate to the NorthStar
5.1.0 directory:
[root ~]# cd /opt/northstar/northstar_bundle_5.1.0
- Upgrade the NorthStar application:
[root northstar_bundle_5.1.0]# ./install.sh
- On each NorthStar analytics server:
Untar the Northstar_bundle:
[root ~]# tar zxf <filename.tar.gz>
Install the RPM bundle:
[root ~]# rpm -Uvh northStar_bundle_5_1_0/<rpm-filename>
Navigate to the db_migration directory:
[root ~]# cd /opt/northstar/northstar_bundle_5.1.0/db_migration
Uninstall and reinstall NorthStar analytics:
[root northstar_bundle_5.1.0]# cd /opt/northstar/northstar_bundle_5.1.0 ./uninstall-analytics.sh (wait for completion) [root northstar_bundle_5.1.0]# ./install-analytics.sh
- On the NorthStar application server, prepare and redeploy
HA analytics data collector settings:
[root northstar_bundle_5.1.0]# /opt/northstar/utils/net_setup.py
Select G (Data Collector Setting) from the main menu, and then B (Prepare and Deploy HA Data Collector Setting) from the Data Collector Configuration Settings menu. See Installing Data Collectors for Analytics for more information.
- On the NorthStar application server, ensure that analytics data collector connectivity is UP. From the net_setup.py utility main menu, select G (Data Collector Setting), and then select 9 (Test Data Collector Connectivity) from the Data Collector Configuration Settings menu.
Update the Netflow Aggregation Parameter
Between NorthStar Controller Release 4.2.0 and 4.3.0, the possible
values for the netflow_aggregate_by_prefix parameter changed. If you
are ugrading from Release 4.2.0, you must edit the parameter in the /opt/northstar/data/northstar.cfg
file to reflect
a valid Release 5.1.0 value.
To edit the value, perform the following steps:
- SSH to the NorthStar server.
- Using a text editor such as vi, edit the netflow_aggregate_by_prefix=
statement in the
/opt/northstar/data/northstar.cfg
file as follows:If you had the value set to 1 in NorthStar Controller Release 4.2.0, change the value to always.
If you had the value set to 0 in NorthStar Controller Release 4.2.0, change the value to disabled.
- Manually restart the netflowd process:
[root ~]# supervisorctl restart analytics:netflowd
Import Existing Data (Recommended)
In this procedure, you run the es_export_import_util.py utility again on the NorthStar application server to import the data you previously exported and saved.
- Log in to the NorthStar application server.
- Navigate to the db_migration directory:
[root ~]# cd /opt/northstar/northstar_bundle_5.1.0/db_migration
- Launch the import utility:
[root db_migration]# ./es_export_import_util.py -imp