mirror of
https://github.com/deviantony/docker-elk.git
synced 2025-12-11 17:30:11 +01:00
feat!: Remove support for Compose v1
There has been no release of the deprecated 'docker-compose' Python package since v1.29.2, which was published in May 2021[1]. This release is currently broken due to a breaking change in the 'docker' Python package at version 7.0.0[1], and there is seemlingly no plan to release a patch version of Compose v1 to address the problem. The official path forward is to use Compose v2, which is now bundled with the Docker client and available on all platforms where Docker is supported. This commit additionally removes the 'version' attribute from Compose files, since it was obsoleted in the Compose Spec[3]. Closes #1017 [1]: https://pypi.org/project/docker-compose/#history [2]: docker/docker-py#3194 [3]: https://compose-spec.io
This commit is contained in:
29
README.md
29
README.md
@@ -32,11 +32,11 @@ Other available stack variants:
|
|||||||
## tl;dr
|
## tl;dr
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker-compose up setup
|
docker compose up setup
|
||||||
```
|
```
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker-compose up
|
docker compose up
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
@@ -91,7 +91,7 @@ own_. [sherifabdlnaby/elastdocker][elastdocker] is one example among others of p
|
|||||||
### Host setup
|
### Host setup
|
||||||
|
|
||||||
* [Docker Engine][docker-install] version **18.06.0** or newer
|
* [Docker Engine][docker-install] version **18.06.0** or newer
|
||||||
* [Docker Compose][compose-install] version **1.28.0** or newer (including [Compose V2][compose-v2])
|
* [Docker Compose][compose-install] version **2.0.0** or newer
|
||||||
* 1.5 GB of RAM
|
* 1.5 GB of RAM
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
@@ -128,7 +128,7 @@ instructions from the [documentation][mac-filesharing] to add more locations.
|
|||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
> [!WARNING]
|
> [!WARNING]
|
||||||
> You must rebuild the stack images with `docker-compose build` whenever you switch branch or update the
|
> You must rebuild the stack images with `docker compose build` whenever you switch branch or update the
|
||||||
> [version](#version-selection) of an already existing stack.
|
> [version](#version-selection) of an already existing stack.
|
||||||
|
|
||||||
### Bringing up the stack
|
### Bringing up the stack
|
||||||
@@ -142,13 +142,13 @@ git clone https://github.com/deviantony/docker-elk.git
|
|||||||
Then, initialize the Elasticsearch users and groups required by docker-elk by executing the command:
|
Then, initialize the Elasticsearch users and groups required by docker-elk by executing the command:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker-compose up setup
|
docker compose up setup
|
||||||
```
|
```
|
||||||
|
|
||||||
If everything went well and the setup completed without error, start the other stack components:
|
If everything went well and the setup completed without error, start the other stack components:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker-compose up
|
docker compose up
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
@@ -186,15 +186,15 @@ reset the passwords of all aforementioned Elasticsearch users to random secrets.
|
|||||||
of them.
|
of them.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker-compose exec elasticsearch bin/elasticsearch-reset-password --batch --user elastic
|
docker compose exec elasticsearch bin/elasticsearch-reset-password --batch --user elastic
|
||||||
```
|
```
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker-compose exec elasticsearch bin/elasticsearch-reset-password --batch --user logstash_internal
|
docker compose exec elasticsearch bin/elasticsearch-reset-password --batch --user logstash_internal
|
||||||
```
|
```
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker-compose exec elasticsearch bin/elasticsearch-reset-password --batch --user kibana_system
|
docker compose exec elasticsearch bin/elasticsearch-reset-password --batch --user kibana_system
|
||||||
```
|
```
|
||||||
|
|
||||||
If the need for it arises (e.g. if you want to [collect monitoring information][ls-monitoring] through Beats and
|
If the need for it arises (e.g. if you want to [collect monitoring information][ls-monitoring] through Beats and
|
||||||
@@ -223,7 +223,7 @@ reset the passwords of all aforementioned Elasticsearch users to random secrets.
|
|||||||
1. Restart Logstash and Kibana to re-connect to Elasticsearch using the new passwords
|
1. Restart Logstash and Kibana to re-connect to Elasticsearch using the new passwords
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker-compose up -d logstash kibana
|
docker compose up -d logstash kibana
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
@@ -260,7 +260,7 @@ Elasticsearch data is persisted inside a volume by default.
|
|||||||
In order to entirely shutdown the stack and remove all persisted data, use the following Docker Compose command:
|
In order to entirely shutdown the stack and remove all persisted data, use the following Docker Compose command:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker-compose down -v
|
docker compose down -v
|
||||||
```
|
```
|
||||||
|
|
||||||
### Version selection
|
### Version selection
|
||||||
@@ -269,7 +269,7 @@ This repository stays aligned with the latest version of the Elastic stack. The
|
|||||||
version (8.x).
|
version (8.x).
|
||||||
|
|
||||||
To use a different version of the core Elastic components, simply change the version number inside the [`.env`](.env)
|
To use a different version of the core Elastic components, simply change the version number inside the [`.env`](.env)
|
||||||
file. If you are upgrading an existing stack, remember to rebuild all container images using the `docker-compose build`
|
file. If you are upgrading an existing stack, remember to rebuild all container images using the `docker compose build`
|
||||||
command.
|
command.
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
@@ -359,7 +359,7 @@ To run the setup container again and re-initialize all users for which a passwor
|
|||||||
simply "up" the `setup` Compose service again:
|
simply "up" the `setup` Compose service again:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker-compose up setup
|
$ docker compose up setup
|
||||||
⠿ Container docker-elk-elasticsearch-1 Running
|
⠿ Container docker-elk-elasticsearch-1 Running
|
||||||
⠿ Container docker-elk-setup-1 Created
|
⠿ Container docker-elk-setup-1 Created
|
||||||
Attaching to docker-elk-setup-1
|
Attaching to docker-elk-setup-1
|
||||||
@@ -393,7 +393,7 @@ To add plugins to any ELK component you have to:
|
|||||||
|
|
||||||
1. Add a `RUN` statement to the corresponding `Dockerfile` (eg. `RUN logstash-plugin install logstash-filter-json`)
|
1. Add a `RUN` statement to the corresponding `Dockerfile` (eg. `RUN logstash-plugin install logstash-filter-json`)
|
||||||
1. Add the associated plugin code configuration to the service configuration (eg. Logstash input/output)
|
1. Add the associated plugin code configuration to the service configuration (eg. Logstash input/output)
|
||||||
1. Rebuild the images using the `docker-compose build` command
|
1. Rebuild the images using the `docker compose build` command
|
||||||
|
|
||||||
### How to enable the provided extensions
|
### How to enable the provided extensions
|
||||||
|
|
||||||
@@ -471,7 +471,6 @@ See the following Wiki pages:
|
|||||||
|
|
||||||
[docker-install]: https://docs.docker.com/get-docker/
|
[docker-install]: https://docs.docker.com/get-docker/
|
||||||
[compose-install]: https://docs.docker.com/compose/install/
|
[compose-install]: https://docs.docker.com/compose/install/
|
||||||
[compose-v2]: https://docs.docker.com/compose/compose-v2/
|
|
||||||
[linux-postinstall]: https://docs.docker.com/engine/install/linux-postinstall/
|
[linux-postinstall]: https://docs.docker.com/engine/install/linux-postinstall/
|
||||||
|
|
||||||
[bootstrap-checks]: https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html
|
[bootstrap-checks]: https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
version: '3.7'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
# The 'setup' service runs a one-off script which initializes users inside
|
# The 'setup' service runs a one-off script which initializes users inside
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ If you want to include the Curator extension, run Docker Compose from the root o
|
|||||||
command line argument referencing the `curator-compose.yml` file:
|
command line argument referencing the `curator-compose.yml` file:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker-compose -f docker-compose.yml -f extensions/curator/curator-compose.yml up
|
$ docker compose -f docker-compose.yml -f extensions/curator/curator-compose.yml up
|
||||||
```
|
```
|
||||||
|
|
||||||
This sample setup demonstrates how to run `curator` every minute using `cron`.
|
This sample setup demonstrates how to run `curator` every minute using `cron`.
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
version: '3.7'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
curator:
|
curator:
|
||||||
build:
|
build:
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ To include Enterprise Search in the stack, run Docker Compose from the root of t
|
|||||||
line argument referencing the `enterprise-search-compose.yml` file:
|
line argument referencing the `enterprise-search-compose.yml` file:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker-compose -f docker-compose.yml -f extensions/enterprise-search/enterprise-search-compose.yml up
|
$ docker compose -f docker-compose.yml -f extensions/enterprise-search/enterprise-search-compose.yml up
|
||||||
```
|
```
|
||||||
|
|
||||||
Allow a few minutes for the stack to start, then open your web browser at the address <http://localhost:3002> to see the
|
Allow a few minutes for the stack to start, then open your web browser at the address <http://localhost:3002> to see the
|
||||||
@@ -120,7 +120,7 @@ enterprise-search:
|
|||||||
Any change to the Enterprise Search configuration requires a restart of the Enterprise Search container:
|
Any change to the Enterprise Search configuration requires a restart of the Enterprise Search container:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker-compose -f docker-compose.yml -f extensions/enterprise-search/enterprise-search-compose.yml restart enterprise-search
|
$ docker compose -f docker-compose.yml -f extensions/enterprise-search/enterprise-search-compose.yml restart enterprise-search
|
||||||
```
|
```
|
||||||
|
|
||||||
Please refer to the following documentation page for more details about how to configure Enterprise Search inside a
|
Please refer to the following documentation page for more details about how to configure Enterprise Search inside a
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
version: '3.7'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
enterprise-search:
|
enterprise-search:
|
||||||
build:
|
build:
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ To include Filebeat in the stack, run Docker Compose from the root of the reposi
|
|||||||
argument referencing the `filebeat-compose.yml` file:
|
argument referencing the `filebeat-compose.yml` file:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker-compose -f docker-compose.yml -f extensions/filebeat/filebeat-compose.yml up
|
$ docker compose -f docker-compose.yml -f extensions/filebeat/filebeat-compose.yml up
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuring Filebeat
|
## Configuring Filebeat
|
||||||
@@ -25,7 +25,7 @@ the help of the [Configuration reference][filebeat-config].
|
|||||||
Any change to the Filebeat configuration requires a restart of the Filebeat container:
|
Any change to the Filebeat configuration requires a restart of the Filebeat container:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker-compose -f docker-compose.yml -f extensions/filebeat/filebeat-compose.yml restart filebeat
|
$ docker compose -f docker-compose.yml -f extensions/filebeat/filebeat-compose.yml restart filebeat
|
||||||
```
|
```
|
||||||
|
|
||||||
Please refer to the following documentation page for more details about how to configure Filebeat inside a Docker
|
Please refer to the following documentation page for more details about how to configure Filebeat inside a Docker
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
version: '3.7'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
filebeat:
|
filebeat:
|
||||||
build:
|
build:
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ To include Fleet Server in the stack, run Docker Compose from the root of the re
|
|||||||
argument referencing the `fleet-compose.yml` file:
|
argument referencing the `fleet-compose.yml` file:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker-compose -f docker-compose.yml -f extensions/fleet/fleet-compose.yml up
|
$ docker compose -f docker-compose.yml -f extensions/fleet/fleet-compose.yml up
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuring Fleet Server
|
## Configuring Fleet Server
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
version: '3.7'
|
|
||||||
|
|
||||||
# Example of Fleet-enrolled Elastic Agent pre-configured with an agent policy
|
# Example of Fleet-enrolled Elastic Agent pre-configured with an agent policy
|
||||||
# for running the APM Server integration (see kibana.yml).
|
# for running the APM Server integration (see kibana.yml).
|
||||||
#
|
#
|
||||||
# Run with
|
# Run with
|
||||||
# docker-compose \
|
# docker compose \
|
||||||
# -f docker-compose.yml \
|
# -f docker-compose.yml \
|
||||||
# -f extensions/fleet/fleet-compose.yml \
|
# -f extensions/fleet/fleet-compose.yml \
|
||||||
# -f extensions/fleet/agent-apmserver-compose.yml \
|
# -f extensions/fleet/agent-apmserver-compose.yml \
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
version: '3.7'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
fleet-server:
|
fleet-server:
|
||||||
build:
|
build:
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ To include Heartbeat in the stack, run Docker Compose from the root of the repos
|
|||||||
argument referencing the `heartbeat-compose.yml` file:
|
argument referencing the `heartbeat-compose.yml` file:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker-compose -f docker-compose.yml -f extensions/heartbeat/heartbeat-compose.yml up
|
$ docker compose -f docker-compose.yml -f extensions/heartbeat/heartbeat-compose.yml up
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuring Heartbeat
|
## Configuring Heartbeat
|
||||||
@@ -24,7 +24,7 @@ with the help of the [Configuration reference][heartbeat-config].
|
|||||||
Any change to the Heartbeat configuration requires a restart of the Heartbeat container:
|
Any change to the Heartbeat configuration requires a restart of the Heartbeat container:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker-compose -f docker-compose.yml -f extensions/heartbeat/heartbeat-compose.yml restart heartbeat
|
$ docker compose -f docker-compose.yml -f extensions/heartbeat/heartbeat-compose.yml restart heartbeat
|
||||||
```
|
```
|
||||||
|
|
||||||
Please refer to the following documentation page for more details about how to configure Heartbeat inside a
|
Please refer to the following documentation page for more details about how to configure Heartbeat inside a
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
version: '3.7'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
heartbeat:
|
heartbeat:
|
||||||
build:
|
build:
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ To include Metricbeat in the stack, run Docker Compose from the root of the repo
|
|||||||
argument referencing the `metricbeat-compose.yml` file:
|
argument referencing the `metricbeat-compose.yml` file:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker-compose -f docker-compose.yml -f extensions/metricbeat/metricbeat-compose.yml up
|
$ docker compose -f docker-compose.yml -f extensions/metricbeat/metricbeat-compose.yml up
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuring Metricbeat
|
## Configuring Metricbeat
|
||||||
@@ -25,7 +25,7 @@ with the help of the [Configuration reference][metricbeat-config].
|
|||||||
Any change to the Metricbeat configuration requires a restart of the Metricbeat container:
|
Any change to the Metricbeat configuration requires a restart of the Metricbeat container:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker-compose -f docker-compose.yml -f extensions/metricbeat/metricbeat-compose.yml restart metricbeat
|
$ docker compose -f docker-compose.yml -f extensions/metricbeat/metricbeat-compose.yml restart metricbeat
|
||||||
```
|
```
|
||||||
|
|
||||||
Please refer to the following documentation page for more details about how to configure Metricbeat inside a
|
Please refer to the following documentation page for more details about how to configure Metricbeat inside a
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
version: '3.7'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
metricbeat:
|
metricbeat:
|
||||||
build:
|
build:
|
||||||
|
|||||||
Reference in New Issue
Block a user