69979efc2e
Installing python packages directly to the system site-packages can cause various problems, in particular when pip overwrites a system package. Python virtualenvs are one solution to this issue, as they allow python packages to be installed in an isolated environment. This change adds support to the baremetal role for installing python dependencies in a virtualenv. Typically we will need to enable use of system site-packages from within this virtualenv, to support the use of modules such as yum, apt, and selinux, which are not available on PyPI. The path to the virtualenv is configured via the 'virtualenv' variable, and access to site-packages is controlled via 'virtualenv_site_packages'. When executing other kolla-ansible commands, the variable 'ansible_python_interpreter' should be set to the python interpreter installed in 'virtualenv'. Note that this variable cannot be templated. Change-Id: I0741923065246f9c5b168059fcd66504f2753c41 Related-Bug: #1731026
24 lines
1.1 KiB
YAML
24 lines
1.1 KiB
YAML
---
|
|
features:
|
|
- |
|
|
Adds support for installing python dependencies into a virtualenv on remote
|
|
hosts.
|
|
|
|
Installing python packages directly to the system site-packages can cause
|
|
various problems, in particular when pip overwrites a system package.
|
|
Python virtualenvs are one solution to this issue, as they allow python
|
|
packages to be installed in an isolated environment. Typically we will
|
|
need to enable use of system site-packages from within this virtualenv, to
|
|
support the use of modules such as yum, apt, and selinux, which are not
|
|
available on PyPI.
|
|
|
|
The path to the virtualenv is configured via the ``virtualenv`` variable,
|
|
and access to site-packages is controlled via ``virtualenv_site_packages``.
|
|
The default value for ``virtualenv`` is None, in which case the old
|
|
behaviour of installing packages directly to the system site-packages is
|
|
maintained.
|
|
|
|
When executing other kolla-ansible commands, the variable
|
|
``ansible_python_interpreter`` should be set to the python interpreter
|
|
installed in ``virtualenv``. Note that this variable cannot be templated.
|