Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ceph-dashboard-* jobs: Install Prometheus and Alertmanager #1497

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,6 @@
- shell:
!include-raw:
- ../../../scripts/dashboard/install-e2e-test-deps.sh
- ../../../scripts/dashboard/install-prometheus-and-alertmanager.sh
- shell: "cd src/pybind/mgr/dashboard; timeout 7200 ./run-frontend-e2e-tests.sh"
- shell: pkill prometheus && pkill alertmanager
27 changes: 27 additions & 0 deletions scripts/dashboard/install-prometheus-and-alertmanager.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

set -ex

# Install and run Prometheus
# Use $WORKSPACE dir since it will be wiped after the job has completed
cd $WORKSPACE
sudo mkdir prometheus
cd prometheus
sudo curl -LO https://github.com/prometheus/prometheus/releases/download/v2.15.2/prometheus-2.15.2.linux-amd64.tar.gz
sudo tar xf prometheus-2.15.2.linux-amd64.tar.gz
cd prometheus-2.15.2.linux-amd64

sudo ./prometheus &

cd $WORKDIR

# Install and run Alertmanager
sudo mkdir alertmanager
cd alertmanager
sudo curl -LO https://github.com/prometheus/alertmanager/releases/download/v0.20.0/alertmanager-0.20.0.linux-amd64.tar.gz
sudo tar xf alertmanager-0.20.0.linux-amd64.tar.gz
cd alertmanager-0.20.0.linux-amd64

sudo ./alertmanager &

# "pkill prometheus" and "pkill alertmanager" must be executed in the Jenkins job that uses this script