Skip to content

Upgrade CouchDB and prometheus export to newer versions; adjust aux files#1641

Open
vkuznet wants to merge 2 commits intodmwm:masterfrom
vkuznet:wmcore_issue_12127
Open

Upgrade CouchDB and prometheus export to newer versions; adjust aux files#1641
vkuznet wants to merge 2 commits intodmwm:masterfrom
vkuznet:wmcore_issue_12127

Conversation

@vkuznet
Copy link
Copy Markdown
Collaborator

@vkuznet vkuznet commented Aug 20, 2025

This PR upgrades:

  • CouchDB to version 3.4.1
  • Prometheus CouchDB exporter to version 30.14.0
  • setup couchapp into virtual environment as Debian distributions prohibit installation of 3rd party python packages in system area
  • adjust manage script to use couchdapp from virtual environment

Copy link
Copy Markdown
Member

@arooshap arooshap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Copy link
Copy Markdown
Contributor

@amaltaro amaltaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vkuznet I left a few comments along the code.

In addition, let us please not merge this until we can verify that CouchDB works well - AND that manage script is still functional, explicitly:

  • we can run couchapp to deploy WMCore code
  • we can run status/stop/start/restart (for this, I think a restart/stop will kill the container, but that is another problem...)
    Thanks!

Comment thread docker/couchdb/Dockerfile
# - option A: install with (potential) break of system packages
# RUN pip install --break-system-packages CMSCouchapp
# - option B: install in virtual environment
RUN apt install -y python3.11-venv
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why python3.11? Is it the base python version that gets installed with apt-get?

BTW, do we still have to install python? Or does it come with the CouchDB vanilla image?

Comment thread docker/couchdb/Dockerfile
RUN curl -ksLO https://github.com/gesellix/couchdb-prometheus-exporter/releases/download/v27.0.0/couchdb-prometheus-exporter_27.0.0_Linux_x86_64.tar.gz
RUN tar xfz couchdb-prometheus-exporter_27.0.0_Linux_x86_64.tar.gz
RUN rm couchdb-prometheus-exporter_27.0.0_Linux_x86_64.tar.gz LICENSE README*.md
ARG VER=30.14.0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest moving this argument variable to the top of the file and rename it to a more meaningful name (EXPORTER_VER ?).

Comment thread docker/couchdb/monitor.sh

# start couchdb exporter
COUCH_CONFIG=/data/srv/current/auth/couchdb/couchdb_config.ini
export COUCHDB_NODE_NAME="couchdb@$(hostname)"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you removing this line? Do you have to rebase this branch?

Comment thread docker/couchdb/monitor.sh
nohup couchdb-prometheus-exporter -telemetry.address=":9984" -logtostderr=true \
--config=$COUCH_CONFIG -databases.views=false --databases=_all_dbs 2>&1 1>& couchdb_exporter.log < /dev/null &
#sudo cp /etc/secrets/$fname /data/srv/current/auth/$srv/$fname
#sudo chown $USER.$USER /data/srv/current/auth/$srv/$fname
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why secrets are removed? I think it is needed to be able to query CouchDB and collect the metrics.

…tallation candidate and PEP 668 error which prevents installing external (Python packages from pip) on Debian system
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants