From 8ae55dd0b8e53e2afcc337204c469ca863823f18 Mon Sep 17 00:00:00 2001 From: Roman Krček Date: Mon, 5 Aug 2024 16:57:06 +0200 Subject: Refactor dev mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Provides mechanism for future work to fix bug where when package file manifest changes, the changes were not reflected in to devmode-enabled container. It changes the strategy of installing projects in dev mode in containers. Instead of bind mounting the project's git repository to the venv of the container, the repository is bind mounted to /dev-mode/ from which the it is installed using pip on every startup of the container using kolla_install_projects script. Related-bug: #1814515 Change-Id: Ia1bdff87cba73587a03124ab78a56b21c6176373 Signed-off-by: Roman Krček --- docker/base/Dockerfile.j2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'docker/base/Dockerfile.j2') diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index fe91ca6a6..d220eba2c 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -358,6 +358,7 @@ RUN sed -ri '/-session(\s+)optional(\s+)pam_systemd.so/d' /etc/pam.d/system-auth COPY set_configs.py /usr/local/bin/kolla_set_configs COPY start.sh /usr/local/bin/kolla_start COPY copy_cacerts.sh /usr/local/bin/kolla_copy_cacerts +COPY install_projects.sh /usr/local/bin/kolla_install_projects COPY httpd_setup.sh /usr/local/bin/kolla_httpd_setup COPY sudoers /etc/sudoers @@ -375,7 +376,10 @@ RUN chmod 755 /usr/local/bin/healthcheck_* {% endif %} RUN touch /usr/local/bin/kolla_extend_start \ - && chmod 755 /usr/local/bin/kolla_start /usr/local/bin/kolla_set_configs /usr/local/bin/kolla_copy_cacerts \ + && chmod 755 /usr/local/bin/kolla_start \ + /usr/local/bin/kolla_set_configs \ + /usr/local/bin/kolla_copy_cacerts \ + /usr/local/bin/kolla_install_projects \ && chmod 644 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_httpd_setup \ && chmod 440 /etc/sudoers \ && mkdir -p /var/log/kolla \ -- cgit v1.2.3