SlideShare a Scribd company logo
1 of 33
Download to read offline
Container & OpenNMS
Operations
Docker & Docker Compose
DockerHub Account
http://tiny.cc/dj2019docker
http://tiny.cc/dj2019docker
docker-compose up -d
Start database and horizon
services in background
http://tiny.cc/dj2019docker
docker-compose stop [service]
Stops all services or a specific one.

The last state is preserved.
http://tiny.cc/dj2019docker
docker-compose down -v
Stops all services or a specific one.

Last state is removed.
Deletes also Volumes!
Upgrade
Backup etc, rrd, reports and database
1. Stop horizon: docker-compose stop horizon
2. Backup database:

docker-compose exec database 

pg_dump -W -U horizonuser 

-Fc -f /tmp/opennms.pgsql.gz horizondb
3. Get backup file from container:

docker cp postgresql:/tmp/opennms.pgsql.gz .
4. docker inspect horizon | grep data-horizon-rrd


demo_data-horizon-rrd:/opt/opennms/share/rrd:rw",
"Name": "demo_data-horizon-rrd",
"Source": "/var/lib/docker/volumes/demo_data-horizon-rrd/_data",
Initialise a new etc and apply changes
1. Delete the content of your ./etc directory
2. Bump the image version
3. Initalise a pristine etc from the new version with

docker-compose run horizon -i
4. Restore your modified config files and start
Merge changes from identified configs
1. Backup files you have modified
2. Merge your modified files, it means check XML schema
changes. Use

https://github.com/opennms/opennms-etc-pristine

with your target version for the merge
docker-compose exec horizon 
diff -rq -EBbw ./etc share/etc-pristine | grep "Only in ./etc[/|:]"
docker-compose exec horizon 

diff -rq -EBbw ./etc share/etc-pristine | grep "differ"
docker-compose exec horizon 

diff -rq -EBbw ./etc share/etc-pristine | grep "Only in share/etc-pristine[/|:]"
1. Identify changed configuration files
docker-compose exec horizon 
diff -rq -EBbw ./etc share/etc-pristine | grep "Only in ./etc[/|:]"
docker-compose exec horizon 

diff -rq -EBbw ./etc share/etc-pristine | grep "differ"
docker-compose exec horizon 

diff -rq -EBbw ./etc share/etc-pristine | grep "Only in share/etc-pristine[/|:]"
1. Identify changed configuration files
NMS-12129
volumes:

- ./etc-overlay:/opt/opennms-overlay
Overlay Directory
Everything is copied and overwrites files in the directory

/opt/opennms
Use it for files which are not changed from the Web UI

- opennms.properties.d

- Poller Configuration
- Notification Commands
Changes from the Web UI get overwritten on next restart:
- SNMP Communities
- Users, Groups, Destination Paths,
- Notifications, Thresholds, etc.
Troubleshooting
1. docker-compose logs -f horizon
2. docker-compose exec horizon bash
3. docker-compose run horizon -t
4. environment:

- JAVA_OPTS=-XX:+UseG1GC
5. docker cp <container-id>:/path/src /path/dest
6. Start with JPDA debugger:



JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,address=$*:8001,suspend=n
Development
• Build OCI with the CI/CD
• Integrate in Test environment
• Docker Images as artefacts
• Test the OCI itself
• target is Horizon 25
• horizon-core-web -> horizon
• Simplify overlay directories
• Run with OpenShift as non-root
• POC with confd
Challenges
Karaf Containers
926MiB
567MiB
232MiB
127MiB
CentOS 7 OpenJDK
Dependencies OpenNMS
Runtime configs Start-up configs
Double-click to edit
• Double-click to edit

More Related Content

What's hot

Speed up Drupal development with Drush
Speed up Drupal development with DrushSpeed up Drupal development with Drush
Speed up Drupal development with Drush
kbasarab
 
Recent advances in the Linux kernel resource management
Recent advances in the Linux kernel resource managementRecent advances in the Linux kernel resource management
Recent advances in the Linux kernel resource management
OpenVZ
 
Deploy, Scale and Sleep at Night with JRuby
Deploy, Scale and Sleep at Night with JRubyDeploy, Scale and Sleep at Night with JRuby
Deploy, Scale and Sleep at Night with JRuby
Joe Kutner
 

What's hot (20)

Setting up LAMP for Linux newbies
Setting up LAMP for Linux newbiesSetting up LAMP for Linux newbies
Setting up LAMP for Linux newbies
 
Speed up Drupal development with Drush
Speed up Drupal development with DrushSpeed up Drupal development with Drush
Speed up Drupal development with Drush
 
