nodepool-elements: Use venv for utilities

Since all platforms have Python 3, use the new ensure-venv element
from the dependent change to install bindep and os-testr.

Since we are no longer using pip to install anything during the
builder, this drops the dependency on pip-and-virtualenv from
nodepool-base.  Avoiding this element is our long-term goal, as it's
modification to system state are problematic in a number of ways.  To
maintain the status-quo, the pip-and-virtualenv element is added
explicitly to each build's element list, with a note on it's future.

The current plan for backwards compatability is to replicate the
environment pip-and-virtualenv provides in a base role/job that can be
optionally included.  To test this, provide a new node type
"ubuntu-bionic-plain" that will not include the pip-and-virtualenv
element.  This is put on just one provider (rax) to minimise impact.

The dependent-change (and a dib release) is required for
ubuntu-bionic-plain to drop any dependency on pip-and-virtualenv, but
this change should be safe to merge at any point since it will not
change the status-quo for the existing images.

Depends-On: https://review.opendev.org/707513
Change-Id: I85438baf5bb31790a56fe5b38327361f0a2398e9
This commit is contained in:
Ian Wienand 2020-02-14 13:26:10 +11:00
parent b393e47795
commit d5e40841fd
6 changed files with 104 additions and 6 deletions

View File

@ -1,2 +1,3 @@
ensure-venv
openssh-server
package-installs

View File

@ -22,5 +22,5 @@ if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
fi
set -e
$DIB_PYTHON_VIRTUALENV /usr/bindep-env
python3 -m venv /usr/bindep-env
/usr/bindep-env/bin/pip install bindep

View File

@ -1,3 +1,3 @@
ensure-venv
package-installs
pip-and-virtualenv
zuul-worker

View File

@ -18,5 +18,5 @@ if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
fi
set -e
$DIB_PYTHON_VIRTUALENV /usr/os-testr-env
python3 -m venv /usr/os-testr-env
/usr/os-testr-env/bin/pip install os-testr

View File

@ -36,6 +36,7 @@ labels:
min-ready: 10
- name: ubuntu-xenial
min-ready: 1
- name: ubuntu-bionic-plain
providers:
- name: rax-dfw
@ -67,6 +68,8 @@ providers:
config-drive: true
- name: ubuntu-xenial
config-drive: true
- name: ubuntu-bionic-plain
config-drive: true
pools:
- name: main
max-servers: 140
@ -121,6 +124,11 @@ providers:
flavor-name: 'Performance'
diskimage: ubuntu-bionic
key-name: infra-root-keys-2018-06-15
- name: ubuntu-bionic-plain
min-ram: 8192
flavor-name: 'Performance'
diskimage: ubuntu-bionic-plain
key-name: infra-root-keys-2018-06-15
- name: ubuntu-xenial
min-ram: 8192
flavor-name: 'Performance'
@ -164,3 +172,4 @@ diskimages:
- name: opensuse-tumbleweed
- name: ubuntu-bionic
- name: ubuntu-xenial
- name: ubuntu-bionic-plain

View File

