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: Update to v2 #1907

Closed
wants to merge 7 commits into from
Closed

feat: Update to v2 #1907

wants to merge 7 commits into from

Conversation

dpaasman00
Copy link
Contributor

@dpaasman00 dpaasman00 commented Oct 9, 2024

Proposed Change

Reworks updater to update an installation from v1 to v2.

  • Reads endpoint, secret_key, and agent_id values from existing manager.yaml and uses them to create basic supervisor.yaml
  • Uses healthcheck extension on agent to determine if startup is successful once service is restarted
  • Cleans up various files from v1 install that are no longer needed in a v2 install

Note:

  • This does not apply the previously used config, users will need to reapply a config from BP
  • Only the values listed above are carried over from the manager.yaml

Testing

Test following this guide: https://docs.google.com/document/d/1ZaSXnJIu-rjctiihBdBLvHymuaB7GFIW8I56biN5v8Q/edit?tab=t.0

  1. Run VERSION=v2.0.0 make release-test in this repo
  2. Run the following script as ./build-agent-upgrade.sh version=v2.0.0 from the root of this repo:
#!/bin/sh
VERSION="$1"

ref_name=$(git rev-parse HEAD | cut -b 1-8)

mkdir -p ./artifacts
mkdir -p ./tmp
cp ./scripts/install/*.sh ./artifacts
cp ./dist/*tar.gz ./artifacts
cp ./dist/*.rpm ./artifacts
cp ./dist/*.deb ./artifacts
cp ./dist/*SHA256SUMS ./artifacts
tar -czvf "./tmp/observiq-otel-collector-${VERSION}-SNAPSHOT-${ref_name}-artifacts.tar.gz" -C ./artifacts .

rm -rf ./artifacts
  1. Make sure you have a v1.64.0 or older Agent running and connected to local BP.
  2. Restart local BP instance after changing/adding top level config key offline: true.
  3. Apply the agent-upgrade to BP using bindplane upload agent-upgrade ~/bindplane-agent/tmp/observiq-otel-collector-....
  4. Select the agent in the BP agent table and select 'Upgrade Outdated Agent'.
  5. Verify Agent shuts down and comes back as a v2 agent with the same ID and is running.
Checklist
  • Changes are tested
  • CI has passed

@dpaasman00 dpaasman00 marked this pull request as ready for review October 9, 2024 11:43
@dpaasman00 dpaasman00 requested review from BinaryFissionGames and a team as code owners October 9, 2024 11:43
updater/internal/install/install.go Outdated Show resolved Hide resolved
updater/internal/updater/updater.go Show resolved Hide resolved
@dpaasman00 dpaasman00 force-pushed the feat/updater-2.0 branch 2 times, most recently from 649d5f4 to 12f3c49 Compare November 5, 2024 14:09
@dpaasman00
Copy link
Contributor Author

Moving away from updating from v1 to v2. Changes to how the supervisor runs the collector prevents accurately verifying collector has started up.

@dpaasman00 dpaasman00 closed this Dec 3, 2024
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