76bdd3f8a3
This change adds support for installing the python-cyborgclient from git. By default it is installed but it can be disabled by setting CYBORG_CLIENT_INSTALL=False. The version and repo can be set using CYBORG_CLIENT_REPO and CYBORG_CLIENT_BRANCH. Change-Id: I1dd616fe1e0c5b03118a23fc5afe2a4d3bb3686d
58 lines
2.3 KiB
Plaintext
58 lines
2.3 KiB
Plaintext
enable_service cyborg cyborg-api cyborg-cond cyborg-agent
|
|
|
|
# cyborg setting
|
|
# Defaults
|
|
# --------
|
|
# Set up default directories
|
|
# then name of the directory where cyborg is cloned is set by the first
|
|
# argument to enable_plugin so we should not assume it will be cyborg
|
|
CYBORG_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )
|
|
CYBORG_DEVSTACK_DIR=$CYBORG_DIR/devstack
|
|
CYBORG_DEVSTACK_FILES_DIR=$CYBORG_DEVSTACK_DIR/files
|
|
CYBORG_DATA_DIR=$DATA_DIR/cyborg
|
|
CYBORG_STATE_PATH=/var/lib/cyborg
|
|
CYBORG_AUTH_CACHE_DIR=${CYBORG_AUTH_CACHE_DIR:-/var/cache/cyborg}
|
|
CYBORG_CONF_DIR=${CYBORG_CONF_DIR:-/etc/cyborg}
|
|
CYBORG_CONF_FILE=$CYBORG_CONF_DIR/cyborg.conf
|
|
CYBORG_API_PASTE_INI=$CYBORG_CONF_DIR/api-paste.ini
|
|
CYBORG_POLICY_JSON=$CYBORG_CONF_DIR/policy.json
|
|
CYBORG_SERVICE_HOST=${CYBORG_SERVICE_HOST:-$SERVICE_HOST}
|
|
CYBORG_SERVICE_PORT=${CYBORG_SERVICE_PORT:-6666}
|
|
CYBORG_SERVICE_PROTOCOL=${CYBORG_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
|
|
CYBORG_ENABLED_DRIVERS=${CYBORG_ENABLED_DRIVERS:-fake_driver}
|
|
|
|
if [[ -d ${CYBORG_DIR}/bin ]]; then
|
|
CYBORG_BIN_DIR=${CYBORG_DIR}/bin
|
|
else
|
|
CYBORG_BIN_DIR=$(get_python_exec_prefix)
|
|
fi
|
|
|
|
# Toggle for deploying Cyborg-API under a wsgi server
|
|
CYBORG_USE_UWSGI=${CYBORG_USE_UWSGI:-True}
|
|
|
|
CYBORG_UWSGI=$CYBORG_BIN_DIR/cyborg-wsgi-api
|
|
CYBORG_UWSGI_CONF=$CYBORG_CONF_DIR/cyborg-api-uwsgi.ini
|
|
|
|
if [[ "$CYBORG_USE_UWSGI" == "True" ]]; then
|
|
CYBORG_API_URL="$CYBORG_SERVICE_PROTOCOL://$CYBORG_SERVICE_HOST/accelerator"
|
|
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"}
|
|
CYBORG_CLIENT_BRANCH=${CYBORG_CLIENT_BRANCH:-master}
|
|
CYBORG_CLIENT_DIR="${DEST}/python-cyborgclient"
|