summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2023-02-14 09:39:25 +0000
committerGerrit Code Review <review@openstack.org>2023-02-14 09:39:25 +0000
commit49557afc04988c7dc9d73965ba8acfe0571675ff (patch)
treec84f6a800bba41d12c8ac0a60cc4effd0d1a1403
parenta58e1b1c25129ba96e9919778e03ee5af347d48e (diff)
parentcb7084ed1868a29795364a83999842d8e671f4d0 (diff)
downloadceilometer-49557afc04988c7dc9d73965ba8acfe0571675ff.tar.gz
Merge "Fix gnocchi install from git"
-rw-r--r--.zuul.yaml1
-rw-r--r--devstack/README.rst3
-rw-r--r--devstack/local.conf.sample45
-rw-r--r--devstack/plugin.sh8
-rw-r--r--devstack/settings6
5 files changed, 59 insertions, 4 deletions
diff --git a/.zuul.yaml b/.zuul.yaml
index 9ed570be..e01941ee 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -5,6 +5,7 @@
required-projects:
- opendev.org/openstack/grenade
- opendev.org/openstack/ceilometer
+ - gnocchixyz/gnocchi
vars:
configure_swap_size: 8192
grenade_devstack_localrc:
diff --git a/devstack/README.rst b/devstack/README.rst
index 38aa78c2..ee71f43e 100644
--- a/devstack/README.rst
+++ b/devstack/README.rst
@@ -22,4 +22,7 @@ Enabling Ceilometer in DevStack
installation of Ceilometer. If you don't want to use their default value,
you can set a new one in ``local.conf``.
+ Alternitvely you can modify copy and modify the sample ``local.conf``
+ located at ``ceilometer/devstack/local.conf.sample``
+
3. Run ``stack.sh``.
diff --git a/devstack/local.conf.sample b/devstack/local.conf.sample
new file mode 100644
index 00000000..f35aca41
--- /dev/null
+++ b/devstack/local.conf.sample
@@ -0,0 +1,45 @@
+[[local|localrc]]
+# Common options
+# --------------
+#RECLONE=True
+#FORCE=True
+#OFFLINE=True
+#USE_PYTHON3=True
+#PYTHON3_VERSION=3.8
+# HOST_IP shoudl be set to an ip that is present on the host
+# e.g. the ip of eth0. This will be used to bind api endpoints and horizon.
+HOST_IP=<hostip>
+
+# Minimal Contents
+# ----------------
+
+# While ``stack.sh`` is happy to run without ``localrc``, devlife is better when
+# there are a few minimal variables set:
+
+# If the ``*_PASSWORD`` variables are not set here you will be prompted to enter
+# values for them by ``stack.sh``and they will be added to ``local.conf``.
+ADMIN_PASSWORD=password
+DATABASE_PASSWORD=$ADMIN_PASSWORD
+RABBIT_PASSWORD=$ADMIN_PASSWORD
+SERVICE_PASSWORD=$ADMIN_PASSWORD
+
+LOGFILE=$DEST/logs/stack.sh.log
+LOGDAYS=2
+
+# the plugin line order matters but the placment in the file does not
+enable_plugin aodh https://opendev.org/openstack/aodh
+enable_plugin ceilometer https://opendev.org/openstack/ceilometer.git
+
+# Gnocchi settings
+# Gnocchi is optional but can be enbaled by uncommenting CEILOMETER_BACKEND
+CEILOMETER_BACKEND=gnocchi
+
+# if gnocchi is not in LIBS_FROM_GIT it will install from pypi.
+# Currently this is broken with the latest gnocchi release 4.4.2
+# so we need to install from git until
+# https://github.com/gnocchixyz/gnocchi/issues/1290 is resolved
+LIBS_FROM_GIT+=gnocchi
+
+# to control the version of gnocchi installed from git uncomment these options
+#GNOCCHI_BRANCH="master"
+#GNOCCHI_REPO=https://github.com/gnocchixyz/gnocchi
diff --git a/devstack/plugin.sh b/devstack/plugin.sh
index c475be44..62e79c6c 100644
--- a/devstack/plugin.sh
+++ b/devstack/plugin.sh
@@ -137,8 +137,12 @@ function ceilometer_create_accounts {
function install_gnocchi {
echo_summary "Installing Gnocchi"
- if [ $GNOCCHI_GIT_PATH ]; then
- pip_install -e $GNOCCHI_GIT_PATH[redis,${DATABASE_TYPE},keystone] uwsgi
+ if use_library_from_git "gnocchi"; then
+ # we need to git clone manually to ensure that the git repo is added
+ # to the global git repo list and ensure its cloned as the current user
+ # not as root.
+ git_clone ${GNOCCHI_REPO} ${GNOCCHI_DIR} ${GNOCCHI_BRANCH}
+ pip_install -e ${GNOCCHI_DIR}[redis,${DATABASE_TYPE},keystone] uwsgi
else
pip_install gnocchi[redis,${DATABASE_TYPE},keystone] uwsgi
fi
diff --git a/devstack/settings b/devstack/settings
index 142ecf7b..1e503344 100644
--- a/devstack/settings
+++ b/devstack/settings
@@ -16,9 +16,11 @@ if [ "$CEILOMETER_BACKEND" = "gnocchi" ]; then
enable_service gnocchi-api gnocchi-metricd
fi
+
+GNOCCHI_DIR=${GNOCCHI_DIR:-${DEST}/gnocchi}
+GNOCCHI_BRANCH=${GNOCCHI_BRANCH:-"master"}
+GNOCCHI_REPO=${GNOCCHI_REPO:-https://github.com/gnocchixyz/gnocchi}
# Gnocchi default archive_policy for Ceilometer
-# TODO(sileht): when Gnocchi 4.0 is out use the tarball instead
-GNOCCHI_GIT_PATH=${GNOCCHI_GIT_PATH:-git+https://github.com/gnocchixyz/gnocchi#egg=gnocchi}
if [ -n "$GNOCCHI_ARCHIVE_POLICY_TEMPEST" ]; then
GNOCCHI_ARCHIVE_POLICY=$GNOCCHI_ARCHIVE_POLICY_TEMPEST
else