[CORD-1805] Fix ELK Stack support in logging module
Change-Id: I2f8bc4219b80e09baa3d03acd610f8cbdfb50aeb
diff --git a/roles/apache-proxy/files/cord-http.conf b/roles/apache-proxy/files/cord-http.conf
index 0057d6a..5460216 100644
--- a/roles/apache-proxy/files/cord-http.conf
+++ b/roles/apache-proxy/files/cord-http.conf
@@ -50,6 +50,10 @@
# TOSCA
ProxyPass /xos-tosca http://xos-tosca:9102
+ # ELK STACK
+ ProxyPass /elkapi http://xos:9200
+ ProxyPass /elk http://xos:5601
+
# Map the various XOS roots to the XOS instance
ProxyPass /xos-deprecated http://xos:9000
ProxyPass /xos-deprecated/ http://xos:9000/
diff --git a/roles/cord-profile/defaults/main.yml b/roles/cord-profile/defaults/main.yml
index e139397..e94f4cf 100644
--- a/roles/cord-profile/defaults/main.yml
+++ b/roles/cord-profile/defaults/main.yml
@@ -139,3 +139,5 @@
# used in carrierethernet-*.yaml.j2
carrierethernet_domainid_prefix: "{{ site_name }}"
+# used in platform-install / roles/cord-profile/templates/docker-compose.yml.j2
+use_elasticstack: False
diff --git a/roles/cord-profile/templates/docker-compose.yml.j2 b/roles/cord-profile/templates/docker-compose.yml.j2
index ac6f00c..0efc344 100644
--- a/roles/cord-profile/templates/docker-compose.yml.j2
+++ b/roles/cord-profile/templates/docker-compose.yml.j2
@@ -28,6 +28,17 @@
{% endfor %}
services:
+{% if use_elasticstack %}
+ elk:
+ image: {{ pull_docker_registry }}sebp/elk:{{ pull_docker_tag }}
+ ports:
+ - "5601:5601"
+ - "9200:9200"
+ networks:
+{% for network in xos_docker_networks %}
+ - {{ network }}
+{% endfor %}
+{% endif %}
consul:
image: {{ pull_docker_registry }}gliderlabs/consul-server:{{ pull_docker_tag }}
command: "-advertise=${MYHOST} -server -bootstrap"