masakari/devstack/settings
Ghanshyam Mann 513c29078f [goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to do two things:

1. Change the default value of '[oslo_policy] policy_file''
config option from 'policy.json' to 'policy.yaml' with
upgrade checks.

2. Deprecate the JSON formatted policy file on the project side
via warning in doc and releasenotes.

Also replace policy.json to policy.yaml ref from doc and tests.

[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Change-Id: Iad942530b5d540af3d3c074e9944687b93bcd7f2
2020-12-23 00:47:36 +00:00

54 lines
2.4 KiB
Plaintext

# Settings needed for Masakari plugin
# -----------------------------------
# Set up default directories
MASAKARI_DIR=${MASAKARI_DIR:-${DEST}/masakari}
MASAKARI_REPO=${GIT_BASE}/openstack/masakari.git}
MASAKARI_BRANCH=${MASAKARI_BRANCH:-master}
MASAKARI_DASHBOARD_REPO=${MASAKARI_DASHBOARD_REPO:-${GIT_BASE}/openstack/masakari-dashboard.git}
MASAKARI_DASHBOARD_BRANCH=${MASAKARI_DASHBOARD_BRANCH:-master}
MASAKARI_MONITORS_DIR=${MASAKARI_MONITORS_DIR:-${DEST}/masakari-monitors}
MASAKARI_MONITORS_REPO=${MASAKARI_MONITORS_REPO:-${GIT_BASE}/openstack/masakari-monitors.git}
MASAKARI_MONITORS_BRANCH=${MASAKARI_MONITORS_BRANCH:-master}
# Set up configuration directory and files
MASAKARI_CONF_DIR=${MASAKARI_CONF_DIR:-/etc/masakari}
MASAKARI_DASHBOARD_DIR=$DEST/masakari-dashboard
MASAKARI_CONF=${MASAKARI_CONF:-${MASAKARI_CONF_DIR}/masakari.conf}
MASAKARI_API_PASTE_INI=${MASAKARI_API_PASTE_INI:-${MASAKARI_CONF_DIR}/api-paste.ini}
MASAKARI_POLICY_JSON=${MASAKARI_POLICY_JSON:-${MASAKARI_CONF_DIR}/policy.yaml}
MASAKARI_MONITORS_CONF_DIR=${MASAKARI_MONITORS_CONF_DIR:-/etc/masakarimonitors}
MASAKARI_MONITORS_CONF=${MASAKARI_MONITORS_CONF:-${MASAKARI_MONITORS_CONF_DIR}/masakarimonitors.conf}
MASAKARI_LOCAL_CONF_DIR=${MASAKARI_LOCAL_CONF_DIR:-${MASAKARI_DIR}/etc/masakari}
MASAKARI_LOCAL_API_PASTE_INI=${MASAKARI_LOCAL_API_PASTE_INI:-${MASAKARI_LOCAL_CONF_DIR}/api-paste.ini}
MASAKARI_LOCAL_POLICY_JSON=${MASAKARI_LOCAL_POLICY_JSON:-${MASAKARI_LOCAL_CONF_DIR}/policy.yaml}
MASAKARI_AUTH_CACHE_DIR=${MASAKARI_AUTH_CACHE_DIR:-/var/cache/masakari}
MASAKARI_SERVICE_HOST=${MASAKARI_SERVICE_HOST:-$SERVICE_HOST}
MASAKARI_SERVICE_PROTOCOL=${MASAKARI_SERVICE_PROTOCOL:-http}
# set environment variables
USERNAME="masakari"
SERVICE_DOMAIN_ID="default"
# Support entry points installation of console scripts
if [[ -d $MASAKARI_DIR/bin ]]; then
MASAKARI_BIN_DIR=$MASAKARI_DIR/bin
MASAKARI_MONITORS_BIN_DIR=$MASAKARI_MONITORS_DIR/bin
else
MASAKARI_BIN_DIR=$(get_python_exec_prefix)
fi
MASAKARI_MANAGE=$MASAKARI_BIN_DIR/masakari-manage
# Public facing bits
MASAKARI_SERVICE_PORT=${MASAKARI_SERVICE_PORT:-15868}
MASAKARI_SERVICE_PORT_INT=${MASAKARI_SERVICE_PORT_INT:-25868}
MASAKARI_UWSGI=$MASAKARI_BIN_DIR/masakari-wsgi
MASAKARI_UWSGI_CONF=$MASAKARI_CONF_DIR/masakari-api-uwsgi.ini
enable_service masakari masakari-api masakari-engine
enable_service masakari-monitors masakari-processmonitor masakari-instancemonitor masakari-hostmonitor
enable_service masakari-introspectiveinstancemonitor