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/install_projects.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 docker/base/install_projects.sh (limited to 'docker/base/install_projects.sh') diff --git a/docker/base/install_projects.sh b/docker/base/install_projects.sh new file mode 100644 index 000000000..a9a7948d0 --- /dev/null +++ b/docker/base/install_projects.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# This script finds all projects in /dev-mode folder and +# installs them using pip +# The projects are mounted there when dev mode is enabled for them +# in kolla-ansible + +if [ -d "/dev-mode" ]; then + for project in /dev-mode/*; do + pip install -U "$project" + done +fi -- cgit v1.2.3