Make container kolla-toolbox build with debian
- handle different path for os_client_config Change-Id: I1134a932845ee22e8318c14ec02f0478eee11b9a Partially-implements: blueprint build-debian
This commit is contained in:
parent
f43a2ecf38
commit
5df0903cfa
@ -1,6 +1,8 @@
|
|||||||
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
|
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
|
||||||
MAINTAINER {{ maintainer }}
|
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'] %}
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
||||||
|
|
||||||
RUN yum -y install \
|
RUN yum -y install \
|
||||||
@ -29,6 +31,10 @@ RUN apt-get -y --no-install-recommends install \
|
|||||||
python-dev \
|
python-dev \
|
||||||
&& apt-get clean
|
&& 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 %}
|
{% endif %}
|
||||||
|
|
||||||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
|
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 \
|
RUN useradd --user-group ansible --groups kolla \
|
||||||
&& mkdir -p /etc/ansible /usr/share/ansible \
|
&& mkdir -p /etc/ansible /usr/share/ansible \
|
||||||
&& echo 'localhost ansible_connection=local' > /etc/ansible/hosts \
|
&& 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 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
|
COPY ansible.cfg /home/ansible/.ansible.cfg
|
||||||
|
Loading…
Reference in New Issue
Block a user