2015-11-18 06:22:17 +00:00
|
|
|
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
|
2015-11-23 07:08:58 +00:00
|
|
|
MAINTAINER {{ maintainer }}
|
2015-08-15 01:38:35 +00:00
|
|
|
|
2015-09-04 09:15:03 +00:00
|
|
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
2015-08-15 01:38:35 +00:00
|
|
|
|
|
|
|
RUN yum -y install \
|
|
|
|
gcc \
|
2015-11-18 06:22:17 +00:00
|
|
|
git \
|
2015-08-15 01:38:35 +00:00
|
|
|
libffi-devel \
|
|
|
|
libxml2-devel \
|
|
|
|
libxslt-devel \
|
2016-03-09 05:43:52 +00:00
|
|
|
MariaDB-devel \
|
2015-08-15 01:38:35 +00:00
|
|
|
openssl-devel \
|
|
|
|
python-devel \
|
|
|
|
openssh-clients \
|
2016-01-30 01:46:38 +00:00
|
|
|
&& yum clean all \
|
2016-02-17 09:56:38 +00:00
|
|
|
&& rpm -e --nodeps pytz
|
2015-08-15 01:38:35 +00:00
|
|
|
|
2015-11-18 06:22:17 +00:00
|
|
|
{% elif base_distro in ['ubuntu', 'debian'] %}
|
|
|
|
|
|
|
|
RUN apt-get -y --no-install-recommends install \
|
|
|
|
build-essential \
|
|
|
|
ca-certificates \
|
|
|
|
git \
|
|
|
|
libffi-dev \
|
|
|
|
libmariadbclient-dev \
|
|
|
|
libssl-dev \
|
|
|
|
libxslt1-dev \
|
|
|
|
python-dev \
|
|
|
|
&& apt-get clean
|
2015-08-20 12:13:00 +00:00
|
|
|
|
2015-08-15 01:38:35 +00:00
|
|
|
{% endif %}
|
|
|
|
|
2015-11-18 06:22:17 +00:00
|
|
|
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
|
|
|
|
&& python get-pip.py \
|
|
|
|
&& rm get-pip.py \
|
|
|
|
&& pip --no-cache-dir install \
|
|
|
|
MySQL-python \
|
2016-03-01 20:13:34 +00:00
|
|
|
os-client-config==1.16.0 \
|
2015-12-22 22:17:51 +00:00
|
|
|
pyudev \
|
2016-03-01 20:13:34 +00:00
|
|
|
shade==1.4.0
|
2015-08-15 01:38:35 +00:00
|
|
|
|
2016-03-01 20:13:34 +00:00
|
|
|
RUN git clone https://github.com/ansible/ansible.git \
|
2015-08-15 01:38:35 +00:00
|
|
|
&& cd ansible \
|
2016-03-04 16:06:36 +00:00
|
|
|
&& git checkout 89569d035ea5002302a0a6b03451a4963fd83eb3 \
|
2015-08-15 01:38:35 +00:00
|
|
|
&& git submodule update --init --recursive \
|
2015-08-02 19:26:30 +00:00
|
|
|
&& pip --no-cache-dir install .
|
2015-08-20 12:13:00 +00:00
|
|
|
|
2016-03-09 05:47:15 +00:00
|
|
|
RUN useradd --user-group ansible --groups kolla \
|
|
|
|
&& mkdir -p /etc/ansible /usr/share/ansible \
|
2015-11-11 17:54:00 +00:00
|
|
|
&& echo 'localhost ansible_connection=local' > /etc/ansible/hosts \
|
2016-03-01 14:38:47 +00:00
|
|
|
&& sed -i 's| "identity_api_version": "2.0",| "identity_api_version": "3",|' /usr/lib/python2.7/site-packages/os_client_config/defaults.json
|
2015-08-15 01:38:35 +00:00
|
|
|
|
2015-12-14 08:34:56 +00:00
|
|
|
COPY find_disks.py kolla_keystone_service.py kolla_keystone_user.py kolla_sanity.py kolla_zookeeper.py /usr/share/ansible/
|
2015-11-11 17:54:00 +00:00
|
|
|
COPY ansible.cfg /home/ansible/.ansible.cfg
|
|
|
|
|
2015-12-25 21:55:08 +00:00
|
|
|
CMD ["/bin/sleep", "infinity"]
|
|
|
|
|
2015-08-28 10:17:41 +00:00
|
|
|
{{ include_footer }}
|
2015-11-12 14:34:09 +00:00
|
|
|
|
|
|
|
USER ansible
|