diff --git a/elk-ror/conf/es/readonlyrest.yml b/elk-ror/conf/es/readonlyrest.yml index beb88ba..0d80cc8 100644 --- a/elk-ror/conf/es/readonlyrest.yml +++ b/elk-ror/conf/es/readonlyrest.yml @@ -60,6 +60,20 @@ readonlyrest: ror_kbn_auth: name: "kbn1" + - name: "Reporting tests: user2" + auth_key: user2:dev + kibana: + index: ".kibana_user2" + access: rw + indices: [ "invoices" ] + + - name: "Reporting tests: user3" + auth_key: user3:dev + kibana: + index: ".kibana_user3" + access: rw + indices: [ "invoices" ] + # USERS TO GROUPS ############ users: - username: admin diff --git a/elk-ror/conf/kbn/kbn-proxy-nginx.conf b/elk-ror/conf/kbn/kbn-proxy-nginx.conf new file mode 100644 index 0000000..c9efe0e --- /dev/null +++ b/elk-ror/conf/kbn/kbn-proxy-nginx.conf @@ -0,0 +1,15 @@ +events { } + +http { + upstream kbn-ror { + server kbn-ror:5601; + } + + server { + listen 80; + + location / { + proxy_pass http://kbn-ror; + } + } +} \ No newline at end of file diff --git a/elk-ror/conf/kbn/kibana.yml b/elk-ror/conf/kbn/kibana.yml index 2faec52..8f7b6aa 100644 --- a/elk-ror/conf/kbn/kibana.yml +++ b/elk-ror/conf/kbn/kibana.yml @@ -1,4 +1,4 @@ -server.name: kibana-ror +server.name: "kibana-ror-${HOSTNAME}" server.host: 0.0.0.0 server.port: 5601 #server.basePath: '/kibana' @@ -20,6 +20,7 @@ elasticsearch.hosts: [ "${ES_API_URL}" ] elasticsearch.username: kibana elasticsearch.password: kibana xpack.encryptedSavedObjects.encryptionKey: "19+230i1902i310293213i109312i31209302193219039120i3j23h31h3h213h123!" +xpack.reporting.encryptionKey: "321421321211231241232132132132132" #xpack.reporting.index: '.reporting-test-index' telemetry.enabled: false diff --git a/elk-ror/docker-compose.yml b/elk-ror/docker-compose.yml index 8dd793f..67d63dd 100644 --- a/elk-ror/docker-compose.yml +++ b/elk-ror/docker-compose.yml @@ -42,12 +42,18 @@ services: depends_on: es-ror: condition: service_healthy - ports: - - "5601:5601" + deploy: + mode: replicated + replicas: 3 environment: ELASTIC_USER_PASSWORD: elastic ES_API_URL: http://es-ror:9200 - # todo: healthcheck + healthcheck: + test: [ "CMD", "curl", "--fail", "http://localhost:5601/api/status" ] + interval: 10s + timeout: 10s + retries: 30 + start_period: 60s networks: - es-ror-network ulimits: @@ -55,6 +61,19 @@ services: soft: -1 hard: -1 + kbn-proxy: + build: + context: ../. + dockerfile: elk-ror/images/kbn/Proxy-Dockerfile + depends_on: + kbn-ror: + condition: service_healthy + ports: + - "5601:80" + # todo: healthcheck + networks: + - es-ror-network + networks: es-ror-network: driver: bridge diff --git a/elk-ror/images/kbn/Proxy-Dockerfile b/elk-ror/images/kbn/Proxy-Dockerfile new file mode 100644 index 0000000..cebcf37 --- /dev/null +++ b/elk-ror/images/kbn/Proxy-Dockerfile @@ -0,0 +1,3 @@ +FROM nginx:latest + +COPY elk-ror/conf/kbn/kbn-proxy-nginx.conf /etc/nginx/nginx.conf \ No newline at end of file diff --git a/elk-ror/stop-and-clean.sh b/elk-ror/stop-and-clean.sh index 2940268..e082c38 100755 --- a/elk-ror/stop-and-clean.sh +++ b/elk-ror/stop-and-clean.sh @@ -4,6 +4,6 @@ cd "$(dirname "$0")" echo "Stopping and cleaning environment the tests were being run at ..." -docker-compose rm --stop --force +docker compose rm --stop --force echo "Done!" \ No newline at end of file