[Elastic Agent] Add upgrade CLI to initiate upgrade of Agent locally#21425
Merged
blakerouse merged 7 commits intoelastic:masterfrom Oct 5, 2020
Merged
[Elastic Agent] Add upgrade CLI to initiate upgrade of Agent locally#21425blakerouse merged 7 commits intoelastic:masterfrom
blakerouse merged 7 commits intoelastic:masterfrom
Conversation
Contributor
|
Pinging @elastic/ingest-management (Team:Ingest Management) |
Contributor
Contributor
There was a problem hiding this comment.
should we allow to upgrade agent when enrolled?
Contributor
Author
There was a problem hiding this comment.
I think we should allow it, but I can disable it if we think that is correct.
michalpristas
approved these changes
Oct 5, 2020
Contributor
michalpristas
left a comment
There was a problem hiding this comment.
Code LGTM, not sure if we should enable manual upgrade when connected to fleet, but code wise it looks ok
233f815 to
6c2666c
Compare
aef67c3 to
5a9920f
Compare
Contributor
Author
|
Switched it to not allow local upgrade when Agent is controlled by Fleet. |
3 tasks
blakerouse
added a commit
to blakerouse/beats
that referenced
this pull request
Oct 5, 2020
…lastic#21425) * Add new upgrade command to initiate a local upgrade of Elastic Agent. * Update drop path with file:// prefix is defined. * Add comment. * Add missing new line. * Add changelog. * Prevent upgrading of Agent locally when connected to Fleet. * Fixes from rebase. (cherry picked from commit c858dd0)
blakerouse
added a commit
that referenced
this pull request
Oct 6, 2020
…21425) (#21542) * Add new upgrade command to initiate a local upgrade of Elastic Agent. * Update drop path with file:// prefix is defined. * Add comment. * Add missing new line. * Add changelog. * Prevent upgrading of Agent locally when connected to Fleet. * Fixes from rebase. (cherry picked from commit c858dd0)
v1v
added a commit
to v1v/beats
that referenced
this pull request
Oct 6, 2020
* upstream/master: [CI] Setup git config globally (elastic#21562) docs: update generate_fields_docs.py (elastic#21359) Add support for additional fields from V2 ALB logs (elastic#21540) Move Prometheus query & remote_write to GA (elastic#21507) feat: add a new step to run the e2e tests for certain parts of Beats (elastic#21100) [Elastic Agent] Add elastic agent ID and version to events from filebeat and metricbeat. (elastic#21543) Release cloudfoundry input and processor as GA (elastic#21525) [Packetbeat] New SIP protocol (elastic#21221) [Filebeat][New Module] Add support for Microsoft MTP / 365 Defender (elastic#21446) [Beats][pytest] Asserting if filebeat logs include errors (elastic#20999) junipersrx-module initial release (elastic#20017) Add a persistent cache for cloudfoundry metadata based on badger (elastic#20775) Add missing changelog entry for cisco umbrella (elastic#21550) [Elastic Agent] Add upgrade CLI to initiate upgrade of Agent locally (elastic#21425) Enable filestream input (elastic#21533) Add filestream input reader (elastic#21481) [CI] fix 'no matches found within 10000' (elastic#21466) Fix billing.go aws.GetStartTimeEndTime (elastic#21531)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a new
upgradeCLI command that communicates with the running Elastic Agent to perform self-upgrading. This also allows a local upgrade to a new build using the--source-uri file://${path}command line flag.Why is it important?
To allow upgrading of the installed Elastic Agent, as well as to help with testing the upgrade process because of the allowed
file://prefix in the--source-uri.Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added tests that prove my fix is effective or that my feature worksCHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.How to test this PR locally
Using a properly installed Elastic Agent with
./elastic-agent install. You can initiate an upgrade:The above will fail because there is no pushed 8.0.0, but using the same command and the added
--source-uriupgrading can be tested.This requires that the branch was build with DEV on so that the *.asc files are not required
DEV=true mag package. You can point it to the same installed version but that will result in the following error:Adding a commit and rebuilding will result in a new version that will successfully upgrade.
Related issues