Dashboard System
Environment, Deployment, Installation and Configuration Guide
Table of Contents
1 Introduction
2 Server Breakdown
3 Server Set-up
3.1 Software needed on the servers
3.2 Trap Processor machine set-up
3.3 Correlator machine set-up
3.3.1 MySQL Databases
3.3.2 Directory and Permissions set-up
3.4 Web Application machine set-up
3.5 OpsDB machine set up
4 Puppet Configuration
4.1 Existing Puppet Repositories (not foremanised)
4.2 Puppet environment-specific working copies
4.3 Formalisation of Puppet Repositories
4.3.1 Puppet formalisation for Web Application machine
4.3.2 Puppet formalisation for Correlator machine
5 Deployment through Bamboo
6 Installation and Execution
6.1 Installing and Running a WAR in Tomcat (correlator, web application and otrs messaging application)
6.2 Installing and Running the Network Map DB Repopulator JAR
6.3 Installing and Running the Trap Processor JAR
6.4 Installing and Running the OpsDB Copier JAR
7 Log files
7.1 Trap Processor and Correlator
7.2 Web application
7.3 Network Map DB Repopulator
7.4 OTRS Messaging Application
7.5 OpsDBCopier
8 RPM Repositories

Introduction

This guide describes how to install the entire Dashboard system (end-to-end).
The system consists of 6 applications:

Each of these applications consist of a deployable artifact (either a WAR or a JAR). They are built automatically on code "push" by the Bamboo continuous integration server, which also automatically deploys the artifact to its respective TEST server Bamboo is currently unable to build or deploy the opsDBCopier project because of a certificate issue between Bamboo and the dante.win.org.uk instance of Artifactory. Please speak to Michael Haller to resolve this. In the meantime, the project can be built locally and manually deployed if and when necessary (which should be very rarely – there are likely to be very few changes to this application). .

Server Breakdown

The servers are split into PROD, UAT and TEST. Within each, there are primary (01) and backup (02) environments for each (so 6 environments in total).
Each environment is, in turn, split into 3 machines The correlator and web application machines house additional applications besides just the correlator and web application respectively (they are simply named after the main application sitting on them).:

There are 5 main applications to be split across any given environment. The split occurs as follows (Prod 01 environment used in the examples):
prod-dboard01-trap.geant.net


prod-dboard01-corr.geant.net


prod-dboard01.geant.net


There is also a small 6th application, which sits on the Production OpsDB 01 box (prod-opsdb01.geant.net), whose purpose is to periodically (or on demand) provide updated versions of OpsDB for network map population. There are unlikely to be many (if any) new versions of this particular application, so it is unlikely to be necessary to deploy it regularly.

Server Set-up

Software needed on the servers

Please consult the original ticket raised for the set up of the Dashboard machines for details of software required, but in addition to any standard pre-requisities and as a bare minimum the machines should have (in each case, the version should be the one currently on UAT, except for the Nginx exception listed below):
prod-dboard01-trap.geant.net


prod-dboard01-corr.geant.net


prod-dboard01.geant.net


Trap Processor machine set-up


Correlator machine set-up

MySQL Databases


The following databases should be present on the correlator box:


Once these have been created, please import dump files in the following repo to set up the correct table structure, constraints etc:


Run one of the following scripts to create the relevant MySQL users and add privileges:


Directory and Permissions set-up

Web Application machine set-up

OpsDB machine set up



Puppet Configuration

Existing Puppet Repositories (not foremanised)

