-
Notifications
You must be signed in to change notification settings - Fork 25
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
MDBF-829 - Update MariaDB Server cnf #655
MDBF-829 - Update MariaDB Server cnf #655
Conversation
See example below: faust@hz-downloads:~$ cat /etc/cron.d/docker-db-backup
# backup db from the docker container
00 02 * * * root docker exec prod-db mariadb-backup --user=root --password=password --backup --stream=xbstream 2>/var/log/mariadb-backup.log >/backup/mariadb.xb || cat /var/log/mariadb-backup.log And then, restic will backup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure that I understand how the dev configuration of mariadb is done, what is sure is that if it's a symlink we clearly can not afford same setting on DEV, way less RAM for instance...
The source of truth is:
|
@fauust Don't we need a volume mount for backup? |
This is why there are 2 folders now, two separate configs. |
Nope, it use STDOUT (or SDTERR, |
Note https://github.com/MariaDB/server/blob/10.11/debian/additions/mariadb.conf.d/50-server.cnf is the current default.
|
@grooverdan Does the fact that this configuration file is included (by For example we have global variables defined in Except |
Your config file will take effect as its read last, just validating to be sure:
Noting that charset/collation is the default (for this image, changes in ~ 11.5/11.6). bind-address is the real default, listen to all interfaces, and not the debian default, because listen to all is the only sane default value for a container. |
@grooverdan @fauust Please let me know if there is anything else to cover so I can merge rebase and merge this PR. |
docker-compose/generate-config.py
Outdated
@@ -41,10 +41,10 @@ | |||
- MARIADB_AUTO_UPGRADE=1 | |||
network_mode: host | |||
healthcheck: | |||
test: ['CMD', "mariadb-admin", "--password=password", "--protocol", "tcp", "ping"] | |||
test: ['CMD', "healthcheck.sh", "--connect", "--innodb_initialized"] | |||
volumes: | |||
- ./mariadb:/var/lib/mysql:rw |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably go to /srv/mariadb
or somewhere else but should be outside docker-compose IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From previous:
so removing, port, bind-address, connection_timeout through to skip-name-resolved, query_cache_size, [mysqldump] max_allowed_packet and sort_buffer_size are above defaults, so conservativity you could keep those. |
Solved in 6db3b51. |
@fauust @grooverdan |
though to was referring to everything in-between. Can commit for now and look at query/system performance after the bunch of changes, including below, are deployed.
As you are changing the character set, may as well change the collation too at the same time |
05c7c5f
to
35979cd
Compare
Separate configs for PROD and DEV. - updated docker-compose to choose the right one based on environment. - old_mode = '' to allow utf8mb4 on the connection. Emoji's can now be inserted into buildbot.changes.comments - cleaned PROD configuration where default/harmful options were present. - pinned MariaDB Server version to 10.11.10 to be in control of minor upgrades. - switched to standard healthcheck script for containers - moved datadir to /srv/mariadb
35979cd
to
62483d0
Compare
Main feature: MDBF-791 - Run Production BuildBot services in docker containers
In this Pull Request:
Q:
-> @fauust how Restic backup will work for containers?
-> @grooverdan Couldn't find anything for slow query log in containers --> stdout (to be inspected with
docker logs
viajournald
driver). Anything like that possible? I've mounted a volume for these logs.Source of Truth:
@fauust / @grooverdan For PROD configuration, well, my source of truth was hz-bbm1.
Here's the current prod layout, if you have any suggestions or I missed something, please let me know.