Skip to content

Commit 7f4f102

Browse files
author
Gaetano Giunta
committed
wip add all dbs to the list
1 parent a74555a commit 7f4f102

File tree

3 files changed

+140
-15
lines changed

3 files changed

+140
-15
lines changed

README.md

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,33 +21,58 @@ b) allow doing full-fledged load testing, comparing results across many db versi
2121

2222
## Requirements
2323

24-
* Docker X.Y or later.
24+
* Docker: 1.13 or later.
2525

26-
* Docker-compose 1.13 or later
26+
* Docker-compose: version 1.10 or later
2727

28+
* minimum RAM, CPU, Disk space: these have not been measured, but you probably want something better than a raspberry pi...
2829

29-
## Installation
30+
31+
## Quick Start
32+
33+
### Installation
3034

3135
cd docker && touch containers.env.local && docker-compose build
3236

3337
*NB*: if the user-id and group-id of the account that you are using on the host computer are not 1000:1000, edit
3438
the file docker/containers.env.local _before_ running the `build` command, and add in there correct values for
3539
the CONTAINER_USER_UID and CONTAINER_USER_GID environment variables. More details in the file docker/containers.env.
3640

41+
*NB*: the containers by default expose a web application on ports 80 and 443. If any of those ports are in use on
42+
the host computer, please change variables COMPOSE_WEB_LISTEN_PORT_HTTP and COMPOSE_WEB_LISTEN_PORT_HTTPS in file .env
3743

38-
## Usage
44+
### Usage
3945

4046
cd docker && docker-compose up -d
4147
docker exec -ti db3v4l_worker su - user
42-
php bin/console
48+
cd db3v4l
49+
php bin/console db3v4l:sql:execute --sql='select current_date'
50+
mysql -h mysql_5_5 -u 3v4l -p -e 'select current_date'
51+
psql -h postgresql_9_4 -U postgres -c 'select current_date'
4352
...
4453

54+
The default password for the last 2 commands is '3v4l'
55+
56+
Once the containers are upp and running, you can access a database administration console at: http://localhost/adminer.php
57+
(if you are running the whole stack inside a VM, replace 'localhost' with the IP of the VM, as seen from the computer where
58+
your browser is executing).
59+
4560
## Details
4661

62+
### Troubleshooting
63+
64+
After starting the containers via `docker-compose up -d`, you can:
65+
66+
- check if they are all running: `docker-compose ps`
67+
- check if they all bootstrapped correctly: `docker-compose logs`
68+
- check if they one container bootstrapped correctly, eg: `docker-compose logs db3v4l_postgresql_9_4`
69+
- check the processes running in one container, eg: `docker exec -ti db3v4l_postgresql_9_4 ps aux`
70+
4771
### Maintenance
4872

4973
- 3 scripts are provided in the top-level `bin` folder to help keeping disk space usage under control
5074

75+
5176
## Thanks
5277

5378
Many thanks to

TODO.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1-
- worker: allow to take sql snippet file, pick the desired servers, run it and show results + time taken
1+
- fix auth problems with mysql 8.0
22

3-
- verify usage of custom config files for both mysql and posgres (look at readme on dockerhub)
3+
- worker: improve sql execution cmd:
4+
+ fix: why does mariadb cli command does return -1 as exit code ?
5+
+ allow it to take sql snippet from file
6+
+ allow it to pick a set of desired servers
7+
+ at end show results + time & mem taken for each db
8+
9+
- worker: improve profile of 'user' account (esp: add APP_ENV and APP_DEBUG env vars)
410

511
- web: allow to insert sql snippet, pick the desired servers, run it and show results
612

@@ -10,30 +16,37 @@
1016

1117
- pick up a library which allows to load db-agnostic schema defs and data
1218

13-
- web: add rest API
14-
15-
- worker: improve profile of 'user' account
19+
- symfony config: get pwd for db root accounts injected from docker-compose
1620

1721
- web/worker: set up a cronjob to remove SF profiler data
1822

1923
- web/worker: move sf logs to a mounted volume
2024

21-
- worker: add phpbench as dependency
25+
- web: improve Adminer gui by providing a pre-filled list of databases
2226

23-
- web gui: store previous snippets in a dedicated db, list them
27+
- web: add rest API
28+
29+
- improve cli scripts:
30+
+ add a script that removes images+logs+data
31+
+ make the script which removes data ask 4 confirmation
2432

