kolla-ansible/docker/openstack-base/Dockerfile.j2
Martin André b5878b2449 Fix MySQL-python build on Centos
The build of MySQL-python started to fail after the update to
Percona-Server-devel-56-5.6.27-rel76.0.el7.x86_64 with:

  /usr/bin/ld: cannot find -lmysqlclient

It appears Percona-Server-devel package provides a broken
/usr/lib64/libmysqlclient.so that points to nonexistent
libmysqlclient.so.18.

Fix the build by installing MariaDB-shared package from the mariadb
repo that contains the missing file.

Change-Id: Ia95fddfe44f54bd355c6f3d0ac895fdc05cecff9
Closes-Bug: #1526129
2015-12-15 17:35:48 +09:00

109 lines
2.9 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %}
# TODO(mandre) remove MariaDB-shared once Percona has fixed its packaging issue
RUN yum -y install \
git \
iproute \
mariadb-libs \
MariaDB-shared \
openssl \
&& yum clean all
{% endif %}
{% if install_type == 'binary' %}
{% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
python-barbicanclient \
python-ceilometerclient \
python-congressclient \
python-designateclient \
python-heatclient \
python-ironicclient \
python-magnumclient \
python-manilaclient \
python-mistralclient \
python-muranoclient \
python-pip \
python-saharaclient \
python-swiftclient \
python-troveclient \
python-tuskarclient \
python-zaqarclient \
python-openstackclient \
MySQL-python \
python-keystoneauth1 \
&& yum clean all
{% endif %}
{% elif install_type == 'source' %}
{% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
gcc \
gcc-c++ \
libffi-devel \
libxml2-devel \
libxslt-devel \
mariadb-devel \
openldap-devel \
openssl-devel \
postgresql \
postgresql-devel \
python-devel \
sqlite-devel \
&& yum clean all
{% elif base_distro in ['ubuntu', 'debian'] %}
RUN apt-get install -y --no-install-recommends \
ca-certificates \
build-essential \
python-dev \
libssl-dev \
libmariadbclient-dev \
libxslt1-dev \
libffi-dev \
libyaml-dev \
pkg-config \
git \
&& apt-get clean
{% endif %}
ADD openstack-base-archive /openstack-base-source
RUN ln -s openstack-base-source/* /requirements \
&& mkdir /var/lib/kolla \
&& curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
&& python get-pip.py \
&& rm get-pip.py \
&& pip install -U virtualenv \
&& virtualenv /var/lib/kolla/venv \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install -U -c requirements/upper-constraints.txt \
jinja2 \
kazoo \
python-barbicanclient \
python-ceilometerclient \
python-congressclient \
python-designateclient \
python-heatclient \
python-ironicclient \
python-magnumclient \
python-manilaclient \
python-mistralclient \
python-muranoclient \
python-saharaclient \
python-swiftclient \
python-troveclient \
python-tuskarclient \
python-zaqarclient \
python-openstackclient \
MySQL-python \
python-memcached \
six
ENV PATH /var/lib/kolla/venv/bin:$PATH
{% endif %}