summaryrefslogtreecommitdiff
path: root/devstack
diff options
context:
space:
mode:
authorJulien Danjou <julien@danjou.info>2017-10-16 11:31:51 +0200
committerJulien Danjou <julien@danjou.info>2017-10-25 14:38:43 +0200
commitd881dd52289d453b9f9d94c7c32c0672a70a8064 (patch)
tree3e8dba427d47ccaf28c5c16bfc20956d09e6a042 /devstack
parent4b420650697c9c19029152ebce24e0c591f2d9c3 (diff)
downloadceilometer-d881dd52289d453b9f9d94c7c32c0672a70a8064.tar.gz
Remove Ceilometer API
This removes the deprecated Ceilometer API. Change-Id: I752b36b3dfe8f935b68c4d3d59ccb5b8b60c582f
Diffstat (limited to 'devstack')
-rw-r--r--devstack/apache-ceilometer.template15
-rw-r--r--devstack/plugin.sh79
-rw-r--r--devstack/settings11
-rw-r--r--devstack/upgrade/settings4
-rwxr-xr-xdevstack/upgrade/shutdown.sh2
-rwxr-xr-xdevstack/upgrade/upgrade.sh3
6 files changed, 6 insertions, 108 deletions
diff --git a/devstack/apache-ceilometer.template b/devstack/apache-ceilometer.template
deleted file mode 100644
index 79f14c38..00000000
--- a/devstack/apache-ceilometer.template
+++ /dev/null
@@ -1,15 +0,0 @@
-Listen %PORT%
-
-<VirtualHost *:%PORT%>
- WSGIDaemonProcess ceilometer-api processes=2 threads=10 user=%USER% display-name=%{GROUP} %VIRTUALENV%
- WSGIProcessGroup ceilometer-api
- WSGIScriptAlias / %WSGIAPP%
- WSGIApplicationGroup %{GLOBAL}
- <IfVersion >= 2.4>
- ErrorLogFormat "%{cu}t %M"
- </IfVersion>
- ErrorLog /var/log/%APACHE_NAME%/ceilometer.log
- CustomLog /var/log/%APACHE_NAME%/ceilometer_access.log combined
-</VirtualHost>
-
-WSGISocketPrefix /var/run/%APACHE_NAME%
diff --git a/devstack/plugin.sh b/devstack/plugin.sh
index 70923fad..c3e9acc3 100644
--- a/devstack/plugin.sh
+++ b/devstack/plugin.sh
@@ -57,10 +57,6 @@ function is_ceilometer_enabled {
return 1
}
-function ceilometer_service_url {
- echo "$CEILOMETER_SERVICE_PROTOCOL://$CEILOMETER_SERVICE_HOST:$CEILOMETER_SERVICE_PORT"
-}
-
function gnocchi_service_url {
echo "$GNOCCHI_SERVICE_PROTOCOL://$GNOCCHI_SERVICE_HOST/metric"
@@ -110,9 +106,6 @@ function _ceilometer_config_apache_wsgi {
local apache_version=$(get_apache_version)
local venv_path=""
- # Copy proxy vhost and wsgi file
- sudo cp $CEILOMETER_DIR/ceilometer/api/app.wsgi $CEILOMETER_WSGI_DIR/app
-
if [[ ${USE_VENV} = True ]]; then
venv_path="python-path=${PROJECT_VENV["ceilometer"]}/lib/$(python_version)/site-packages"
fi
@@ -169,15 +162,6 @@ function ceilometer_create_accounts {
create_service_user "ceilometer" "admin"
- if is_service_enabled ceilometer-api; then
- get_or_create_service "ceilometer" "metering" "OpenStack Telemetry Service"
- get_or_create_endpoint "metering" \
- "$REGION_NAME" \
- "$(ceilometer_service_url)" \
- "$(ceilometer_service_url)" \
- "$(ceilometer_service_url)"
- fi
-
if is_service_enabled swift; then
# Ceilometer needs ResellerAdmin role to access Swift account stats.
get_or_add_user_project_role "ResellerAdmin" "ceilometer" $SERVICE_PROJECT_NAME
@@ -236,28 +220,9 @@ function preinstall_ceilometer {
echo_summary "Preinstall not in virtualenv context. Skipping."
}
-# Remove WSGI files, disable and remove Apache vhost file
-function _ceilometer_cleanup_apache_wsgi {
- if is_service_enabled ceilometer-api && [ "$CEILOMETER_USE_MOD_WSGI" == "True" ]; then
- sudo rm -f "$CEILOMETER_WSGI_DIR"/*
- sudo rmdir "$CEILOMETER_WSGI_DIR"
- sudo rm -f $(apache_site_config_for ceilometer)
- fi
-}
-
-function _ceilometer_drop_database {
- if is_service_enabled ceilometer-api ; then
- if [ "$CEILOMETER_BACKEND" = 'mongodb' ] ; then
- mongo ceilometer --eval "db.dropDatabase();"
- fi
- fi
-}
-
# cleanup_ceilometer() - Remove residual data files, anything left over
# from previous runs that a clean run would need to clean up
function cleanup_ceilometer {
- _ceilometer_cleanup_apache_wsgi
- _ceilometer_drop_database
sudo rm -f "$CEILOMETER_CONF_DIR"/*
sudo rmdir "$CEILOMETER_CONF_DIR"
}
@@ -311,8 +276,6 @@ function _ceilometer_configure_storage_backend {
echo ' - panko://' >> $CEILOMETER_CONF_DIR/event_pipeline.yaml
fi
fi
-
- _ceilometer_drop_database
}
# Configure Ceilometer
@@ -342,9 +305,6 @@ function configure_ceilometer {
# with rootwrap installation done elsewhere and also clobber
# ceilometer.conf settings that have already been made.
# Anyway, explicit is better than implicit.
- for conffile in policy.json api_paste.ini; do
- cp $CEILOMETER_DIR/etc/ceilometer/$conffile $CEILOMETER_CONF_DIR
- done
cp $CEILOMETER_DIR/etc/ceilometer/polling_all.yaml $CEILOMETER_CONF_DIR/polling.yaml
cp $CEILOMETER_DIR/ceilometer/pipeline/data/*.yaml $CEILOMETER_CONF_DIR
@@ -371,11 +331,6 @@ function configure_ceilometer {
configure_auth_token_middleware $CEILOMETER_CONF ceilometer $CEILOMETER_AUTH_CACHE_DIR
- # Configure storage
- if is_service_enabled ceilometer-api; then
- _ceilometer_configure_storage_backend
- fi
-
if [[ "$VIRT_DRIVER" = 'vsphere' ]]; then
iniset $CEILOMETER_CONF DEFAULT hypervisor_inspector vsphere
iniset $CEILOMETER_CONF vmware host_ip "$VMWAREAPI_IP"
@@ -383,9 +338,7 @@ function configure_ceilometer {
iniset $CEILOMETER_CONF vmware host_password "$VMWAREAPI_PASSWORD"
fi
- if is_service_enabled ceilometer-api && [ "$CEILOMETER_USE_MOD_WSGI" == "True" ]; then
- _ceilometer_config_apache_wsgi
- fi
+ _ceilometer_configure_storage_backend
if is_service_enabled ceilometer-aipmi; then
# Configure rootwrap for the ipmi agent
@@ -398,15 +351,6 @@ function init_ceilometer {
# Create cache dir
sudo install -d -o $STACK_USER $CEILOMETER_AUTH_CACHE_DIR
rm -f $CEILOMETER_AUTH_CACHE_DIR/*
-
- if is_service_enabled ceilometer-api; then
- if is_service_enabled mysql postgresql ; then
- if [ "$CEILOMETER_BACKEND" = 'mysql' ] || [ "$CEILOMETER_BACKEND" = 'postgresql' ] || [ "$CEILOMETER_BACKEND" = 'es' ] ; then
- recreate_database ceilometer
- $CEILOMETER_BIN_DIR/ceilometer-upgrade --skip-gnocchi-resource-types
- fi
- fi
- fi
}
# Install Ceilometer.
@@ -421,10 +365,6 @@ function install_ceilometer {
! [[ $DEVSTACK_PLUGINS =~ 'gnocchi' ]] && [ "$CEILOMETER_BACKEND" = 'gnocchi' ] && install_gnocchi
- if is_service_enabled ceilometer-api; then
- _ceilometer_prepare_storage_backend
- fi
-
if is_service_enabled ceilometer-acompute ; then
_ceilometer_prepare_virt_drivers
fi
@@ -465,15 +405,6 @@ function start_ceilometer {
run_process ceilometer-acentral "$CEILOMETER_BIN_DIR/ceilometer-polling --polling-namespaces central --config-file $CEILOMETER_CONF"
run_process ceilometer-aipmi "$CEILOMETER_BIN_DIR/ceilometer-polling --polling-namespaces ipmi --config-file $CEILOMETER_CONF"
- if [[ "$CEILOMETER_USE_MOD_WSGI" == "False" ]]; then
- run_process ceilometer-api "$CEILOMETER_BIN_DIR/ceilometer-api --port $CEILOMETER_SERVICE_PORT"
- elif is_service_enabled ceilometer-api; then
- enable_apache_site ceilometer
- restart_apache_server
- tail_log ceilometer /var/log/$APACHE_NAME/ceilometer.log
- tail_log ceilometer-api /var/log/$APACHE_NAME/ceilometer_access.log
- fi
-
# run the notification agent after restarting apache as it needs
# operational keystone if using gnocchi
run_process ceilometer-anotification "$CEILOMETER_BIN_DIR/ceilometer-agent-notification --config-file $CEILOMETER_CONF"
@@ -490,14 +421,6 @@ function start_ceilometer {
# stop_ceilometer() - Stop running processes
function stop_ceilometer {
- if is_service_enabled ceilometer-api ; then
- if [ "$CEILOMETER_USE_MOD_WSGI" == "True" ]; then
- disable_apache_site ceilometer
- restart_apache_server
- else
- stop_process ceilometer-api
- fi
- fi
# Kill the ceilometer screen windows
for serv in ceilometer-acompute ceilometer-acentral ceilometer-aipmi ceilometer-anotification; do
diff --git a/devstack/settings b/devstack/settings
index 7c2bfb3c..b2768eed 100644
--- a/devstack/settings
+++ b/devstack/settings
@@ -11,11 +11,8 @@ CEILOMETER_CONF=$CEILOMETER_CONF_DIR/ceilometer.conf
CEILOMETER_AUTH_CACHE_DIR=${CEILOMETER_AUTH_CACHE_DIR:-/var/cache/ceilometer}
CEILOMETER_WSGI_DIR=${CEILOMETER_WSGI_DIR:-/var/www/ceilometer}
-# Set up no backend
CEILOMETER_BACKEND=${CEILOMETER_BACKEND:-gnocchi}
-if [ "$CEILOMETER_BACKEND" = "es" ] || [ "$CEILOMETER_BACKEND" = "mysql" ] || [ "$CEILOMETER_BACKEND" = "postgresql" ] || [ "$CEILOMETER_BACKEND" = "mongodb" ]; then
- enable_service ceilometer-api
-elif [ "$CEILOMETER_BACKEND" = "gnocchi" ]; then
+if [ "$CEILOMETER_BACKEND" = "gnocchi" ]; then
enable_service gnocchi-api gnocchi-metricd
fi
@@ -38,12 +35,6 @@ GNOCCHI_WSGI_DIR=${GNOCCHI_WSGI_DIR:-/var/www/gnocchi}
# when the gate job have overrided this.
CEILOMETER_ALARM_GRANULARITY=${CEILOMETER_ALARM_GRANULARITY:-60}
-# Ceilometer connection info.
-CEILOMETER_SERVICE_PROTOCOL=http
-CEILOMETER_SERVICE_HOST=${CEILOMETER_SERVICE_HOST:-${SERVICE_HOST}}
-CEILOMETER_SERVICE_PORT=${CEILOMETER_SERVICE_PORT:-8777}
-CEILOMETER_USE_MOD_WSGI=${CEILOMETER_USE_MOD_WSGI:-${ENABLE_HTTPD_MOD_WSGI_SERVICES}}
-
# To enable OSprofiler change value of this variable to "notifications,profiler"
CEILOMETER_NOTIFICATION_TOPICS=${CEILOMETER_NOTIFICATION_TOPICS:-notifications}
diff --git a/devstack/upgrade/settings b/devstack/upgrade/settings
index bd7a20b8..0324704f 100644
--- a/devstack/upgrade/settings
+++ b/devstack/upgrade/settings
@@ -1,7 +1,7 @@
register_project_for_upgrade ceilometer
devstack_localrc base enable_plugin ceilometer git://git.openstack.org/openstack/ceilometer
-devstack_localrc base enable_service ceilometer-acompute ceilometer-acentral ceilometer-aipmi ceilometer-anotification ceilometer-api tempest
+devstack_localrc base enable_service ceilometer-acompute ceilometer-acentral ceilometer-aipmi ceilometer-anotification tempest
devstack_localrc target enable_plugin ceilometer git://git.openstack.org/openstack/ceilometer
-devstack_localrc target enable_service ceilometer-acompute ceilometer-acentral ceilometer-aipmi ceilometer-anotification ceilometer-api tempest
+devstack_localrc target enable_service ceilometer-acompute ceilometer-acentral ceilometer-aipmi ceilometer-anotification tempest
diff --git a/devstack/upgrade/shutdown.sh b/devstack/upgrade/shutdown.sh
index 615a3737..ccd42bac 100755
--- a/devstack/upgrade/shutdown.sh
+++ b/devstack/upgrade/shutdown.sh
@@ -22,6 +22,6 @@ stop_ceilometer
# ensure everything is stopped
-SERVICES_DOWN="ceilometer-acompute ceilometer-acentral ceilometer-aipmi ceilometer-anotification ceilometer-api"
+SERVICES_DOWN="ceilometer-acompute ceilometer-acentral ceilometer-aipmi ceilometer-anotification"
ensure_services_stopped $SERVICES_DOWN
diff --git a/devstack/upgrade/upgrade.sh b/devstack/upgrade/upgrade.sh
index 12fef542..e6ff2b59 100755
--- a/devstack/upgrade/upgrade.sh
+++ b/devstack/upgrade/upgrade.sh
@@ -79,8 +79,7 @@ start_ceilometer
# the impi is not ready. The ceilometer-polling should fail.
ensure_services_started "ceilometer-polling --polling-namespaces compute" \
"ceilometer-polling --polling-namespaces central" \
- ceilometer-agent-notification \
- ceilometer-api
+ ceilometer-agent-notification
# Save mongodb state (replace with snapshot)
if grep -q 'connection *= *mongo' /etc/ceilometer/ceilometer.conf; then