aboutsummaryrefslogtreecommitdiff
path: root/docker/base/install_projects.sh
diff options
context:
space:
mode:
authorRoman Krček <roman.krcek@tietoevry.com>2024-08-05 16:57:06 +0200
committerRoman Krček <roman.krcek@tietoevry.com>2024-09-04 06:37:09 +0000
commit8ae55dd0b8e53e2afcc337204c469ca863823f18 (patch)
tree39a6319ec85ca55308b5c142c71612401047703f /docker/base/install_projects.sh
parentc63961fdbe4b00707dfc744c57b5b7b0a3257a64 (diff)
downloadkolla-8ae55dd0b8e53e2afcc337204c469ca863823f18.tar.gz
kolla-8ae55dd0b8e53e2afcc337204c469ca863823f18.zip
Refactor dev mode
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/<project_name> 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 <roman.krcek@tietoevry.com>
Diffstat (limited to 'docker/base/install_projects.sh')
-rw-r--r--docker/base/install_projects.sh12
1 files changed, 12 insertions, 0 deletions
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