2533
- web/worker: allow easy loading of 'standard' testing data sets
2634
https://www.percona.com/blog/2011/02/01/sample-datasets-for-benchmarking-and-testing/
2735
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-public-data-sets
2836

37+
- web gui: store previous snippets in a dedicated db, list them
38+
2939
- mariadb/mysql: allow to define in docker parameters the size of the ramdisk for
3040
also in default configs, do use /tmpfs? At least add it commented out
31-
41+
3242
- postgresql: move stats_temp_directory to /tmpfs
3343

44+
- worker: add phpbench as dependency
45+
3446
- allow to easily set up either prod/public or dev/private stacks via a parameter in .env
3547

3648
- "public server" configuration:
49+
- disable access to adminer
3750
- add mod_security 3
3851
- prevent usage of custom db schemas, allow only temp ones
3952
- rate-limit http requests
@@ -50,7 +63,7 @@
5063

5164
- add oracle containers (see https://github.com/oracle/docker-images/tree/master/OracleDatabase/SingleInstance)
5265

53-
- add sqlite, Firebird and MSSQL containers
66+
- add sqlite, Firebird, MSSQL and Elastic containers
5467

5568
- add clustered mysql/postgresql containers
5669

app/config/services.yaml

Lines changed: 88 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,38 @@ parameters:
1515
driver: pdo_mysql
1616
charset: UTF8
1717
server_version: mariadb-5.5
18+
mariadb_10_0:
19+
host: mariadb_10_0
20+
port: 3306
21+
user: root
22+
password: 3v4l
23+
driver: pdo_mysql
24+
charset: UTF8
25+
server_version: mariadb-10.0
26+
mariadb_10_1:
27+
host: mariadb_10_1
28+
port: 3306
29+
user: root
30+
password: 3v4l
31+
driver: pdo_mysql
32+
charset: UTF8
33+
server_version: mariadb-10.1
34+
mariadb_10_2:
35+
host: mariadb_10_2
36+
port: 3306
37+
user: root
38+
password: 3v4l
39+
driver: pdo_mysql
40+
charset: UTF8
41+
server_version: mariadb-10.2
42+
mariadb_10_3:
43+
host: mariadb_10_3
44+
port: 3306
45+
user: root
46+
password: 3v4l
47+
driver: pdo_mysql
48+
charset: UTF8
49+
server_version: mariadb-10.3
1850
mysql_5_5:
1951
host: mysql_5_5
2052
port: 3306
@@ -23,6 +55,30 @@ parameters:
2355
driver: pdo_mysql
2456
charset: UTF8
2557
server_version: '5.5'
58+
mysql_5_6:
59+
host: mysql_5_6
60+
port: 3306
61+
user: root
62+
password: 3v4l
63+
driver: pdo_mysql
64+
charset: UTF8
65+
server_version: '5.6'
66+
mysql_5_7:
67+
host: mysql_5_7
68+
port: 3306
69+
user: root
70+
password: 3v4l
71+
driver: pdo_mysql
72+
charset: UTF8
73+
server_version: '5.7'
74+
mysql_8_0:
75+
host: mysql_8_0
76+
port: 3306
77+
user: root
78+
password: 3v4l
79+
driver: pdo_mysql
80+
charset: UTF8
81+
server_version: '8.0'
2682
postgresql_9_4:
2783
host: postgresql_9_4
2884
port: 5432
@@ -31,7 +87,38 @@ parameters:
3187
driver: pdo_pgsql
3288
charset: UTF8
3389
server_version: '9.4'
34-
90+
postgresql_9_5:
91+
host: postgresql_9_5
92+
port: 5432
93+
user: postgres
94+
password: 3v4l
95+
driver: pdo_pgsql
96+
charset: UTF8
97+
server_version: '9.5'
98+
postgresql_9_6:
99+
host: postgresql_9_6
100+
port: 5432
101+
user: postgres
102+
password: 3v4l
103+
driver: pdo_pgsql
104+
charset: UTF8
105+
server_version: '9.6'
106+
postgresql_10_7:
107+
host: postgresql_10_7
108+
port: 5432
109+
user: postgres
110+
password: 3v4l
111+
driver: pdo_pgsql
112+
charset: UTF8
113+
server_version: '10.7'
114+
postgresql_11_2:
115+
host: postgresql_11_2
116+
port: 5432
117+
user: postgres
118+
password: 3v4l
119+
driver: pdo_pgsql
120+
charset: UTF8
121+
server_version: '11.2'
35122
services:
36123
# default configuration for services in *this* file
37124
_defaults:

0 commit comments

Comments
 (0)