Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use docker-compose to ease product tests execution
Thanks to that developer can easily set up docker test environment on which he could run product tests.
- Loading branch information
Showing
42 changed files
with
427 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
version: '2' | ||
services: | ||
hadoop-master: | ||
hostname: hadoop-master | ||
image: 'teradatalabs/cdh5-hive' | ||
ports: | ||
- '8020:8020' | ||
- '8088:8088' | ||
- '9083:9083' | ||
- '10000:10000' | ||
- '50070:50070' | ||
- '50075:50075' | ||
|
||
presto-master: | ||
hostname: presto-master | ||
build: 'presto-dev-env' | ||
image: 'teradatalabs/presto-dev-env-distributed' | ||
ports: | ||
- '8080:8080' | ||
depends_on: | ||
- 'hadoop-master' | ||
command: /presto-launcher-wrapper.sh master run | ||
volumes: | ||
- ../../../presto-server/target/:/presto-server/target:ro | ||
env_file: | ||
- ../../target/classes/presto.env | ||
|
||
presto-worker: | ||
image: 'teradatalabs/presto-dev-env-distributed' | ||
depends_on: | ||
- 'presto-master' | ||
command: /presto-launcher-wrapper.sh worker run | ||
volumes_from: | ||
- presto-master | ||
env_file: | ||
- ../../target/classes/presto.env |
7 changes: 7 additions & 0 deletions
7
presto-product-tests/etc/distributed/presto-dev-env/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM teradatalabs/centos6-java8-oracle | ||
MAINTAINER Grzegorz Kokosiński <grzegorz.kokosinski@teradata.com> | ||
|
||
COPY /presto-launcher-wrapper.sh / | ||
COPY catalog /etc/catalog | ||
COPY master /etc/master | ||
COPY worker /etc/worker |
1 change: 1 addition & 0 deletions
1
presto-product-tests/etc/distributed/presto-dev-env/catalog/blackhole.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
connector.name=blackhole |
5 changes: 5 additions & 0 deletions
5
presto-product-tests/etc/distributed/presto-dev-env/catalog/hive.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
connector.name=hive-cdh5 | ||
hive.metastore.uri=thrift://hadoop-master:9083 | ||
hive.allow-drop-table=true | ||
hive.allow-rename-table=true | ||
hive.metastore-cache-ttl=0s |
1 change: 1 addition & 0 deletions
1
presto-product-tests/etc/distributed/presto-dev-env/catalog/jmx.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
connector.name=jmx |
3 changes: 3 additions & 0 deletions
3
presto-product-tests/etc/distributed/presto-dev-env/catalog/tpch.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
connector.name=tpch | ||
tpch.splits-per-node=4 | ||
|
11 changes: 11 additions & 0 deletions
11
presto-product-tests/etc/distributed/presto-dev-env/master/config.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
node.id=will-be-overwritten | ||
node.environment=test | ||
|
||
coordinator=true | ||
node-scheduler.include-coordinator=false | ||
http-server.http.port=8080 | ||
query.max-memory=1GB | ||
query.max-memory-per-node=512MB | ||
discovery-server.enabled=true | ||
discovery.uri=http://presto-master:8080 | ||
plugin.config-dir=/etc/catalog |
14 changes: 14 additions & 0 deletions
14
presto-product-tests/etc/distributed/presto-dev-env/master/jvm.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
-server | ||
-Xmx2G | ||
-XX:+UseG1GC | ||
-XX:+UseGCOverheadLimit | ||
-XX:+ExplicitGCInvokesConcurrent | ||
-XX:+CMSClassUnloadingEnabled | ||
-XX:+AggressiveOpts | ||
-XX:+HeapDumpOnOutOfMemoryError | ||
-XX:OnOutOfMemoryError=kill -9 %p | ||
-XX:ReservedCodeCacheSize=150M | ||
-DHADOOP_USER_NAME=hive | ||
-Duser.timezone=UTC | ||
-Xdebug | ||
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 |
5 changes: 5 additions & 0 deletions
5
presto-product-tests/etc/distributed/presto-dev-env/master/log.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
com.facebook.presto=INFO | ||
com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory=WARN | ||
com.ning.http.client=DEBUG | ||
com.facebook.presto.server.PluginManager=DEBUG | ||
io.airlift.discovery.client=INFO |
17 changes: 17 additions & 0 deletions
17
presto-product-tests/etc/distributed/presto-dev-env/presto-launcher-wrapper.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash -xe | ||
|
||
CONFIG=$1 | ||
|
||
if [[ "$CONFIG" != "master" && "$CONFIG" != "worker" ]]; then | ||
echo "Usage: launcher-wrapper <master|worker> <launcher args>" | ||
exit 1 | ||
fi | ||
|
||
shift 1 | ||
presto-server/target/presto-server-$PRESTO_VERSION/bin/launcher \ | ||
-Dnode.id=$HOSTNAME \ | ||
--config=/etc/$CONFIG/config.properties \ | ||
--jvm-config=/etc/$CONFIG/jvm.config \ | ||
--log-levels-file=/etc/$CONFIG/log.properties \ | ||
--data-dir=/var/presto \ | ||
$* |
10 changes: 10 additions & 0 deletions
10
presto-product-tests/etc/distributed/presto-dev-env/worker/config.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
node.id=will-be-overwritten | ||
node.environment=test | ||
|
||
coordinator=false | ||
http-server.http.port=8081 | ||
query.max-memory=1GB | ||
query.max-memory-per-node=512MB | ||
discovery-server.enabled=false | ||
discovery.uri=http://presto-master:8080 | ||
plugin.config-dir=/etc/catalog |
14 changes: 14 additions & 0 deletions
14
presto-product-tests/etc/distributed/presto-dev-env/worker/jvm.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
-server | ||
-Xmx2G | ||
-XX:+UseG1GC | ||
-XX:+UseGCOverheadLimit | ||
-XX:+ExplicitGCInvokesConcurrent | ||
-XX:+CMSClassUnloadingEnabled | ||
-XX:+AggressiveOpts | ||
-XX:+HeapDumpOnOutOfMemoryError | ||
-XX:OnOutOfMemoryError=kill -9 %p | ||
-XX:ReservedCodeCacheSize=150M | ||
-DHADOOP_USER_NAME=hive | ||
-Duser.timezone=UTC | ||
-Xdebug | ||
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 |
5 changes: 5 additions & 0 deletions
5
presto-product-tests/etc/distributed/presto-dev-env/worker/log.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
com.facebook.presto=INFO | ||
com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory=WARN | ||
com.ning.http.client=DEBUG | ||
com.facebook.presto.server.PluginManager=DEBUG | ||
io.airlift.discovery.client=INFO |
Empty file.
7 changes: 7 additions & 0 deletions
7
presto-product-tests/etc/distributed/tempto-configuration-local.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
hosts: | ||
hadoop-master: ${DOCKER_MACHINE_HOST} | ||
databases: | ||
hive: | ||
host: ${DOCKER_MACHINE_HOST} | ||
presto: | ||
host: ${DOCKER_MACHINE_HOST} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
version: '2' | ||
services: | ||
hadoop-master: | ||
hostname: hadoop-master | ||
image: 'teradatalabs/cdh5-hive' | ||
ports: | ||
- '8020:8020' | ||
- '8088:8088' | ||
- '9083:9083' | ||
- '10000:10000' | ||
- '50070:50070' | ||
- '50075:50075' | ||
|
||
presto-master: | ||
hostname: presto-master | ||
build: 'presto-dev-env' | ||
image: 'teradatalabs/presto-dev-env-singlenode' | ||
ports: | ||
- '8080:8080' | ||
depends_on: | ||
- 'hadoop-master' | ||
command: /presto-launcher-wrapper.sh run | ||
volumes: | ||
- ../../../presto-server/target/:/presto-server/target:ro | ||
env_file: | ||
- ../../target/classes/presto.env |
6 changes: 6 additions & 0 deletions
6
presto-product-tests/etc/singlenode/presto-dev-env/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM teradatalabs/centos6-java8-oracle | ||
MAINTAINER Grzegorz Kokosiński <grzegorz.kokosinski@teradata.com> | ||
|
||
COPY /presto-launcher-wrapper.sh / | ||
COPY catalog /etc/catalog | ||
COPY master /etc/master |
1 change: 1 addition & 0 deletions
1
presto-product-tests/etc/singlenode/presto-dev-env/catalog/blackhole.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
connector.name=blackhole |
5 changes: 5 additions & 0 deletions
5
presto-product-tests/etc/singlenode/presto-dev-env/catalog/hive.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
connector.name=hive-cdh5 | ||
hive.metastore.uri=thrift://hadoop-master:9083 | ||
hive.allow-drop-table=true | ||
hive.allow-rename-table=true | ||
hive.metastore-cache-ttl=0s |
1 change: 1 addition & 0 deletions
1
presto-product-tests/etc/singlenode/presto-dev-env/catalog/jmx.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
connector.name=jmx |
3 changes: 3 additions & 0 deletions
3
presto-product-tests/etc/singlenode/presto-dev-env/catalog/tpch.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
connector.name=tpch | ||
tpch.splits-per-node=4 | ||
|
11 changes: 11 additions & 0 deletions
11
presto-product-tests/etc/singlenode/presto-dev-env/master/config.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
node.id=will-be-overwritten | ||
node.environment=test | ||
|
||
coordinator=true | ||
node-scheduler.include-coordinator=true | ||
http-server.http.port=8080 | ||
query.max-memory=1GB | ||
query.max-memory-per-node=512MB | ||
discovery-server.enabled=true | ||
discovery.uri=http://presto-master:8080 | ||
plugin.config-dir=/etc/catalog |
14 changes: 14 additions & 0 deletions
14
presto-product-tests/etc/singlenode/presto-dev-env/master/jvm.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
-server | ||
-Xmx2G | ||
-XX:+UseG1GC | ||
-XX:+UseGCOverheadLimit | ||
-XX:+ExplicitGCInvokesConcurrent | ||
-XX:+CMSClassUnloadingEnabled | ||
-XX:+AggressiveOpts | ||
-XX:+HeapDumpOnOutOfMemoryError | ||
-XX:OnOutOfMemoryError=kill -9 %p | ||
-XX:ReservedCodeCacheSize=150M | ||
-DHADOOP_USER_NAME=hive | ||
-Duser.timezone=UTC | ||
-Xdebug | ||
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 |
5 changes: 5 additions & 0 deletions
5
presto-product-tests/etc/singlenode/presto-dev-env/master/log.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
com.facebook.presto=INFO | ||
com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory=WARN | ||
com.ning.http.client=DEBUG | ||
com.facebook.presto.server.PluginManager=DEBUG | ||
io.airlift.discovery.client=INFO |
9 changes: 9 additions & 0 deletions
9
presto-product-tests/etc/singlenode/presto-dev-env/presto-launcher-wrapper.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash -xe | ||
|
||
presto-server/target/presto-server-$PRESTO_VERSION/bin/launcher \ | ||
-Dnode.id=$HOSTNAME \ | ||
--config=/etc/master/config.properties \ | ||
--jvm-config=/etc/master/jvm.config \ | ||
--log-levels-file=/etc/master/log.properties \ | ||
--data-dir=/var/presto \ | ||
$* |
7 changes: 7 additions & 0 deletions
7
presto-product-tests/etc/singlenode/tempto-configuration-local.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
hosts: | ||
hadoop-master: ${DOCKER_MACHINE_HOST} | ||
databases: | ||
hive: | ||
host: ${DOCKER_MACHINE_HOST} | ||
presto: | ||
host: ${DOCKER_MACHINE_HOST} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.