There are puppet configurations for 2 of the 3 machines in any given environment Please note that these puppet repos contain machine-wide configurations, they do not just apply to the correlator and webapp applications. : the correlator machine and the web application machine (trap processor configuration is currently very simple and consists of only 2 files bundled inside the ZIP build artifact produced by Bamboo but outside the executable JAR).
The repositories containing these configurations have the following urls:
git@git:dashboard-correlator-puppet
git@git:dashboard-webapp-puppet
They are configured in the win.dante.org.uk gitolite server, whose admin repository is contained at the following url:
git@git:gitolite-admin
The dashboard-webapp-puppet repository was adapted from the old dashboard puppet config, and still contains the odd manifest/template/file entries which should be removed (notably references to MySQL – there is no need for a MySQL server on the webapp box, as the only database it accesses is on the correlator machine).
Both repositories should be examined carefully by SysOps/Dev when they are moved into Foreman to ensure that they are as streamlined as possible and there are no unwanted services running on the machines in question which could tie up vital system resources (notably processor cores and threads) unnecessarily.
In the dashboard-correlator-puppet repository, there is an additional branch besides master called "oneMachine". This contains the base config for the time when GEANT move to the new physical multicore Blade servers (as the web application should be moved to the correlator box at that time to speed up DB access for front-end operations). The branch essentially contains the relevant parts of dashboard-webapp-puppet configuration integrated into the dashboard-correlator-puppet. However, please note that the very latest changes from the master branches of both dashboard-correlator-puppet and dashboard-webapp-puppet have not yet been incorporated into this branch, so merging and porting will be necessary to bring this branch up to date as and when it's needed.

Puppet environment-specific working copies

Although these puppet configurations have not yet been formalised by SysOps (including full integration into Foreman and set up of formalised working copies for the various machines), we do have manually run working copies of each repository for the TEST, UAT and PROD 01 environments. These working copies are contained in a "newdashboard" subdirectory of the dante.tipper home directory on each 01 machine (bar the trap processor box, for reasons explained above). To run puppet and apply these configurations, go to the dante.tipper directory and run the executable script "run-test.sh" (more details in the Installation and Execution below).
Each working copy will have slightly different environment-specific values in some of their config files. In the dashboard-correlator-puppet working copies, you will need to set the environment prefix to either "test", "uat" or "prod" depending on which environment's working copy it is in the following files (all within files/apachetomcat7):

Similarly, in the dashboard-webapp-puppet working copies, you will need to set the environment prefix in:

And you will need to change the host prefix as appropriate in webapp-db.properties (again, to either test, uat or prod).
In the correlator, if installing to production, you will aslo need to alter correlator.properties to enable otrs integration (set the otrsIntegrationEnabled flag to true).
In the web application, if installing to production, change webapp.properties to set disableManualNetworkMapRefresh to false.
When the web application is running, system settings can be adjusted as appropriate including enabling/disabling maintenance check (this will be done by the OC).

Formalisation of Puppet Repositories

Puppet formalisation for Web Application machine

A partial formalisation of the dashboard-webapp-puppet repository has already been carried out by Michael Haller and is contained in the following repository:
it.geant.net:puppet-modules/puppet-dashboard-webapp
This repository also crucially contains the configuration for nginx (the web sockets compatible web server which should ultimately be installed on the web application box, which will forward all incoming requests aimed at the GUI on to tomcat 7).
By "partial formalisation", what is meant is that this repository was created some weeks ago, and so the latest changes in dashboard-webapp-puppet will need to be ported across into it. Once they have been, a ticket should be raised with Michael Haller to make this configuration the puppet master of test-dboard01 (and then uat-dboard01 and prod-dboard01 when it has been confirmed that test is running as desired, as well as the respective 02 servers when they are set up).

Puppet formalisation for Correlator machine

There is also a repository for formalising the correlator puppet configuration:
it.geant.net:puppet-modules/puppet-dashboard-correlator
but it is currently empty. A ticket should be raised with Michael Haller to formanise the puppet configuration in dashboard-correlator-puppet and to port it across to the new repository. This configuration can then be made the puppet master of test-dboard01-corr (and subsequently uat-dboard01-corr, as well as the respective 02 servers when they are set up).

Deployment through Bamboo

