Open zmoog opened 10 months ago
Create the agent policy you want to use and copy the enrollment token for that policy.
#
# Store the enrollment token and Fleet URL in an environment variable.
#
# For example, UXg4Nzdvc0JsWUhmeC1CNjZKdTM6a1lKMzd6cVNSemluc1NlN1Q5YTE0UQ==
export ENROLLMENT_TOKEN="<TOKEN>"
# For example, https://whatever.fleet.eastus2.azure.elastic-cloud.com
export FLEET_URL="<URL>"
# Enroll the Agent
docker run \
--rm \
--name="elastic-agent" \
-e FLEET_ENROLL=true \
-e FLEET_URL=${FLEET_URL} \
-e FLEET_ENROLLMENT_TOKEN=${ENROLLMENT_TOKEN} \
-i zmoog/elastic-agent:8.10.5-SNAPSHOT
Suppose you have a custom agent image and you want to enroll an agent in Fleet using that image.
During this test I will try with:
8.10.4
8.10.5-SNAPSHOT
(custom build from the8.10
branch with image idaec97a66257d
— See Docker Hub for more).