-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Windows installation and packaging (#1775)
* wip * initial testing * add goreleaser logging * install tools * simplify manual msi build action * fix supervisor binary * polish * change back service name * remove goreleaser logs * update supervisor labels field * add supervisor_storage, rename cfg to supervisor.yaml, try removing supervisor storage on uninstall * cleanup logging and use -r flag when removing supervisor_storage * include supervisor_storage dir
- Loading branch information
1 parent
0346fab
commit 8247b64
Showing
22 changed files
with
146 additions
and
289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,3 @@ | ||
# Windows MSI building | ||
|
||
This directory contains sources for building the Windows MSI using [go-msi](https://github.com/observIQ/go-msi/) and the [Wix toolset](https://wixtoolset.org/). | ||
|
||
## Building Locally with Vagrant | ||
|
||
A local build may be performed with [vagrant](https://www.vagrantup.com/). | ||
|
||
The following make targets are available for local development: | ||
* `vagrant-prep`: Starts up the vagrant box and prepares it for building and testing. The vagrant box must be up in order for building or testing to work. **PLEASE NOTE** that valid Windows licensing is your responsibility. | ||
* `fetch-dependencies`: Fetches dependencies for building the MSI. | ||
* `build-msi`: Builds the MSI. Depends on the `fetch-dependencies` target (`fetch-dependencies` will be run every time this is run). | ||
* `test-install-msi`: Test installing the MSI. `build-msi` should be run before this is run. **NOTE** This target is flaky, it seems like the installers just don't run sometimes, so you may need to run this a couple of times, or manually install the msi's (cinc + observiq-otel-collector). | ||
* `test-uninstall-msi`: Test uninstalling the MSI. `build-msi` should be run before this is run, and the MSI should be installed (e.g. by running `test-install-msi`) | ||
* `clean`: Cleans this directory of dependencies from `fetch-dependencies`, as well as of build artifacts. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
@echo off | ||
setlocal | ||
|
||
set "install_dir=%~1" | ||
set "endpoint=%~2" | ||
set "secret_key=%~3" | ||
set "labels=%~4" | ||
|
||
echo %install_dir% | ||
echo %endpoint% | ||
echo %secret_key% | ||
echo %labels% | ||
|
||
if "%endpoint%"=="" ( | ||
echo Endpoint not specified; Not writing output yaml | ||
exit /b 0 | ||
) | ||
|
||
if "%secret_key%"=="" ( | ||
echo Secret Key not specified; Not writing output yaml | ||
exit /b 0 | ||
) | ||
|
||
set "supervisorFile=%install_dir%supervisor.yaml" | ||
set "agentBinary=%install_dir%observiq-otel-collector.exe" | ||
|
||
echo Writing manager yaml | ||
|
||
set "serverField=server:" | ||
set "endpointField= endpoint: "%endpoint%"" | ||
set "headersField= headers:" | ||
set "authorizationField= Authorization: "Secret-Key %secret_key%"" | ||
set "tlsField= tls:" | ||
set "insecureField= insecure: true" | ||
set "insecureSkipField= insecure_skip_verify: true" | ||
|
||
set "capabilitiesField=capabilities:" | ||
set "acceptsRemoteCfgField= accepts_remote_config: true" | ||
set "reportsRemoteCfgField= reports_remote_config: true" | ||
|
||
set "agentField=agent:" | ||
set "executablePathField= executable: '%agentBinary%'" | ||
set "descriptionField= description:" | ||
set "nonIdentifyingAttributesField= non_identifying_attributes:" | ||
set "serviceLabelsField= service.labels: "%labels%"" | ||
|
||
set "storageField=storage:" | ||
set "directoryField= directory: '%install_dir%supervisor_storage'" | ||
|
||
echo %serverField% >"%supervisorFile%" | ||
echo %endpointField% >>"%supervisorFile%" | ||
echo %headersField% >>"%supervisorFile%" | ||
echo %authorizationField% >>"%supervisorFile%" | ||
echo %tlsField% >>"%supervisorFile%" | ||
echo %insecureField% >>"%supervisorFile%" | ||
echo %insecureSkipField% >>"%supervisorFile%" | ||
|
||
echo %capabilitiesField% >>"%supervisorFile%" | ||
echo %acceptsRemoteCfgField% >>"%supervisorFile%" | ||
echo %reportsRemoteCfgField% >>"%supervisorFile%" | ||
|
||
echo %agentField% >>"%supervisorFile%" | ||
echo %executablePathField% >>"%supervisorFile%" | ||
echo %descriptionField% >>"%supervisorFile%" | ||
echo %nonIdentifyingAttributesField% >>"%supervisorFile%" | ||
echo %serviceLabelsField% >>"%supervisorFile%" | ||
|
||
echo %storageField% >>"%supervisorFile%" | ||
echo %directoryField% >>"%supervisorFile%" | ||
|
||
endlocal |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.