Merge pull request #260 from JoseD92/255-add-docker-ES

add ES5 docker compose container for easy testing
This commit is contained in:
Chris Allen 2019-08-02 11:47:25 -05:00 committed by GitHub
commit 9537ed2539
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 63 additions and 0 deletions

View File

@ -82,3 +82,25 @@ module-touch:
upload:
stack upload --no-signature .
# Create ES5 instance
## Run test environment
compose-ES5:
@LOCAL_USER_ID=${LOCAL_USER_ID} docker-compose -f tests/ES5/docker-compose.yml --project-directory tests/ES5/ up
## Run test environment in detach mode
compose-ES5-detach-up:
@LOCAL_USER_ID=${LOCAL_USER_ID} docker-compose -f tests/ES5/docker-compose.yml --project-directory tests/ES5/ up -d
## Close test environment if run on detach mode
compose-ES5-detach-down:
@LOCAL_USER_ID=${LOCAL_USER_ID} docker-compose -f tests/ES5/docker-compose.yml --project-directory tests/ES5/ down
## build the docker compose images
compose-build:
@LOCAL_USER_ID=${LOCAL_USER_ID} docker-compose -f tests/ES5/docker-compose.yml --project-directory tests/ES5/ build
## Spawn bash shell in ES5 test container
ES5-shell:
@LOCAL_USER_ID=${LOCAL_USER_ID} docker-compose -f tests/ES5/docker-compose.yml --project-directory tests/ES5/ exec elasticsearch1 bash

View File

@ -0,0 +1,3 @@
xpack.security.enabled: false
cluster.name: "docker-cluster"
network.host: 0.0.0.0

View File

@ -0,0 +1,35 @@
version: "2"
services:
elasticsearch1:
build: .
container_name: elasticsearch1
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 1g
ports:
- 9200:9200
networks:
- esnet
elasticsearch2:
build: .
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "discovery.zen.ping.unicast.hosts=elasticsearch1"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 1g
networks:
- esnet
networks:
esnet: {}

3
tests/ES5/dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM docker.elastic.co/elasticsearch/elasticsearch:5.6.0
COPY config /usr/share/elasticsearch/config/