buildbot.mariadb.org
(MDEV-8244)
|
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | N/A |
| Affects Version/s: | None |
| Fix Version/s: | N/A |
| Type: | Technical task | Priority: | Major |
| Reporter: | Sergei Golubchik | Assignee: | Teodor Mircea Ionita (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Description |
|
Use Docker instead of KVM when possible. |
| Comments |
| Comment by Elena Stepanova [ 2017-04-16 ] | ||||||||||||||
|
I think we should first create a prototype and measure performance to make sure we are not losing anything. | ||||||||||||||
| Comment by Daniel Black [ 2017-04-17 ] | ||||||||||||||
|
I've got a reasonable docker build/test environment. I'll attach some scripts in the next few days. Its easy enough to add a few at a time. First tip is to use overlayfs for the docker backing filesystem. | ||||||||||||||
| Comment by Daniel Black [ 2017-04-28 ] | ||||||||||||||
HostSysctlsRunning a shared kernel between contains will hit on these limits in test: /etc/sysctl.d/80-mysql-limits.conf
/etc/sysctl.d/30-mysql-vm-huge-pages.conf
Dockeroverlayfs is better performing that the default aufs On an ubuntu-16.04 base the following was sufficent to switch /etc/systemd/system/docker.service.d/overlay.conf
The following was useful to inject common environment variables into the docker executable (like proxy servers) /etc/systemd/system/docker.service.d/env.conf
Docker build containersOverviewThe attached scripts are based on a Jenkins build environment. They where more aimed at building cross MySQL variants and across many compilers rather than cross OS variant. source maps to a checked out source and hopefully the environment variables used are obvious to map to buildbot. Important bits are that docker containers use VOLUMES maps to the host (like artefacts) for preserving build logs (and ccache) between builds. docker_run_build.sh creates a image, and then runs it as a container. Dockerfile is an ubuntu-16.04 base image and only one of these should be needed per (arch,distro). Bits in here are needed for non-mariadb MySQL variants build_mysql.sh runs from within the container and calls func_test.sh to run functional tests. ArchitecturesThe Docker support for multiple architectures in pulling images via docker hub is currently a bit limited though being worked on. Workaround like running the following to establish a consistent name on Power machines to those on intel so the same Dockerfile can be used helps. Pulling from dockerhub ppc64le images https://hub.docker.com/r/ppc64le/
The same applies for Debian, Fedora, Centos, Opensuse To build from scratch would invole using something like https://github.com/moby/moby/blob/master/contrib/mkimage-debootstrap.sh and
With Fedora something like spins/kickstarts could be used to generate images. PPC64 (Big endian) - docker for BE doesn't existedit: no BE docker. | ||||||||||||||
| Comment by Daniel Black [ 2017-04-28 ] | ||||||||||||||
|
Any question let me know. Happy to provide guidance. | ||||||||||||||
| Comment by Daniel Black [ 2017-06-08 ] | ||||||||||||||
|
Note | ||||||||||||||
| Comment by Daniel Black [ 2017-06-28 ] | ||||||||||||||
|
Note: | ||||||||||||||
| Comment by Teodor Mircea Ionita (Inactive) [ 2018-10-15 ] | ||||||||||||||
|
I have a functional implementation of latest Buildbot using Docker for targeting Linux builds: Code/config available here: Dockerfiles for current builders: Also see associated README.md in the repo for details. So far no major drawbacks from using Docker have been encountered. The only downside is that we can't really use it to target anything else besides Linux x86 builds. For all other architectures, we need to revert back to KVM (any other options suggested worth a try?). |