cda0459ad1
There were some inconsistencies with pip install instructions thoughout Kolla. We fix those here. Additionally, we fix the virtualenv to properly use the site-packages on the host if a library is not available in the venv. Change-Id: Ib84d48e8826bb96060338b3fa0782620c98794a8 Related-Bug: #1524684 Closes-Bug: #1529434
38 lines
1.5 KiB
Django/Jinja
38 lines
1.5 KiB
Django/Jinja
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
|
|
MAINTAINER {{ maintainer }}
|
|
|
|
{% if install_type == 'binary' %}
|
|
{% if base_distro in ['centos'] %}
|
|
|
|
RUN curl https://copr.fedoraproject.org/coprs/sdake/openstack-magnum/repo/epel-7/sdake-openstack-magnum-epel-7.repo -o /etc/yum.repos.d/sdake-openstack-magnum-epel-7.repo \
|
|
&& rpm --import https://copr-be.cloud.fedoraproject.org/results/sdake/openstack-magnum/pubkey.gpg \
|
|
&& yum install -y openstack-magnum-common \
|
|
&& yum clean all
|
|
|
|
{% elif base_distro in ['fedora'] %}
|
|
|
|
RUN curl https://copr.fedoraproject.org/coprs/sdake/openstack-magnum/repo/fedora-22/sdake-openstack-magnum-fedora-22.repo -o /etc/yum.repos.d/sdake-openstack-magnum-f22.repo \
|
|
&& rpm --import https://copr-be.cloud.fedoraproject.org/results/sdake/openstack-magnum/pubkey.gpg \
|
|
&& yum install -y openstack-magnum-common \
|
|
&& yum clean all
|
|
|
|
{% elif base_distro in ['oraclelinux'] %}
|
|
|
|
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
|
&& /bin/false
|
|
|
|
{% endif %}
|
|
{% elif install_type == 'source' %}
|
|
|
|
ADD magnum-base-archive /magnum-base-source
|
|
RUN ln -s magnum-base-source/* magnum \
|
|
&& useradd --user-group magnum \
|
|
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /magnum \
|
|
&& mkdir -p /etc/magnum /var/log/magnum /home/magnum \
|
|
&& cp -r /magnum/etc/magnum/* /etc/magnum \
|
|
&& chown -R magnum: /etc/magnum /var/log/magnum /home/magnum
|
|
|
|
{% endif %}
|
|
|
|
RUN usermod -a -G kolla magnum
|