kolla-ansible/docker/openstack-base/Dockerfile.j2
Paul Bourke 72a8f5aabd Use openstack/requirements for repeatable builds
Add this repo to the openstack-base image, and use the upper-constraints
to install the client packages. Will follow up with dependant patches
for the child images to reduce the risk of breaking everything at once.

--

Background:

Many dependencies in the requirements.txt of OpenStack components have
quite loose version requirements, in many cases they will just specify a
minimum version (e.g. WebOb>=1.2.3).

The result of this is that given a Kolla image for Keystone built today,
another build of the exact same ref of Keystone could be broken
tomorrow, due to it picking up a later unsupported dependency.

The https://github.com/openstack/requirements repo exists to bring some
sanity to this situation. (It also outlines other problems it solves in
it's readme).

We also may like to checkout the stable/liberty branch of this project
in our liberty branch, once it appears.

Change-Id: Iccb4e99f8e4b6659a19c1817d0f4c697824af25c
Partial-Bug: #1505306
2015-10-15 12:07:48 +01:00

101 lines
2.6 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
git \
iproute \
mariadb-libs \
MySQL-python \
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 \
&& 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 \
mysql-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 \
curl \
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 \
&& curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
&& python get-pip.py \
&& rm get-pip.py \
&& pip --no-cache-dir install -U -c requirements/upper-constraints.txt \
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
{% endif %}