fix(ext/fleet): Restart on failure

It is expected that Elastic Agent fails when Kibana is not ready. To
simplify the ergonomics of this extension, and avoid having to wait
before starting it, restart the Fleet Server service (container)
automatically on failures.

Closes #763
This commit is contained in:
Antoine Cotten 2022-10-19 18:02:55 +02:00
parent 8d99ebbe3f
commit 58613c2dcb
No known key found for this signature in database
GPG Key ID: 94637E68D4A79DD0
2 changed files with 2 additions and 4 deletions

View File

@ -13,10 +13,6 @@ Fleet Server is the central component which allows connecting Elastic Agents to
## Usage ## Usage
> **Note**
> Elastic Agent does not retry failed connections to Kibana upon the initial enrollment phase. Therefore, Kibana must be
> fully started before this extension can be run.
To include Fleet Server in the stack, run Docker Compose from the root of the repository with an additional command line To include Fleet Server in the stack, run Docker Compose from the root of the repository with an additional command line
argument referencing the `fleet-compose.yml` file: argument referencing the `fleet-compose.yml` file:

View File

@ -19,6 +19,8 @@ services:
ports: ports:
- '8220:8220' - '8220:8220'
hostname: fleet-server hostname: fleet-server
# Elastic Agent does not retry failed connections to Kibana upon the initial enrollment phase.
restart: on-failure
networks: networks:
- elk - elk
depends_on: depends_on: