-
Notifications
You must be signed in to change notification settings - Fork 217
[opampsupervisor] Add MSI installer to release artifacts #1261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[opampsupervisor] Add MSI installer to release artifacts #1261
Conversation
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
Signed-off-by: Douglas Camata <[email protected]>
There was a problem hiding this 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" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
|
I think spend some time to try to make this build on Windows runners, @pjanotti. Let me see if I don't get stuck. |
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
opampsupervisorbinary in place, with an example configuration. This configuration is installed at$INSTALL_DIR\config.yamlwhere$INSTALL_DIRis 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:
Example instructions to run
1.1. I personally recommend using the Otel Collector Contrib MSI. Remember to disable its service.
OpenTelemetry OpAMP Supervisorservice.Technical notes
opampsupervisorbecause I need a lot of changes in thewxsfile. This can be done in the future..goreleaser.yamlfiles 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.