-
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
[Agent] Introduce mage demo command #17312
Conversation
Pinging @elastic/ingest-management (Project:fleet) |
@michalpristas I've been trying to test this out locally without luck, I've started with a cleaned environment and I only get an issue that it cannot pull the elastic agent. I've run the following commands:
The result I get is:
|
I also did a double check, I do not have anything set or customized in my docker environment, I am running it with the default options. |
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.
LGTM, not sure over the weekend what fixed my dev env.. :/
What does this PR do?
Introducing
mage demo
command, which runs a current agent in a container.command first checks whether image with name
elastic-agent-{commit}
already exists and if not it prepares a build and create an image, then it runs the containerIf docker image already exists it runs the image straight away.
Command needs to be run from within
x-pack/agent
directoryBy default it will enroll to local kibana at
locahost:5601
. It will use default credentials.To tweak this behavior use these env variables which will be passed to docker image (default values in square brackets):
FLEET_SETUP
- if set to 1 fleet setup will be performed creating a fleet user [false]FLEET_ADMIN_PASSWORD
- used for new fleet user [elastic]FLEET_ADMIN_USERNAME
- used for new fleet user [changeme]FLEET_CONFIG_ID
- config related to new token [defaul]FLEET_ENROLLMENT_TOKEN
- existing enrollment token to be used for enrollFLEET_TOKEN_NAME
- token name for a token to be createdKIBANA_HOST
- actual kibana host [http://localhost:5601]KIBANA_PASSWORD
- password for accessing kibana API [changeme]KIBANA_USERNAME
- username for accessing kibana API [elastic]Why is it important?
To helps devs running an agent without need of tweaking anything.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.