add knob for OPAE install

Currently, OPAE is so picky about the OS.

Not every developer need OPAE.
In order to make them happy, add knot for OPAE install.

Change-Id: Ief2c75c4bc80bb7b01a812fd6f18abd6a3acfcc5
This commit is contained in:
Shaohe Feng 2019-04-10 07:23:07 +00:00
parent 499f491061
commit dd8057211c
4 changed files with 26 additions and 4 deletions

View File

@ -21,7 +21,6 @@ function setup_distro_vars {
[[ $os_RELEASE == "16.04" ]] && PKG_EXT="deb"
fi
}
setup_distro_vars
function install_opae_pkg {
local pkg=$1
@ -46,6 +45,7 @@ function install_opae_pkg {
}
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"

View File

@ -14,9 +14,9 @@ if is_service_enabled cyborg-api cyborg-cond; then
# stack/pre-install - Called after (OS) setup is complete and before
# project source is installed
echo_summary "Installing additional Cyborg packages"
if install_opae_packages; then
if [[ "$OPAE_INSTALL_ENABLE" == "True" ]] && install_opae_packages; then
echo_summary "INFO: Additional Cyborg packages installed"
else
elif [[ "$OPAE_INSTALL_ENABLE" == "True" ]]; then
echo "WARNING: Failed to install additional Cyborg packages"
fi
elif [[ "$2" == "install" ]]; then
@ -56,6 +56,8 @@ if is_service_enabled cyborg-api cyborg-cond; then
# clean - Called by clean.sh before other services are cleaned, but after
# unstack.sh has been called.
cleanup_cyborg
uninstall_opae_packages
if [[ "$OPAE_INSTALL_ENABLE" == "True" ]]; then
uninstall_opae_packages
fi
fi
fi

View File

@ -3,6 +3,7 @@ enable_service cyborg cyborg-api cyborg-cond cyborg-agent
# 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"}

View File

@ -123,6 +123,25 @@ 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.
Run DevStack
------------