Skip to content
This repository has been archived by the owner on Sep 9, 2021. It is now read-only.

Gru’s Lab is a testing and demonstration environment for SMNepO

Notifications You must be signed in to change notification settings

OpenNMS-Archives/smnnepo-gruslab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gru’s Lab

Gru’s Lab is a testing and demonstration environment for SMNepO. It simulates a complex network with a central OpenNMS instance and multiple sites having seperated infrastructure and services.

1. Functional overview

The following figure describes the test scenario to simulate.

Functional Overview

1.1. The Network Operation Center (NOC)

  • Runs an OpenNMS instance

  • Uses ActiveMQ as a messaging server

1.2. The Store

  • Runs up to 10 nodes

  • Runs one minion (to manage all nodes)

  • Needs a VPN connection to the NOC (reserved)

  • Needs a "public" connection to the internet

  • A node is not reachable from the outside (E.g. the internet or the NOC)

  • All nodes within a store can see/ping each other.

If there are multiple stores, each store is build exactly the same (even the ip addresses match).

Each node must run

  • snmp agent

  • some java application to collect jmx data

  • send traps to NOC

2. Technical overview

The environment is simulated with virtual machines controlled by vagrant. Vagrant is responsible for creating and provisioning the machines. It also creates and wires up the virtual network.

To simulate the network, internal-only networks between the virtual machines are used. These networks are not accessible from the host and allow isolation of the transmitted data.

There is a network for the NOC containing the OpenNMS installation and a network for each store containing the SMNnepO Minion and some nodes.

The following figure describes this.

Technical Overview

2.1. OpenNMS VM

The OpenNMS VM is running OpenNMS and the SMNnepO Dominion part.

2.2. The transfer network

The transfer network is used to connect the stores to the NOC. It’s a bridge connecting the routers for each side and can be seen as the public internet.

The IP range used for the transfer network is:

10.10.10.0/24

2.3. The NOC

The NOC contains the central OpenNMS instance

The IP range used for the NOC network is:

172.16.0.0/24

The IP of the NOC router is:

172.16.0.254 inside
10.10.10.254 outside

The whole network is reachable from the transfer network.

The Machine running the OpenNMS instance and the OpenNMS dominion has the following IP:

172.16.0.253

2.4. Store

A store consists of a router connecting the store with the transfer network, a OpenNMS minion VM and N nodes providing data collection targets.

The IP range used for each store is:

192.168.0.0/24

Whereas each store has the same address range.

The public IP of the store router is:

192.168.0.254 inside
10.10.10.n    outside - n is the number of the store

The Machine running the SMNnepO Minion has the following IP:

192.168.1.253

3. Preparation

3.1. OpenNMS VM

In order to get the OpenNMS VM to work it is required that you know how to build OpenNMS from source. If you do not know how to do this, go here

Note
You have to checkout branch develop.

Run this to do a clean build and assembly of OpenNMS

./clean.pl && ./compile.pl && ./assemble.pl -Dopennms.home=/opt/opennms

Copy the generated opennms-<version>.tar.gz file to opennms, e.g.

cp ~/dev/opennms/target/opennms-<version>.tar.gz ~/dev/smnnepo-gruslab/provisioning/noc/opennms/opennms.tar.gz
Note
The target file name must be opennms.tar.gz

You also have to compile/build the OpenNMS SMNnepO project.

Note
You have to checkout branch develop

Simply invoke

mvn clean install -DskipTests -Dopennms.home=/opt/opennms

And after that copy the generated smnnepo.war file to opennms, e.g.

cp ~/dev/smnnepo/sampler-repo-webapp/target/smnnepo.war ~/dev/smnnepo-grulab/provisioning/noc/opennms/smnnepo.war

4. Usage

Note
All commands must be executed from the project folder.

4.1. Status

To see which virtual machines are available, use:

vagrant status

4.2. Starting

To start the whole lab with all machines, the following command can be used:

vagrant up

To start individual virtual machines, use the following command:

vagrant up opennms
vagrant up router
etc.

The OpenNMS Web UI is forwarded to your host system by default to http://localhost:8980/opennms. If you have a service running on that port, you should stop that service or change the host port in the Vagrantfile.

4.3. Stopping

To shut down all machines from the lab, the following command can be used:

vagrant destroy -f (1)
  1. -f indicates force and does not ask if you really want to destroy all virtual machines.

To stop individual virtual machines, use the following command:

vagrant destroy -f opennms
vagrant destroy -f router
etc.

4.4. Verification

Part of the project is a verification script. It connects to each VM managed by vagrant and executes test scripts.

To execute all tests, execute the following command:

./verify.sh

5. TODO/Open Issues

  • Currently the readme refers to jira/PJSM-229 branch but should refer to develop (OpenNMS) or development/master (SMNNEPO)

  • provisioning of the OpenNMS VM seems to work, except the download of the opennms-setup.karaf file from the local OpenNMS. I always get a ssh error. However if I connect to the vm and manually run ssh -p 8101 admin@localhost "source http://localhost:8980/smnnepo/opennms-setup.karaf" it works. We have to fix this.

  • The same is for the minion.

  • Merge with fooker/playground

  • Make all Stores have the same ip address range (192.168.X.X)

  • finish all tasks found by a search for TODO

6. Limitations

At this point there are a few limitations to consider.

  • We use our own opennms-server.opennmsinit script, but we may want to use the official opennms one.

About

Gru’s Lab is a testing and demonstration environment for SMNepO

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages