From dba9d5a5e9a0283e2c7d05d6e9479c642c815aa8 Mon Sep 17 00:00:00 2001 From: Aleksandr Mogylchenko Date: Tue, 6 Dec 2016 14:15:13 +0100 Subject: [PATCH] Add ability to use custom index server for pip All Python modules inside fuel-ccp are installed via `pip install` from official PyPi repository. That might sometimes be not convenient, in case somebody wants to use own repository. Change-Id: Ia3cb2676e4b048fe9babd663c5a3d96cdb907a32 --- docker/openstack-base/Dockerfile.j2 | 2 +- docker/openstack-base/{pip.conf => pip.conf.j2} | 3 +++ service/files/defaults.yaml | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) rename docker/openstack-base/{pip.conf => pip.conf.j2} (55%) diff --git a/docker/openstack-base/Dockerfile.j2 b/docker/openstack-base/Dockerfile.j2 index f4e612b..2b136d7 100644 --- a/docker/openstack-base/Dockerfile.j2 +++ b/docker/openstack-base/Dockerfile.j2 @@ -13,7 +13,7 @@ RUN apt-get install -y --no-install-recommends \ git \ && apt-get clean -COPY pip.conf /tmp/pip.conf +COPY {{ render('pip.conf.j2') }} /tmp/pip.conf {{ copy_sources("openstack/requirements", "/tmp/requirements") }} diff --git a/docker/openstack-base/pip.conf b/docker/openstack-base/pip.conf.j2 similarity index 55% rename from docker/openstack-base/pip.conf rename to docker/openstack-base/pip.conf.j2 index 93d9904..8a161ab 100644 --- a/docker/openstack-base/pip.conf +++ b/docker/openstack-base/pip.conf.j2 @@ -1,3 +1,6 @@ [global] constraint = /var/lib/microservices/venv/constraints.txt no-cache-dir = false +{% if url.pypi_index %} +index-url = {{ url.pypi_index }} +{% endif %} diff --git a/service/files/defaults.yaml b/service/files/defaults.yaml index d71cf60..f1a6221 100644 --- a/service/files/defaults.yaml +++ b/service/files/defaults.yaml @@ -2,3 +2,6 @@ sources: openstack/requirements: git_url: https://git.openstack.org/openstack/requirements.git git_ref: stable/newton + +url: + pypi_index: https://pypi.python.org/simple/