Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
FROM ubuntu:14.04
MAINTAINER P. Barrett Little <barrett@barrettlittle.com>

# Download latest package lists
RUN apt-get update

# Install dependencies
RUN DEBIAN_FRONTEND=noninteractive \
# Download latest package lists & install dependencies
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you should use DEBIAN_FRONTEND=noninteractive as people who build FROM this image will get unexpected behavior.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ianks I know that calling ENV DEBIAN_FRONTEND=noninteractive in your Dockerfile can potentially cause persistence issues, but I didn't realize that setting it inline was a problem:

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install

Do you mind elaborating?

apt-get install -yq \
openjdk-7-jre-headless \
wget
Expand Down
26 changes: 26 additions & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# Usage Notes
# -----------
#
# Install Go
# sudo apt-get install golang
#
# Set GOPATH and PATH
# mkdir $HOME/go
# export GOPATH=$HOME/go
# export PATH=$PATH:$GOPATH/bin
#
# Download the Go implementation of Foreman
# go get github.com/mattn/goreman
#
# Start Logstash with a linked Elasticsearch container
# goreman start
#
# Get your log on
# http://<your_kibana_ip>:9292/index.html#/dashboard/file/logstash.json

# Build the Elasticsearch container you are linking to
elasticsearch: docker run -d --name elasticsearch barnybug/elasticsearch:1.1.1

# Build the Logstash server and link to the new Elasticsearch container
logstash: docker run -d --link elasticsearch:es -p 9292:9292 -p 9200:9200 pblittle/docker-logstash
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ If you prefer to build from source rather than use the [pblittle/docker-logstash

## Running Logstash

To run this logstash image, you have to first choose one of three Elasticsearch configuration options.
### First, choose an Elasticsearch configuration

To run this logstash image, you have to first choose one of three Elasticsearch configurations.

* Use the embedded Elasticsearch server
* Use a linked container running Elasticsearch
Expand All @@ -20,13 +22,21 @@ To run this logstash image, you have to first choose one of three Elasticsearch

To fetch and start a container running logstash and the embedded Elasticsearch server, simply execute:

$ docker run -d -p 9292:9292 -p 9200:9200 pblittle/docker-logstash

Or, if you are working from the project source directory:

$ make run

### Use a linked container running Elasticsearch

If you want to link to another container running elasticsearch rather than the embedded server, set the `ES_CONTAINER` environment variable to your existing elasticsearch container name.

$ export ES_CONTAINER=<your_es_container>
$ docker run -d --link <your_es_container_name>:es -p 9292:9292 -p 9200:9200 pblittle/docker-logstash

Or, if you are working from the project source directory:

$ export ES_CONTAINER=<your_es_container_name>
$ make run

In addition to the link, if you want your elasticsearch node's `bind_host` and `port` automatically detected, you will need to set the `ES_HOST` and `ES_PORT` placeholders in your `elasticsearch` definition in your logstash config file. For example:
Expand All @@ -42,8 +52,8 @@ In addition to the link, if you want your elasticsearch node's `bind_host` and `

If you are using an external elasticsearch server rather than an embedded or linked server, simply set the `ES_HOST` and `ES_PORT` environment variables.

$ export ES_HOST=<your_es_host>
$ export ES_PORT=<your_es_port>
$ export ES_HOST=<your_es_server_host>
$ export ES_PORT=<your_es_server_port>
$ make run

## Logstash configuration
Expand Down