summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLingxian Kong <anlin.kong@gmail.com>2021-01-27 10:38:02 +1300
committerLingxian Kong <anlin.kong@gmail.com>2021-01-27 11:43:16 +1300
commit1e04b269ca75067e28ae3e6ecb60ac2d11ab5b3b (patch)
tree7db44f5d2cf8fb18645bd624e427decc5e957349
parent537a2859f6115b1fdbe1bcb968ed937fdcff5339 (diff)
downloadtrove-1e04b269ca75067e28ae3e6ecb60ac2d11ab5b3b.tar.gz
Stop using pip-and-virtualenv diskimage element
ALthough diskimage-builder will solve the issue eventually, but we still prefer to put the package installation under trove's own control. Story: 2008559 Task: 41697 Change-Id: Ie704db8233c4b797eeefa140c4a11427280dffd9
-rw-r--r--integration/scripts/files/elements/guest-agent/element-deps1
-rwxr-xr-xintegration/scripts/files/elements/guest-agent/install.d/guest-agent-source-install/31-guest-agent-install2
-rw-r--r--integration/scripts/files/elements/guest-agent/package-installs.yaml4
-rw-r--r--integration/scripts/functions_qemu1
4 files changed, 5 insertions, 3 deletions
diff --git a/integration/scripts/files/elements/guest-agent/element-deps b/integration/scripts/files/elements/guest-agent/element-deps
index 6dcd66dc..f16aabad 100644
--- a/integration/scripts/files/elements/guest-agent/element-deps
+++ b/integration/scripts/files/elements/guest-agent/element-deps
@@ -3,4 +3,3 @@ package-installs
pkg-map
source-repositories
svc-map
-pip-and-virtualenv
diff --git a/integration/scripts/files/elements/guest-agent/install.d/guest-agent-source-install/31-guest-agent-install b/integration/scripts/files/elements/guest-agent/install.d/guest-agent-source-install/31-guest-agent-install
index 1eb66ffd..0cd63059 100755
--- a/integration/scripts/files/elements/guest-agent/install.d/guest-agent-source-install/31-guest-agent-install
+++ b/integration/scripts/files/elements/guest-agent/install.d/guest-agent-source-install/31-guest-agent-install
@@ -19,7 +19,7 @@ done
install -D -g root -o ${GUEST_USERNAME} -m 0644 ${SCRIPTDIR}/guest-agent.logrotate /etc/logrotate.d/guest-agent
# Create a virtual environment (with dependencies installed) for guest agent service
-${DIB_PYTHON} -m virtualenv ${GUEST_VENV}
+/usr/bin/python3 -m venv ${GUEST_VENV}
${GUEST_VENV}/bin/pip install pip --upgrade
${GUEST_VENV}/bin/pip install -U -c /opt/upper-constraints.txt /opt/guest-agent
chown -R ${GUEST_USERNAME}:root ${GUEST_VENV}
diff --git a/integration/scripts/files/elements/guest-agent/package-installs.yaml b/integration/scripts/files/elements/guest-agent/package-installs.yaml
index 1cf7179f..6f2e7892 100644
--- a/integration/scripts/files/elements/guest-agent/package-installs.yaml
+++ b/integration/scripts/files/elements/guest-agent/package-installs.yaml
@@ -32,7 +32,11 @@ openssh-client:
openssh-server:
pollinate:
psmisc:
+python3-dev:
+python3-pip:
+python3-setuptools:
python3-sqlalchemy:
+python3-venv:
rsync:
rsyslog:
ubuntu-cloudimage-keyring:
diff --git a/integration/scripts/functions_qemu b/integration/scripts/functions_qemu
index aa88f559..eef67356 100644
--- a/integration/scripts/functions_qemu
+++ b/integration/scripts/functions_qemu
@@ -62,7 +62,6 @@ function build_guest_image() {
export DIB_CLOUD_INIT_DATASOURCES=${DIB_CLOUD_INIT_DATASOURCES:-"ConfigDrive"}
elementes="$elementes cloud-init-datasources"
- elementes="$elementes pip-and-virtualenv"
elementes="$elementes pip-cache"
elementes="$elementes guest-agent"
elementes="$elementes ${guest_os}-docker"