Skip to content

Commit

Permalink
Update docker-compose files to version 2 (elastic#2950)
Browse files Browse the repository at this point in the history
This will allow us to fully leverage the official elastic docker files
  • Loading branch information
ruflin authored and tsg committed Nov 8, 2016
1 parent 946aa56 commit 0ee4eef
Show file tree
Hide file tree
Showing 12 changed files with 267 additions and 249 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Running the testsuite has the following requirements:

* Python >=2.7.9
* Docker >=1.10.0
* Docker-compose >= 1.7.0
* Docker-compose >= 1.8.0


## Documentation
Expand Down
111 changes: 57 additions & 54 deletions libbeat/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,62 @@
beat:
build: ${PWD}/.
links:
- redis
- sredis
- kafka
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- SREDIS_HOST=sredis
- SREDIS_PORT=6380
- LS_HOST=logstash
- LS_TCP_PORT=5044
- LS_TLS_PORT=5055
# Setup work environment
- LIBBEAT_PATH=/go/src/github.com/elastic/beats/libbeat
# TODO: Set to true as soon as stable release is out
- SHIELD=false
- KAFKA_HOST=kafka
- KAFKA_PORT=9092
env_file:
- ${PWD}/build/test.env
volumes:
- ${PWD}/..:/go/src/github.com/elastic/beats/
working_dir: /go/src/github.com/elastic/beats/libbeat
command: make
entrypoint: /go/src/github.com/elastic/beats/libbeat/scripts/docker-entrypoint.sh
version: '2'
services:
beat:
build: ${PWD}/.
links:
- redis
- sredis
- kafka
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- SREDIS_HOST=sredis
- SREDIS_PORT=6380
- LS_HOST=logstash
- LS_TCP_PORT=5044
- LS_TLS_PORT=5055
# Setup work environment
- LIBBEAT_PATH=/go/src/github.com/elastic/beats/libbeat
# TODO: Set to true as soon as stable release is out
- SHIELD=false
- KAFKA_HOST=kafka
- KAFKA_PORT=9092
env_file:
- ${PWD}/build/test.env
volumes:
- ${PWD}/..:/go/src/github.com/elastic/beats/
working_dir: /go/src/github.com/elastic/beats/libbeat
command: make
entrypoint: /go/src/github.com/elastic/beats/libbeat/scripts/docker-entrypoint.sh

# This host name is fixed because of the certificate
logstash:
env_file:
- ${PWD}/build/test.env
# This host name is fixed because of the certificate
logstash:
env_file:
- ${PWD}/build/test.env

redis:
image: redis:3.2.4-alpine
redis:
image: redis:3.2.4-alpine

# This host name is fixed because of the certificate
sredis: # stunnel proxy for redis
build: ${PWD}/../testing/environments/docker/sredis
expose:
- 6380
links:
- redis
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
env_file:
- ${PWD}/build/test.env
# This host name is fixed because of the certificate
sredis: # stunnel proxy for redis
build: ${PWD}/../testing/environments/docker/sredis
expose:
- 6380
links:
- redis
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
env_file:
- ${PWD}/build/test.env

kafka:
image: spotify/kafka
expose:
- 9092
- 2181
kafka:
image: spotify/kafka
expose:
- 9092
- 2181

# Overloading kibana with a simple image as it is not needed here
kibana:
build: ${PWD}/../testing/environments/
dockerfile: Dockerfile
# Overloading kibana with a simple image as it is not needed here
kibana:
build:
context: ${PWD}/../testing/environments/
dockerfile: Dockerfile
133 changes: 68 additions & 65 deletions metricbeat/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,76 +1,79 @@
beat:
build: ${PWD}/.
links:
- apache
- filebeat
- mongodb
- mysql
- nginx
- postgresql
- redis
- zookeeper
- haproxy
environment:
- APACHE_HOST=apache
- APACHE_PORT=80
- FILEBEAT_HOST=filebeat
- FILEBEAT_PORT=6060
- NGINX_HOST=nginx
- NGINX_PORT=80
- REDIS_HOST=redis
- REDIS_PORT=6379
- MONGODB_HOST=mongodb
- MONGODB_PORT=27017
- MYSQL_DSN=root:test@tcp(mysql:3306)/
- MYSQL_HOST=mysql
- MYSQL_PORT=3306
- POSTGRESQL_DSN=postgres://postgresql:5432?sslmode=disable
- POSTGRESQL_HOST=postgresql
- POSTGRESQL_PORT=5432
- POSTGRESQL_USERNAME=postgres
- ZOOKEEPER_HOST=zookeeper
- ZOOKEEPER_PORT=2181
- HAPROXY_HOST=haproxy
- HAPROXY_PORT=14567
- TEST_ENVIRONMENT=false
working_dir: /go/src/github.com/elastic/beats/metricbeat
volumes:
- ${PWD}/..:/go/src/github.com/elastic/beats/
command: make
entrypoint: /go/src/github.com/elastic/beats/metricbeat/docker-entrypoint.sh
version: '2'
services:
beat:
build: ${PWD}/.
links:
- apache
- filebeat
- mongodb
- mysql
- nginx
- postgresql
- redis
- zookeeper
- haproxy
environment:
- APACHE_HOST=apache
- APACHE_PORT=80
- FILEBEAT_HOST=filebeat
- FILEBEAT_PORT=6060
- NGINX_HOST=nginx
- NGINX_PORT=80
- REDIS_HOST=redis
- REDIS_PORT=6379
- MONGODB_HOST=mongodb
- MONGODB_PORT=27017
- MYSQL_DSN=root:test@tcp(mysql:3306)/
- MYSQL_HOST=mysql
- MYSQL_PORT=3306
- POSTGRESQL_DSN=postgres://postgresql:5432?sslmode=disable
- POSTGRESQL_HOST=postgresql
- POSTGRESQL_PORT=5432
- POSTGRESQL_USERNAME=postgres
- ZOOKEEPER_HOST=zookeeper
- ZOOKEEPER_PORT=2181
- HAPROXY_HOST=haproxy
- HAPROXY_PORT=14567
- TEST_ENVIRONMENT=false
working_dir: /go/src/github.com/elastic/beats/metricbeat
volumes:
- ${PWD}/..:/go/src/github.com/elastic/beats/
command: make
entrypoint: /go/src/github.com/elastic/beats/metricbeat/docker-entrypoint.sh

# Overloading kibana with a simple image as it is not needed here
kibana:
build: ${PWD}/../testing/environments/
dockerfile: Dockerfile
# Overloading kibana with a simple image as it is not needed here
kibana:
build:
context: ${PWD}/../testing/environments/
dockerfile: Dockerfile

# Modules
apache:
build: ${PWD}/module/apache/_meta
# Modules
apache:
build: ${PWD}/module/apache/_meta

filebeat:
build: ${PWD}/module/beats/filebeat/_meta
filebeat:
build: ${PWD}/module/beats/filebeat/_meta

mongodb:
image: mongo:3.0
mongodb:
image: mongo:3.0

mysql:
image: mysql:5.7.12
environment:
- MYSQL_ROOT_PASSWORD=test
mysql:
image: mysql:5.7.12
environment:
- MYSQL_ROOT_PASSWORD=test

nginx:
build: ${PWD}/module/nginx/_meta
nginx:
build: ${PWD}/module/nginx/_meta

haproxy:
build: ${PWD}/module/haproxy/_meta
haproxy:
build: ${PWD}/module/haproxy/_meta

postgresql:
image: postgres:9.5.3
postgresql:
image: postgres:9.5.3

redis:
image: redis:3.2.4-alpine
redis:
image: redis:3.2.4-alpine

zookeeper:
image: jplock/zookeeper:3.4.8
zookeeper:
image: jplock/zookeeper:3.4.8

22 changes: 12 additions & 10 deletions packetbeat/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
beat:
build: .
environment:
- LIBBEAT_PATH=/go/src/github.com/elastic/beats/libbeat
# Puts build dir outside of shared file system to prevent issues
# This means artifacts are not shared locally
- BUILD_DIR=/tmp/build
volumes:
- ..:/go/src/github.com/elastic/beats/
working_dir: /go/src/github.com/elastic/beats/packetbeat
version: '2'
services:
beat:
build: .
environment:
- LIBBEAT_PATH=/go/src/github.com/elastic/beats/libbeat
# Puts build dir outside of shared file system to prevent issues
# This means artifacts are not shared locally
- BUILD_DIR=/tmp/build
volumes:
- ..:/go/src/github.com/elastic/beats/
working_dir: /go/src/github.com/elastic/beats/packetbeat
15 changes: 0 additions & 15 deletions testing/environments/5.0.0-alpha5.yml

This file was deleted.

44 changes: 25 additions & 19 deletions testing/environments/5.0.0-cgroups.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
# This should test the environment with the latest snapshots
# This is based on base.yml

elasticsearch:
build: ./docker/elasticsearch
dockerfile: Dockerfile-5.0.0-alpha5
command: elasticsearch -Enetwork.host=0.0.0.0 -Ediscovery.zen.minimum_master_nodes=1 -Ebootstrap.ignore_system_bootstrap_checks=true
version: '2'
services:
elasticsearch:
build:
context: ./docker/elasticsearch
dockerfile: Dockerfile-5.0.0-alpha5
command: elasticsearch -Enetwork.host=0.0.0.0 -Ediscovery.zen.minimum_master_nodes=1 -Ebootstrap.ignore_system_bootstrap_checks=true

logstash:
build: ./docker/logstash
dockerfile: Dockerfile-5.0.0-alpha5
logstash:
build:
context: ./docker/logstash
dockerfile: Dockerfile-5.0.0-alpha5

kibana:
build: ./docker/kibana
dockerfile: Dockerfile-5.0.0-alpha5
kibana:
build:
context: ./docker/kibana
dockerfile: Dockerfile-5.0.0-alpha5

metricbeat:
build: ./docker/metricbeat
dockerfile: Dockerfile-5.0.0-cgroups
links:
- elasticsearch
volumes:
- "/proc:/hostfs/proc:ro"
- "/sys/fs/cgroup:/hostfs/sys/fs/cgroup"
command: -system.hostfs=/hostfs -E output.elasticsearch.hosts=elasticsearch -E metricbeat.modules.0.cgroups=true
metricbeat:
build:
context: ./docker/metricbeat
dockerfile: Dockerfile-5.0.0-cgroups
links:
- elasticsearch
volumes:
- "/proc:/hostfs/proc:ro"
- "/sys/fs/cgroup:/hostfs/sys/fs/cgroup"
command: -system.hostfs=/hostfs -E output.elasticsearch.hosts=elasticsearch -E metricbeat.modules.0.cgroups=true
Loading

0 comments on commit 0ee4eef

Please sign in to comment.