Contrail Insights Installation for Standalone
Requirements
Contrail Insights can monitor hosts and network devices in a standalone cluster without a management platform (for example, OpenStack) from which to discover entities. This topic explains how to install a standalone version of Contrail Insights.
For hardware and software requirements, see Contrail Insights General 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: Standalone Number of hosts: Number of instances:
Installation
To install Contrail Insights in a standalone environment:
-
Download the Contrail Insights files from Juniper Software Downloads and copy the following files onto the host where Ansible will be run.
contrail-insights-<version>.tar.gz contrail-insights-platform-images-<version>.tar.gz contrail-insights-dependencies-images-<version>.tar.gz contrail-insights-network_device-images-<version>.tar.gz
If you are installing a Contrail Insights version earlier than 3.2.6, copy the Contrail Insights license file to the Contrail Insights Platform node.
Run the following commands to install Ansible on the installer node. Ansible will install Docker and
docker-py
on theappformix_controller
. This allows Ansible to run between the installer node andappformix_controller
node.Ubuntu # sudo apt-get install python-pip python-dev build-essential libssl-dev libffi-dev # sudo easy_install pyOpenSSL # sudo pip install ansible==2.8.9 markupsafe httplib2 For ansible 2.8.9 # sudo pip install ansible==2.8.9 markupsafe httplib2 cryptography==1.5
RHEL/CentOS # sudo yum install epel-release #Enable EPEL repository In case the above command does not work, manually download and install the epel-release package with one of the below commands, depending on your system’s version. sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm # sudo yum groupinstall 'Development Tools' #Install development tools # sudo yum install python-pip python-devel gcc gcc-c++ make openssl-devel libffi-devel # sudo yum install openssl-devel libffi libffi-devel #Dependencies # sudo yum install python-pip python-devel #Install Pip # sudo pip install ansible==2.8.9 #Install Ansible 2.8.9 # sudo pip install markupsafe httplib2 requests #Dependencies
Note:For RHEL, the following IPtables rule is needed to access port 9000:
# sudo iptables -t filter -A IN_public_allow -p tcp --dport 9000 -j ACCEPT
Install Python and
python-pip
on theappformix_controller
so that Ansible can run between the installer node andappformix_controller
node.Ubuntu # sudo apt-get install -y python python-pip
RHEL/CentOS # sudo yum install -y python python-pip
Install the
python-pip
package on the hosts where Contrail Insights Agents run.Ubuntu # apt-get install -y python-pip
RHEL/CentOS # yum install -y python-pip
To enable passwordless login to the Contrail Insights Platform by Ansible, create an SSH public key on the node where Ansible playbooks are run and then copy the key to
appformix_controller
.$ 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
Alternately, you can use
ansible_connection=local
as shown in the following inventory example:[appformix_controller] 172.xx.xx.119 ansible_connection=local
Create an Ansible inventory by creating a directory named
inventory
and in that directory edit theinventory/hosts
file. The following is an example:# List all hosts which needs to be monitored by Contrail Insights [bare_host] 172.xx.xx.5 172.xx.xx.17 # Contrail Insights Platform host [appformix_controller] 172.xx.xx.119 # List of all hosts which will do network telemetry collection. You can use same hosts from other tags such [bare_host], [appformix_controller] [appformix_network_agents] 172.xx.xx.119 172.xx.xx.5 172.xx.xx.6
The host listed under group
appformix_controller
is mandatory. This is the host onto which Contrail Insights Platform will be installed. Optionally, you can monitor additional hosts by listing them in thebare_host
section. All the hosts listed underappformix_network_agents
are used as collectors to collect network device telemetry. Workload is distributed evenly between hosts listed underappformix_network_agents
. As you add more network devices to Contrail Insights, you might need to add more hosts to do the telemetry collecting, which can be done by adding hosts toappformix_network_agents
aggregate from the UI after installation.In the inventory directory, create a subdirectory named
inventory/group_vars
and then create a fileinventory/groups_vars/all
inside this subdirectory:$ mkdir inventory/group_vars $ touch inventory/group_vars/all
Add the following configuration parameters to the
all
file: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 appformix_kvm_instance_discovery: true # For enabling prerequisites for package installation. appformix_network_device_monitoring_enabled: true # For running the appformix-network-device-adapter network_device_discovery_enabled: true appformix_plugins: '{{ appformix_network_device_factory_plugins }}' # After 3.1, SNMP Traps can be enabled also so appformix_plugins can be specified as below: # appformix_plugins: '{{ appformix_network_device_factory_plugins }} + {{ appformix_snmp_trap_factory_plugins }}'
If you are installing a version earlier than 3.2.6, include the path to the Contrail Insights license file in
group_vars/all
:appformix_license: path/to/<contrail-insights-license-file>.sig
Note:appformix_docker_images
is mandatory. Also, be sure to add all required Contrail Insights SNMP, JTI Native, and gRPC network device monitoring plug-ins to thegroups_vars/all
file under variableappformix_plugins
. There are more than 20 built-in plug-ins available in thecertified_plugins/
directory. The example above shows how you can enable all built-in network device plug-ins.There are two ways to add network devices. One method should be chosen to add devices for monitoring.
Unpack the Contrail Insights TAR file and change to the created directory:
$ tar xzf 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 Step 6 and Step 7. For example:$ ansible-playbook -i ../inventory appformix_standalone.yml
If running the playbooks as
root
user, you can skip this step. As a non-root user, for example “ubuntu” then user “ubuntu” needs access to thedocker
user group. Run the following command to add the user to thedocker
group:sudo usermod -aG docker ubuntu
To locate the Contrail Insights token for Auth Service, look in the following file on the Contrail Insights Platform host.
$ cat /opt/appformix/etc/appformix_token.rst
Deprecation Notice: The appformix_mongo_cache_size_gb
parameter previously
available starting in Contrail Insights 2.19.5 is now deprecated and no longer
supported from Contrail Insights 3.2.0 and going forward. Starting with Contrail
Insights
Release
3.2.0, Mongo will be configured to use a maximum of 40 percent of the available
memory on the Contrail Insights Platform nodes.
Upgrade Contrail Insights for Standalone
Contrail Insights can be easily upgraded by running the appformix_standalone.yml
playbook of the new release.
Follow the same procedure as for the installation.
Uninstall Contrail Insights from Standalone
If you want to uninstall Contrail Insights and destroy all data, execute the following command:
ansible-playbook -i <inventory_file> clean_appformix_standalone.yml