Contrail Insights Installation for NorthStar
NorthStar controller for traffic optimization provides granular visibility into, and control over, IP/MPLS flows in large service provider and enterprise networks. NorthStar automates the creation of traffic-engineering paths across the network, increasing network utilization and enabling a customized and programmable networking experience.
Integrating NorthStar and Contrail Insights is a robust solution where Contrail Insights monitors nodes in the network topology by collecting telemetry data and notifies NorthStar using HTTP endpoints to take appropriate action when an alarm is triggered. Some actions that can happen with this integration are:
Putting a node in the network into maintenance mode when node metrics such as CPU, memory, etc. are above a threshold.
Changes in LSP when an interface on a node is affected.
Requirements
NorthStar controller version 4.0.0
See Contrail Insights General Requirements for hardware and software requirements.
- Note:
Upgrade notice: Starting with Contrail Insights 3.2.6, the requirement for a license file is removed. If you are installing a version earlier than 3.2.6, a license is required prior to installation.
You can obtain a license key from mailto:APPFORMIX-KEY-REQUEST@juniper.net. Provide the following information in your request:
Group name: Target customers or use: Cluster type: NorthStar Number of hosts: Number of instances:
Install the NorthStar Controller
For information on installing the NorthStar Controller, see the NorthStar Documentation.
Install Contrail Insights
To integrate Contrail Insights with NorthStar:
Download the following packages from https://www.juniper.net/support/downloads/?p=appformix on to the host where you will run Ansible.
contrail-insights-<version>.tar.gz contrail-insights-dependencies-images-<version>.tar.gz contrail-insights-platform-images-<version>.tar.gz contrail-insights-network_device-images-<version>.tar.gz
If you are installing a version earlier than 3.2.6, copy the Contrail Insights license file to the Contrail Insights Platform node.
Install Ansible on the installer node.
Ansible will install docker and docker-py on the
appformix_controller
.# sudo apt-get install python-pip python-dev build-essential libssl-dev libffi-dev # sudo yum install python-pip python-devel gcc gcc-c++ make openssl-devel libffi-devel # sudo easy_install pyOpenSSL # sudo pip install ansible==2.7.6 markupsafe httplib2
If you are using Ansible 2.3, use the following commands.
# sudo pip install ansible==2.3 markupsafe httplib2 cryptography==1.5
Install python and python-pip on the
appformix_controller
so that Ansible can run between the installer node and theappformix_controller
node.# sudo apt-get install -y python python-pip
Install the python pip package on the hosts where the Contrail Insights Agents run.
# apt-get install -y python-pip
To enable passwordless login to the Contrail Insights Platform by Ansible, create a SSH public key on the node where Ansible playbooks are run, and then copy the key to the
appformix_controller
node.$ ssh-keygen -t rsa #Creates keys $ ssh-copy-id -i ~/.ssh/id_rsa.pub <target_host> #Copies key from the node to appformix_controller node
Or, you can use
ansible_connection=local
in the inventory example.[appformix_controller] 172.16.70.119 ansible_connection=local
Create an Ansible inventory. Create a directory named inventory, and in that directory edit the inventory/hosts file. For example:
# Contrail Insights Network Agent hosts [appformix_network_agents] 172.16.10.1 172.16.10.2 # Contrail Insights Platform host [appformix_controller] 172.16.70.119
The host listed under
appformix_controller
is mandatory. This is the host onto which the Contrail Insights Platform is installed.The Contrail Insights Agent is installed on the hosts listed under
appformix_network_agents
. This field is optional as the Agent is already installed on theappformix_controller
host.Within the inventory directory, create a subdirectory called inventory/group_vars. Then create an inventory/groups_vars/all file inside that subdirectory. For example:
$ mkdir inventory/group_vars $ touch inventory/group_vars/all
Add the following configuration parameters to the all file.
Note:All the variables in
group_vars
are mandatory. If you are installing a version earlier than 3.2.6, include the path to the Contrail Insights license file ingroup_vars/all
.appformix_docker_images: - path-to/contrail-insights-platform-images-<version>.tar.gz - path-to/contrail-insights-dependencies-images-<version>.tar.gz - path-to/contrail-insights-network_device-images-<version>.tar.gz # For enabling pre-requisites for package installation. appformix_network_device_monitoring_enabled: true appformix_plugins: - { plugin_info: 'certified_plugins/snmp_network_device_usage.json' } - { plugin_info: 'certified_plugins/snmp_config_ifxtable_mib.json' } - { plugin_info: 'certified_plugins/snmp_config_juniper_device_mib.json' } - { plugin_info: 'certified_plugins/snmp_config_tcp_mib.json' } - { plugin_info: 'certified_plugins/snmp_config_juniper_alarm_mib.json' } - { plugin_info: 'certified_plugins/snmp_config_device_resources_mib.json' } - { plugin_info: 'certified_plugins/jti_config_all_sensors.json' } - { plugin_info: 'certified_plugins/grpc_config_all_sensors.json' } appformix_northstar_monitoring_enabled: true northstar_user_name: <NorthStar UI Login Id> northstar_password: <NorthStar UI Login Password> northstar_controller_url: https://<Northstar-controller-ip>:8443 northstar_tenant_id: 1 northstar_topology_id: 1
Unpack the Contrail Insights TAR file, and change directory to the directory that is created. For example:
tar -xvzf contrail-insights-<version>.tar.gz cd contrail-insights-<version>/
Note:The remaining steps should be executed from within the
contrail-insights-<version>/
directory. Although the product name changed from "AppFormix" to "Contrail Insights," the UI and internal command paths continue to show AppFormix and will reflect the new name at a later date.-
Run Ansible using the path to the inventory directory created in steps 6 and 7. For example:
$ ansible-playbook -i ../inventory appformix_standalone.yml
If you are running the playbooks as the root user, this step can be skipped. If you are running the playbooks as any other user, for example ubuntu, that user account must have access to the docker user group.
For example, the below command adds the user ubuntu to the docker group.
$ sudo usermod -aG docker ubuntu
Obtain the token to log in to the Contrail Insights UI from the appformix_token.rst file located on the Contrail Insights Platform host. For example:
$ cat /opt/appformix/etc/appformix_token.rst
-
Use the token from Step 12 to login to the Contrail Insights dashboard.
Select Settings > Network Devices.
The network devices from NorthStar that are discovered by Contrail Insights appear in a list. Each device that has an SNMP/JTI/gRPC config is posted to the Contrail Insights Platform.
Figure 1 shows an example of network devices of a NorthStar monitored network topology discovered by Contrail Insights.
Figure 1: Example Discovered Network Devices