Bacula Overview
Bacula OverviewBacula Overview
Bacula Overview
 
Fluentd and WebHDFS
Fluentd and WebHDFSFluentd and WebHDFS
Fluentd and WebHDFS
 
Puppet Camp Ghent 2013
Puppet Camp Ghent 2013Puppet Camp Ghent 2013
Puppet Camp Ghent 2013
 
MongoDB Backup & Disaster Recovery
MongoDB Backup & Disaster RecoveryMongoDB Backup & Disaster Recovery
MongoDB Backup & Disaster Recovery
 
Writing and Publishing Puppet Modules
Writing and Publishing Puppet ModulesWriting and Publishing Puppet Modules
Writing and Publishing Puppet Modules
 
Recent advances in the Linux kernel resource management
Recent advances in the Linux kernel resource managementRecent advances in the Linux kernel resource management
Recent advances in the Linux kernel resource management
 
Time to rethink /proc
Time to rethink /procTime to rethink /proc
Time to rethink /proc
 
Mongodb backup
Mongodb backupMongodb backup
Mongodb backup
 
Docker container management
Docker container managementDocker container management
Docker container management
 
GlusterFS As an Object Storage
GlusterFS As an Object StorageGlusterFS As an Object Storage
GlusterFS As an Object Storage
 
configuring a warm standby, the easy way
configuring a warm standby, the easy wayconfiguring a warm standby, the easy way
configuring a warm standby, the easy way
 
Deploying pNFS over Distributed File Storage w/ Jiffin Tony Thottan and Niels...
Deploying pNFS over Distributed File Storage w/ Jiffin Tony Thottan and Niels...Deploying pNFS over Distributed File Storage w/ Jiffin Tony Thottan and Niels...
Deploying pNFS over Distributed File Storage w/ Jiffin Tony Thottan and Niels...
 
GFProxy: Scaling the GlusterFS FUSE Client
GFProxy: Scaling the GlusterFS FUSE Client	GFProxy: Scaling the GlusterFS FUSE Client
GFProxy: Scaling the GlusterFS FUSE Client
 
Scale out backups-with_bareos_and_gluster
Scale out backups-with_bareos_and_glusterScale out backups-with_bareos_and_gluster
Scale out backups-with_bareos_and_gluster
 
Lcna 2012-tutorial
Lcna 2012-tutorialLcna 2012-tutorial
Lcna 2012-tutorial
 
Deploy, Scale and Sleep at Night with JRuby
Deploy, Scale and Sleep at Night with JRubyDeploy, Scale and Sleep at Night with JRuby
Deploy, Scale and Sleep at Night with JRuby
 
Cassandra4hadoop
Cassandra4hadoopCassandra4hadoop
Cassandra4hadoop
 
Gdeploy 2.0
Gdeploy 2.0Gdeploy 2.0
Gdeploy 2.0
 

Similar to Dev-Jam 2019 - Container & OpenNMS

Be a Happier Developer with Docker: Tricks of the Trade
Be a Happier Developer with Docker: Tricks of the TradeBe a Happier Developer with Docker: Tricks of the Trade
Be a Happier Developer with Docker: Tricks of the Trade
Docker, Inc.
 

Similar to Dev-Jam 2019 - Container & OpenNMS (20)

PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
 
Challenges of container configuration
Challenges of container configurationChallenges of container configuration
Challenges of container configuration
 
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz LachJDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and Production
 
Continuous delivery with docker
Continuous delivery with dockerContinuous delivery with docker
Continuous delivery with docker
 
DCSF19 Dockerfile Best Practices
DCSF19 Dockerfile Best PracticesDCSF19 Dockerfile Best Practices
DCSF19 Dockerfile Best Practices
 
DCEU 18: Tips and Tricks of the Docker Captains
DCEU 18: Tips and Tricks of the Docker CaptainsDCEU 18: Tips and Tricks of the Docker Captains
DCEU 18: Tips and Tricks of the Docker Captains
 
Docker advance1
Docker advance1Docker advance1
Docker advance1
 
Docker advance topic
Docker advance topicDocker advance topic
Docker advance topic
 
Docker Distributed application bundle & Stack - Overview
Docker Distributed application bundle & Stack - Overview Docker Distributed application bundle & Stack - Overview
Docker Distributed application bundle & Stack - Overview
 
Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
 
Docker Compose Explained
Docker Compose ExplainedDocker Compose Explained
Docker Compose Explained
 
Docker Essentials Workshop— Innovation Labs July 2020
Docker Essentials Workshop— Innovation Labs July 2020Docker Essentials Workshop— Innovation Labs July 2020
Docker Essentials Workshop— Innovation Labs July 2020
 
Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)
 
