Skip to content

NMS-20453: Setup, upgrade and restore docs - #9006

Merged
joseanesONMS merged 14 commits into
developfrom
jira/NMS-20453-upgrade-docs
Oct 22, 2026
Merged

joseanesONMS merged 14 commits into
developfrom
jira/NMS-20453-upgrade-docs

Conversation

@joseanesONMS

@joseanesONMS joseanesONMS commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Documents the core setup, upgrade, backup and restore steps

Ticket Topic Page(s) added/changed Source of truth
NMS-20453 Core setup credentials and Debian paths deployment/…/core/{centos,debian-ubuntu}/initialize-core.adoc debian/rules, debian/opennms-common.links
NMS-15295 Consistent sudo in the Debian upgrade deployment/…/upgrade/debian/up-debian.adoc n/a (commands)

The second tee in the Debian setup now appends instead of overwriting opennms.conf.

Corrections to existing docs (separate NMS-20453: Fix … commits, each can be dropped on its own)

Topic Change Source of truth
Upgrade, backup, restore Absolute /opt/opennms paths, Debian Git-diff steps, dump file name, line continuations, sudo on privileged restore commands, supported PostgreSQL on Debian restore, stale CAP_NET_RAW step debian/rules, debian/opennms-common.links, opennms.spec, opennms.service
RHEL 7/8 Removed or relabelled on pages for supported releases docs/antora.yml (compatible-rhel: '9,10')
Release notes Duplicated platform upgrade section removed git log of whatsnew.adoc

The docs build adds no warnings (develop's two existing ones remain).

External References

The vault step used a generic "password" placeholder, so it was unclear that these are the opennms and postgres passwords from the PostgreSQL setup, and the Debian/Ubuntu steps used an undefined $OPENNMS_HOME although the Debian package installs to /opt/opennms (debian/rules). The second opennms.conf line now appends instead of overwriting the first.
The Debian upgrade steps mixed sudo and plain root commands, so some apt and installer commands failed when run as a regular user. Every privileged command now uses sudo, and the first step asks for a user with sudo privileges instead of a root login.
The Debian package installs to /opt/opennms (debian/rules sets opennms.home and install.dir; debian/opennms-common.links) and does not export OPENNMS_HOME, so the commands now use absolute paths.
docs/antora.yml lists CentOS and RHEL 9 and 10 as the only compatible releases, so the RHEL 7 RRDtool tab and the RHEL 8-only PostgreSQL restore steps are removed and the remaining RHEL tabs and notes are relabelled. The restore page now points to the supported PostgreSQL setup instead of the distribution package, which is older than the compatible PostgreSQL range on RHEL 9.
The initialize-core-cap section was removed in #7907 because the shipped opennms.service unit sets AmbientCapabilities=CAP_NET_RAW CAP_NET_BIND_SERVICE (opennms-base-assembly/src/main/filtered/etc/opennms.service), and the restore copies that unit back into place, so the step pointing at the missing anchor is dropped.
The same hunk landed twice, once in 09a8bcd (#8590) and once in 5192bee, and the merge d8cdc7c kept both; the two copies are identical, so one is removed.
The RHEL backup steps write /tmp/opennms-postgres.dmp with pg_dumpall, but the restore read /tmp/opennms_postgres.dmp; the restore now uses the same name, as the Debian/Ubuntu pair already does.
Two commands ended in "&& /" instead of "&& \", so the shell treats "/" as a command instead of continuing on the next line.
The RPM installs to /opt/opennms (tools/packages/opennms/opennms.spec instprefix, with /opt/opennms/share linked to the directory holding etc-pristine) and exports OPENNMS_HOME only for login shells through /etc/profile.d/opennms.sh, so the commands now use absolute paths that also work in non-login and sudo shells and match the Debian pages.
The Debian package ships the real configuration directory at /opt/opennms/etc and makes /etc/opennms the link (debian/opennms-common.dirs, debian/opennms-common.links, debian/rules), so the mv and ln -s steps that assumed the reverse are replaced with the same commands as the RHEL tab, which also match the later etc.bak restore step.
The restore steps ran chown and the Debian apt-get install without sudo, and
appended to /etc/passwd and /etc/group with a shell redirect that runs
unprivileged even under sudo, so each step failed for a sudo user. They now
use sudo, and sudo tee -a for the appends.
@@ -28,7 +29,7 @@ NOTE: **Optional**: Define any necessary xref:operation:deep-dive/admin/configur
[source, console]
----
echo "JAVA_HEAP_SIZE=16384" | sudo tee /opt/opennms/etc/opennms.conf

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
echo "JAVA_HEAP_SIZE=16384" | sudo tee /opt/opennms/etc/opennms.conf
echo "JAVA_HEAP_SIZE=16384" | sudo tee -a /opt/opennms/etc/opennms.conf

Might as well do both.

----
echo "JAVA_HEAP_SIZE=16384" | sudo tee ${OPENNMS_HOME}/etc/opennms.conf
echo "MAXIMUM_FILE_DESCRIPTORS=512000" | sudo tee ${OPENNMS_HOME}/etc/opennms.conf
echo "JAVA_HEAP_SIZE=16384" | sudo tee /opt/opennms/etc/opennms.conf

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
echo "JAVA_HEAP_SIZE=16384" | sudo tee /opt/opennms/etc/opennms.conf
echo "JAVA_HEAP_SIZE=16384" | sudo tee -a /opt/opennms/etc/opennms.conf

# Conflicts:
#	docs/modules/deployment/pages/upgrade/debian/up-debian.adoc
#	docs/modules/deployment/pages/upgrade/restore/debian-ubuntu/restore-debian-ubuntu.adoc
…g it

The first tee replaced opennms.conf, discarding any settings already in it; both the RHEL and Debian setup pages now append, like the next line does.
@joseanesONMS

Copy link
Copy Markdown
Contributor Author

@dino2gnt Both now append with tee -a (ba60f13). I also merged develop to resolve the JDK 25 conflicts, keeping sudo on the install lines.

@joseanesONMS
joseanesONMS requested a review from dino2gnt October 22, 2026 14:36

@marshallmassengill marshallmassengill left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good to go.

…ge too

The CentOS/RHEL initialize-core page still wrote JAVA_HEAP_SIZE with a
plain tee, which replaces any existing opennms.conf. Append it with
tee -a, as the CentOS and Debian/Ubuntu pages now do.
@joseanesONMS

Copy link
Copy Markdown
Contributor Author

@dino2gnt The CentOS/RHEL initialize-core.adoc page also overwrote opennms.conf with the heap size; it now appends with tee -a too (733bdc3). All three initialize-core pages append both lines now.

@dino2gnt dino2gnt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

@joseanesONMS
joseanesONMS merged commit 37b7f97 into develop Oct 22, 2026
6 checks passed
@joseanesONMS
joseanesONMS deleted the jira/NMS-20453-upgrade-docs branch October 22, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants