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.
The following figure describes the test scenario to simulate.
-
Runs an OpenNMS instance
-
Uses ActiveMQ as a messaging server
-
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
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.
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
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
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
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
Note
|
All commands must be executed from the project folder. |
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.
To shut down all machines from the lab, the following command can be used:
vagrant destroy -f (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.
-
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