Fix pip install settings

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
This commit is contained in:
SamYaple 2015-12-27 02:41:30 +00:00
parent 4457636167
commit cda0459ad1
24 changed files with 26 additions and 27 deletions

View File

@ -15,7 +15,7 @@ RUN yum -y install \
ADD aodh-base-archive /aodh-base-source
RUN ln -s aodh-base-source/* aodh \
&& useradd --user-group aodh \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install -c requirements/upper-constraints.txt /aodh \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /aodh \
&& mkdir -p /etc/aodh /var/log/aodh /home/aodh \
&& cp -r /aodh/etc/* /etc/aodh/ \
&& chown -R aodh: /etc/aodh /var/log/aodh /home/aodh

View File

@ -15,7 +15,7 @@ RUN yum -y install \
ADD ceilometer-base-archive /ceilometer-base-source
RUN ln -s ceilometer-base-source/* ceilometer \
&& useradd --user-group ceilometer \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install -c requirements/upper-constraints.txt /ceilometer \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /ceilometer \
&& mkdir -p /etc/ceilometer /var/log/ceilometer /home/ceilometer \
&& cp -r /ceilometer/etc/* /etc/ceilometer/ \
&& chown -R ceilometer: /etc/ceilometer /var/log/ceilometer /home/ceilometer

View File

@ -31,7 +31,7 @@ RUN apt-get install -y --no-install-recommends \
ADD cinder-base-archive /cinder-base-source
RUN ln -s cinder-base-source/* cinder \
&& useradd --user-group cinder \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install -c requirements/upper-constraints.txt /cinder \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /cinder \
&& mkdir -p /etc/cinder /var/log/cinder /home/cinder \
&& cp -r /cinder/etc/cinder/* /etc/cinder/ \
&& chown -R cinder: /etc/cinder /var/log/cinder /home/cinder

View File

@ -23,7 +23,7 @@ RUN yum install -y \
ADD designate-base-archive /designate-base-source
RUN ln -s designate-base-source/* designate \
&& useradd --user-group designate \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install -c requirements/upper-constraints.txt /designate \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /designate \
&& mkdir -p /etc/designate /var/log/designate /home/designate \
&& cp -r /designate/etc/designate/* /etc/designate/ \
&& chown -R designate: /etc/designate /var/log/designate /home/designate

View File

@ -18,7 +18,7 @@ RUN echo 'deb http://apt.dockerproject.org/repo ubuntu-trusty main' > /etc/apt/s
docker-engine=1.8.2-0~trusty \
openssh-server \
&& apt-get clean \
&& pip --no-cache-dir install docker-py
&& pip --no-cache-dir install --upgrade docker-py
{% endif %}

View File

@ -37,8 +37,7 @@ RUN apt-get install -y --no-install-recommends \
ADD glance-base-archive /glance-base-source
RUN ln -s glance-base-source/* glance \
&& useradd --user-group glance \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install -c requirements/upper-constraints.txt /glance \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install python-cephlibs /glance \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /glance \
&& mkdir -p /etc/glance /var/log/glance /var/lib/glance /home/glance \
&& cp -r /glance/etc/* /etc/glance/ \
&& chown -R glance: /etc/glance /var/log/glance /var/lib/glance /home/glance

View File

@ -17,7 +17,7 @@ RUN apt-get install -y --no-install-recommends libpq-dev \
ADD gnocchi-base-archive /gnocchi-base-source
RUN ln -s gnocchi-base-source/* gnocchi \
&& useradd --user-group gnocchi \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install -c requirements/upper-constraints.txt /gnocchi \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /gnocchi \
&& mkdir -p /etc/gnocchi /var/log/gnocchi /home/gnocchi \
&& cp -r /gnocchi/etc/* /etc/gnocchi/ \
&& chown -R gnocchi: /etc/gnocchi /var/log/gnocchi /home/gnocchi

View File

@ -14,7 +14,7 @@ RUN yum -y install \
ADD heat-base-archive /heat-base-source
RUN ln -s heat-base-source/* heat \
&& useradd --user-group heat \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install -c requirements/upper-constraints.txt /heat \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /heat \
&& mkdir -p /etc/heat /var/log/heat /home/heat \
&& cp -r /heat/etc/heat/* /etc/heat/ \
&& chown -R heat: /etc/heat /var/log/heat /home/heat

View File

@ -43,7 +43,7 @@ RUN apt-get install -y --no-install-recommends \
ADD horizon-archive /horizon-source
RUN ln -s horizon-source/* horizon \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install -c requirements/upper-constraints.txt /horizon \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /horizon \
&& useradd --user-group horizon \
&& mkdir -p /etc/openstack-dashboard /home/horizon \
&& ln -s /etc/openstack-dashboard/local_settings /var/lib/kolla/venv/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.py \

View File

@ -20,7 +20,7 @@ RUN yum -y install \
ADD ironic-base-archive /ironic-base-source
RUN ln -s ironic-base-source/* ironic \
&& useradd --user-group ironic \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install -c requirements/upper-constraints.txt /ironic \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /ironic \
&& mkdir -p /etc/ironic /var/log/ironic /home/ironic \
&& cp -r /ironic/etc/ironic/* /etc/ironic/ \
&& chown -R ironic: /etc/ironic /var/log/ironic /home/ironic

View File

@ -4,7 +4,7 @@ MAINTAINER {{ maintainer }}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN /var/lib/kolla/venv/bin/pip install ironic-discoverd
RUN pip install ironic-discoverd
# discoverd no longer in delorean 9/28/2015, switch to inspector on TODO
#RUN yum -y install \
# openstack-ironic-discoverd \

View File

@ -38,7 +38,7 @@ RUN apt-get install -y --no-install-recommends \
ADD keystone-archive /keystone-source
RUN ln -s keystone-source/* keystone \
&& useradd --user-group keystone \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install -c requirements/upper-constraints.txt /keystone \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /keystone \
&& mkdir -p /etc/keystone /var/www/cgi-bin/keystone /var/log/apache2 /home/keystone \
&& cp -r /keystone/etc/* /etc/keystone/ \
&& cp /keystone/httpd/keystone.py /var/www/cgi-bin/keystone/admin \

View File

@ -36,7 +36,7 @@ RUN apt-get -y --no-install-recommends install \
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
&& python get-pip.py \
&& rm get-pip.py \
&& pip install -U wheel \
&& pip --no-cache-dir install --upgrade wheel \
&& pip --no-cache-dir install \
MySQL-python \
os-client-config==1.11.1 \

View File

@ -27,7 +27,7 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
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 -c requirements/upper-constraints.txt /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

View File

@ -11,7 +11,7 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
ADD murano-base-archive /murano-base-source
RUN ln -s murano-base-source/* murano \
&& useradd --user-group murano \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install -c requirements/upper-constraints.txt /murano \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /murano \
&& mkdir -p /etc/murano /var/log/murano /home/murano \
&& cp -r /murano/etc/murano/* /etc/murano/ \
&& chown -R murano: /etc/murano /var/log/murano /home/murano

View File

@ -39,7 +39,7 @@ RUN apt-get install -y --no-install-recommends \
ADD neutron-base-archive /neutron-base-source
RUN ln -s neutron-base-source/* neutron \
&& useradd --user-group neutron \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install -c requirements/upper-constraints.txt /neutron \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /neutron \
&& mkdir -p /etc/neutron /usr/share/neutron /var/log/neutron /home/neutron \
&& cp -r /neutron/etc/* /etc/neutron/ \
&& cp -r /neutron/etc/neutron/* /etc/neutron/ \

View File

@ -5,7 +5,7 @@ ADD plugins-archive /
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start \
&& if [[ "$(ls /plugins)" ]]; then \
pip --no-cache-dir install -c requirements/upper-constraints.txt /plugins/*; \
pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /plugins/*; \
fi
{{ include_footer }}

View File

@ -39,7 +39,7 @@ RUN apt-get install -y --no-install-recommends \
ADD nova-base-archive /nova-base-source
RUN ln -s nova-base-source/* nova \
&& useradd --user-group nova \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install -c requirements/upper-constraints.txt /nova \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /nova \
&& mkdir -p /etc/nova /var/log/nova /home/nova /var/lib/nova \
&& cp -r /nova/etc/nova/* /etc/nova/ \
&& chown -R nova: /etc/nova /var/log/nova /home/nova /var/lib/nova

View File

@ -34,7 +34,7 @@ RUN apt-get install -y --no-install-recommends \
{% endif %}
RUN /var/lib/kolla/venv/bin/pip --no-cache-dir install -c requirements/upper-constraints.txt libvirt-python
RUN /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt libvirt-python
{% endif %}

View File

@ -79,9 +79,9 @@ 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 install -U virtualenv \
&& virtualenv /var/lib/kolla/venv \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install -U -c requirements/upper-constraints.txt \
&& pip --no-cache-dir install -U virtualenv \
&& virtualenv --system-site-packages /var/lib/kolla/venv \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt \
jinja2 \
kazoo \
python-barbicanclient \

View File

@ -13,7 +13,7 @@ RUN yum -y install openstack-swift \
ADD swift-base-archive /swift-base-source
RUN ln -s swift-base-source/* swift \
&& useradd --user-group swift \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install -c requirements/upper-constraints.txt /swift \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /swift \
&& mkdir -p /etc/swift /var/log/swift /home/swift \
&& cp -r /swift/etc/* /etc/swift/ \
&& chown -R swift: /etc/swift /var/log/swift /home/swift

View File

@ -13,7 +13,7 @@ RUN yum -y install \
ADD tempest-archive /tempest-source
RUN ln -s tempest-source/* tempest \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install -c requirements/upper-constraints.txt /tempest \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /tempest \
&& mkdir -p /etc/tempest /var/log/tempest /etc/tempest/tempest_lock
{% endif %}

View File

@ -15,7 +15,7 @@ RUN yum -y install \
ADD trove-base-archive /trove-base-source
RUN ln -s trove-base-source/* trove \
&& useradd --user-group trove \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install -c requirements/upper-constraints.txt /trove \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /trove \
&& mkdir -p /etc/trove /var/log/trove /home/trove \
&& cp -r /trove/etc/* /etc/trove/ \
&& chown -R trove: /etc/trove /var/log/trove /home/trove

View File

@ -13,7 +13,7 @@ RUN yum -y install openstack-zaqar \
ADD zaqar-archive /zaqar-source
RUN ln -s zaqar-source/* zaqar \
&& useradd --user-group zaqar \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install -c requirements/upper-constraints.txt /zaqar \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /zaqar \
&& mkdir -p /etc/zaqar /var/log/zaqar /home/zaqar \
&& cp -r /zaqar/etc/* /etc/zaqar/ \
&& chown -R zaqar: /etc/zaqar /var/log/zaqar /home/zaqar