From 48f379a0e52e8bd3731d2d9be3e41c77f0ea161b Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Wed, 1 Nov 2023 09:36:57 -0300 Subject: [PATCH] Remove anonymous volumes --- observability/docker-compose.yml | 15 --------------- observability/elk/elasticsearch/Dockerfile | 4 +--- observability/elk/extensions/curator/Dockerfile | 3 +++ .../elk/extensions/curator/curator-compose.yml | 3 --- observability/elk/extensions/heartbeat/Dockerfile | 2 ++ .../extensions/heartbeat/heartbeat-compose.yml | 6 ------ observability/elk/kibana/Dockerfile | 4 +--- observability/elk/logstash/Dockerfile | 4 ++-- observability/elk/setup/Dockerfile | 5 ++++- 9 files changed, 13 insertions(+), 33 deletions(-) diff --git a/observability/docker-compose.yml b/observability/docker-compose.yml index 0c78a56..32ff35a 100644 --- a/observability/docker-compose.yml +++ b/observability/docker-compose.yml @@ -7,10 +7,6 @@ services: - setup image: ${ELK_SETUP_IMAGE} init: true - volumes: - - ./elk/setup/entrypoint.sh:/entrypoint.sh:ro,Z - - ./elk/setup/lib.sh:/lib.sh:ro,Z - - ./elk/setup/roles:/roles:ro,Z environment: ELASTIC_PASSWORD: ${ELASTIC_PASSWORD:-} LOGSTASH_INTERNAL_PASSWORD: ${LOGSTASH_INTERNAL_PASSWORD:-} @@ -28,7 +24,6 @@ services: elasticsearch: image: ${ELASTICSEARCH_IMAGE} volumes: - - ./elk/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro,Z - elasticsearch:/usr/share/elasticsearch/data ports: - 9200:9200 @@ -36,12 +31,7 @@ services: environment: node.name: elasticsearch ES_JAVA_OPTS: -Xms512m -Xmx512m - # Bootstrap password. - # Used to initialize the keystore during the initial startup of - # Elasticsearch. Ignored on subsequent runs. ELASTIC_PASSWORD: ${ELASTIC_PASSWORD:-} - # Use single node discovery in order to disable production mode and avoid bootstrap checks. - # see: https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html discovery.type: single-node networks: - elk @@ -50,9 +40,6 @@ services: logstash: container_name: fids_logstash image: ${LOGSTASH_IMAGE} - volumes: - - ./elk/logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:ro,Z - - ./elk/logstash/pipeline:/usr/share/logstash/pipeline:ro,Z ports: - 5044:5044 - 50000:50000/tcp @@ -71,8 +58,6 @@ services: kibana: image: ${KIBANA_IMAGE} - volumes: - - ./elk/kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml:ro,Z ports: - 5601:5601 environment: diff --git a/observability/elk/elasticsearch/Dockerfile b/observability/elk/elasticsearch/Dockerfile index 22528c6..5dc03e3 100644 --- a/observability/elk/elasticsearch/Dockerfile +++ b/observability/elk/elasticsearch/Dockerfile @@ -1,7 +1,5 @@ ARG ELASTIC_VERSION -# https://www.docker.elastic.co/ FROM docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_VERSION} -# Add your elasticsearch plugins setup here -# Example: RUN elasticsearch-plugin install analysis-icu +COPY config/elasticsearch.yml /usr/share/elasticsearch/config/elasticsearch.yml \ No newline at end of file diff --git a/observability/elk/extensions/curator/Dockerfile b/observability/elk/extensions/curator/Dockerfile index 6cb8cdc..1b3a159 100644 --- a/observability/elk/extensions/curator/Dockerfile +++ b/observability/elk/extensions/curator/Dockerfile @@ -5,5 +5,8 @@ USER root RUN >>/var/spool/cron/crontabs/nobody \ echo '* * * * * /curator/curator /.curator/delete_log_files_curator.yml' +COPY config/curator.yml /.curator/curator.yml +COPY config/delete_log_files_curator.yml /.curator/delete_log_files_curator.yml + ENTRYPOINT ["crond"] CMD ["-f", "-d8"] diff --git a/observability/elk/extensions/curator/curator-compose.yml b/observability/elk/extensions/curator/curator-compose.yml index 31e410f..66fbbed 100644 --- a/observability/elk/extensions/curator/curator-compose.yml +++ b/observability/elk/extensions/curator/curator-compose.yml @@ -4,9 +4,6 @@ services: curator: image: ${CURATOR_IMAGE} init: true - volumes: - - ./elk/extensions/curator/config/curator.yml:/.curator/curator.yml:ro,Z - - ./elk/extensions/curator/config/delete_log_files_curator.yml:/.curator/delete_log_files_curator.yml:ro,Z environment: ELASTIC_PASSWORD: ${ELASTIC_PASSWORD:-} networks: diff --git a/observability/elk/extensions/heartbeat/Dockerfile b/observability/elk/extensions/heartbeat/Dockerfile index 0d7de19..496dfee 100644 --- a/observability/elk/extensions/heartbeat/Dockerfile +++ b/observability/elk/extensions/heartbeat/Dockerfile @@ -1,3 +1,5 @@ ARG ELASTIC_VERSION FROM docker.elastic.co/beats/heartbeat:${ELASTIC_VERSION} + +COPY config/heartbeat.yml /usr/share/heartbeat/heartbeat.yml \ No newline at end of file diff --git a/observability/elk/extensions/heartbeat/heartbeat-compose.yml b/observability/elk/extensions/heartbeat/heartbeat-compose.yml index 6a97a1f..6317f2e 100644 --- a/observability/elk/extensions/heartbeat/heartbeat-compose.yml +++ b/observability/elk/extensions/heartbeat/heartbeat-compose.yml @@ -4,14 +4,8 @@ services: heartbeat: image: ${HEARTBEAT_IMAGE} command: - # Log to stderr. - -e - # Disable config file permissions checks. Allows mounting - # 'config/heartbeat.yml' even if it's not owned by root. - # see: https://www.elastic.co/guide/en/beats/libbeat/current/config-file-permissions.html - --strict.perms=false - volumes: - - ./elk/extensions/heartbeat/config/heartbeat.yml:/usr/share/heartbeat/heartbeat.yml:ro,Z environment: HEARTBEAT_INTERNAL_PASSWORD: ${HEARTBEAT_INTERNAL_PASSWORD:-} BEATS_SYSTEM_PASSWORD: ${BEATS_SYSTEM_PASSWORD:-} diff --git a/observability/elk/kibana/Dockerfile b/observability/elk/kibana/Dockerfile index 9a075be..4000e66 100644 --- a/observability/elk/kibana/Dockerfile +++ b/observability/elk/kibana/Dockerfile @@ -1,7 +1,5 @@ ARG ELASTIC_VERSION -# https://www.docker.elastic.co/ FROM docker.elastic.co/kibana/kibana:${ELASTIC_VERSION} -# Add your kibana plugins setup here -# Example: RUN kibana-plugin install +COPY config/kibana.yml /usr/share/kibana/config/kibana.yml \ No newline at end of file diff --git a/observability/elk/logstash/Dockerfile b/observability/elk/logstash/Dockerfile index bde5808..ba721dc 100644 --- a/observability/elk/logstash/Dockerfile +++ b/observability/elk/logstash/Dockerfile @@ -3,5 +3,5 @@ ARG ELASTIC_VERSION # https://www.docker.elastic.co/ FROM docker.elastic.co/logstash/logstash:${ELASTIC_VERSION} -# Add your logstash plugins setup here -# Example: RUN logstash-plugin install logstash-filter-json +COPY config/logstash.yml /usr/share/logstash/config/logstash.yml +COPY pipeline /usr/share/logstash/pipeline \ No newline at end of file diff --git a/observability/elk/setup/Dockerfile b/observability/elk/setup/Dockerfile index 1cb7538..5dda795 100644 --- a/observability/elk/setup/Dockerfile +++ b/observability/elk/setup/Dockerfile @@ -1,6 +1,9 @@ ARG ELASTIC_VERSION -# https://www.docker.elastic.co/ FROM docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_VERSION} +COPY entrypoint.sh /entrypoint.sh +COPY lib.sh /lib.sh +COPY roles /roles + ENTRYPOINT ["/entrypoint.sh"]