From af44abd8d8339e81aeff4d62547a8ea9a8a11925 Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Thu, 27 Aug 2015 20:37:59 -0700 Subject: [PATCH] Remove maridb client from base image Sam thinks this is the cause of the permissions issue. Whether it is or not, it is not necessary in the base image. Sam suggested using the same libraries throughout the deployment related to mysql - seems to make sense to me. Change-Id: I14ed99db7ceccd6d6231f29bd24e1dcd0246bf92 Closes-Bug: #1486374 --- docker_templates/base/Dockerfile.j2 | 9 +++++++-- docker_templates/base/mariadb.yum.repo | 5 +++++ docker_templates/galera/Dockerfile.j2 | 10 +--------- 3 files changed, 13 insertions(+), 11 deletions(-) create mode 100644 docker_templates/base/mariadb.yum.repo diff --git a/docker_templates/base/Dockerfile.j2 b/docker_templates/base/Dockerfile.j2 index 807f3fe6ca..b3b0c776a2 100755 --- a/docker_templates/base/Dockerfile.j2 +++ b/docker_templates/base/Dockerfile.j2 @@ -7,6 +7,13 @@ ENV KOLLA_BASE_DISTRO {{ base_distro }} ENV KOLLA_INSTALL_TYPE {{ install_type }} {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +# Turns on galera repos throughout the build +COPY mariadb.yum.repo /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 + {% if install_type == 'binary' %} {% if base_distro in ['centos', 'oraclelinux'] %} @@ -57,7 +64,6 @@ RUN yum update -y \ RUN yum install -y \ git \ iproute \ - mariadb \ mariadb-libs \ openssl \ openstack-utils \ @@ -165,7 +171,6 @@ RUN yum update -y \ libffi-devel \ libxml2-devel \ libxslt-devel \ - mariadb \ mariadb-devel \ mysql-devel \ MySQL-python \ diff --git a/docker_templates/base/mariadb.yum.repo b/docker_templates/base/mariadb.yum.repo new file mode 100644 index 0000000000..564ce3f0e7 --- /dev/null +++ b/docker_templates/base/mariadb.yum.repo @@ -0,0 +1,5 @@ +[mariadb] +name = MariaDB +baseurl = http://yum.mariadb.org/10.0/centos7-amd64 +gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB +gpgcheck=1 diff --git a/docker_templates/galera/Dockerfile.j2 b/docker_templates/galera/Dockerfile.j2 index 7856a7f243..bb92710586 100644 --- a/docker_templates/galera/Dockerfile.j2 +++ b/docker_templates/galera/Dockerfile.j2 @@ -3,15 +3,7 @@ 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 \ +RUN yum install -y \ MariaDB-Galera-server \ MariaDB-client \ rsync \