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

docker images for vttestserver #7262

Merged
merged 2 commits into from
Jan 7, 2021
Merged

Conversation

deepthi
Copy link
Member

@deepthi deepthi commented Jan 7, 2021

Signed-off-by: deepthi [email protected]

Description

There has been a request for a vttestserver docker image for testing purposes.
We already have a Dockerfile that does this for mysql57.
The files in this PR are just a little bit different.

  • mysql57 and mysql80 flavors
  • startup command that runs vttestserver using provided arguments
  • removed orchestrator/web because I don't think that is required

Related Issue(s)

Fixes #7203

Checklist

  • Should this PR be backported? (NO)
  • Tests were added or are not required
  • Documentation was added or is not required

Deployment Notes

Run as follows

$ docker run -e PORT=9997 -e NUM_SHARDS="1,1" -e KEYSPACES="hello,bye" --network host -d vitess/vttestserver:mysql57
1c64f5b029b198eee678ab9defa78419b11e8c8332c5326b996763404bfeb2e0
$ docker exec -it 1c64f5b029b198eee678ab9defa78419b11e8c8332c5326b996763404bfeb2e0 /bin/bash
vitess@1c64f5b029b1:/$ ps -aef | grep vt
vitess       1     0  0 01:48 ?        00:00:00 /bin/sh -c /vt/bin/vttestserver -port $PORT -keyspaces $KEYSPACES -num_shards $NUM_SHARDS
vitess       7     1  0 01:48 ?        00:00:00 /vt/bin/vttestserver -port 3303 -keyspaces hello,bye -num_shards 1,1
vitess      55     1  0 01:48 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/vt/vtdataroot/vttest883037074/vt_0000000001/my.cnf --basedir=/usr
vitess     678    55  3 01:48 ?        00:00:00 /usr/sbin/mysqld --defaults-file=/vt/vtdataroot/vttest883037074/vt_0000000001/my.cnf --basedir=/usr --datadir=/vt/vtdataroot/vttest883037074/vt_0000000001/data --plugin-dir=/usr/lib/mysql/plugin --log-error=/vt/vtdataroot/vttest883037074/vt_0000000001/error.log --pid-file=/vt/vtdataroot/vttest883037074/vt_0000000001/mysql.pid --socket=/vt/vtdataroot/vttest883037074/vt_0000000001/mysql.sock --port=3305
vitess     709     7  6 01:48 ?        00:00:01 /vt/bin/vtcombo -port 3303 -log_dir /vt/vtdataroot/vttest883037074/logs -alsologtostderr -grpc_port 3304 -db_charset utf8 -db_app_user vt_dba -db_app_password  -db_dba_user vt_dba -db_dba_password  -proto_topo keyspaces:<name:"hello" shards:<name:"0" > replica_count:2 rdonly_count:1 > keyspaces:<name:"bye" shards:<name:"0" > replica_count:2 rdonly_count:1 > cells:"test"  -mycnf_server_id 1 -mycnf_socket_file /vt/vtdataroot/vttest883037074/vt_0000000001/mysql.sock -normalize_queries -queryserver-config-pool-size 4 -queryserver-config-query-timeout 300 -queryserver-config-schema-reload-time 60 -queryserver-config-stream-pool-size 4 -queryserver-config-transaction-cap 4 -queryserver-config-transaction-timeout 300 -queryserver-config-txpool-timeout 300 -service_map grpc-vtgateservice,grpc-vtctl -enable_queries -transaction_mode MULTI -tablet_hostname localhost -db_socket /vt/vtdataroot/vttest883037074/vt_0000000001/mysql.sock -mysql_auth_server_impl none -mysql_server_port 3306 -mysql_server_bind_address localhost
vitess     775   768  0 01:48 pts/0    00:00:00 grep vt
vitess@1c64f5b029b1:/$ exit
$ mysql --host 127.0.0.1 --port 10000
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.7.9-Vitess MySQL Community Server (GPL)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+----------+
| Database |
+----------+
| bye      |
| hello    |
+----------+
2 rows in set (0.00 sec)

mysql> exit
Bye

Impacted Areas in Vitess

Components that this PR will affect:

  • Query Serving
  • VReplication
  • Cluster Management
  • Build

@deepthi deepthi requested a review from mavenraven January 7, 2021 01:52
@deepthi deepthi marked this pull request as ready for review January 7, 2021 02:59
Copy link
Contributor

@dkhenry dkhenry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@deepthi deepthi merged commit d508d33 into vitessio:master Jan 7, 2021
@deepthi deepthi deleted the ds-vttest-docker branch January 7, 2021 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docker image for vttestserver
2 participants