Added instrumented site demo that sends logs to ELK. Updated ports.

Project: http://git-wip-us.apache.org/repos/asf/incubator-senssoft/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-senssoft/commit/9068fc14
Tree: http://git-wip-us.apache.org/repos/asf/incubator-senssoft/tree/9068fc14
Diff: http://git-wip-us.apache.org/repos/asf/incubator-senssoft/diff/9068fc14

Branch: refs/heads/asf-site
Commit: 9068fc14d32e13cdfeba81b5da7e5c6a0f54b49c
Parents: 731fb44
Author: msb3399 <mbe...@draper.com>
Authored: Wed May 3 14:35:55 2017 -0400
Committer: msb3399 <mbe...@draper.com>
Committed: Wed May 3 14:35:55 2017 -0400

----------------------------------------------------------------------
 docker/docker-compose.yml                    | 12 +++++--
 docker/logstash/config/logstash-userale.conf |  2 +-
 docker/site/Dockerfile                       | 42 +++++++++++++++++++++++
 3 files changed, 53 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-senssoft/blob/9068fc14/docker/docker-compose.yml
----------------------------------------------------------------------
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index 0778c42..6570771 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -24,8 +24,17 @@ services:
     container_name: senssoft-start
     depends_on:
       - "elasticsearch"
+      - "userale-forwarder"
     command: bash /opt/entrypoint.sh
 
+  # Site
+  site:
+    build: ./site
+    container_name: senssoft-app
+    ports:
+      - 8080:8080
+    command: python -m SimpleHTTPServer 8080
+
   # ELK Stack
   elasticsearch:
     image: elasticsearch:latest
@@ -56,13 +65,12 @@ services:
     container_name: senssoft-userale-forwarder
     command: -f /etc/logstash/conf.d
     ports:
-      - 8080:8080
+      - 8100:8100
     volumes: 
       - 
./logstash/config/logstash-userale.conf:/etc/logstash/conf.d/logstash-userale.conf
       - 
./logstash/templates/userale.json:/usr/share/logstash/templates/userale.json
     depends_on:
       - "elasticsearch"
-      - "startup"
     environment:
       LS_HEAP_SIZE: "2048m"
 

http://git-wip-us.apache.org/repos/asf/incubator-senssoft/blob/9068fc14/docker/logstash/config/logstash-userale.conf
----------------------------------------------------------------------
diff --git a/docker/logstash/config/logstash-userale.conf 
b/docker/logstash/config/logstash-userale.conf
index 79a69d0..6eb103e 100644
--- a/docker/logstash/config/logstash-userale.conf
+++ b/docker/logstash/config/logstash-userale.conf
@@ -16,7 +16,7 @@
 input {
        http {
                codec => "json"
-               port => 8080
+               port => 8100
                response_headers => { 
                        "Access-Control-Allow-Origin" => "*" 
             "Access-Control-Allow-Headers" => "Origin, X-Requested-With, 
Content-Type, Accept"

http://git-wip-us.apache.org/repos/asf/incubator-senssoft/blob/9068fc14/docker/site/Dockerfile
----------------------------------------------------------------------
diff --git a/docker/site/Dockerfile b/docker/site/Dockerfile
new file mode 100644
index 0000000..0525dea
--- /dev/null
+++ b/docker/site/Dockerfile
@@ -0,0 +1,42 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+FROM ruby
+MAINTAINER Michelle Beard <msbe...@apache.org>
+
+# Install system wide dependencies
+RUN apt-get -yqq update && apt-get -yqq install \
+       curl \
+       sudo
+
+# Set the work directory
+RUN mkdir -p /usr/src
+WORKDIR /usr/src
+
+# Install git
+RUN sudo -E apt-get -yqq install \
+  git
+
+# Clone Apache SensSoft Site
+RUN git clone -b master https://github.com/apache/incubator-senssoft.git
+WORKDIR /usr/src/incubator-senssoft/site/_site
+
+# Update data-url to send to logstash
+RUN sed -i 's/data-url=\"\"/data-url="http:\/\/localhost:8100"/' index.html
+RUN sed -i 's/noSend\: true/noSend\: false/' index.html
+
+# Install system wide dependencies
+RUN apt-get -yqq update && apt-get -yqq install \
+       python

Reply via email to