手把手帶你學Docker 03042017
手把手帶你學Docker 03042017手把手帶你學Docker 03042017
手把手帶你學Docker 03042017
 
Be a happier developer with Docker: Tricks of the trade
Be a happier developer with Docker: Tricks of the tradeBe a happier developer with Docker: Tricks of the trade
Be a happier developer with Docker: Tricks of the trade
 
Be a Happier Developer with Docker: Tricks of the Trade
Be a Happier Developer with Docker: Tricks of the TradeBe a Happier Developer with Docker: Tricks of the Trade
Be a Happier Developer with Docker: Tricks of the Trade
 
Docker in production
Docker in productionDocker in production
Docker in production
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 

More from Ronny Trommer

More from 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 - 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
 
Dev-Jam 2019 - Developing & Contributing to OpenNMS
Dev-Jam 2019 - Developing & Contributing to OpenNMSDev-Jam 2019 - Developing & Contributing to OpenNMS
Dev-Jam 2019 - Developing & Contributing to OpenNMS
 
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
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 

Dev-Jam 2019 - Container & OpenNMS

  • 3. Docker & Docker Compose DockerHub Account
  • 5. http://tiny.cc/dj2019docker docker-compose up -d Start database and horizon services in background
  • 6. http://tiny.cc/dj2019docker docker-compose stop [service] Stops all services or a specific one.
 The last state is preserved.
  • 7. http://tiny.cc/dj2019docker docker-compose down -v Stops all services or a specific one.
 Last state is removed. Deletes also Volumes!
  • 9. Backup etc, rrd, reports and database 1. Stop horizon: docker-compose stop horizon 2. Backup database:
 docker-compose exec database 
 pg_dump -W -U horizonuser 
 -Fc -f /tmp/opennms.pgsql.gz horizondb 3. Get backup file from container:
 docker cp postgresql:/tmp/opennms.pgsql.gz . 4. docker inspect horizon | grep data-horizon-rrd 
 demo_data-horizon-rrd:/opt/opennms/share/rrd:rw", "Name": "demo_data-horizon-rrd", "Source": "/var/lib/docker/volumes/demo_data-horizon-rrd/_data",
  • 10. Initialise a new etc and apply changes 1. Delete the content of your ./etc directory 2. Bump the image version 3. Initalise a pristine etc from the new version with
 docker-compose run horizon -i 4. Restore your modified config files and start
  • 11. Merge changes from identified configs 1. Backup files you have modified 2. Merge your modified files, it means check XML schema changes. Use
 https://github.com/opennms/opennms-etc-pristine
 with your target version for the merge
  • 12. docker-compose exec horizon diff -rq -EBbw ./etc share/etc-pristine | grep "Only in ./etc[/|:]" docker-compose exec horizon 
 diff -rq -EBbw ./etc share/etc-pristine | grep "differ" docker-compose exec horizon 
 diff -rq -EBbw ./etc share/etc-pristine | grep "Only in share/etc-pristine[/|:]" 1. Identify changed configuration files
  • 13. docker-compose exec horizon diff -rq -EBbw ./etc share/etc-pristine | grep "Only in ./etc[/|:]" docker-compose exec horizon 
 diff -rq -EBbw ./etc share/etc-pristine | grep "differ" docker-compose exec horizon 
 diff -rq -EBbw ./etc share/etc-pristine | grep "Only in share/etc-pristine[/|:]" 1. Identify changed configuration files NMS-12129
  • 14. volumes:
 - ./etc-overlay:/opt/opennms-overlay Overlay Directory Everything is copied and overwrites files in the directory
 /opt/opennms Use it for files which are not changed from the Web UI
 - opennms.properties.d
 - Poller Configuration - Notification Commands Changes from the Web UI get overwritten on next restart: - SNMP Communities - Users, Groups, Destination Paths, - Notifications, Thresholds, etc.
  • 16. 1. docker-compose logs -f horizon 2. docker-compose exec horizon bash 3. docker-compose run horizon -t 4. environment:
 - JAVA_OPTS=-XX:+UseG1GC 5. docker cp <container-id>:/path/src /path/dest 6. Start with JPDA debugger:
 
 JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,address=$*:8001,suspend=n
  • 18. • Build OCI with the CI/CD • Integrate in Test environment • Docker Images as artefacts • Test the OCI itself • target is Horizon 25
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28. • horizon-core-web -> horizon • Simplify overlay directories • Run with OpenShift as non-root • POC with confd
  • 33. Double-click to edit • Double-click to edit