mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
mysql/postgresql: move Dockerfiles and docker_compose to docker/test
This commit is contained in:
parent
4c08fff0d3
commit
70fca95a5a
@ -1,3 +1,6 @@
|
||||
# docker build -t yandex/clickhouse-mysql-golang-client .
|
||||
# MySQL golang client docker container
|
||||
|
||||
FROM golang:1.12.2
|
||||
|
||||
RUN go get "github.com/go-sql-driver/mysql"
|
@ -1,3 +1,6 @@
|
||||
# docker build -t yandex/clickhouse-mysql-java-client .
|
||||
# MySQL Java client docker container
|
||||
|
||||
FROM ubuntu:18.04
|
||||
|
||||
RUN apt-get update && \
|
8
docker/test/integration/mysql_js_client/Dockerfile
Normal file
8
docker/test/integration/mysql_js_client/Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
# docker build -t yandex/clickhouse-mysql-js-client .
|
||||
# MySQL JavaScript client docker container
|
||||
|
||||
FROM node:8
|
||||
|
||||
RUN npm install mysql
|
||||
|
||||
COPY ./test.js test.js
|
@ -1,3 +1,6 @@
|
||||
# docker build -t yandex/clickhouse-mysql-php-client .
|
||||
# MySQL PHP client docker container
|
||||
|
||||
FROM php:7.3-cli
|
||||
|
||||
COPY ./client.crt client.crt
|
@ -1,3 +1,6 @@
|
||||
# docker build -t yandex/clickhouse-postgresql-java-client .
|
||||
# PostgreSQL Java client docker container
|
||||
|
||||
FROM ubuntu:18.04
|
||||
|
||||
RUN apt-get update && \
|
@ -1,8 +1,6 @@
|
||||
version: '2.3'
|
||||
services:
|
||||
golang1:
|
||||
build:
|
||||
context: ./
|
||||
network: host
|
||||
image: yandex/clickhouse-mysql-golang-client
|
||||
# to keep container running
|
||||
command: sleep infinity
|
@ -1,8 +1,6 @@
|
||||
version: '2.3'
|
||||
services:
|
||||
java1:
|
||||
build:
|
||||
context: ./
|
||||
network: host
|
||||
image: yandex/clickhouse-mysql-java-client
|
||||
# to keep container running
|
||||
command: sleep infinity
|
@ -1,8 +1,6 @@
|
||||
version: '2.3'
|
||||
services:
|
||||
mysqljs1:
|
||||
build:
|
||||
context: ./
|
||||
network: host
|
||||
image: yandex/clickhouse-mysql-js-client
|
||||
# to keep container running
|
||||
command: sleep infinity
|
@ -1,7 +1,6 @@
|
||||
version: '2.3'
|
||||
services:
|
||||
php1:
|
||||
build:
|
||||
context: ./
|
||||
image: yandex/clickhouse-mysql-php-client
|
||||
# to keep container running
|
||||
command: sleep infinity
|
@ -1,8 +1,6 @@
|
||||
version: '2.2'
|
||||
services:
|
||||
java:
|
||||
build:
|
||||
context: ./
|
||||
network: host
|
||||
image: yandex/clickhouse-postgresql-java-client
|
||||
# to keep container running
|
||||
command: sleep infinity
|
@ -1,5 +0,0 @@
|
||||
FROM node:8
|
||||
|
||||
RUN npm install mysql
|
||||
|
||||
COPY ./test.js test.js
|
@ -11,10 +11,11 @@ import pymysql.connections
|
||||
|
||||
from docker.models.containers import Container
|
||||
|
||||
from helpers.cluster import ClickHouseCluster
|
||||
from helpers.cluster import ClickHouseCluster, get_docker_compose_path
|
||||
|
||||
|
||||
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
|
||||
DOCKER_COMPOSE_PATH = get_docker_compose_path()
|
||||
|
||||
config_dir = os.path.join(SCRIPT_DIR, './configs')
|
||||
cluster = ClickHouseCluster(__file__)
|
||||
@ -34,7 +35,7 @@ def server_address():
|
||||
|
||||
@pytest.fixture(scope='module')
|
||||
def mysql_client():
|
||||
docker_compose = os.path.join(SCRIPT_DIR, 'clients', 'mysql', 'docker_compose.yml')
|
||||
docker_compose = os.path.join(DOCKER_COMPOSE_PATH, 'docker_compose_mysql_client.yml')
|
||||
subprocess.check_call(['docker-compose', '-p', cluster.project_name, '-f', docker_compose, 'up', '--no-recreate', '-d', '--build'])
|
||||
yield docker.from_env().containers.get(cluster.project_name + '_mysql1_1')
|
||||
|
||||
@ -60,28 +61,28 @@ def mysql_server(mysql_client):
|
||||
|
||||
@pytest.fixture(scope='module')
|
||||
def golang_container():
|
||||
docker_compose = os.path.join(SCRIPT_DIR, 'clients', 'golang', 'docker_compose.yml')
|
||||
docker_compose = os.path.join(DOCKER_COMPOSE_PATH, 'docker_compose_mysql_golang_client.yml')
|
||||
subprocess.check_call(['docker-compose', '-p', cluster.project_name, '-f', docker_compose, 'up', '--no-recreate', '-d', '--build'])
|
||||
yield docker.from_env().containers.get(cluster.project_name + '_golang1_1')
|
||||
|
||||
|
||||
@pytest.fixture(scope='module')
|
||||
def php_container():
|
||||
docker_compose = os.path.join(SCRIPT_DIR, 'clients', 'php-mysqlnd', 'docker_compose.yml')
|
||||
docker_compose = os.path.join(DOCKER_COMPOSE_PATH, 'docker_compose_mysql_php_client.yml')
|
||||
subprocess.check_call(['docker-compose', '-p', cluster.project_name, '-f', docker_compose, 'up', '--no-recreate', '-d', '--build'])
|
||||
yield docker.from_env().containers.get(cluster.project_name + '_php1_1')
|
||||
|
||||
|
||||
@pytest.fixture(scope='module')
|
||||
def nodejs_container():
|
||||
docker_compose = os.path.join(SCRIPT_DIR, 'clients', 'mysqljs', 'docker_compose.yml')
|
||||
docker_compose = os.path.join(DOCKER_COMPOSE_PATH, 'docker_compose_mysql_js_client.yml')
|
||||
subprocess.check_call(['docker-compose', '-p', cluster.project_name, '-f', docker_compose, 'up', '--no-recreate', '-d', '--build'])
|
||||
yield docker.from_env().containers.get(cluster.project_name + '_mysqljs1_1')
|
||||
|
||||
|
||||
@pytest.fixture(scope='module')
|
||||
def java_container():
|
||||
docker_compose = os.path.join(SCRIPT_DIR, 'clients', 'java', 'docker_compose.yml')
|
||||
docker_compose = os.path.join(DOCKER_COMPOSE_PATH, 'docker_compose_mysql_java_client.yml')
|
||||
subprocess.check_call(['docker-compose', '-p', cluster.project_name, '-f', docker_compose, 'up', '--no-recreate', '-d', '--build'])
|
||||
yield docker.from_env().containers.get(cluster.project_name + '_java1_1')
|
||||
|
||||
|
@ -20,6 +20,7 @@ psycopg2.extras.register_uuid()
|
||||
|
||||
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
|
||||
config_dir = os.path.join(SCRIPT_DIR, './configs')
|
||||
DOCKER_COMPOSE_PATH = get_docker_compose_path()
|
||||
|
||||
cluster = ClickHouseCluster(__file__)
|
||||
node = cluster.add_instance('node', config_dir=config_dir, env_variables={'UBSAN_OPTIONS': 'print_stacktrace=1'})
|
||||
@ -38,7 +39,7 @@ def server_address():
|
||||
|
||||
@pytest.fixture(scope='module')
|
||||
def psql_client():
|
||||
docker_compose = os.path.join(SCRIPT_DIR, 'clients', 'psql', 'docker_compose.yml')
|
||||
docker_compose = os.path.join(DOCKER_COMPOSE_PATH, 'docker_compose_postgesql.yml')
|
||||
subprocess.check_call(['docker-compose', '-p', cluster.project_name, '-f', docker_compose, 'up', '--no-recreate', '-d', '--build'])
|
||||
yield docker.from_env().containers.get(cluster.project_name + '_psql_1')
|
||||
|
||||
@ -61,7 +62,7 @@ def psql_server(psql_client):
|
||||
|
||||
@pytest.fixture(scope='module')
|
||||
def java_container():
|
||||
docker_compose = os.path.join(SCRIPT_DIR, 'clients', 'java', 'docker_compose.yml')
|
||||
docker_compose = os.path.join(DOCKER_COMPOSE_PATH, 'docker_compose_postgesql_java_client.yml')
|
||||
subprocess.check_call(['docker-compose', '-p', cluster.project_name, '-f', docker_compose, 'up', '--no-recreate', '-d', '--build'])
|
||||
yield docker.from_env().containers.get(cluster.project_name + '_java_1')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user