Guidance for Migrating to CentOS 7.x for NorthStar 6.0.0 and Later
Introduction
If you are already using CentOS 7.x (7.6, 7.7, 7.9) or RHEL 7.x (7.6, 7.7, 7.9) or 8.6, you do not need these instructions. Instead, follow the installation procedures in the NorthStar Controller/Planner Getting Started Guide to install or upgrade your NorthStar application.
These instructions are intended to assist you in migrating a working NorthStar 5.1.0 three-node cluster running on CentOS or RHEL 6.10 to a NorthStar 5.1.0 three-node cluster on CentOS 7.x or RHEL 7.x or 8.6. This creates an upgrade path for NorthStar 5.1.0 to NorthStar 6.0.0 or later as CentOS and RHEL 6.x are no longer supported. If you are running a VM or if you have a current backup plan in production, we recommend you take a snapshot or create a backup before proceeding, as the instructions will involve wiping out your HDD/SDD and removing all data on those drives.
This guidance assumes familiarity with the NorthStar installation and configuration process. If you have never installed/configured NorthStar before, we recommend you read the NorthStar Getting Started Guide for background, and have it available for reference.
You must upgrade the operating system first because NorthStar 6.0.0 or later installation requires CentOS 7.x or RHEL 7.x or 8.6. The order of these procedures is important:
Back up your data.
The following files should be backed up:
/opt/northstar/data/*.json
/opt/northstar/data/northstar.cfg*
/opt/northstar/data/crpd/juniper.conf*
/opt/pcs/db/sys/npatpw
Output from the /opt/northstar/utils/cmgd_cli -c "show config" command.
Upgrade the operating system to CentOS 7.x or RHEL 7.x or 8.6.
Install NorthStar 5.1.0 on the upgraded operating system.
When all nodes are running CentOS 7.x or RHEL 7.x or 8.6 and NorthStar 5.1.0, upgrade NorthStar to 6.0.0 or later.
Example Scenario
For example purposes, these instructions assume you are migrating from CentOS 6.10 to CentOS 7.x, and your network configuration includes:
Three NorthStar application servers in a cluster
Three analytics servers in a cluster
Three collector nodes
Your actual operating system version and network topology might be different, but the principles still apply.
We recommend backing up your operating system files and directories so you have a reference since some of the files differ between CentOS 6.x and CentOS 7.x. Back up these operating system files and directories, and save them to an external or network drive:
/etc/selinux/config
/etc/sysconfig/
/etc/hosts
/etc/ntp.conf
/etc/resolv.conf
/etc/ssh/
/root/.ssh/
Back up these NorthStar files and directories, and save them to an external or network drive:
/opt/pcs/db/sys/npatpw
/opt/northstar/data/northstar.cfg
/opt/northstar/data/*.json
/opt/northstar/data/junosvm.conf
/opt/northstar/northstar.env
/opt/northstar/thirdparty/netconfd/templates
/opt/northstar/saved_models (if used for saving NorthStar Planner projects)
The Basic Work Flow
For any node, whether it is a NorthStar application node, an analytics node, or a collector node, the work flow to upgrade your operating system while preserving your clusters and data is essentially the same:
In this procedure, we have you start with upgrading the operating system on your analytics cluster, then your NorthStar application cluster, and your collector cluster last. However, this order is not a strict requirement. When all nodes in all clusters are running the upgraded operating system and NorthStar 5.1.0, you then upgrade to NorthStar 6.0.0 or later.
Upgrade the Operating System on Your Analytics Nodes
For analytics nodes, Elasticsearch will self-form the cluster and distribute the data per the replication policy. Therefore, there is no need to first delete the node from Elasticsearch history. To migrate your analytics cluster, use the following procedure:
Once this process is completed for the first node, repeat the steps for the remaining analytics cluster nodes. Once the process is complete on all three nodes, your analytics cluster will be up and running with CentOS 7.7 and NorthStar 5.1.0.
The following are useful Elasticsearch (REST API) commands you can use before, during and after upgrading your operating system. Run these from an existing node in the analytics cluster.
curl -X GET "localhost:9200/_cluster/health?pretty"
curl -X GET "localhost:9200/_cat/nodes?v"
curl -X GET "localhost:9200/_cat/indices"
curl -X GET "localhost:9200/_cat/shards"
Use the following command to check that all nodes in your analytics cluster are up:
[root@centos-610-analytics1 root]# /opt/northstar/utils/cluster_status.py -u admin -p %password% | grep -v Connection | grep -v OAuth2 ZooKeeper cluster status: Host Name IPv4 Mode Version centOS-610-analytics1172.25.153.167 follower 3.5.4-beta-7f51e5b68cf2f80176ff944a9ebd2abbc65e7327, built on 05/11/2018 16 centOS-610-analytics3172.25.153.70 leader 3.5.4-beta-7f51e5b68cf2f80176ff944a9ebd2abbc65e7327, built on 05/11/2018 16 centOS-610-analytics2172.25.153.62 follower 3.5.4-beta-7f51e5b68cf2f80176ff944a9ebd2abbc65e7327, built on 05/11/2018 16
Upgrade the Operating System on Your NorthStar Application Nodes
Use the following procedure to upgrade your operating system on the NorthStar application nodes:
You can refer to the NorthStar Getting Started Guide, Replace a Failed Node if Necessary section for reference.
Upgrade the Operating System on Your Collector Nodes
Collector nodes operate independently, but are tied to the application VIP. They can be deleted or installed back in independently. Proceed one node at a time with reinstallation.
All three collectors are currently running CentOS 6.10 with NorthStar 5.1.0 (NorthStar-Bundle-5.1.0-20191210_220522_bb37a329b_64.x86_64.rpm).
If you have not already done so, back up the NorthStar files and directories listed previously, and save them to an external or network drive.
Special Notes for Nested JunosVM Nodes
The following additional procedure applies to migrating a nested JunosVM setup:
Copy the configuration here: /opt/northstar/data/junosvm/junosvm.conf.
Use the net_setup.py script to assign the JunosVM IP address back to the JunosVM.
Copy your backup of junosvm.conf into /opt/northstar/data/junosvm/junosvm.conf.
Restart the JunosVM:
supervisorctl restart junos:junosvm
Observe the JunosVM boot process using this command:
#tail -f /opt/northstar/logs/junosvm_telnet.log
Upgrade all Nodes to NorthStar 6.0.0 or Later
Now that your network and configuration are upgraded to CentOS 7.7, you can proceed with upgrading NorthStar to 6.0.0 or later.
Analytics Node Upgrade to NorthStar 6.0.0 or Later
Upgrade the nodes in the analytics cluster using the following procedure:
NorthStar Application Node Upgrade to NorthStar 6.0.0 or Later
Upgrade the NorthStar application nodes using the following procedure:
Collector Node Upgrade to NorthStar 6.0.0 or Later
Upgrade your collector nodes using the following procedure.