Skip to content

Instantly share code, notes, and snippets.

@mvrueden
Created March 14, 2017 08:42
Show Gist options
  • Save mvrueden/675c2dc0b2dd654e0468a389c836fc1a to your computer and use it in GitHub Desktop.
Save mvrueden/675c2dc0b2dd654e0468a389c836fc1a to your computer and use it in GitHub Desktop.
OpenNMS Developers Welcome Guide Draft

OpenNMS Developer Welcome Guide

This guide describes the requirements and the steps necessary in order to get started with the development of the OpenNMS project.

Operating System / Environment

To build/compile OpenNMS it is necessary to run a *nix system. You do not need to run it physically, a virtual machine is sufficient, but the choice is yours. We recommend one of the following:

Note
This documentation assumes that you chose a debian based desktop environment.

Installation

The next chapter describes the full setup of your environment in order to meet the pre-requirements.

TL;DR

Simply follow these instructions, they may vary depending on your Operating System.

# add OpenNMS as repository to install icmp and such
echo "deb http://debian.opennms.org stable main" > /etc/apt/sources.list.d/opennms.list
echo "deb-src http://debian.opennms.org stable main" >> /etc/apt/sources.list.d/opennms.list
# Add pgp key
wget -O - http://debian.opennms.org/OPENNMS-GPG-KEY | apt-key add -

# overall update
apt-get update
# install stuff
apt-get install -y software-properties-common wget git-core
apt-get install -y tree tcpdump iftop htop slurm screen
apt-get install -y zsh
apt-get install -y nsis

# install and configure PostgreSQL
apt-get install -y postgresql
echo "local   all             postgres                                peer" > /etc/postgresql/9.3/main/pg_hba.conf
echo "local   all             all                                     peer" >> /etc/postgresql/9.3/main/pg_hba.conf
echo "host    all             all             127.0.0.1/32            trust" >> /etc/postgresql/9.3/main/pg_hba.conf
echo "host    all             all             ::1/128                 trust" >> /etc/postgresql/9.3/main/pg_hba.conf
# install OpenNMS basic dependencies
apt-get install -y maven
apt-get install -y jicmp jicmp6
apt-get install -y jrrd
# fix locales
echo 'LC_ALL="en_US.utf8"' >> /etc/environment
locale-gen
# set shell to use zsh
chsh -s /bin/zsh $USER

# clone opennms
mkdir -p ~/dev/opennms
git clone https://github.com/OpenNMS/opennms.git ~/dev/opennms

After this you should be able to build OpenNMS:

cd ~/dev/opennms
./clean.pl
./compile.pl -DskipTests
./assemble.pl -p dir

After OpenNMS successfully built, please follow the instructions here under "Running OpenNMS", to start OpenNMS.

Tooling

We recommend the following toolset:

  • Git

  • Maven 3

  • IDE: IntelliJ IDEA Ultimate

  • DB-Tool: DBeaver or Postgres Admin

  • Graphing: yEd

  • Other: www.atom.io

General

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment