-
Notifications
You must be signed in to change notification settings - Fork 36
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
feat(scripts): update install.sh to use packages on macOS #1127
Conversation
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.
Are psutil
and launchcl
available on all mac platforms?
It would be nice to have e2e tests for this PR, as it is quite significant
Yes, both plutil & launchctl exist for all macOS platforms and have been there for 10+ years. E2E tests are a great idea; I'll fix up the broken test(s) and start to add coverage today. |
Testing Instructions (within the S3M flows)Replace the appropriate flow steps with the following. NOTE: The URLs used will not match those going into the UI updates Set Up Collector
Please be sure to replace <YOUR_TOKEN> and optionally modify the tags etc.
Configure App
Reload the Sumo Logic Otel Collector Service.
|
Fixed an uninstallation bug SumoLogic/sumologic-otel-collector-packaging#10 |
@amdprophet @sumo-drosiek @perk-sumo We cannot merge this PR until the UI team is ready for the rollout across deploys. The UI team is putting a dynamic property in place to pin the MacOS installation script release (i.e. 0.79.0 instead of latest). Once this is done, we can then merge this PR and cut a collector release. The UI team can then flip a feature flag on the Staging deployment and QE can run through the E2E test suites (and make corrections etc). After E2E tests pass, the UI team can do a slow rollout across deploys (days). @amdprophet in the meantime, please get builds passing and do further cleanup. We shouldn't expect a green light until late next week 😅 |
Signed-off-by: Justin Kolberg <[email protected]>
Signed-off-by: Justin Kolberg <[email protected]>
Signed-off-by: Justin Kolberg <[email protected]>
Signed-off-by: Sean Porter <[email protected]>
Signed-off-by: Justin Kolberg <[email protected]>
Signed-off-by: Justin Kolberg <[email protected]>
Signed-off-by: Justin Kolberg <[email protected]>
Signed-off-by: Justin Kolberg <[email protected]>
Signed-off-by: Justin Kolberg <[email protected]>
Signed-off-by: Justin Kolberg <[email protected]>
a5e3486
to
c76865e
Compare
Signed-off-by: Justin Kolberg <[email protected]>
pkg/scripts_test/check_darwin.go
Outdated
if path == configPath { | ||
// /etc/otelcol-sumo/sumologic.yaml | ||
permissions = configPathFilePermissions | ||
} else if path == userConfigPath { | ||
// /etc/otelcol-sumo/conf.d/common.yaml | ||
permissions = commonConfigPathFilePermissions | ||
} else { | ||
// /etc/otelcol-sumo/conf.d/* | ||
permissions = confDPathFilePermissions |
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 think we may use switch
here
@@ -723,11 +723,11 @@ function setup_config_darwin() { | |||
write_sumologic_extension "${COMMON_CONFIG_PATH}" "${INDENTATION}" | |||
|
|||
# fill in api base url | |||
if [[ -n "${API_BASE_URL}" && -z "${USER_API_URL}" ]]; then | |||
if [[ -n "${API_BASE_URL}" ]]; then |
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.
Do we need this change? If yes, can add to linux as well?
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.
This is only necessary on macOS as common.yaml
is replaced on upgrades. I haven't been able to find a way around this.
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.
two minor things
Signed-off-by: Justin Kolberg <[email protected]>
Updates
scripts/install.sh
to install otelcol-sumo using packages when run on macOS. I forked the packaging repository to create an example release for testing. SetPACKAGE_GITHUB_ORG="sensu"
insideinstall.sh
for testing installation from a GitHub Release, or use--binary-branch main
to test installing from GitHub Action artifacts.These changes should be broken up into separate functions and the install script should be refactored to account for platform differences but @portertech wants to tackle that separately from this initial implementation.