bug fix: devstack adds cyborg account and endpoint.

Co-Authored-By: Jinghan Sun <jinghan.sun@intel.com>

Change-Id: I01f0e79fbbc85b0e8318baf0fca11fd0036277ec
This commit is contained in:
Shaohe Feng 2018-02-08 10:52:41 +00:00
parent 2e78e10e5a
commit a35598b1a5
2 changed files with 22 additions and 0 deletions

View File

@ -39,6 +39,8 @@ CYBORG_CONF_DIR=${CYBORG_CONF_DIR:-/etc/cyborg}
CYBORG_CONF_FILE=$CYBORG_CONF_DIR/cyborg.conf
CYBORG_ROOTWRAP_CONF=$CYBORG_CONF_DIR/rootwrap.conf
CYBORG_POLICY_JSON=$CYBORG_CONF_DIR/policy.json
CYBORG_SERVICE_HOST=${CYBORG_SERVICE_HOST:-$SERVICE_HOST}
CYBORG_SERVICE_PROTOCOL=${CYBORG_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
if [[ -d ${CYBORG_DIR}/bin ]]; then
CYBORG_BIN_DIR=${CYBORG_DIR}/bin
else
@ -87,6 +89,25 @@ function configure_cyborg_dirs {
}
# Defaults
# --------
# create_cyborg_accounts - Set up common required cyborg accounts
#
# Project User Roles
# ------------------------------
# service cyborg admin
function create_cyborg_accounts {
create_service_user "cyborg" "admin"
get_or_create_service "cyborg" "cyborg" "Cyborg Accelerators Service"
get_or_create_endpoint "cyborg" \
"$REGION_NAME" \
"${CYBORG_SERVICE_PROTOCOL}://${CYBORG_SERVICE_HOST}/cyborg/v1" \
"${CYBORG_SERVICE_PROTOCOL}://${CYBORG_SERVICE_HOST}/cyborg/v1" \
"${CYBORG_SERVICE_PROTOCOL}://${CYBORG_SERVICE_HOST}/cyborg/v1"
}
# configure_cyborg() - Set config files, create data dirs, etc
function configure_cyborg {
configure_cyborg_dirs

View File

@ -27,6 +27,7 @@ if is_service_enabled cyborg-api cyborg-cond; then
echo_summary "Configuring Cyborg"
configure_cyborg
create_cyborg_accounts
elif [[ "$2" == "extra" ]]; then
# stack/extra - Called near the end after layer 1 and 2 services have