Skip to content

Add CI install-test for the Windows MSI + document MSI install/upgrade/uninstall#664

Open
vharseko wants to merge 4 commits into
OpenIdentityPlatform:masterfrom
vharseko:features/windows-distribution
Open

Add CI install-test for the Windows MSI + document MSI install/upgrade/uninstall#664
vharseko wants to merge 4 commits into
OpenIdentityPlatform:masterfrom
vharseko:features/windows-distribution

Conversation

@vharseko

@vharseko vharseko commented Jun 26, 2026

Copy link
Copy Markdown
Member

What

Add CI coverage for the Windows MSI and document MSI install/upgrade/uninstall. The opendj-msi
package was built and uploaded as an artifact but never installed or exercised in CI, and the
install guide never mentioned the MSI (.msi/msiexec appeared nowhere — only .zip and native
.deb/.rpm).

This PR does not change the MSI package itself.

CI: test-msi job (needs: build-maven, runs-on: windows-latest)

  1. Downloads the windows-latest-11 artifact (contains the .msi).
  2. Installs a JRE (Zulu 25).
  3. Silent install via msiexec /i … /quiet, then resolves the install root.
  4. Runs setup.bat --doNotStart, registers the OpenDJ Windows service
    (windows-service.bat --enableService), net start / net stop "OpenDJ Server" with a
    TCP + ldapsearch liveness check.
  5. Uninstalls via msiexec /x … /quiet.

--doNotStart is required: without it setup.bat starts a standalone server and net start then
returns exit 2 (service already started).

Docs: MSI install/upgrade/uninstall (install-guide/)

  • chap-install.adoc — new "Install With the Windows Installer (MSI)" section: GUI and silent
    msiexec /i, install location, Java as a runtime prerequisite the installer does not enforce
    (set OPENDJ_JAVA_HOME/OPENDJ_JAVA_BIN or have java on PATH), configure with setup.bat,
    optional Windows-service registration via windows-service.bat (the MSI does not register it).
  • chap-upgrade.adoc — MSI upgrade: disable service, back up, install the newer .msi over the same
    directory (instance config/db/logs kept), run upgrade.bat, re-enable the service.
  • chap-uninstall.adoc — MSI uninstall via Apps & features or msiexec /x.

Note on the Java launch condition

An earlier commit added a WiX launch condition requiring JAVA_HOME; it was reverted because a
JRE does not always set JAVA_HOME (it may be only on PATH), which would false-block valid installs.
The docs instead state Java is a prerequisite the admin ensures.

MSI validation findings (not changed here — follow-up)

# Finding Severity
1 WiX 3.11.1 (2017) is EOL — current is WiX v7; v3/v4/v5 out of community support. High
2 x86-only — installs into Program Files (x86); a server should ship x64. High
3 MSI registers no Windows service — done separately via windows-service.bat (instance-bound, post-setup). Med
4 No Authenticode signing — unsigned MSI triggers SmartScreen/UAC. Med
5 InstallerVersion="300" (Windows Installer 3.0) and CompressionLevel="none" (bloated cab). Low
6 Fragile build: WiX fetched from GitHub; dotnet40 via winetricks under wine; winetricks pinned to master; light -sval disables ICE validation. Med

Migration note: WiX v4+ is a .NET tool running natively on Linux/macOS (would drop
wine+winetricks+dotnet40); caveat: WiX v6+ carries an Open Source Maintenance Fee.

build-docker-alpine failures on some runs are an unrelated pre-existing flake.

The opendj-msi package was built and uploaded but never installed or
exercised in CI. Add a test-msi job (needs: build-maven) that, on a
windows-latest runner, installs the built .msi silently (msiexec /i),
runs setup, registers and starts/stops the OpenDJ Windows service with
an ldapsearch liveness check, then uninstalls (msiexec /x).
@vharseko vharseko requested a review from maximthomas June 26, 2026 17:38
@vharseko vharseko added the build label Jun 26, 2026
@vharseko vharseko marked this pull request as draft June 26, 2026 19:02
…E 25)

The MSI ships no JRE, so add a WiX launch condition that fails the install
early with a clear message when Java is not detected (it does not install
Java). JAVA_HOME is captured from the environment before LaunchConditions;
`Installed` keeps uninstall/repair working regardless of Java.

Fix the test-msi CI job (it failed with `net start` exit 2 "service already
started"):
- setup.bat is now invoked with --doNotStart, so the server is started only by
  `net start "OpenDJ Server"` (setup.bat no longer starts a standalone instance
  first).
- Bump actions/setup-java from 21 to 25 (latest LTS; smoke-tests the MSI under a
  fresh JRE). The runner has JAVA_HOME from setup-java, so the new launch
  condition is satisfied and the install proceeds.
@vharseko vharseko changed the title Add CI install-test for the Windows MSI (+ msi packaging validation) Add CI install-test for the Windows MSI + require Java at install (launch condition) Jun 28, 2026
vharseko added 2 commits June 28, 2026 23:22
The launch condition (Installed OR JAVA_HOME_ENV) false-blocked valid installs: a JRE does not always set JAVA_HOME (it may be only on PATH). Drop it - the MSI again only copies files and Java availability stays the admin's responsibility. The test-msi fix (--doNotStart, JRE 25) is unaffected.
The install guide covered only the .zip and native .deb/.rpm. Add Windows MSI sections to chap-install/chap-upgrade/chap-uninstall: GUI and silent msiexec install, Java as a runtime prerequisite the installer does not enforce, configure via setup.bat, optional Windows service registration via windows-service.bat, MSI upgrade (disable service, back up, install newer .msi, upgrade.bat, re-enable), and uninstall via Apps & features / msiexec /x.
@vharseko vharseko changed the title Add CI install-test for the Windows MSI + require Java at install (launch condition) Add CI install-test for the Windows MSI + document MSI install/upgrade/uninstall Jun 28, 2026
@vharseko vharseko marked this pull request as ready for review June 28, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants