Remove OPAE dependency in devstack

This patch removes OPAE driver package from cyborg-agent dependencies due to
the following reasons:

1. In the kolla cyborg-agent image we install OPAE, but OPAE is not
available for CentOS 8 for the moment. This will make the cyborg-agent image
unbuildable in Ussuri[0].

2. In devstack, due to the fact that OPAE packages depend on libjson0, which
is not available after Ubuntu 16.04, so cyborg can't be installed on Ubuntu
higher than 16.04 now(unless disable dependency manually). Moreover,from
cyborg's perspective, it does not need to contain any hardware driver
dependency, we can assume the admin should know about it and install the
correct version.

3. We had an agreement at Victoria PTG that we should remove.[1]

[0]http://lists.openstack.org/pipermail/openstack-discuss/2020-June/015428.html
[1]https://etherpad.opendev.org/p/cyborg-victoria-goals L261

Change-Id: If0c92ea6ed98f195f5645ae0260855ed50f4f2a8
Story: 2007810
Task: 40078
changes/26/735526/2
Yumeng Bao 3 years ago
parent eef6ddd62d
commit 7ee7de1ec9
  1. 21
      devstack/lib/cyborg
  2. 57
      devstack/lib/opae
  3. 3
      devstack/plugin.sh
  4. 11
      devstack/settings
  5. 24
      doc/source/contributor/devstack_setup.rst
  6. 13
      releasenotes/notes/remove-OPAE-dependency-from-devstack-f6db83bb37761340.yaml

@ -31,27 +31,6 @@ function check_cyborg_service_deps {
fi
}
function pre_install_agent {
if is_service_enabled cyborg-agent; then
# stack/pre-install - Called after (OS) setup is complete and before
# project source is installed
echo_summary "Installing additional Cyborg packages"
if [[ "$OPAE_INSTALL_ENABLE" == "True" ]] && install_opae_packages; then
echo_summary "INFO: Additional Cyborg packages installed"
elif [[ "$OPAE_INSTALL_ENABLE" == "True" ]]; then
echo "WARNING: Failed to install additional Cyborg packages"
fi
fi
}
function cleanup_agent {
if is_service_enabled cyborg-agent; then
if [[ "$OPAE_INSTALL_ENABLE" == "True" ]]; then
uninstall_opae_packages
fi
fi
}
function clone_cyborg_client {
if [[ "${CYBORG_CLIENT_INSTALL}" == "True" ]]; then

@ -1,57 +0,0 @@
#!/bin/bash
#
# lib/opae
# Functions to download, install, or remove OPAE packages
# Dependencies:
#
function setup_distro_vars {
PKG_EXT=""
if is_fedora; then
PKG_EXT="rpm"
elif is_ubuntu ; then
# NOTE(Sundar): OPAE packages depend on libjson0, which is
# not available after Ubuntu 16.04. After OPAE packages are
# updated, this check can be removed.
[[ $os_RELEASE == "16.04" ]] && PKG_EXT="deb"
fi
}
function install_opae_pkg {
local pkg=$1
local url=$2
local CURL="curl -sSfL --retry 2"
local tmpfile="/tmp/$pkg.$PKG_EXT"
local retval=0
# NOTE(Sundar): After OPAE libraries become part of the distro
# repos, we can skip the download with curl.
if ! is_package_installed $pkg; then
$CURL -o $tmpfile $url; retval=$?
if [[ $? -eq 0 ]]; then
install_package $tmpfile; retval=$?
[[ $? -ne 0 ]] && echo "WARNING: Could not install $pkg"
else
echo "WARNING: Could not download $url"
fi
/bin/rm -f $tmpfile
fi
return $retval
}
function install_opae_packages {
setup_distro_vars
local libs_url="$OPAE_GITHUB/$OPAE_LIBS.$PKG_EXT"
local devel_url="$OPAE_GITHUB/$OPAE_DEVEL.$PKG_EXT"
[[ "$PKG_EXT" == "" ]] && return 1
install_opae_pkg "$OPAE_LIBS_PKG" $libs_url && \
install_opae_pkg "$OPAE_DEVEL_PKG" $devel_url
# return value is the exit code of last command
}
function uninstall_opae_packages {
uninstall_package "$OPAE_DEVEL_PKG"
uninstall_package "$OPAE_LIBS_PKG"
}

@ -6,13 +6,11 @@
echo_summary "cyborg devstack plugin.sh called: $1/$2"
source $DEST/cyborg/devstack/lib/cyborg
source $DEST/cyborg/devstack/lib/opae
case $1 in
"stack")
case $2 in
"pre-install")
pre_install_agent
clone_cyborg_client
;;
"install")
@ -47,6 +45,5 @@ case $1 in
# clean - Called by clean.sh before other services are cleaned, but after
# unstack.sh has been called.
cleanup_cyborg
cleanup_agent
;;
esac