@ -74,19 +74,45 @@ providers:
region-name: 'DFW'
cloud: rax
rate: 0.001
diskimages: *provider_diskimages
diskimages: &rax_provider_diskimages
# NOTE(ianw) 2020-02-17 : duplicated to add ubuntu-bionic-plain
# while we work to remove pip-and-virtualenv
- name: centos-7
config-drive: true
- name: centos-8
config-drive: true
- name: debian-buster
config-drive: true
- name: debian-stretch
config-drive: true
- name: fedora-29
config-drive: true
- name: fedora-30
config-drive: true
- name: gentoo-17-0-systemd
config-drive: true
- name: opensuse-15
config-drive: true
- name: opensuse-tumbleweed
config-drive: true
- name: ubuntu-bionic
config-drive: true
- name: ubuntu-bionic-plain
config-drive: true
- name: ubuntu-xenial
config-drive: true
- name: rax-iad
region-name: 'IAD'
cloud: rax
rate: 0.001
diskimages: *provider_diskimages
diskimages: *rax_provider_diskimages
- name: rax-ord
region-name: 'ORD'
cloud: rax
rate: 0.001
diskimages: *provider_diskimages
diskimages: *rax_provider_diskimages
- name: vexxhost-ca-ymq-1
region-name: 'ca-ymq-1'
@ -131,6 +157,9 @@ diskimages:
- growroot
- infra-package-needs
- epel
# NOTE(ianw) 2020-02-17 : we are working to move this into job
# configuration
- pip-and-virtualenv
env-vars:
TMPDIR: /opt/dib_tmp
DIB_CHECKSUM: '1'
@ -154,6 +183,9 @@ diskimages:
- growroot
- infra-package-needs
- epel
# NOTE(ianw) 2020-02-17 : we are working to move this into job
# configuration
- pip-and-virtualenv
env-vars:
TMPDIR: /opt/dib_tmp
DIB_CHECKSUM: '1'
@ -176,6 +208,9 @@ diskimages:
- cache-devstack
- growroot
- infra-package-needs
# NOTE(ianw) 2020-02-17 : we are working to move this into job
# configuration
- pip-and-virtualenv
release: stretch
env-vars:
TMPDIR: /opt/dib_tmp
@ -204,6 +239,9 @@ diskimages:
- cache-devstack
- growroot
- infra-package-needs
# NOTE(ianw) 2020-02-17 : we are working to move this into job
# configuration
- pip-and-virtualenv
release: buster
env-vars:
TMPDIR: /opt/dib_tmp
@ -251,6 +289,9 @@ diskimages:
- initialize-urandom
- growroot
- infra-package-needs
# NOTE(ianw) 2020-02-17 : we are working to move this into job
# configuration
- pip-and-virtualenv
release: 29
env-vars:
TMPDIR: /opt/dib_tmp
@ -274,6 +315,9 @@ diskimages:
- initialize-urandom
- growroot
- infra-package-needs
# NOTE(ianw) 2020-02-17 : we are working to move this into job
# configuration
- pip-and-virtualenv
release: 30
env-vars:
TMPDIR: /opt/dib_tmp
@ -294,6 +338,9 @@ diskimages:
- nodepool-base
- growroot
- infra-package-needs
# NOTE(ianw) 2020-02-17 : we are working to move this into job
# configuration
- pip-and-virtualenv
env-vars:
TMPDIR: /opt/dib_tmp
DIB_CHECKSUM: '1'
@ -317,6 +364,9 @@ diskimages:
- cache-devstack
- growroot
- infra-package-needs
# NOTE(ianw) 2020-02-17 : we are working to move this into job
# configuration
- pip-and-virtualenv
release: '15.1'
env-vars:
TMPDIR: /opt/dib_tmp
@ -339,6 +389,9 @@ diskimages:
- cache-devstack
- growroot
- infra-package-needs
# NOTE(ianw) 2020-02-17 : we are working to move this into job
# configuration
- pip-and-virtualenv
release: 'tumbleweed'
env-vars:
TMPDIR: /opt/dib_tmp
@ -361,6 +414,9 @@ diskimages:
- cache-devstack
- growroot
- infra-package-needs
# NOTE(ianw) 2020-02-17 : we are working to move this into job
# configuration
- pip-and-virtualenv
release: bionic
env-vars:
TMPDIR: /opt/dib_tmp
@ -388,6 +444,9 @@ diskimages:
- initialize-urandom
- growroot
- infra-package-needs
# NOTE(ianw) 2020-02-17 : we are working to move this into job
# configuration
- pip-and-virtualenv
release: xenial
env-vars:
TMPDIR: /opt/dib_tmp
@ -403,3 +462,32 @@ diskimages:
GIT_HTTP_LOW_SPEED_TIME: '300'
GIT_HTTP_LOW_SPEED_LIMIT: '1000'
DIB_SHOW_IMAGE_USAGE: '1'
# NOTE(ianw) 2020-02-17 : this is an alternative image without the
# pip-and-virtualenv element we can test ansible roles to achieve
# full backwards-compatability with.
- name: ubuntu-bionic-plain
pause: false
elements:
- ubuntu-minimal
- vm
- simple-init
- openstack-repos
- nodepool-base
- cache-devstack
- growroot
- infra-package-needs
release: bionic
env-vars:
TMPDIR: /opt/dib_tmp
DIB_CHECKSUM: '1'
DIB_IMAGE_CACHE: /opt/dib_cache
DIB_JOURNAL_SIZE: '512'
DIB_APT_LOCAL_CACHE: '0'
DIB_DISABLE_APT_CLEANUP: '1'
DIB_GRUB_TIMEOUT: '0'
DIB_DISTRIBUTION_MIRROR: 'http://mirror.dfw.rax.openstack.org/ubuntu'
DIB_DEBOOTSTRAP_EXTRA_ARGS: '--no-check-gpg'
DIB_DEBIAN_COMPONENTS: 'main,universe'
GIT_HTTP_LOW_SPEED_TIME: '300'
GIT_HTTP_LOW_SPEED_LIMIT: '1000'
DIB_SHOW_IMAGE_USAGE: '1'