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
This commit is contained in:
Lingxian Kong 2021-01-27 10:38:02 +13:00
parent 537a2859f6
commit 1e04b269ca
4 changed files with 5 additions and 3 deletions

View File

@ -3,4 +3,3 @@ package-installs
pkg-map
source-repositories
svc-map
pip-and-virtualenv

View File

@ -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}

View File

@ -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:

View File

@ -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"