A link to all Dashboard "build" projects is below (the "deployment" projects can either be accessed through their associated build project, or through the "Deployment Projects" link at the top of the page):
https://ci.win.dante.org.uk/bamboo/browse/DBOARD
Note that some of these build projects are shared libraries used by the applications listed above; it is only the applications themselves which need to be deployed.
Each Bamboo build project is linked to a particular Git source repository. Bamboo then polls the repo in question for new commits, and rebuilds the project if changes are detected. Any "dependent" projects within Bamboo are also built at the same time (eg. changes to the "common" repo will trigger not only a build of the "common" Bamboo project, but also a build of all dependent Bamboo projects). Dependencies between Bamboo projects are established in the "Dependencies" tab when editing a build project.
As stated above, deployment of each of the applications (bar opsDBCopier) to its respective TEST environment is executed automatically at the end of a successful build (so, for example, on successful build of the "correlator" project "master" branch, the WAR produced will be automatically deployed to the /tmp directory on test-dboard01-corr.geant.net). For deployment of these applications to either UAT or PRODUCTION, you will need to manually trigger the deployment in question. To do this:


Installation and Execution

After the application in question has been deployed, it will need to be installed and run. How this is done will depend on what kind of artifact the application is packaged in. If it's a WAR, it should be run in Tomcat 7; if it's a JAR, it should be run from the command line (though configuration will vary depending on the application in question).

Installing and Running a WAR in Tomcat (correlator, dashboard web application, populator app and otrs messaging application)

Installing and Running the Trap Processor JAR

Installing and Running the OpsDB Copier JAR


Note: the dashboard webapp THE ABOVE SHOULD ALL BE AUTOMATED INSIDE AN RPM ON INSTALLATION (or using Bamboo to run scripts on the client machine).






Log files

Log4j.xml files for the Correlator, Network DB Repopulator, Web Application and OTRS messaging application are all contained in their respective puppet configurations.
The Trap Processor's log4j.xml file is internal (this could be externalised if there is ever any need to change it).
The opsdbCopier's log4j.xml file is also internal, but unlike the trap processor its only appender is currently to System.out, so the file it logs to can be determined when the jar is run.

Trap Processor and Correlator

On their respective machines, the trap processor and correlator log to the following directories respectively:
/var/log/snmptraps/new-dashboard/TrapProcessor
/var/log/snmptraps/new-dashboard/Correlator
Within these directories, you should find three files when the applications are up-and-running:
allLog.txt: contains all messages at level DEBUG and above
warnLog.txt: contains all WARN messages
errorLog.txt:contains all ERROR messages
The separate files for errors and warnings exist for monitoring and debugging convenience. All error and warning messages will also be present in the allLog.txt file.
Note that, where the correlator is concerned, you will still need to check catalina.out on start-up (and for general tomcat problems), as application logging will only be directed to the application-specific log files from the point in application context loading where the log4j log binder is initialised.

Web application

The web application is currently set up to log to dante.tipper/DashboardWeb/allLog.txt (though the puppet repo has been updated to log to /var/log/snmptraps/new-dashboard/DashboardWeb/allLog.txt instead; the changes have not yet been deployed).

Network Map DB Repopulator

The Network Map DB Repopulator is currently set up to log to dante.sanigar/populate.log (though the puppet repo has been updated to log to /var/log/snmptraps/new-dashboard/Populator/populate.log instead; the changes have not yet been deployed).

OTRS Messaging Application

The OTRS Messaging Application is currently set up to log to dante.tipper/otrs.log (though the puppet repo has been updated to log to /var/log/snmptraps/new-dashboard/OTRS/otrs.log instead; the changes have not yet been deployed).

OpsDBCopier

The OpsDBCopier application is currently logging to dante.sanigar/copier.log (but the file can be changed whenever the application is restarted).

RPM Repositories

There is one existing RPM repository for the Dashboard Web Application contained in the following repo:
git@git:rpms/dashboardV2
This repo could be used as a model for the creation of all WAR based RPMs (though ideally RPM creation would be integrated into Bamboo).
This repository follows the standard GEANT approach for creation of RPMs based on: