Pre 8.0
, you could set an Elastic Agent container as a Fleet Server with Docker environment variables:
docker run ...
-e "KIBANA_FLEET_SETUP=1" \
-e "FLEET_ENROLL=1" \
-e "FLEET_SERVER_INSECURE_HTTP=1" \
-e "FLEET_SERVER_ENABLE=true" \
-e "FLEET_SERVER_ELASTICSEARCH_HOST=${ELASTICSEARCH_URL}" \
-e "FLEET_URL=${FLEET_URL}" \
docker.elastic.co/beats/elastic-agent:7.17.0
With 8.x
, it looks like you need to provide enrollment and service tokens
...
environment:
- FLEET_ENROLLMENT_TOKEN={enrollment-token}
- FLEET_ENROLL=1
- FLEET_URL={fleet-server-url}
- FLEET_SERVER_ENABLE=true
- FLEET_SERVER_ELASTICSEARCH_HOST={elasticsearch-host}
- FLEET_SERVER_SERVICE_TOKEN={service-token}
...
Question: Is there a way to use Docker Compose to bring up an entire Elasticsearch, Kibana, and Fleet stack or do you need to go into Kibana and manually generate and collect these tokens?