From 3eff4bc0d131f484def2ebcab0826f338091c545 Mon Sep 17 00:00:00 2001 From: "Michal (inc0) Jastrzebski" Date: Mon, 12 Sep 2016 16:50:04 +0000 Subject: [PATCH] Allow customizations of pip packages Customizations of packages for source builds Closes-Bug: #1623083 Change-Id: I99263af53c8f9830bcf0c6fec78194c8f7cd88c5 --- docker/macros.j2 | 5 + docker/openstack-base/Dockerfile.j2 | 207 ++++++++++++++-------------- 2 files changed, 110 insertions(+), 102 deletions(-) diff --git a/docker/macros.j2 b/docker/macros.j2 index 494feb2f49..32496a9210 100644 --- a/docker/macros.j2 +++ b/docker/macros.j2 @@ -12,3 +12,8 @@ {%- endif %} {%- endif %} {%- endmacro %} + + +{% macro install_pip(packages) %} +RUN /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt {% for package in packages %}{{ package }} {% endfor %} +{% endmacro %} diff --git a/docker/openstack-base/Dockerfile.j2 b/docker/openstack-base/Dockerfile.j2 index 3ec33f1beb..09dfe1798b 100644 --- a/docker/openstack-base/Dockerfile.j2 +++ b/docker/openstack-base/Dockerfile.j2 @@ -231,112 +231,115 @@ RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ && rm get-pip.py {% endblock %} +{% set openstack_base_pip_packages = [ + 'Babel', + 'Mako', + 'MarkupSafe', + 'Paste', + 'PasteDeploy', + 'PyYAML', + 'Routes', + 'SQLAlchemy', + 'Tempita', + 'WebOb', + 'alembic', + 'amqp', + 'anyjson', + 'appdirs', + 'cachetools', + 'cliff', + 'cmd2', + 'contextlib2', + 'debtcollector', + 'decorator', + 'enum34', + 'eventlet', + 'fasteners', + 'funcsigs', + 'functools32', + 'futures', + 'futurist', + 'greenlet', + 'iso8601', + 'jinja2', + 'jsonpatch', + 'jsonpointer', + 'jsonschema', + 'keystoneauth1', + 'keystonemiddleware', + 'kombu', + 'monotonic', + 'msgpack-python', + 'netaddr', + 'netifaces', + 'os-client-config', + 'oslo.concurrency', + 'oslo.config', + 'oslo.context', + 'oslo.db', + 'oslo.i18n', + 'oslo.log', + 'oslo.messaging', + 'oslo.middleware', + 'oslo.policy', + 'oslo.serialization', + 'oslo.service', + 'oslo.utils', + 'pbr', + 'pika', + 'pika-pool', + 'positional', + 'prettytable', + 'pycadf', + 'pycrypto', + 'pyinotify', + 'pymysql', + 'pyparsing', + 'python-barbicanclient', + 'python-ceilometerclient', + 'python-cinderclient', + 'python-congressclient', + 'python-dateutil', + 'python-designateclient', + 'python-editor', + 'python-glanceclient', + 'python-heatclient', + 'python-ironicclient', + 'python-keystoneclient', + 'python-magnumclient', + 'python-manilaclient', + 'python-memcached', + 'python-mistralclient', + 'python-muranoclient', + 'python-neutronclient', + 'python-novaclient', + 'python-openstackclient', + 'python-saharaclient', + 'python-swiftclient', + 'python-troveclient', + 'python-zaqarclient', + 'pytz', + 'repoze.lru', + 'requests', + 'requestsexceptions', + 'retrying', + 'simplejson', + 'six', + 'sqlalchemy-migrate', + 'sqlparse', + 'stevedore', + 'unicodecsv', + 'warlock', + 'wrapt' + ] +%} + ADD openstack-base-archive /openstack-base-source RUN ln -s openstack-base-source/* /requirements \ && mkdir -p /var/lib/kolla \ && 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 \ - Babel \ - Mako \ - MarkupSafe \ - Paste \ - PasteDeploy \ - PyYAML \ - Routes \ - SQLAlchemy \ - Tempita \ - WebOb \ - alembic \ - amqp \ - anyjson \ - appdirs \ - cachetools \ - cliff \ - cmd2 \ - contextlib2 \ - debtcollector \ - decorator \ - enum34 \ - eventlet \ - fasteners \ - funcsigs \ - functools32 \ - futures \ - futurist \ - greenlet \ - iso8601 \ - jinja2 \ - jsonpatch \ - jsonpointer \ - jsonschema \ - keystoneauth1 \ - keystonemiddleware \ - kombu \ - monotonic \ - msgpack-python \ - netaddr \ - netifaces \ - os-client-config \ - oslo.concurrency \ - oslo.config \ - oslo.context \ - oslo.db \ - oslo.i18n \ - oslo.log \ - oslo.messaging \ - oslo.middleware \ - oslo.policy \ - oslo.serialization \ - oslo.service \ - oslo.utils \ - pbr \ - pika \ - pika-pool \ - positional \ - prettytable \ - pycadf \ - pycrypto \ - pyinotify \ - pymysql \ - pyparsing \ - python-barbicanclient \ - python-ceilometerclient \ - python-cinderclient \ - python-congressclient \ - python-dateutil \ - python-designateclient \ - python-editor \ - python-glanceclient \ - python-heatclient \ - python-ironicclient \ - python-keystoneclient \ - python-magnumclient \ - python-manilaclient \ - python-memcached \ - python-mistralclient \ - python-muranoclient \ - python-neutronclient \ - python-novaclient \ - python-openstackclient \ - python-saharaclient \ - python-swiftclient \ - python-troveclient \ - python-zaqarclient \ - pytz \ - repoze.lru \ - requests \ - requestsexceptions \ - retrying \ - simplejson \ - six \ - sqlalchemy-migrate \ - sqlparse \ - stevedore \ - unicodecsv \ - warlock \ - wrapt - + && virtualenv --system-site-packages /var/lib/kolla/venv +{{ macros.install_pip(openstack_base_pip_packages | customizable("pip_packages")) }} ENV PATH /var/lib/kolla/venv/bin:$PATH {% endif %}