Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update DB versions in docker demos #278

Merged
merged 2 commits into from
Nov 6, 2018
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
11 changes: 0 additions & 11 deletions docker/_scripts/mysql-ssl-configure.sh

This file was deleted.

5 changes: 5 additions & 0 deletions docker/_scripts/mysql/mariadb-ssl.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[mysqld]
ssl
ssl-ca=/tmp.ssl/ca.crt
ssl-cert=/tmp.ssl/mysql.crt
ssl-key=/tmp.ssl/mysql.key
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,9 @@ services:

# Postgresql container
mysql:
# Build and run container based on official mysql image
# with disabled SSL
build:
context: ../
dockerfile: docker/mysql-nossl.dockerfile
image: mariadb:10.3
# INSECURE!!! You MUST define your own DB name and credentials
environment:
MYSQL_ONETIME_PASSWORD: ${MYSQL_ONETIME_PASSWORD:-urLK7YJPndDWsnJC}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-hy53uBLmBuihUK29}
MYSQL_DATABASE: ${MYSQL_DATABASE:-test}
MYSQL_USER: ${MYSQL_USER:-test}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,7 @@ services:

# Postgresql container
mysql:
# Build and run container based on official mysql image
# with disabled SSL
build:
context: ../
dockerfile: docker/mysql-nossl.dockerfile
image: mariadb:10.3
# INSECURE!!! You MUST define your own DB name and credentials
environment:
MYSQL_ONETIME_PASSWORD: ${MYSQL_ONETIME_PASSWORD:-urLK7YJPndDWsnJC}
Expand Down
7 changes: 2 additions & 5 deletions docker/docker-compose.mysql-nossl-server-ssl-connector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,7 @@ services:

# Postgresql container
mysql:
# Build and run container based on official mysql image
# with disabled SSL
build:
context: ../
dockerfile: docker/mysql-nossl.dockerfile
image: mariadb:10.3
# INSECURE!!! You MUST define your own DB name and credentials
environment:
MYSQL_ONETIME_PASSWORD: ${MYSQL_ONETIME_PASSWORD:-urLK7YJPndDWsnJC}
Expand Down Expand Up @@ -111,6 +107,7 @@ services:
--db_host=mysql
--db_port=3306
--keys_dir=/keys
--client_id=${ACRA_CLIENT_ID:-testclientid}
--auth_keys=/keys/httpauth.accounts
--http_api_enable
--incoming_connection_api_string=tcp://0.0.0.0:9090
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,7 @@ services:

# Postgresql container
mysql:
# Build and run container based on official mysql image
# with disabled SSL
build:
context: ../
dockerfile: docker/mysql-nossl.dockerfile
image: mariadb:10.3
# INSECURE!!! You MUST define your own DB name and credentials
environment:
MYSQL_ONETIME_PASSWORD: ${MYSQL_ONETIME_PASSWORD:-urLK7YJPndDWsnJC}
Expand Down
1 change: 1 addition & 0 deletions docker/docker-compose.mysql-ssl-server-ssl-connector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ services:
--db_host=mysql
--db_port=3306
--keys_dir=/keys
--client_id=${ACRA_CLIENT_ID:-testclientid}
--auth_keys=/keys/httpauth.accounts
--http_api_enable
--incoming_connection_api_string=tcp://0.0.0.0:9090
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ services:

# Postgresql container
postgresql:
image: postgres:9.6
image: postgres:11
# INSECURE!!! You MUST define your own DB name and credentials
environment:
POSTGRES_DB: ${POSTGRES_DB:-test}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ services:

# Postgresql container
postgresql:
image: postgres:9.6
image: postgres:11
# INSECURE!!! You MUST define your own DB name and credentials
environment:
POSTGRES_DB: ${POSTGRES_DB:-test}
Expand Down
3 changes: 2 additions & 1 deletion docker/docker-compose.pgsql-nossl-server-ssl-connector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ services:

# Postgresql container
postgresql:
image: postgres:9.6
image: postgres:11
# INSECURE!!! You MUST define your own DB name and credentials
environment:
POSTGRES_DB: ${POSTGRES_DB:-test}
Expand Down Expand Up @@ -103,6 +103,7 @@ services:
command: >-
--db_host=postgresql
--keys_dir=/keys
--client_id=${ACRA_CLIENT_ID:-testclientid}
--auth_keys=/keys/httpauth.accounts
--http_api_enable
--incoming_connection_api_string=tcp://0.0.0.0:9090
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ services:

# Postgresql container
postgresql:
image: postgres:9.6
image: postgres:11
# INSECURE!!! You MUST define your own DB name and credentials
environment:
POSTGRES_DB: ${POSTGRES_DB:-test}
Expand Down
1 change: 1 addition & 0 deletions docker/docker-compose.pgsql-ssl-server-ssl-connector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ services:
command: >-
--db_host=postgresql
--keys_dir=/keys
--client_id=${ACRA_CLIENT_ID:-testclientid}
--auth_keys=/keys/httpauth.accounts
--http_api_enable
--incoming_connection_api_string=tcp://0.0.0.0:9090
Expand Down
3 changes: 0 additions & 3 deletions docker/mysql-nossl.dockerfile

This file was deleted.

14 changes: 7 additions & 7 deletions docker/mysql-ssl.dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM mysql:5.7
FROM mariadb:10.3

# Original mysql init script expects empty /var/lib/mysql so we initially place
# certificates into the image to the intermediate directory
COPY docker/ssl/mysql/mysql.crt /tmp.ssl/server-cert.pem
COPY docker/ssl/mysql/mysql.key /tmp.ssl/server-key.pem
COPY docker/ssl/ca/example.cossacklabs.com.crt /tmp.ssl/ca.pem
# Original init script expects empty /var/lib/mysql so we initially place
# certificates to the intermediate directory
COPY docker/ssl/mysql/mysql.crt /tmp.ssl/
COPY docker/ssl/mysql/mysql.key /tmp.ssl/
COPY docker/ssl/ca/example.cossacklabs.com.crt /tmp.ssl/ca.crt
RUN chown -R mysql:mysql /tmp.ssl

COPY docker/_scripts/mysql-ssl-configure.sh /docker-entrypoint-initdb.d/
COPY docker/_scripts/mysql/mariadb-ssl.cnf /etc/mysql/mariadb.conf.d/
2 changes: 1 addition & 1 deletion docker/postgresql-ssl.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM postgres:9.6
FROM postgres:11

# Original postgresql init script expects empty $PGDATA so we initially place
# certificates into the image to the intermediate directory
Expand Down
2 changes: 2 additions & 0 deletions examples/python/example_with_zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ def write_data(data, connection):
connection = engine.connect()
metadata.create_all(engine)

print('DB driver: {}'.format(driver))

if args.print:
print_data(args.zone_id, connection)
elif args.data:
Expand Down
2 changes: 2 additions & 0 deletions examples/python/example_without_zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ def write_data(data, connection):
metadata.create_all(engine)
connection = engine.connect()

print('DB driver: {}'.format(driver))

if args.print:
print_data(connection)
else:
Expand Down