From 5df0903cfa2bf3a3990786a4bfc37c6f53b29d76 Mon Sep 17 00:00:00 2001 From: Benedikt Trefzer Date: Thu, 24 Mar 2016 14:10:46 +0100 Subject: [PATCH] Make container kolla-toolbox build with debian - handle different path for os_client_config Change-Id: I1134a932845ee22e8318c14ec02f0478eee11b9a Partially-implements: blueprint build-debian --- docker/kolla-toolbox/Dockerfile.j2 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docker/kolla-toolbox/Dockerfile.j2 b/docker/kolla-toolbox/Dockerfile.j2 index c206610b28..061dab08fa 100644 --- a/docker/kolla-toolbox/Dockerfile.j2 +++ b/docker/kolla-toolbox/Dockerfile.j2 @@ -1,6 +1,8 @@ FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} MAINTAINER {{ maintainer }} +{% set os_client_config='/usr/lib/python2.7/site-packages/os_client_config/defaults.json' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} RUN yum -y install \ @@ -29,6 +31,10 @@ RUN apt-get -y --no-install-recommends install \ python-dev \ && apt-get clean +{% if base_distro == 'debian' %} + {% set os_client_config='/usr/local/lib/python2.7/dist-packages/os_client_config/defaults.json' %} +{% endif %} + {% endif %} RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ @@ -50,7 +56,7 @@ RUN git clone https://github.com/ansible/ansible.git \ RUN useradd --user-group ansible --groups kolla \ && mkdir -p /etc/ansible /usr/share/ansible \ && echo 'localhost ansible_connection=local' > /etc/ansible/hosts \ - && sed -i 's| "identity_api_version": "2.0",| "identity_api_version": "3",|' /usr/lib/python2.7/site-packages/os_client_config/defaults.json + && sed -i 's| "identity_api_version": "2.0",| "identity_api_version": "3",|' {{ os_client_config }} COPY find_disks.py kolla_keystone_service.py kolla_keystone_user.py kolla_sanity.py kolla_zookeeper.py /usr/share/ansible/ COPY ansible.cfg /home/ansible/.ansible.cfg