Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

E2E Add Auto-enroll on first startup new scenario #1499

Open
IgorGuz2000 opened this issue Aug 24, 2021 · 2 comments
Open

E2E Add Auto-enroll on first startup new scenario #1499

IgorGuz2000 opened this issue Aug 24, 2021 · 2 comments
Labels

Comments

@IgorGuz2000
Copy link
Contributor

Steps:

  1. Install agent with --delay-enroll option
  2. Check that agent is not started
  3. Restart the agent host
  4. Verify that agent started and enrolled to the Fleet

Overview

In cloud deployments and/or physical system deployments there is a case where you want an Elastic Agent to enroll into Fleet on first startup and not at installation time. Example being a prepared gold image for a cloud deployment, or a prepared sys-prepped Windows image for an organization.
Idea

The idea is to add an option to the install command to not have it actually start the service and to not actually enroll at that time.

.\elastic-agent install --delay-enroll --url https://my.fleet.server --enrollment-token ${token}

Implementation

This would proceed to install the Elastic Agent, write an enroll.yml (with the url and enrollment token) file next to the elastic-agent.yml file and not start the service.

Then on the first start of the service (which is normally on boot up of a fresh deployment) then the Elastic Agent would notice that a enroll.yml file is present, load that perform enrollment, re-exec into Fleet mode, and then delete the enroll.yml.

@IgorGuz2000
Copy link
Contributor Author

elastic/beats#26667

@IgorGuz2000
Copy link
Contributor Author

#1512

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants