-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Cherry-pick #21206 to 7.x: [Elastic Agent] Add install/uninstall sub-command #21387
Merged
Conversation
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
* Add install command. * Fix binary name on darwin. * Fix install of mkdir. * Update shell wrapper path for darwin. * Add ability to fix broken installation. * Fix issues with install/uninstall. * Add dedicated uninstall command. * Add enrollment at the end of install command. * Fix installation of shell wrapper. * Fix root_windows.go * Fix uninstall on Windows. * Add sleep to removal on Windows. * Fix sleep to timeout in uninstall subcommand. * Fix uninstall for nested timeout with cmd.exe. * Fix uninstall on windows to actually sleep correctly. * Fix formatting. * Add changelog. * Fixes for mage check. * Create the symlink on Windows on install, fix issue with enroll questions during install. * Refactor to remove the paths.yml and symlink dance on Windows, because new install command handles that. * Cleanup repeat GA warning. * Fix symlink on Windows. * Fix control socket on windows. * Fix socket path and authority on Windows. * Fix username matching for SYSTEM. * Fix socket path on darwin. * Fix darwin service name. Fix uninstall on systemd. * Fix install on linux. * Fix RunningInstalled on Linux. * Prevent upgrade unless conditions are correct. * Add ability to force upgradable with DEV=true when built. * Fixes from code review. * Fix issue with service description. (cherry picked from commit 2996b6f)
Pinging @elastic/ingest-management (Team:Ingest Management) |
botelastic
bot
added
needs_team
Indicates that the issue/PR needs a Team:* label
and removed
needs_team
Indicates that the issue/PR needs a Team:* label
labels
Sep 29, 2020
Collaborator
💔 Build FailedExpand to view the summary
Build stats
Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
CI failures are unrelated to this change. |
ph
approved these changes
Sep 30, 2020
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.
backport LGTM.
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.
Cherry-pick of PR #21206 to 7.x branch. Original message:
What does this PR do?
Adds a new
install
anduninstall
command to the Elastic Agent.install
is used to install the Elastic Agent onto the system persistently. This will place Elastic Agent in the correct location for the platform, register it as a service and start the service.install
also has the ability to detect if an installation is broken and offer the option to overwrite that installation with the executing non-installed Elastic Agent.install
cannot be called from the installed version on the systemuninstall
is used to uninstall the Elastic Agent on the current system. This can only be called from the installed Elastic Agent. If theuninstall
command is executed from a non-installed Elastic Agent it will provide information on how to run it from the installed Elastic Agent, if it is installed on the system.Why is it important?
Provides a uniform path to installed the Elastic Agent onto the system, as well as allows that Elastic Agent to be self-upgradable.
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 works(impossible to unit test)CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
With a built package run
./elastic-agent install
Once installed run
elastic-agent uninstall
Related issues