Skip to content

Conversation

@douglascamata
Copy link
Member

@douglascamata douglascamata commented Nov 14, 2025

The work similar is supposed to be similar to what was done in #1209, but for Windows.

The idea is to provide a installer that can put the opampsupervisor binary in place, with an example configuration. This configuration is installed at $INSTALL_DIR\config.yaml where $INSTALL_DIR is the directory where the binary is put in.

The user is still responsible for getting their own Otel Collector (Contrib) binary and configuration, as well as putting them in paths according to the Supervisor's configuration.

With these changes I could successfully build the MSI locally (see logs below) and the CI should also build it.

Local MSI build logs

$ SKIP_SIGNS=true goreleaser release -f cmd/opampsupervisor/.goreleaser.yaml --snapshot --skip=publish --skip=announce --skip=docker --skip=sbom --skip=sign --clean
  • by using this software you agree with its EULA, available at https://goreleaser.com/eula
  • running goreleaser v2.12.7
  • skipping license check on snapshot
  • skipping announce, docker, publish, sbom, sign, and validate...
  • cleaning distribution directory
  • loading environment variables
  • getting and validating git state
    • git state                                      commit=08ea54ff4a5e3fc359f6c6538115a443097b1649 branch=oampsupervisor-msi current_tag=cmd/opampsupervisor/v0.140.0-nightly.202511140236 previous_tag=cmd/opampsupervisor/v0.140.0-nightly.202511130237 dirty=true
    • pipe skipped or partially skipped              reason=validation is disabled
  • parsing tag
  • setting defaults
    • dockers and docker_manifests are being phased out and will eventually be replaced by dockers_v2, check https://goreleaser.com/deprecations#dockers for more info
    • dockers and docker_manifests are being phased out and will eventually be replaced by dockers_v2, check https://goreleaser.com/deprecations#dockers for more info
  • snapshotting
    • building snapshot...                           version=0.140.0-next
  • ensuring distribution directory
  • setting up metadata
  • writing release metadata
  • loading go mod information
  • build prerequisites
  • building binaries
    • building                                       binary=dist/opampsupervisor-windows_windows_amd64_v1/opampsupervisor.exe
    • building                                       binary=dist/opampsupervisor-darwin_darwin_amd64_v1/opampsupervisor
    • building                                       binary=dist/opampsupervisor-linux_linux_ppc64le_power8/opampsupervisor
    • building                                       binary=dist/opampsupervisor-darwin_darwin_arm64_v8.0/opampsupervisor
    • building                                       binary=dist/opampsupervisor-linux_linux_amd64_v1/opampsupervisor
    • building                                       binary=dist/opampsupervisor-linux_linux_arm64_v8.0/opampsupervisor
  • archives
    • archiving                                      binary=opampsupervisor name=opampsupervisor_0.140.0-next_darwin_arm64
    • archiving                                      binary=opampsupervisor name=opampsupervisor_0.140.0-next_linux_arm64
    • archiving                                      binary=opampsupervisor.exe name=opampsupervisor_0.140.0-next_windows_amd64.exe
    • archiving                                      binary=opampsupervisor name=opampsupervisor_0.140.0-next_linux_amd64
    • archiving                                      binary=opampsupervisor name=opampsupervisor_0.140.0-next_linux_ppc64le
    • archiving                                      binary=opampsupervisor name=opampsupervisor_0.140.0-next_darwin_amd64
  • linux packages
    • creating                                       package=opampsupervisor format=deb arch=amd64v1 file=dist/opampsupervisor_0.140.0-next_linux_amd64.deb
    • creating                                       package=opampsupervisor format=rpm arch=ppc64le file=dist/opampsupervisor_0.140.0-next_linux_ppc64le.rpm
    • creating                                       package=opampsupervisor format=deb arch=ppc64le file=dist/opampsupervisor_0.140.0-next_linux_ppc64le.deb
    • creating                                       package=opampsupervisor format=deb arch=arm64v8.0 file=dist/opampsupervisor_0.140.0-next_linux_arm64.deb
    • creating                                       package=opampsupervisor format=rpm arch=arm64v8.0 file=dist/opampsupervisor_0.140.0-next_linux_arm64.rpm
    • creating                                       package=opampsupervisor format=rpm arch=amd64v1 file=dist/opampsupervisor_0.140.0-next_linux_amd64.rpm
  • msi
    • templating                                     src=cmd/opampsupervisor/windows-installer.wxs dst=dist/msi/opampsupervisor_0.140.0-next_windows_x64/opampsupervisor_0.140.0-next_windows_x64.wxs
    • detected schema version                        wxs=cmd/opampsupervisor/windows-installer.wxs version=v3
    • creating msi                                   path=opampsupervisor_0.140.0-next_windows_x64.msi
  • calculating checksums
  • storing artifacts metadata
  • release succeeded after 5s
  • thanks for using GoReleaser Pro!

Aaaaand here's a small screenshot of the service running:

image

Example instructions to run

  1. Install a Collector Contrib binary.
    1.1. I personally recommend using the Otel Collector Contrib MSI. Remember to disable its service.
  2. Install the Supervisor MSI
  3. Rename the example configuration provided by the MSI and edit it accordingly.
  4. Start the OpenTelemetry OpAMP Supervisor service.

Technical notes

  • I'm not using the MSI generator (yet) for the opampsupervisor because I need a lot of changes in the wxs file. This can be done in the future.
  • I had to use a path hack for the files included in the MSI installer, similar to the one in [opampsupervisor] Add deb/rpm packages for the OpAMP supervisor #1209 for the deb/rpm packages.
  • I added a small comment at the top of the .goreleaser.yaml files that should be the YAML language server to validate it against the GoReleaser Pro schema. Just helps to catch issues at dev time and prevents code editors from assuming the GoReleaser free version and throwing warnings/errors for pro-only configuration.

@douglascamata douglascamata changed the title Add .DS_Store to gitignore [opampsupervisor] Add MSI installer to release artifacts Nov 14, 2025
@douglascamata douglascamata marked this pull request as ready for review November 18, 2025 15:50
@douglascamata douglascamata requested a review from a team as a code owner November 18, 2025 15:50
Copy link
Contributor

@pjanotti pjanotti left a comment

Choose a reason for hiding this comment

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

I reviewed the cmd/opampsupervisor/windows-installer.wxs and took a glance at the GH workflows.

LGTM

@mowies had mentioned that there was some flakiness using wxl on Ubuntu, and for the collector, in the end the MSI build was moved to Windows runners (WiX is already installed on them). That said, I see it as a separate issue.

Description="Supervises an OpenTelemetry Collector and manages its configuration."
Type="ownProcess"
Vital="yes"
Start="demand"
Copy link
Contributor

Choose a reason for hiding this comment

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

Q.: why on demand? Just trying to understand the choice here and what will trigger the service to run.

Copy link
Member Author

Choose a reason for hiding this comment

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

@pjanotti I put on demand because by default the service is not "startable". It requires that you put a Collector Contrib binary in place + copy and edit the Supervisor example configuration. Do you think on-demand is not ideal for this? I'm not as knowledgeable as you on this Windows stuff, so any advice is highly appreciated. 😅

Thanks for the review, by the way!

@douglascamata
Copy link
Member Author

I think spend some time to try to make this build on Windows runners, @pjanotti. Let me see if I don't get stuck.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants