SlideShare une entreprise Scribd logo
1  sur  31
Télécharger pour lire hors ligne
Contribute to OpenNMS
DEV JAM 2019 

June 24, 2019 to June 28, 2019

Markus von Rüden
who | what | where | how
Who Am I
Involved with OpenNMS since end of 2012


Full time contributor for The OpenNMS
Project since March 2013
Stuttgart, DE
https://dev.marskuh.de

mvr@opennms.com

https://github.com/mvrueden
Joined ~2013
mvrueden // mvr

Markus von Rüden
Most Recent Contributions 

Bootstrap 4 Migration
Ulf Login Screen
Geocoder Config UI
Grafana Endpoint UI
Reporting UI (WIP)
Who contributes to the
OpenNMS project?
The OpenNMS Group (TOG)
Order of The Green Polo (OGP)
OpenNMS Community
What to contribute?
Documentation
Code
Configs
Report templates
Bug Reports
Knowledge
Features
Stories
Ideas
Games
Comics
Songs
Where to Contribute?
Chat GITHUB JIRADiscourse
Configuration, documentation, patches,
features
Knowledge
blogyoutube
Contribution Workflow
Create Issue
Checkout / Create
Branch
Make Changes
Create Pull
Request
Contributor
Member of TOG
ReviewBuild Pipeline
Merge to target
branch
Next Release*
* Horizon Releases are every 3rd Thursday
Create Issue // Important fields
Feature?
Bug?
Configuration?
Story
Bug
Configuration
Issue TypeIs it a
Don’t worry about the fields too much

we will fill them in for you
Summary
Affected Version
Description
Required fields
@ issues.opennms.org
Issue Workflow
OPEN
IN PROGRESS
IN REVIEW
RESOLVED/
CLOSED
Issue Created
Working on
Issue
Pull Request
created
Pull Request
merged
Set up your environment
latest JDK 8

Maven >= 3.5

PostgreSQL Server >= 9.5

makensis

Pearl

git
MAC OS Users 

https://opennms.discourse.group/t/set-up-local-development-environment-macos/485

Docker Build Image

https://hub.docker.com/r/opennms/build-env
jicmp, jicmp6 (optional)

https://github.com/OpenNMS/jicmp6

https://github.com/OpenNMS/jicmp
Git & Github
Create account @ https://github.com/join
Generate SSH Key

https://help.github.com/en/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
Add SSH Key to your Account

https://help.github.com/en/enterprise/2.15/user/articles/adding-a-new-ssh-key-to-your-github-account
Optionally add GPG Key to your Account

https://help.github.com/en/articles/adding-a-new-gpg-key-to-your-github-account
Install git either via desktop.github.com or git command o/
Git Settings
Ensure git config —global
user.name and user.email are set
properly
Optionally sign the commits
The user.email should match any github user account email address
Please use real user name and email
address as it shows up in the
commit history
1
2
1
2
Code base // Github
• Code is hosted at GitHub

