29c542186b
The kolla-toolbox container contains ansible which has the mysql_db module which helps on various mysql tasks such as db creation. The mysql_db module requires certain mysql binaries in order to accomplish tasks such as restoring a database from a dump. This change adds those client libraries which weren't previously included in the container. Change-Id: I6516838381bf9327c8901fc4c32ebd5151fb053f Signed-off-by: Stephan Michaud <michauds90@gmail.com> Closes-Bug: #1616155
78 lines
2.2 KiB
Django/Jinja
78 lines
2.2 KiB
Django/Jinja
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
|
|
MAINTAINER {{ maintainer }}
|
|
|
|
{% set os_client_config='/usr/lib/python2.7/site-packages/os_client_config/defaults.json' %}
|
|
|
|
{% import "macros.j2" as macros with context %}
|
|
|
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
|
{% set kolla_toolbox_packages = [
|
|
'crudini',
|
|
'gcc',
|
|
'gdisk',
|
|
'git',
|
|
'jq',
|
|
'libffi-devel',
|
|
'libxml2-devel',
|
|
'libxslt-devel',
|
|
'MariaDB-devel',
|
|
'MariaDB-shared',
|
|
'MariaDB-client',
|
|
'openssl-devel',
|
|
'python-devel',
|
|
'openssh-clients'
|
|
] %}
|
|
|
|
{% elif base_distro in ['ubuntu', 'debian'] %}
|
|
{% set kolla_toolbox_packages = [
|
|
'build-essential',
|
|
'ca-certificates',
|
|
'crudini',
|
|
'gdisk',
|
|
'git',
|
|
'jq',
|
|
'libffi-dev',
|
|
'libmariadbclient-dev',
|
|
'mariadb-client',
|
|
'libssl-dev',
|
|
'libxslt1-dev',
|
|
'python-dev'
|
|
] %}
|
|
|
|
{% if base_distro == 'debian' %}
|
|
{% set os_client_config='/usr/local/lib/python2.7/dist-packages/os_client_config/defaults.json' %}
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
{{ macros.install_packages(kolla_toolbox_packages | customizable("packages")) }}
|
|
|
|
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 pytz \
|
|
&& pip --no-cache-dir install \
|
|
ansible==2.1.1.0 \
|
|
MySQL-python \
|
|
os-client-config==1.16.0 \
|
|
pyudev \
|
|
shade==1.4.0
|
|
|
|
RUN useradd -m --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",|' {{ os_client_config }}
|
|
|
|
COPY find_disks.py kolla_keystone_service.py kolla_keystone_user.py kolla_sanity.py /usr/share/ansible/
|
|
COPY ansible.cfg /home/ansible/.ansible.cfg
|
|
|
|
COPY ansible_sudoers /etc/sudoers.d/ansible_sudoers
|
|
RUN chmod 440 /etc/sudoers.d/ansible_sudoers
|
|
|
|
CMD ["/bin/sleep", "infinity"]
|
|
|
|
{% block kolla_toolbox_footer %}{% endblock %}
|
|
{% block footer %}{% endblock %}
|
|
{{ include_footer }}
|
|
|
|
USER ansible
|