@ -39,17 +39,6 @@ else
CYBORG_API_URL="$CYBORG_SERVICE_PROTOCOL://$CYBORG_SERVICE_HOST:$CYBORG_SERVICE_PORT"
fi
# OPAE settings
# OPAE packages are not yet upstreamed into OS repos
# We need to download them from OPAE releases page on GitHub
OPAE_INSTALL_ENABLE=$(trueorfalse True OPAE_INSTALL_ENABLE)
OPAE_VERSION=${OPAE_VERSION:-"1.1.0-2"}
OPAE_GITHUB=${OPAE_GITHUB:-"https://github.com/OPAE/opae-sdk/releases/download/$OPAE_VERSION"}
OPAE_DEVEL_PKG=${OPAE_DEVEL_PKG:-"opae-devel"}
OPAE_DEVEL=${OPAE_DEVEL:-"${OPAE_DEVEL_PKG}-$OPAE_VERSION.x86_64"}
OPAE_LIBS_PKG=${OPAE_LIBS_PKG:-"opae-libs"}
OPAE_LIBS=${OPAE_LIBS:-"${OPAE_LIBS_PKG}-$OPAE_VERSION.x86_64"}
# client settings
CYBORG_CLIENT_INSTALL=$(trueorfalse True CYBORG_CLIENT_INSTALL)
CYBORG_CLIENT_REPO=${CYBORG_CLIENT_REPO:-"$GIT_BASE/openstack/python-cyborgclient"}

@ -2,12 +2,6 @@
DevStack Quick Start
====================
.. note::
Because OPAE packages depend on libjson0, which is not available
after Ubuntu 16.04, so cyborg can't be installed on Ubuntu
higher than 16.04 now.
Create stack user (optional)
----------------------------
@ -119,24 +113,6 @@ Enable services
If you got version conflicts, please set `PIP_UPGRADE` to `True` in local.conf
Disable OPAE install
>>>>>>>>>>>>>>>>>>>>
::
OPAE_INSTALL_ENABLE=false
- By default OPAE_INSTALL_ENABLE is True.
- You need to set OPAE_INSTALL_ENABLE as false explicitly,
if not need OPEA enviroment.
- At present OPAE depends on OS verson heavily.
.. note::
If you do not want to try Intel FPGA, you can disable OPAE install. Then you
do not depend on specific OS verson.
Multi-Node Lab
--------------

@ -0,0 +1,13 @@
---
deprecations:
- |
Intel OPAE driver dependency is removed from the devstack installation
dependencies due to the following reasons:
1) In the kolla cyborg-agent image we install OPAE, but OPAE is
not available for CentOS 8 for the moment. This will make the cyborg-agent
image unbuildable in Ussuri. 2) In devstack, due to the fact that OPAE
packages depend on libjson0, which is not available after Ubuntu 16.04, so
cyborg can't be installed on Ubuntu higher than 16.04 now(unless disable
dependency manually). Moreover,from cyborg's perspective, it does not need
to contain any hardware driver dependency, we can assume the admin should
know about it and install the correct version.
Loading…
Cancel
Save