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

Add docs for MSI support #1036

Closed
kilfoyle opened this issue Apr 18, 2024 · 5 comments · Fixed by #1039
Closed

Add docs for MSI support #1036

kilfoyle opened this issue Apr 18, 2024 · 5 comments · Fixed by #1039
Assignees

Comments

@kilfoyle
Copy link
Contributor

kilfoyle commented Apr 18, 2024

MSI installs for Elastic Agent are added via elastic/elastic-stack-installers#212. This will GA in 8.14.

The Install Elastic Agent section of the docs will need updates, and possible the install command parameters.

@kilfoyle kilfoyle self-assigned this Apr 18, 2024
@amitkanfer
Copy link
Contributor

amitkanfer commented Apr 18, 2024

For MSI, here's my suggestion:

MSI is the file format and command line utility for the 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.

Requirements:

  • Download the latest Elastic Agent MSI binary from the download page.
  • The MSI must run as an administrator (the installer will not start w/o admin permissions)

Running from command line:

In order to fully install and enroll Agent with Fleet, command line parameters are needed via the INSTALLARGS option. The value passed to INSTALLARGS is passed to the elastic-agent install command verbatim. An example for 8.13.2 Agent:

elastic-agent-8.13.2-windows-x86_64.msi INSTALLARGS="--url=<URL> --enrollment-token=<TOKEN>"

For troubleshooting, msiexec can be used to create installation logs:

msiexec -i elastic-agent-8.13.2-windows-x86_64.msi INSTALLARGS="--url=<URL> --enrollment-token=<TOKEN>" -L*V "log.txt"

Installation notes:

  • If INSTALLARGS are not provided, the MSI will copy the files to a temp folder and finish.
  • If INSTALLARGS are provided, the MSI will copy the files to a temp folder and then run the elastic-agent install command with the provided args. If the install flow is successful, the temp folder is deleted.
  • If INSTALLARGS are provided but the elastic-agent install command fails - the top folder is NOT deleted to allow further troubleshooting.
  • if the elastic-agent install command fails (for any reason), the MSI will rollback all changes.

Upgrades:

Upgrades are not supported and prevented by the MSI itself. Agent upgrades shall happen via fleet.

Custom location:

Starting version 8.13 It's also possible to override the installation folder by executing the MSI from command line as such:
msiexec /i "<full path to msi file>" INSTALLDIR="<path of custom folder>"

@kilfoyle
Copy link
Contributor Author

Wow! This is amazing. Thanks Amit! You make it easy for me. :-)

@amitkanfer
Copy link
Contributor

@cmacknz @strawgate if i can have your eyes on this one please.

@strawgate
Copy link
Contributor

Should we note that install will fail if enrollment fails and if you do not want this behavior you should add --delay-enroll ?

@amitkanfer
Copy link
Contributor

Should we note that install will fail if enrollment fails and if you do not want this behavior you should add --delay-enroll ?

Yes, we probably should

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 a pull request may close this issue.

3 participants