initial checkin
diff --git a/containers/elk/kibana/Dockerfile b/containers/elk/kibana/Dockerfile
new file mode 100644
index 0000000..fcfe625
--- /dev/null
+++ b/containers/elk/kibana/Dockerfile
@@ -0,0 +1,37 @@
+FROM ubuntu:14.04.2
+
+ENV KIBANA_VERSION kibana-4.0.1-linux-x64
+ENV KIBANA_SECURE true
+ENV KIBANA_USER kibana
+ENV KIBANA_PASSWORD kibana
+
+RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
+    wget \ 
+    nginx-full \
+    apache2-utils \
+    supervisor
+
+WORKDIR /opt
+
+RUN wget --no-check-certificate -O- https://download.elasticsearch.org/kibana/kibana/${KIBANA_VERSION}.tar.gz | tar xvfz -
+
+RUN mkdir /etc/kibana # This is where the htpasswd file is placed by the run script
+
+ADD conf/kibana /etc/nginx/sites-available/kibana
+
+ADD conf/kibana-secure /etc/nginx/sites-available/kibana-secure
+
+RUN rm /etc/nginx/sites-enabled/*
+
+RUN echo "daemon off;" >> /etc/nginx/nginx.conf
+
+ADD conf/supervisord.conf /etc/supervisor/conf.d/kibana.conf
+
+ADD run_kibana /opt/${KIBANA_VERSION}/run_kibana
+
+RUN chmod +x /opt/${KIBANA_VERSION}/run_kibana
+
+EXPOSE 80
+EXPOSE 5601
+
+CMD /opt/${KIBANA_VERSION}/run_kibana
diff --git a/containers/elk/kibana/Makefile b/containers/elk/kibana/Makefile
new file mode 100644
index 0000000..c44491a
--- /dev/null
+++ b/containers/elk/kibana/Makefile
@@ -0,0 +1,14 @@
+.PHONY: build
+build: ; docker build --rm -t kibana .
+
+.PHONY: run
+run: ; docker run -d --link elasticsearch_server:elasticsearch -p 8000:80 -e KIBANA_SECURE=false --name kibana_server kibana
+
+.PHONY: runsecure
+runsecure: ; docker run -d --link elasticsearch_server:elasticsearch -p 5601:80  --name kibana_server kibana
+
+.PHONY: stop
+stop: ; docker stop kibana_server
+
+.PHONY: rmcontainer
+rmcontainer: ; docker rm kibana_server
diff --git a/containers/elk/kibana/conf/kibana b/containers/elk/kibana/conf/kibana
new file mode 100644
index 0000000..c5c3031
--- /dev/null
+++ b/containers/elk/kibana/conf/kibana
@@ -0,0 +1,17 @@
+server {
+  listen   80; ## listen for ipv4; this line is default and implied
+  listen   [::]:80 default ipv6only=on; ## listen for ipv6
+
+  # Make site accessible from http://localhost/
+  server_name localhost;
+
+  location = /health {
+    return 200;
+    access_log off;
+  }
+
+  location / {
+    proxy_pass http://kibana:5601;
+    proxy_read_timeout 90;
+  }
+}
diff --git a/containers/elk/kibana/conf/kibana-secure b/containers/elk/kibana/conf/kibana-secure
new file mode 100644
index 0000000..760f161
--- /dev/null
+++ b/containers/elk/kibana/conf/kibana-secure
@@ -0,0 +1,24 @@
+server {
+  listen   80; ## listen for ipv4; this line is default and implied
+  listen   [::]:80 default ipv6only=on; ## listen for ipv6
+
+  # Make site accessible from http://localhost/
+  server_name localhost;
+
+  location = /health {
+    return 200;
+    access_log off;
+  }
+
+  location / {
+    proxy_pass http://kibana:5601;
+    proxy_read_timeout 90;
+
+    if ($http_x_forwarded_proto != "https") {
+      rewrite ^ https://$host$uri permanent;
+    }
+
+    auth_basic "Restricted";
+    auth_basic_user_file /etc/kibana/htpasswd;
+  }
+}
diff --git a/containers/elk/kibana/conf/supervisord.conf b/containers/elk/kibana/conf/supervisord.conf
new file mode 100644
index 0000000..deff0c7
--- /dev/null
+++ b/containers/elk/kibana/conf/supervisord.conf
@@ -0,0 +1,14 @@
+[supervisord]
+nodaemon=true
+
+[program:kibana]
+command=/opt/kibana-4.0.1-linux-x64/bin/kibana
+autorestart=true
+stderr_logfile=/var/log/supervisor/kibana.err.log
+stdout_logfile=/var/log/supervisor/kibana.out.log
+
+[program:nginx]
+command=/usr/sbin/nginx
+autorestart=true
+stderr_logfile=/var/log/supervisor/nginx.err.log
+stdout_logfile=/var/log/supervisor/nginx.out.log
diff --git a/containers/elk/kibana/run_kibana b/containers/elk/kibana/run_kibana
new file mode 100644
index 0000000..8723bba
--- /dev/null
+++ b/containers/elk/kibana/run_kibana
@@ -0,0 +1,10 @@
+#!/bin/bash
+sed -i "s/localhost:9200/elasticsearch:9200/g" /opt/${KIBANA_VERSION}/config/kibana.yml
+if [ "$KIBANA_SECURE" = "true" ] ; then
+    ln -s /etc/nginx/sites-available/kibana-secure /etc/nginx/sites-enabled/kibana
+    htpasswd -bc /etc/kibana/htpasswd ${KIBANA_USER} ${KIBANA_PASSWORD}
+else
+    ln -s /etc/nginx/sites-available/kibana /etc/nginx/sites-enabled/kibana
+fi
+sed -i "s/kibana:5601/$HOSTNAME:5601/g" /etc/nginx/sites-enabled/kibana
+/usr/bin/supervisord -c /etc/supervisor/conf.d/kibana.conf