Merge "Allow installing observabilityclient from git"

This commit is contained in:
Zuul
2025-06-26 12:31:35 +00:00
committed by Gerrit Code Review
3 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
# lib/observabilityclient
# Functions to control the installation of observabilityclient
# Save trace setting
_XTRACE_PROMETHEUS=$(set +o | grep xtrace)
set +o xtrace
function install_observabilityclient {
if use_library_from_git "python-observabilityclient"; then
git_clone_by_name "python-observabilityclient"
setup_dev_lib "python-observabilityclient"
else
pip_install_gr python-observabilityclient
fi
}
# Restore xtrace
$_XTRACE_PROMETHEUS

View File

@@ -8,6 +8,7 @@ echo_summary "devstack-plugin-prometheus's plugin.sh was called..."
. $DEST/devstack-plugin-prometheus/devstack/lib/prometheus
. $DEST/devstack-plugin-prometheus/devstack/lib/node_exporter
. $DEST/devstack-plugin-prometheus/devstack/lib/podman_exporter
. $DEST/devstack-plugin-prometheus/devstack/lib/observabilityclient
# Show all of defined environment variables
(set -o posix; set)
@@ -23,6 +24,8 @@ if is_service_enabled prometheus; then
# Perform installation of service source
echo_summary "Installing prometheus"
install_prometheus
echo_summary "Installing python-observabilityclient"
install_observabilityclient
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
# Configure after the other layer 1 and 2 services have been configured

View File

@@ -17,3 +17,8 @@ PROMETHEUS_CUSTOM_SCRAPE_TARGETS=${PROMETHEUS_CUSTOM_SCRAPE_TARGETS:-""}
NODE_EXPORTER_VERSION=1.8.2
# List of "," excluded collector names
NODE_EXPORTER_COLLECTOR_EXCLUDE=${NODE_EXPORTER_COLLECTOR_EXCLUDE:-""}
## Variables related to the observabilityclient
GITREPO["python-observabilityclient"]=${OBSERVABILITYCLIENT_REPO:-${GIT_BASE}/openstack/python-observabilityclient.git}
GITBRANCH["python-observabilityclient"]=${OBSERVABILITYCLIENT_BRANCH:-$TARGET_BRANCH}
GITDIR["python-observabilityclient"]=$DEST/python-observabilityclient