kolla-ansible/docker_templates/galera/Dockerfile.j2
Sam Yaple 8f7ff27779 Fix MariaDB for ubuntu
In MariaDB we adjust the dependecies of what we install there as well
adding only what is appropriate for the install.

In Ansible we adjust some templates to all work around differences
between the different Linux families.

Change-Id: Ibc26e2f4d4a732630632d3ed27fb595b6fe019d2
Partially-Implements: blueprint install-from-ubuntu
2015-08-21 13:10:05 +00:00

49 lines
1.7 KiB
Django/Jinja

FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}
RUN echo "[mariadb]" > /etc/yum.repos.d/MariaDB.repo && \
echo "name = MariaDB" >> /etc/yum.repos.d/MariaDB.repo && \
echo "baseurl = http://yum.mariadb.org/10.0/centos7-amd64" >> /etc/yum.repos.d/MariaDB.repo && \
echo "gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB" >> /etc/yum.repos.d/MariaDB.repo && \
echo "gpgcheck=1" >> /etc/yum.repos.d/MariaDB.repo
RUN yum install -y http://www.percona.com/redir/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm \
&& sed -i 's|$releasever|centos/latest|g' /etc/yum.repos.d/percona-release.repo \
&& yum install -y \
MariaDB-Galera-server \
MariaDB-client \
rsync \
galera \
socat \
hostname \
percona-xtrabackup \
pv \
tar \
expect \
&& rm -rf /var/lib/mysql/*
{% elif base_distro in ['ubuntu', 'debian'] %}
# At the end of this run statement we symlink two folders to match the folder
# structure of the RPM family for mysql configs. This allows us to not change
# the config-external.sh code
# TODO(SamYaple): Remove that symlink once config-external is updated
RUN apt-get install -y --no-install-recommends \
mariadb-galera-server \
percona-xtrabackup \
socat \
expect \
&& apt-get clean \
&& rm -rf /var/lib/mysql/* \
&& ln -s /etc/mysql/conf.d/ /etc/my.cnf.d
{% endif %}
COPY config-galera.sh /opt/kolla/config/
COPY config-external.sh /opt/kolla/
COPY start.sh /
CMD ["/start.sh"]