Skip to content
Permalink
Browse files
Added instrumented site demo that sends logs to ELK. Updated ports.
  • Loading branch information
msb3399 committed May 3, 2017
1 parent 731fb44 commit 9068fc14d32e13cdfeba81b5da7e5c6a0f54b49c
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 3 deletions.
@@ -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"

@@ -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"
@@ -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 <msbeard@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

0 comments on commit 9068fc1

Please sign in to comment.