File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,3 +21,6 @@ The following environment variables may be set to configure the element:
2121 version will be installed.
2222* ``DIB_IPA_EXTRA_HARDWARE_PACKAGES `` a space-separated list of additional
2323 system packages to install.
24+
25+ For Wallaby and later releases, it is recommended to use an upstream version
26+ of the `element <https://opendev.org/openstack/ironic-python-agent-builder/src/branch/master/dib/extra-hardware >`_.
Original file line number Diff line number Diff line change 66set -eu
77set -o pipefail
88
9- IPADIR=/usr/share/ironic-python-agent
109PACKAGE=${DIB_IPA_HARDWARE_PACKAGE:- hardware${DIB_IPA_HARDWARE_VERSION: +==}${DIB_IPA_HARDWARE_VERSION:- } }
1110
12- # Install the python hardware package inside the virtual environment.
13- $IPADIR /venv/bin/pip install -c $IPADIR /upper-constraints.txt $PACKAGE
11+ if [[ -d /usr/share/ironic-python-agent ]]; then
12+ IPADIR=/usr/share/ironic-python-agent
13+ else
14+ IPADIR=/opt/ironic-python-agent
15+ fi
16+
17+ if [[ -d " $IPADIR /venv" ]]; then
18+ $IPADIR /venv/bin/pip install -c $IPADIR /upper-constraints.txt $PACKAGE
19+ else
20+ $IPADIR /bin/pip install -c /tmp/requirements/upper-constraints.txt $PACKAGE
21+ fi
1422
1523# Because the ironic-python-agent systemd unit does not activate the virtualenv
1624# before executing the ironic-python-agent script, the PATH is not updated to
1725# point to the bin directory in the virtual environment. We add this symlink so
1826# that ironic-python-agent sees the hardware-detect tool in its PATH.
19- ln -s $IPADIR /venv/bin/hardware-detect /usr/local/bin/hardware-detect
27+ if [[ -d " $IPADIR /venv" ]]; then
28+ ln -s $IPADIR /venv/bin/hardware-detect /usr/local/bin/hardware-detect
29+ else
30+ ln -s $IPADIR /bin/hardware-detect /usr/local/bin/hardware-detect
31+ fi
2032
2133# Install additional packages as requested.
2234if [[ -n ${DIB_IPA_EXTRA_HARDWARE_PACKAGES:- } ]]; then
You can’t perform that action at this time.
0 commit comments