summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaƫl THEROND (Fl1nt) <gael.therond@bitswalk.com>2023-05-25 16:39:25 +0200
committerMaksim Malchuk <maksim.malchuk@gmail.com>2023-09-06 12:31:14 +0300
commit8558004ab70919cc2a822107c953a24710227f9e (patch)
treec36e3861ae4e1c0d8748d5e2c552c96425b82e2d
parent3684f67fee9026ff85771517af32f12d48e9c625 (diff)
downloadkolla-8558004ab70919cc2a822107c953a24710227f9e.tar.gz
kolla-8558004ab70919cc2a822107c953a24710227f9e.zip
Improve kolla-toolbox offline support.
* Use structure that allow for custom package version and base URL. Change-Id: I169e51c0f5c691518ada1837990b5bdd2a3d1481 Closes-bug: #2020761 (cherry picked from commit 7f38e1df71eafb250b14c4e125c7313bd9218f7d)
-rw-r--r--docker/kolla-toolbox/Dockerfile.j29
-rw-r--r--releasenotes/notes/bug-2020761-c31f28c922ebcf84.yaml5
2 files changed, 11 insertions, 3 deletions
diff --git a/docker/kolla-toolbox/Dockerfile.j2 b/docker/kolla-toolbox/Dockerfile.j2
index 16029216d..06be9325d 100644
--- a/docker/kolla-toolbox/Dockerfile.j2
+++ b/docker/kolla-toolbox/Dockerfile.j2
@@ -82,15 +82,18 @@ ENV PATH {{ virtualenv_path }}/bin:$PATH
'pyudev',
] %}
-COPY requirements.yml /var/lib/ansible/
RUN {{ macros.install_pip(['pip', 'wheel', 'setuptools']) }} \
&& {{ macros.install_pip(kolla_toolbox_pip_packages | customizable("pip_packages")) }} \
&& mkdir -p /etc/ansible /usr/share/ansible \
&& echo 'localhost ansible_connection=local ansible_python_interpreter={{ virtualenv_path }}/bin/python' > /etc/ansible/hosts \
- && sed -i 's| "identity_api_version": "2.0",| "identity_api_version": "3",|' {{ os_client_config }} \
- && ansible-galaxy collection install -p /usr/share/ansible/collections -r /var/lib/ansible/requirements.yml
+ && sed -i 's| "identity_api_version": "2.0",| "identity_api_version": "3",|' {{ os_client_config }}
+
+{% block kolla_toolbox_collections_install %}
+COPY requirements.yml /var/lib/ansible/
+RUN ansible-galaxy collection install -p /usr/share/ansible/collections -r /var/lib/ansible/requirements.yml
ENV ANSIBLE_LIBRARY /usr/share/ansible:$ANSIBLE_LIBRARY
+{% endblock %}
COPY find_disks.py /usr/share/ansible/
COPY ansible.cfg /etc/ansible/ansible.cfg
diff --git a/releasenotes/notes/bug-2020761-c31f28c922ebcf84.yaml b/releasenotes/notes/bug-2020761-c31f28c922ebcf84.yaml
new file mode 100644
index 000000000..c0d93a283
--- /dev/null
+++ b/releasenotes/notes/bug-2020761-c31f28c922ebcf84.yaml
@@ -0,0 +1,5 @@
+---
+fixes:
+ - |
+ Fixes missing way for kolla-toolbox to be built offline.
+ `LP#2020761 <https://launchpad.net/bugs/2020761>`__