-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add docs for MSI install #1039
Merged
Merged
Add docs for MSI install #1039
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
docs/en/ingest-management/elastic-agent/install-agent-msi.asciidoc
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
[[install-agent-msi]] | ||
= Install {agent} from an MSI package | ||
|
||
MSI is the file format and command line utility for the link:https://en.wikipedia.org/wiki/Windows_Installer[Windows Installer]. Windows Installer (previously known as Microsoft Installer) is an interface for Microsoft Windows that’s used to install and manage software on Windows systems. This section covers installing Elastic Agent through the MSI package repository. | ||
|
||
The MSI package installer must be run by an administrator account. The installer won't start without Windows admin permissions. | ||
|
||
[discrete] | ||
== Install {agent} | ||
|
||
. Download the latest Elastic Agent MSI binary from the link:https://www.elastic.co/downloads/elastic-agent[{agent} download page]. | ||
|
||
. Run the installer: | ||
+ | ||
[source,shell] | ||
---- | ||
elastic-agent-<VERSION>-windows-x86_64.msi INSTALLARGS="--url=<URL> --enrollment-token=<TOKEN>" | ||
---- | ||
+ | ||
Where: | ||
|
||
* `VERSION` is the {stack} version you're installing, indicated in the MSI package name. For example, `8.13.2`. | ||
* `URL` is the {fleet-server} URL used to enroll the {agent} into {fleet}. You can find this on the {fleet} *Settings* tab in {kib}. | ||
* `TOKEN` is the authentication token used to enroll the {agent} into {fleet}. You can find this on the {fleet} *Enrollment tokens* tab. | ||
|
||
+ | ||
When you run the command, the value set for `INSTALLARGS` will be passed to the <<elastic-agent-install-command,`elastic-agent install`>> command verbatim. | ||
|
||
. If you need to troubleshoot, you can install using `msiexec` with the `-L*V "log.txt"` option to create installation logs: | ||
+ | ||
[source,shell] | ||
---- | ||
msiexec -i elastic-agent-<VERSION>-windows-x86_64.msi INSTALLARGS="--url=<URL> --enrollment-token=<TOKEN>" -L*V "log.txt" | ||
---- | ||
|
||
[discrete] | ||
== Installation notes | ||
|
||
Installing using an MSI package has the following behaviors: | ||
|
||
* If `INSTALLARGS` are not provided, the MSI will copy the files to a temporary folder and finish. | ||
* If `INSTALLARGS` are provided, the MSI will copy the files to a temporary folder and then run the <<elastic-agent-install-command,`elastic-agent install`>> command with the provided parameters. If the install flow is successful, the temporary folder is deleted. | ||
* If `INSTALLARGS` are provided but the `elastic-agent install` command fails, the top-level folder is NOT deleted, in order to allow for further troubleshooting. | ||
* If the `elastic-agent install` command fails for any reason, the MSI will rollback all changes. | ||
* If the {agent} enrollment fails, the install will fail as well. To avoid this behavior you can add the <<elastic-agent-install-command,`--delay-enroll`>> option to the install command. | ||
|
||
[discrete] | ||
== Upgrading | ||
|
||
Upgrades are not supported and are prevented by the MSI itself. Instead, all of your {agent} upgrades can be managed in {fleet}. | ||
|
||
[discrete] | ||
== Installing in a custom location | ||
|
||
Starting in version 8.13, it's also possible to override the default installation folder by running the MSI from the command line, as shown: | ||
|
||
[source,shell] | ||
---- | ||
msiexec /i "<full path to msi file>" INSTALLDIR="<path of custom folder>" | ||
---- | ||
|
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 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.
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 not clear enough. I'd change to have the example from line 17 with the addition of
INSTALLDIR="<path of custom folder>"
at the endThere 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.
Good idea! Fixed in 135fd6a and changed to:
elastic-agent-<VERSION>-windows-x86_64.msi INSTALLARGS="--url=<URL> --enrollment-token=<TOKEN>" INSTALLDIR="<path of custom folder>"