Skip to content

Commit

Permalink
perf($ELK): enable elasticsearch security
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
johnnymillergh committed Feb 23, 2021
1 parent 5dffc69 commit bbe59a9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions docker/.env
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,5 @@ MUSCLE_MIS_CONTAINER_NAME="maf.muscle-mis.${SPRING_ENVIRONMENT}"
# JIB contain's Java tool options #
##################################################
JAVA_TOOL_OPTIONS="-Xms128m -Xmx128m -Dspring.profiles.active=${SPRING_ENVIRONMENT} -Dspring.cloud.consul.host=${CONSUL_SERVICE_REGISTRY_CONTAINER_NAME}"

MAF_ELASTICSEARCH_PASSWORD=maf@elasticsearch
4 changes: 2 additions & 2 deletions docker/config/logstash/logstash-spring-boot.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ output {
elasticsearch {
hosts => ["es:9200"]
index => "maf-logstash-%{[appname]}-%{+YYYY.MM.dd}"
#user => "elastic"
#password => "changeme"
user => "elastic"
password => "maf@elasticsearch"
}
}
6 changes: 4 additions & 2 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ services:
cluster.name: elasticsearch
discovery.type: single-node
ES_JAVA_OPTS: "-Xms256m -Xmx256m"
ELASTIC_PASSWORD: ${MAF_ELASTICSEARCH_PASSWORD}
xpack.security.enabled: "true"
networks:
muscle_and_fitness_network:

Expand All @@ -163,8 +165,6 @@ services:
kibana:
container_name: "${KIBANA_CONTAINER_NAME}"
image: kibana:${KIBANA_TAG}
links:
- elasticsearch:es # Not sure what the fuck is this for
depends_on:
elasticsearch:
condition: service_started
Expand All @@ -173,6 +173,8 @@ services:
restart: always
environment:
elasticsearch.hosts: "http://${ELASTICSEARCH_CONTAINER_NAME}:9200"
ELASTICSEARCH_USERNAME: elastic
ELASTICSEARCH_PASSWORD: ${MAF_ELASTICSEARCH_PASSWORD}
networks:
muscle_and_fitness_network:

Expand Down

0 comments on commit bbe59a9

Please sign in to comment.