Move global variables to settings file

The global variables are moved to settings file as per
the devstack plug-ins documentation

Change-Id: Ib6f84ecaf01259c4d093df92d90d622927483033
This commit is contained in:
venkatamahesh 2015-11-15 22:53:11 +05:30 committed by Gauvain Pocentek
parent 2c4a4e90d5
commit f331366d2e
3 changed files with 58 additions and 57 deletions

View File

@ -30,7 +30,7 @@ Configure DevStack to run CloudKitty
$ cd ${DEVSTACK_DIR}
cat >> local.conf << EOF
# cloudkitty
enable_plugin cloudkitty https://github.com/openstack/cloudkitty master
enable_plugin cloudkitty https://git.openstack.org/openstack/cloudkitty master
EOF
Run devstack as normal::

56
devstack/plugin.sh Normal file → Executable file
View File

@ -31,21 +31,6 @@ XTRACE=$(set +o | grep xtrace)
set +o xtrace
# Defaults
# --------
# Set up default directories
CLOUDKITTY_DIR=$DEST/cloudkitty
CLOUDKITTY_CONF_DIR=/etc/cloudkitty
CLOUDKITTY_CONF=$CLOUDKITTY_CONF_DIR/cloudkitty.conf
CLOUDKITTY_API_LOG_DIR=/var/log/cloudkitty
CLOUDKITTY_AUTH_CACHE_DIR=${CLOUDKITTY_AUTH_CACHE_DIR:-/var/cache/cloudkitty}
CLOUDKITTY_REPORTS_DIR=${DATA_DIR}/cloudkitty/reports
# Horizon enabled file
CLOUDKITTY_DASHBOARD=$DEST/cloudkitty-dashboard/cloudkittydashboard
CLOUDKITTY_ENABLED_DIR=${CLOUDKITTY_ENABLED_DIR:-${CLOUDKITTY_DASHBOARD}/enabled}
CLOUDKITTY_HORIZON_ENABLED_DIR=${CLOUDKITTY_HORIZON_ENABLED_DIR:-$HORIZON_DIR/openstack_dashboard/enabled}
# Support potential entry-points console scripts
if [[ -d $CLOUDKITTY_DIR/bin ]]; then
CLOUDKITTY_BIN_DIR=$CLOUDKITTY_DIR/bin
@ -53,47 +38,6 @@ else
CLOUDKITTY_BIN_DIR=$(get_python_exec_prefix)
fi
# Set up database backend
CLOUDKITTY_BACKEND=${CLOUDKITTY_BACKEND:-sqlite}
# Set cloudkitty repository
CLOUDKITTY_REPO=${CLOUDKITTY_REPO:-${GIT_BASE}/openstack/cloudkitty.git}
CLOUDKITTY_BRANCH=${CLOUDKITTY_BRANCH:-master}
# Set CloudKitty connection info
CLOUDKITTY_SERVICE_HOST=${CLOUDKITTY_SERVICE_HOST:-$SERVICE_HOST}
CLOUDKITTY_SERVICE_PORT=${CLOUDKITTY_SERVICE_PORT:-8888}
CLOUDKITTY_SERVICE_HOSTPORT="$CLOUDKITTY_SERVICE_HOST:$CLOUDKITTY_SERVICE_PORT"
CLOUDKITTY_SERVICE_PROTOCOL=${CLOUDKITTY_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
# Set CloudKitty auth info
CLOUDKITTY_PRICING_USER=${CLOUDKITTY_PRICING_USER:-"admin"}
CLOUDKITTY_PRICING_PASSWORD=${CLOUDKITTY_PRICING_PASSWORD:-$ADMIN_PASSWORD}
CLOUDKITTY_PRICING_TENANT=${CLOUDKITTY_PRICING_TENANT:-"demo"}
# Set CloudKitty collect info
CLOUDKITTY_COLLECTOR=${CLOUDKITTY_COLLECTOR:-ceilometer}
CLOUDKITTY_SERVICES=${CLOUDKITTY_SERVICES:-compute}
# Set CloudKitty output info
CLOUDKITTY_OUTPUT_BACKEND=${CLOUDKITTY_OUTPUT_BACKEND:-"cloudkitty.backend.file.FileBackend"}
CLOUDKITTY_OUTPUT_BASEPATH=${CLOUDKITTY_OUTPUT_BASEPATH:-$CLOUDKITTY_REPORTS_DIR}
CLOUDKITTY_OUTPUT_PIPELINE=${CLOUDKITTY_OUTPUT_PIPELINE:-"osrf"}
# Set Cloudkitty client info
GITREPO["python-cloudkittyclient"]=${CLOUDKITTYCLIENT_REPO:-${GIT_BASE}/openstack/python-cloudkittyclient.git}
GITDIR["python-cloudkittyclient"]=$DEST/python-cloudkittyclient
GITBRANCH["python-cloudkittyclient"]=${CLOUDKITTYCLIENT_BRANCH:-master}
# Set CloudKitty dashboard info
GITREPO["cloudkitty-dashboard"]=${CLOUDKITTYDASHBOARD_REPO:-${GIT_BASE}/openstack/cloudkitty-dashboard.git}
GITDIR["cloudkitty-dashboard"]=$DEST/cloudkitty-dashboard
GITBRANCH["cloudkitty-dashboard"]=${CLOUDKITTYDASHBOARD_BRANCH:-master}
# Tell Tempest this project is present
TEMPEST_SERVICES+=,cloudkitty
# Functions
# ---------

View File

@ -1,3 +1,60 @@
# turn on the CloudKitty services by default
enable_service ck-api
enable_service ck-proc
# Defaults
# Set up default directories
# --------------------------
CLOUDKITTY_DIR=$DEST/cloudkitty
CLOUDKITTY_CONF_DIR=/etc/cloudkitty
CLOUDKITTY_CONF=$CLOUDKITTY_CONF_DIR/cloudkitty.conf
CLOUDKITTY_API_LOG_DIR=/var/log/cloudkitty
CLOUDKITTY_AUTH_CACHE_DIR=${CLOUDKITTY_AUTH_CACHE_DIR:-/var/cache/cloudkitty}
CLOUDKITTY_REPORTS_DIR=${DATA_DIR}/cloudkitty/reports
# Horizon enabled file
CLOUDKITTY_DASHBOARD=$DEST/cloudkitty-dashboard/cloudkittydashboard
CLOUDKITTY_ENABLED_DIR=${CLOUDKITTY_ENABLED_DIR:-${CLOUDKITTY_DASHBOARD}/enabled}
CLOUDKITTY_HORIZON_ENABLED_DIR=${CLOUDKITTY_HORIZON_ENABLED_DIR:-$HORIZON_DIR/openstack_dashboard/enabled}
# Set up database backend
CLOUDKITTY_BACKEND=${CLOUDKITTY_BACKEND:-sqlite}
# Set cloudkitty repository
CLOUDKITTY_REPO=${CLOUDKITTY_REPO:-${GIT_BASE}/openstack/cloudkitty.git}
CLOUDKITTY_BRANCH=${CLOUDKITTY_BRANCH:-master}
# Set CloudKitty connection info
CLOUDKITTY_SERVICE_HOST=${CLOUDKITTY_SERVICE_HOST:-$SERVICE_HOST}
CLOUDKITTY_SERVICE_PORT=${CLOUDKITTY_SERVICE_PORT:-8888}
CLOUDKITTY_SERVICE_HOSTPORT="$CLOUDKITTY_SERVICE_HOST:$CLOUDKITTY_SERVICE_PORT"
CLOUDKITTY_SERVICE_PROTOCOL=${CLOUDKITTY_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
# Set CloudKitty auth info
CLOUDKITTY_PRICING_USER=${CLOUDKITTY_PRICING_USER:-"admin"}
CLOUDKITTY_PRICING_PASSWORD=${CLOUDKITTY_PRICING_PASSWORD:-$ADMIN_PASSWORD}
CLOUDKITTY_PRICING_TENANT=${CLOUDKITTY_PRICING_TENANT:-"demo"}
# Set CloudKitty collect info
CLOUDKITTY_COLLECTOR=${CLOUDKITTY_COLLECTOR:-ceilometer}
CLOUDKITTY_SERVICES=${CLOUDKITTY_SERVICES:-compute}
# Set CloudKitty output info
CLOUDKITTY_OUTPUT_BACKEND=${CLOUDKITTY_OUTPUT_BACKEND:-"cloudkitty.backend.file.FileBackend"}
CLOUDKITTY_OUTPUT_BASEPATH=${CLOUDKITTY_OUTPUT_BASEPATH:-$CLOUDKITTY_REPORTS_DIR}
CLOUDKITTY_OUTPUT_PIPELINE=${CLOUDKITTY_OUTPUT_PIPELINE:-"osrf"}
# Set Cloudkitty client info
GITREPO["python-cloudkittyclient"]=${CLOUDKITTYCLIENT_REPO:-${GIT_BASE}/openstack/python-cloudkittyclient.git}
GITDIR["python-cloudkittyclient"]=$DEST/python-cloudkittyclient
GITBRANCH["python-cloudkittyclient"]=${CLOUDKITTYCLIENT_BRANCH:-master}
# Set CloudKitty dashboard info
GITREPO["cloudkitty-dashboard"]=${CLOUDKITTYDASHBOARD_REPO:-${GIT_BASE}/openstack/cloudkitty-dashboard.git}
GITDIR["cloudkitty-dashboard"]=$DEST/cloudkitty-dashboard
GITBRANCH["cloudkitty-dashboard"]=${CLOUDKITTYDASHBOARD_BRANCH:-master}
# Tell Tempest this project is present
TEMPEST_SERVICES+=,cloudkitty