• Everything (https://github.com/OpenNMS)

• OpenNMS (https://github.com/OpenNMS/opennms)

• Patches, Config files, Documentation typo fixes, new documentation

• Only members of The OpenNMS Group and The Order of the Green Polo have
direct commit access

• There is a way for contribution —> Fork Project

• Questions: https://chat.opennms.org @ OpenNMS Development Channel
1. Go to the OpenNMS repository @ https://github.com/OpenNMS/opennms
3. Go to your fork of OpenNMS 

@ https://github.com/mvrueden/opennms
2. Fork OpenNMS
Forking the OpenNMS Project
Github Desktop Application works for Mac and Windows users
Download from https://desktop.github.com/
Clone your OpenNMS Repository @ https://github.com/mvrueden/opennms
Alternative git clone command

o/
Manually create pull request at https://github.com/OpenNMS/opennms/pulls/create and
compare across forks
Pull Request Magic
Choose base fork/branch and head fork/branch
OCA not signed?
Fill out https://wiki.opennms.org/wiki/images/6/6b/ContributorAgreement.pdf
send to oca@opennms.org
Tools
Atom.io
Visual Studio Code
Vi, Emacs, …
IntelliJ
Eclipse
yEd - Graph Editor
DataGrip - Database Tool
Development Single File / Documentation Others
Which base branch to use?
Meridian Horizon Branch
M2015 H14 foundation
bug fixes
M2016 H17 foundation-2016
M2017 H19 foundation-2017
M2018 H21 foundation-2018
M2019 TBA, most likely H25
foundation-2019
(not yet available)
- H24.1.1 release-24.1.1
next major release develop new features
Branch naming conventions
most branches jira/<issue-number> jira/NMS-1000
feature branches features/ features/graph-service
test branches <user-prefix>/ mvr/navbar-rework
Coding Conventions
• Always create JIRA issue first

• Only change what is in the focus of the issue

• No whitespace changes

• No re-arranging of imports

• Don’t comment obvious things

• Always provide test coveraged

• No issue required for small changes, such as typos or minor
documentation changes

• Always prefix commits with issue number

• No TODOs
Useful git commands
Git Cheat Sheet

https://opennms.discourse.group/t/git-cheat-sheet/602
General Build Steps
./clean.pl Deletes all target directory for root and
assembly projects
./compile.pl -DskipTests compiles project
./assemble.pl -p dir -DskipTests [-Dopennms.home=/opt/opennms] produces tar.gz distribution
time (./clean.pl && ./compile.pl -DskipTests && ./assemble.pl -Dopennms.home=/opt/opennms -
DskipTests); say "OpenNMS may be ready for deployment”
Takes roughly 15-20 Minutes if .m2 already
populated, otherwise hours
Run Individual Tests
Do a full build 

cd features/<my-feature>
mvn clean install -DskipTests
mvn test 

For the whole module, will not run ITs

mvn verify -DskipITs=false 

Runs Unit and Integration Tests



mvn clean test -Dtest=<myTest> -Dmaven.surefire.debug

mvn clean verify -DskipITs=false -Dit.test=<myIT> -Dmaven.failsafe.debug

This will also run all Unit Tests and the specified IT
Run Smoke Test
Always only run a single test. Never the whole suite!

Requires Firefox 45.0.2. Alternatively use Chrome, which requires chromedriver

Do a full build 

(or use mvn clean install -DskipTests --also-make)

cd smoke-test
mvn clean install -DskipTests 

(make sure it compiles)

mvn clean verify -Dsmoke=true -DskipITs=false -Dit.test=<myTest> [-Dmaven.failsafe.debug]
mvn clean verify -Dorg.opennms.smoketest.webdriver.use-chrome -D"chrome.path=/
Applications/Google Chrome.app/Contents/MacOS/Google Chrome" -DskipITs=false -
Dit.test=AngularLoginRedirectIT [-Dmaven.failsafe.debug]

(Run with Chrome instead of Firefox)
Run System Test
Always only run a single system test, never the whole suite

System Tests require the OpenNMS Docker Test images

Bamboo must have build them, otherwise this is going to be more tricky

Checkout repository 

https://github.com/OpenNMS/opennms-system-test-api

Modify accordingly

https://github.com/mvrueden/scripts/blob/master/opennms/system-tests.sh

Downloads the RPMs from Bamboo and builds the Docker Images

./system-tests.sh https://bamboo.opennms.org/browse/OPENNMS-OPENNMS57-2
mvn clean verify -Dorg.opennms.smoketest.docker=true -Dsmoke=true [-
Dorg.opennms.smoketest.docker.skipTearDown=true] -DskipITs=false -Dit.test=HealthCheckIT -
Dorg.opennms.advertised-host-address=192.168.2.158
• OpenNMS in Debug mode

$OPENNM_HOME/bin/opennms -t start

• If Docker Image, ensure Debug Port 8001 is
exposed

• Maven with debug options will open a port
on 5005

• Add a remote debug connection from your
IDE using port 8001 or 5005
bundle:watch *
• OpenNMS is most likely run as root

• link <root-home>/.m2/repository to <your-user>/.m2/
repository 

• ssh into OpenNMS’ Karaf Shell: ssh admin@localhost -p 8101

• bundle:watch *
• now do a mvn clean install -DskipTests of your maven module
(must be a bundle) and it will automatically be refreshed no rebuild
required
Only assemble.pl
Check all the root modules which have been changed

git status

Manually build each non bundle maven module (i.e. opennms-webapp)

mvn clean install -DskipTests
Stop OpenNMS, delete target and rerun 

./assemble.pl -p dir -DskipTests

Even faster

If only one jar changed, you can copy it to target/opennms-<version>/lib and
restart OpenNMS
UI Work
Most UI Work can be done without restarting or rebuilding 

(except Java changes or new Javascript Modules)

Java-Script changes

• Link jetty-webapps/opennms/assets to core/web-assets

•echo "org.opennms.web.assets.minified=false" > ${OPENNMS_HOME}/etc/
opennms.properties.d/assets.properties
• yarn build in core/web-assets on each change or yarn watch

JSP-Changes in opennms-webapp

rsync -auv src/main/webapp/ /Users/mvrueden/dev/opennms/drift2/target/
opennms-25.0.0-SNAPSHOT/jetty-webapps/opennms
Questions?
Where to go from here?
Developer Guide 

https://docs.opennms.org/opennms/branches/develop/guide-development/guide-
development.html

IntelliJ

https://wiki.opennms.org/wiki/IDEA_and_OpenNMS

Eclipse

https://wiki.opennms.org/wiki/Eclipse_and_OpenNMS

Issues

https://issues.opennms.org

Discourse

community.opennms.com

https://opennms.discourse.group/c/development

https://opennms.discourse.group/tags/devjam-2019

Chat

chat.opennms.com @ DEV JAM

Checkout the Github Repository

https://github.com/opennms/opennms
Git Cheat Sheet

https://opennms.discourse.group/t/git-cheat-sheet/602

Contenu connexe

Tendances

Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsLee Hanxue
 
EclipseCon 2010 talk: Towards contributors heaven
EclipseCon 2010 talk: Towards contributors heavenEclipseCon 2010 talk: Towards contributors heaven
EclipseCon 2010 talk: Towards contributors heavenmsohn
 
Resources For Floss Projects
Resources For Floss ProjectsResources For Floss Projects
Resources For Floss ProjectsJon Spriggs
 
Introduction to Git / Github
Introduction to Git / GithubIntroduction to Git / Github
Introduction to Git / GithubPaige Bailey
 
Git Introduction Tutorial
Git Introduction TutorialGit Introduction Tutorial
Git Introduction TutorialThomas Rausch
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notesglen_a_smith
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github Max Claus Nunes
 
Introduction to github using Egit
Introduction to github using EgitIntroduction to github using Egit
Introduction to github using Egitmatz_twt
 
Builder and BuildKit
Builder and BuildKitBuilder and BuildKit
Builder and BuildKitMoby Project
 
Introduction to Git, DrupalCamp LA 2015
Introduction to Git, DrupalCamp LA 2015Introduction to Git, DrupalCamp LA 2015
Introduction to Git, DrupalCamp LA 2015mwrather
 
Introduction to Version Control with GIT
Introduction to Version Control with GITIntroduction to Version Control with GIT
Introduction to Version Control with GITismet özöztürk
 

Tendances (20)

Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
 
EclipseCon 2010 talk: Towards contributors heaven
EclipseCon 2010 talk: Towards contributors heavenEclipseCon 2010 talk: Towards contributors heaven
EclipseCon 2010 talk: Towards contributors heaven
 
Inside GitHub with Chris Wanstrath
Inside GitHub with Chris WanstrathInside GitHub with Chris Wanstrath
Inside GitHub with Chris Wanstrath
 
git and github
git and githubgit and github
git and github
 
Resources For Floss Projects
Resources For Floss ProjectsResources For Floss Projects
Resources For Floss Projects
 
Git and Github workshop
Git and Github workshopGit and Github workshop
Git and Github workshop
 
Introduction to Git / Github
Introduction to Git / GithubIntroduction to Git / Github
Introduction to Git / Github
 
Git 101 for Beginners
Git 101 for Beginners Git 101 for Beginners
Git 101 for Beginners
 
Git Introduction Tutorial
Git Introduction TutorialGit Introduction Tutorial
Git Introduction Tutorial
 
Social Coding GitHub 2015
Social Coding GitHub 2015Social Coding GitHub 2015
Social Coding GitHub 2015
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notes
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
 
Introduction to github using Egit
Introduction to github using EgitIntroduction to github using Egit
Introduction to github using Egit
 
Hello, Git!
Hello, Git!Hello, Git!
Hello, Git!
 
Introduction to Mercurial
Introduction to MercurialIntroduction to Mercurial
Introduction to Mercurial
 
Builder and BuildKit
Builder and BuildKitBuilder and BuildKit
Builder and BuildKit
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
 
Git training with Devaamo
Git training with DevaamoGit training with Devaamo
Git training with Devaamo
 
Introduction to Git, DrupalCamp LA 2015
Introduction to Git, DrupalCamp LA 2015Introduction to Git, DrupalCamp LA 2015
Introduction to Git, DrupalCamp LA 2015
 
Introduction to Version Control with GIT
Introduction to Version Control with GITIntroduction to Version Control with GIT
Introduction to Version Control with GIT
 

Similaire à Dev-Jam 2019 - Developing & Contributing to OpenNMS

NLUUG Spring 2012 - OpenShift Primer
NLUUG Spring 2012 - OpenShift PrimerNLUUG Spring 2012 - OpenShift Primer
NLUUG Spring 2012 - OpenShift PrimerEric D. Schabell
 
OpenShift Primer - get your business into the Cloud today!
OpenShift Primer - get your business into the Cloud today!OpenShift Primer - get your business into the Cloud today!
OpenShift Primer - get your business into the Cloud today!Eric D. Schabell
 
Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golangBo-Yi Wu
 
Codemotion 2012 Rome - An OpenShift Primer
Codemotion 2012 Rome - An OpenShift PrimerCodemotion 2012 Rome - An OpenShift Primer
Codemotion 2012 Rome - An OpenShift PrimerEric D. Schabell
 
Open source projects with python
Open source projects with pythonOpen source projects with python
Open source projects with pythonroskakori
 
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...NETWAYS
 
Hacktoberfest 2020 - Open source for beginners
Hacktoberfest 2020 - Open source for beginnersHacktoberfest 2020 - Open source for beginners
Hacktoberfest 2020 - Open source for beginnersDeepikaRana30
 
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios
 
Hackaton for health 2015 - Sharing the Code we Make
Hackaton for health 2015 - Sharing the Code we MakeHackaton for health 2015 - Sharing the Code we Make
Hackaton for health 2015 - Sharing the Code we Makeesben1962
 
Module 4_WorkinUnixLinuxCommandAndKeepDoing
Module 4_WorkinUnixLinuxCommandAndKeepDoingModule 4_WorkinUnixLinuxCommandAndKeepDoing
Module 4_WorkinUnixLinuxCommandAndKeepDoingalhassanjawad1
 
Magento Docker Setup.pdf
Magento Docker Setup.pdfMagento Docker Setup.pdf
Magento Docker Setup.pdfAbid Malik
 
Bgoug 2019.11 building free, open-source, plsql products in cloud
Bgoug 2019.11   building free, open-source, plsql products in cloudBgoug 2019.11   building free, open-source, plsql products in cloud
Bgoug 2019.11 building free, open-source, plsql products in cloudJacek Gebal
 
Vagrant and puppet: Deployment made easy
Vagrant and puppet: Deployment made easyVagrant and puppet: Deployment made easy
Vagrant and puppet: Deployment made easyGeronimo Orozco
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushPantheon
 
VM vs Docker-Based Pipelines
VM vs Docker-Based PipelinesVM vs Docker-Based Pipelines
VM vs Docker-Based PipelinesCodefresh
 
Luis atencio on_git
Luis atencio on_gitLuis atencio on_git
Luis atencio on_gitLuis Atencio
 
Open up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHubOpen up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHubScott Graham
 

Similaire à Dev-Jam 2019 - Developing & Contributing to OpenNMS (20)

NLUUG Spring 2012 - OpenShift Primer
NLUUG Spring 2012 - OpenShift PrimerNLUUG Spring 2012 - OpenShift Primer
NLUUG Spring 2012 - OpenShift Primer
 
OpenShift Primer - get your business into the Cloud today!
OpenShift Primer - get your business into the Cloud today!OpenShift Primer - get your business into the Cloud today!
OpenShift Primer - get your business into the Cloud today!
 
Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golang
 
Codemotion 2012 Rome - An OpenShift Primer
Codemotion 2012 Rome - An OpenShift PrimerCodemotion 2012 Rome - An OpenShift Primer
Codemotion 2012 Rome - An OpenShift Primer
 
Open source projects with python
Open source projects with pythonOpen source projects with python
Open source projects with python
 
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
 
Hacktoberfest 2020 - Open source for beginners
Hacktoberfest 2020 - Open source for beginnersHacktoberfest 2020 - Open source for beginners
Hacktoberfest 2020 - Open source for beginners
 
CICD_1670665418.pdf
CICD_1670665418.pdfCICD_1670665418.pdf
CICD_1670665418.pdf
 
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
 
Hackaton for health 2015 - Sharing the Code we Make
Hackaton for health 2015 - Sharing the Code we MakeHackaton for health 2015 - Sharing the Code we Make
Hackaton for health 2015 - Sharing the Code we Make
 
Module 4_WorkinUnixLinuxCommandAndKeepDoing
Module 4_WorkinUnixLinuxCommandAndKeepDoingModule 4_WorkinUnixLinuxCommandAndKeepDoing
Module 4_WorkinUnixLinuxCommandAndKeepDoing
 
Introduction To Docker
Introduction To DockerIntroduction To Docker
Introduction To Docker
 
Magento Docker Setup.pdf
Magento Docker Setup.pdfMagento Docker Setup.pdf
Magento Docker Setup.pdf
 
Git 101
Git 101Git 101
Git 101
 
Bgoug 2019.11 building free, open-source, plsql products in cloud
Bgoug 2019.11   building free, open-source, plsql products in cloudBgoug 2019.11   building free, open-source, plsql products in cloud
Bgoug 2019.11 building free, open-source, plsql products in cloud
 
Vagrant and puppet: Deployment made easy
Vagrant and puppet: Deployment made easyVagrant and puppet: Deployment made easy
Vagrant and puppet: Deployment made easy
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and Drush
 
VM vs Docker-Based Pipelines
VM vs Docker-Based PipelinesVM vs Docker-Based Pipelines
VM vs Docker-Based Pipelines
 
Luis atencio on_git
Luis atencio on_gitLuis atencio on_git
Luis atencio on_git
 
Open up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHubOpen up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHub
 

Plus de Ronny Trommer

DevJam 2019 - OpenNMS Integration API
DevJam 2019 - OpenNMS Integration APIDevJam 2019 - OpenNMS Integration API
DevJam 2019 - OpenNMS Integration APIRonny Trommer
 
DevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesDevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesRonny Trommer
 
Dev-Jam 2019 - New since Dev-Jam 2018
Dev-Jam 2019 - New since Dev-Jam 2018Dev-Jam 2019 - New since Dev-Jam 2018
Dev-Jam 2019 - New since Dev-Jam 2018Ronny Trommer
 
Dev-Jam 2019 - Container & OpenNMS
Dev-Jam 2019 - Container & OpenNMSDev-Jam 2019 - Container & OpenNMS
Dev-Jam 2019 - Container & OpenNMSRonny Trommer
 
Dev-Jam 2019 - Developing OpenNMS on Apache Karaf
Dev-Jam 2019 - Developing OpenNMS on Apache KarafDev-Jam 2019 - Developing OpenNMS on Apache Karaf
Dev-Jam 2019 - Developing OpenNMS on Apache KarafRonny Trommer
 
DevJam 2019 - Building an ALEC Time Engine
DevJam 2019 - Building an ALEC Time EngineDevJam 2019 - Building an ALEC Time Engine
DevJam 2019 - Building an ALEC Time EngineRonny Trommer
 
OUCE Reporting Enhancements in OpenNMS
OUCE Reporting Enhancements in OpenNMSOUCE Reporting Enhancements in OpenNMS
OUCE Reporting Enhancements in OpenNMSRonny Trommer
 
Who Pulls the Strings?
Who Pulls the Strings?Who Pulls the Strings?
Who Pulls the Strings?Ronny Trommer
 
OSMC 2011 - Introduction to OpenNMS
OSMC 2011 - Introduction to OpenNMSOSMC 2011 - Introduction to OpenNMS
OSMC 2011 - Introduction to OpenNMSRonny Trommer
 

Plus de Ronny Trommer (9)

DevJam 2019 - OpenNMS Integration API
DevJam 2019 - OpenNMS Integration APIDevJam 2019 - OpenNMS Integration API
DevJam 2019 - OpenNMS Integration API
 
DevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesDevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to Kubernetes
 
Dev-Jam 2019 - New since Dev-Jam 2018
Dev-Jam 2019 - New since Dev-Jam 2018Dev-Jam 2019 - New since Dev-Jam 2018
Dev-Jam 2019 - New since Dev-Jam 2018
 
Dev-Jam 2019 - Container & OpenNMS
Dev-Jam 2019 - Container & OpenNMSDev-Jam 2019 - Container & OpenNMS
Dev-Jam 2019 - Container & OpenNMS
 
Dev-Jam 2019 - Developing OpenNMS on Apache Karaf
Dev-Jam 2019 - Developing OpenNMS on Apache KarafDev-Jam 2019 - Developing OpenNMS on Apache Karaf
Dev-Jam 2019 - Developing OpenNMS on Apache Karaf
 
DevJam 2019 - Building an ALEC Time Engine
DevJam 2019 - Building an ALEC Time EngineDevJam 2019 - Building an ALEC Time Engine
DevJam 2019 - Building an ALEC Time Engine
 
OUCE Reporting Enhancements in OpenNMS
OUCE Reporting Enhancements in OpenNMSOUCE Reporting Enhancements in OpenNMS
OUCE Reporting Enhancements in OpenNMS
 
Who Pulls the Strings?
Who Pulls the Strings?Who Pulls the Strings?
Who Pulls the Strings?
 
OSMC 2011 - Introduction to OpenNMS
OSMC 2011 - Introduction to OpenNMSOSMC 2011 - Introduction to OpenNMS
OSMC 2011 - Introduction to OpenNMS
 

Dernier

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 

Dernier (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 

Dev-Jam 2019 - Developing & Contributing to OpenNMS

  • 1. Contribute to OpenNMS DEV JAM 2019 
 June 24, 2019 to June 28, 2019 Markus von Rüden who | what | where | how
  • 2. Who Am I Involved with OpenNMS since end of 2012 
 Full time contributor for The OpenNMS Project since March 2013 Stuttgart, DE https://dev.marskuh.de
 mvr@opennms.com
 https://github.com/mvrueden Joined ~2013 mvrueden // mvr
 Markus von Rüden Most Recent Contributions 
 Bootstrap 4 Migration Ulf Login Screen Geocoder Config UI Grafana Endpoint UI Reporting UI (WIP)
  • 3. Who contributes to the OpenNMS project? The OpenNMS Group (TOG) Order of The Green Polo (OGP) OpenNMS Community
  • 4. What to contribute? Documentation Code Configs Report templates Bug Reports Knowledge Features Stories Ideas Games Comics Songs
  • 5. Where to Contribute? Chat GITHUB JIRADiscourse Configuration, documentation, patches, features Knowledge blogyoutube
  • 6. Contribution Workflow Create Issue Checkout / Create Branch Make Changes Create Pull Request Contributor Member of TOG ReviewBuild Pipeline Merge to target branch Next Release* * Horizon Releases are every 3rd Thursday
  • 7. Create Issue // Important fields Feature? Bug? Configuration? Story Bug Configuration Issue TypeIs it a Don’t worry about the fields too much
 we will fill them in for you Summary Affected Version Description Required fields @ issues.opennms.org
  • 8. Issue Workflow OPEN IN PROGRESS IN REVIEW RESOLVED/ CLOSED Issue Created Working on Issue Pull Request created Pull Request merged
  • 9. Set up your environment latest JDK 8 Maven >= 3.5 PostgreSQL Server >= 9.5 makensis Pearl git MAC OS Users 
 https://opennms.discourse.group/t/set-up-local-development-environment-macos/485
 Docker Build Image
 https://hub.docker.com/r/opennms/build-env jicmp, jicmp6 (optional)
 https://github.com/OpenNMS/jicmp6
 https://github.com/OpenNMS/jicmp
  • 10. Git & Github Create account @ https://github.com/join Generate SSH Key
 https://help.github.com/en/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent Add SSH Key to your Account
 https://help.github.com/en/enterprise/2.15/user/articles/adding-a-new-ssh-key-to-your-github-account Optionally add GPG Key to your Account
 https://help.github.com/en/articles/adding-a-new-gpg-key-to-your-github-account Install git either via desktop.github.com or git command o/
  • 11. Git Settings Ensure git config —global user.name and user.email are set properly Optionally sign the commits The user.email should match any github user account email address Please use real user name and email address as it shows up in the commit history 1 2 1 2
  • 12. Code base // Github • Code is hosted at GitHub • Everything (https://github.com/OpenNMS) • OpenNMS (https://github.com/OpenNMS/opennms) • Patches, Config files, Documentation typo fixes, new documentation • Only members of The OpenNMS Group and The Order of the Green Polo have direct commit access • There is a way for contribution —> Fork Project • Questions: https://chat.opennms.org @ OpenNMS Development Channel
  • 13. 1. Go to the OpenNMS repository @ https://github.com/OpenNMS/opennms 3. Go to your fork of OpenNMS 
 @ https://github.com/mvrueden/opennms 2. Fork OpenNMS Forking the OpenNMS Project
  • 14. Github Desktop Application works for Mac and Windows users Download from https://desktop.github.com/ Clone your OpenNMS Repository @ https://github.com/mvrueden/opennms Alternative git clone command
 o/
  • 15. Manually create pull request at https://github.com/OpenNMS/opennms/pulls/create and compare across forks Pull Request Magic Choose base fork/branch and head fork/branch
  • 16. OCA not signed? Fill out https://wiki.opennms.org/wiki/images/6/6b/ContributorAgreement.pdf send to oca@opennms.org
  • 17. Tools Atom.io Visual Studio Code Vi, Emacs, … IntelliJ Eclipse yEd - Graph Editor DataGrip - Database Tool Development Single File / Documentation Others
  • 18. Which base branch to use? Meridian Horizon Branch M2015 H14 foundation bug fixes M2016 H17 foundation-2016 M2017 H19 foundation-2017 M2018 H21 foundation-2018 M2019 TBA, most likely H25 foundation-2019 (not yet available) - H24.1.1 release-24.1.1 next major release develop new features
  • 19. Branch naming conventions most branches jira/<issue-number> jira/NMS-1000 feature branches features/ features/graph-service test branches <user-prefix>/ mvr/navbar-rework
  • 20. Coding Conventions • Always create JIRA issue first • Only change what is in the focus of the issue • No whitespace changes • No re-arranging of imports • Don’t comment obvious things • Always provide test coveraged • No issue required for small changes, such as typos or minor documentation changes • Always prefix commits with issue number • No TODOs
  • 21. Useful git commands Git Cheat Sheet
 https://opennms.discourse.group/t/git-cheat-sheet/602
  • 22. General Build Steps ./clean.pl Deletes all target directory for root and assembly projects ./compile.pl -DskipTests compiles project ./assemble.pl -p dir -DskipTests [-Dopennms.home=/opt/opennms] produces tar.gz distribution time (./clean.pl && ./compile.pl -DskipTests && ./assemble.pl -Dopennms.home=/opt/opennms - DskipTests); say "OpenNMS may be ready for deployment” Takes roughly 15-20 Minutes if .m2 already populated, otherwise hours
  • 23. Run Individual Tests Do a full build cd features/<my-feature> mvn clean install -DskipTests mvn test 
 For the whole module, will not run ITs mvn verify -DskipITs=false 
 Runs Unit and Integration Tests
 
 mvn clean test -Dtest=<myTest> -Dmaven.surefire.debug mvn clean verify -DskipITs=false -Dit.test=<myIT> -Dmaven.failsafe.debug
 This will also run all Unit Tests and the specified IT
  • 24. Run Smoke Test Always only run a single test. Never the whole suite! Requires Firefox 45.0.2. Alternatively use Chrome, which requires chromedriver Do a full build 
 (or use mvn clean install -DskipTests --also-make) cd smoke-test mvn clean install -DskipTests 
 (make sure it compiles) mvn clean verify -Dsmoke=true -DskipITs=false -Dit.test=<myTest> [-Dmaven.failsafe.debug] mvn clean verify -Dorg.opennms.smoketest.webdriver.use-chrome -D"chrome.path=/ Applications/Google Chrome.app/Contents/MacOS/Google Chrome" -DskipITs=false - Dit.test=AngularLoginRedirectIT [-Dmaven.failsafe.debug]
 (Run with Chrome instead of Firefox)
  • 25. Run System Test Always only run a single system test, never the whole suite System Tests require the OpenNMS Docker Test images Bamboo must have build them, otherwise this is going to be more tricky Checkout repository 
 https://github.com/OpenNMS/opennms-system-test-api Modify accordingly
 https://github.com/mvrueden/scripts/blob/master/opennms/system-tests.sh Downloads the RPMs from Bamboo and builds the Docker Images
 ./system-tests.sh https://bamboo.opennms.org/browse/OPENNMS-OPENNMS57-2 mvn clean verify -Dorg.opennms.smoketest.docker=true -Dsmoke=true [- Dorg.opennms.smoketest.docker.skipTearDown=true] -DskipITs=false -Dit.test=HealthCheckIT - Dorg.opennms.advertised-host-address=192.168.2.158
  • 26. • OpenNMS in Debug mode
 $OPENNM_HOME/bin/opennms -t start • If Docker Image, ensure Debug Port 8001 is exposed • Maven with debug options will open a port on 5005 • Add a remote debug connection from your IDE using port 8001 or 5005
  • 27. bundle:watch * • OpenNMS is most likely run as root • link <root-home>/.m2/repository to <your-user>/.m2/ repository • ssh into OpenNMS’ Karaf Shell: ssh admin@localhost -p 8101 • bundle:watch * • now do a mvn clean install -DskipTests of your maven module (must be a bundle) and it will automatically be refreshed no rebuild required
  • 28. Only assemble.pl Check all the root modules which have been changed
 git status Manually build each non bundle maven module (i.e. opennms-webapp)
 mvn clean install -DskipTests Stop OpenNMS, delete target and rerun 
 ./assemble.pl -p dir -DskipTests Even faster
 If only one jar changed, you can copy it to target/opennms-<version>/lib and restart OpenNMS
  • 29. UI Work Most UI Work can be done without restarting or rebuilding 
 (except Java changes or new Javascript Modules) Java-Script changes • Link jetty-webapps/opennms/assets to core/web-assets •echo "org.opennms.web.assets.minified=false" > ${OPENNMS_HOME}/etc/ opennms.properties.d/assets.properties • yarn build in core/web-assets on each change or yarn watch JSP-Changes in opennms-webapp
 rsync -auv src/main/webapp/ /Users/mvrueden/dev/opennms/drift2/target/ opennms-25.0.0-SNAPSHOT/jetty-webapps/opennms
  • 31. Where to go from here? Developer Guide 
 https://docs.opennms.org/opennms/branches/develop/guide-development/guide- development.html IntelliJ
 https://wiki.opennms.org/wiki/IDEA_and_OpenNMS Eclipse
 https://wiki.opennms.org/wiki/Eclipse_and_OpenNMS Issues
 https://issues.opennms.org Discourse
 community.opennms.com
 https://opennms.discourse.group/c/development
 https://opennms.discourse.group/tags/devjam-2019 Chat
 chat.opennms.com @ DEV JAM Checkout the Github Repository
 https://github.com/opennms/opennms Git Cheat Sheet
 https://opennms.discourse.group/t/git-cheat-sheet/602