Skip to content
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: Add uninstall command to install script output (BPOP-1899) #2151

Merged
merged 4 commits into from
Feb 5, 2025

Conversation

Caleb-Hurshman
Copy link
Contributor

Proposed Change

Display the command to uninstall the collector to the output of the installation script.
Change incorrect capitalizations of 'BindPlane' to the correct 'Bindplane'.

Checklist
  • Changes are tested
  • CI has passed

@Caleb-Hurshman Caleb-Hurshman requested review from dpaasman00 and a team as code owners February 5, 2025 15:39
@Caleb-Hurshman Caleb-Hurshman force-pushed the install-script-uninstall-command branch from bb223c2 to f38d251 Compare February 5, 2025 15:42
@Caleb-Hurshman Caleb-Hurshman force-pushed the install-script-uninstall-command branch from f38d251 to 849e2cc Compare February 5, 2025 15:50
@@ -65,7 +65,7 @@ func (a *AgentClient) Do(req *http.Request) (*http.Response, error) {
req.Header.Add("Agent-ID", a.agentID)

if a.secretKey != nil {
req.Header.Add("X-BindPlane-Secret-Key", *a.secretKey)
req.Header.Add("X-Bindplane-Secret-Key", *a.secretKey)
Copy link
Contributor

Choose a reason for hiding this comment

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

This should not be changed right now

@@ -62,7 +62,7 @@ func TestAgentClientDo(t *testing.T) {
headerID := r.Header.Get("Agent-ID")
require.Equal(t, tc.agentID, headerID)

secretKeyHeader := r.Header.Get("X-BindPlane-Secret-Key")
secretKeyHeader := r.Header.Get("X-Bindplane-Secret-Key")
Copy link
Contributor

Choose a reason for hiding this comment

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

This should not be changed right now

Comment on lines 765 to 770
info "Uninstall Command: $(fg_cyan "sudo systemctl observiq-otel-collector -r")$(reset)"
else
info "Start Command: $(fg_cyan "sudo service observiq-otel-collector start")$(reset)"
info "Stop Command: $(fg_cyan "sudo service observiq-otel-collector stop")$(reset)"
info "Status Command: $(fg_cyan "sudo service observiq-otel-collector status")$(reset)"
info "Uninstall Command: $(fg_cyan "sudo service observiq-otel-collector -r")$(reset)"
Copy link
Contributor

Choose a reason for hiding this comment

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

The uninstall commands here are just like the macos one but with the unix script...

Suggested change
info "Uninstall Command: $(fg_cyan "sudo systemctl observiq-otel-collector -r")$(reset)"
else
info "Start Command: $(fg_cyan "sudo service observiq-otel-collector start")$(reset)"
info "Stop Command: $(fg_cyan "sudo service observiq-otel-collector stop")$(reset)"
info "Status Command: $(fg_cyan "sudo service observiq-otel-collector status")$(reset)"
info "Uninstall Command: $(fg_cyan "sudo service observiq-otel-collector -r")$(reset)"
info "Uninstall Command: $(fg_cyan "sudo sh -c "$(curl -fsSlL https://github.com/observIQ/bindplane-otel-collector/releases/latest/download/install_unix.sh)" install_unix.sh -r")$(reset)"
else
info "Start Command: $(fg_cyan "sudo service observiq-otel-collector start")$(reset)"
info "Stop Command: $(fg_cyan "sudo service observiq-otel-collector stop")$(reset)"
info "Status Command: $(fg_cyan "sudo service observiq-otel-collector status")$(reset)"
info "Uninstall Command: $(fg_cyan "sudo sh -c "$(curl -fsSlL https://github.com/observIQ/bindplane-otel-collector/releases/latest/download/install_unix.sh)" install_unix.sh -r")$(reset)"


The updater is a separate binary that runs as a separate process to update agent artifacts (including the agent itself) when managed by [BindPlane OP](https://observiq.com/).
The updater is a separate binary that runs as a separate process to update agent artifacts (including the agent itself) when managed by [Bindplane OP](https://observiq.com/).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The updater is a separate binary that runs as a separate process to update agent artifacts (including the agent itself) when managed by [Bindplane OP](https://observiq.com/).
The updater is a separate binary that runs as a separate process to update agent artifacts (including the agent itself) when managed by [Bindplane](https://bindplane.com/).

@@ -47,4 +47,4 @@ In the event of update failure, you may look in the following places for more in

* The agent produces logs in the log directory (by default, `$INSTALL_DIR/log/collector.log`).
* The updater produces logs in the agent's log directory, and is always set to log at a debug level (`$INSTALL_DIR/log/updater.log`).
* If the update was initiated through the BindPlane OP UI, an error message should be displayed in the UI.
* If the update was initiated through the Bindplane OP UI, an error message should be displayed in the UI.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* If the update was initiated through the Bindplane OP UI, an error message should be displayed in the UI.
* If the update was initiated through the Bindplane UI, an error message should be displayed in the UI.

@Caleb-Hurshman Caleb-Hurshman merged commit 4cb7c47 into main Feb 5, 2025
15 checks passed
@Caleb-Hurshman Caleb-Hurshman deleted the install-script-uninstall-command branch February 5, 2025 16:32
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.

2 participants