-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ceph-dashboard-* jobs: Install Prometheus and Alertmanager
In order to test the alert configuration within the dashboard (e2e tests) we need to have Prometheus and Alertmanager running on the system. Added a new script which takes care of the installation and running Prometheus and Alertmanager in the background. Added the script only to the dashboard e2e Jenkins job (for the time being), the processes will be killed at the end of the job. Signed-off-by: Laura Paduano <[email protected]>
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/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/alertmanager-0.20.0.linux-amd64 | ||
|
||
sudo ./alertmanager & | ||
|
||
# "pkill prometheus" and "pkill alertmanager" must be executed in the Jenkins job that uses this script |