[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-grid5k] 55/73: db disk mount
From: |
gnunet |
Subject: |
[taler-grid5k] 55/73: db disk mount |
Date: |
Tue, 14 Dec 2021 15:10:37 +0100 |
This is an automated email from the git hooks/post-receive script.
marco-boss pushed a commit to branch master
in repository grid5k.
commit d8cabd2cf5e5ee8663cac73400697fc3b66a29d6
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Wed Dec 8 15:00:36 2021 +0100
db disk mount
---
experiment/scripts/database.sh | 13 +++++++++++++
experiment/scripts/monitor.sh | 10 +++++++---
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/experiment/scripts/database.sh b/experiment/scripts/database.sh
index 8f83a8f..76ebd43 100755
--- a/experiment/scripts/database.sh
+++ b/experiment/scripts/database.sh
@@ -6,6 +6,18 @@ source ~/scripts/helpers.sh
# move to tmp to prevent change dir errors
cd /tmp
+function setup_disks() {
+ if [[ "$(hostname)" =~ "dahu" ]]; then
+ mkdir /mnt/sdb || true
+ mount /dev/sdb /mnt/sdb || true
+ if [ ! -L /var/lib/postgresql/13/main/pg_wal ]; then
+ mv /var/lib/postgresql/13/main/pg_wal/ /mnt/sdb
+ ln -s /mnt/sdb/pg_wal /var/lib/postgresql/13/main/pg_wal
+ chown -R postgres:postgres /var/lib/postgresql/13/main/pg_wal/
+ fi
+ fi
+}
+
function setup_config() {
sed -i "s\<DB_URL_HERE>\postgresql:///${DB_NAME}\g" \
/etc/taler/secrets/exchange-db.secret.conf
@@ -90,6 +102,7 @@ function setup_config() {
if [[ "$1" == "init" ]]; then
setup_config
+ setup_disks
fi
systemctl restart postgresql
diff --git a/experiment/scripts/monitor.sh b/experiment/scripts/monitor.sh
index 7e779c9..90f9fcf 100755
--- a/experiment/scripts/monitor.sh
+++ b/experiment/scripts/monitor.sh
@@ -68,7 +68,7 @@ function add_wallet_nodes_to_prometheus() {
fi
}
-function add_exchange_nodes_to_prometheus() {
+function add_exchanges_to_prometheus() {
if [[ "$1" == "init" ]]; then
cat /etc/monitor/exchange-exporters.yaml.tpl >>
/etc/monitor/prometheus.yaml
fi
@@ -93,11 +93,14 @@ function init() {
wait_for_db
- add_wallet_nodes_to_prometheus "init"
-
# Proxy takes longer to start
wait_for_keys "${PROXY_DOMAIN}"
+ # Wait that the nginx proxy has the exchanges configured
+ sleep 1
+ add_wallet_nodes_to_prometheus "init"
+ add_exchanges_to_prometheus "init"
+
systemctl restart prometheus-nginx-exporter \
prometheus-postgres-exporter
@@ -107,6 +110,7 @@ if [[ "$1" == "init" ]]; then
init
else
add_wallet_nodes_to_prometheus ""
+ add_exchanges_to_prometheus ""
fi
systemctl restart prometheus
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-grid5k] 16/73: fix wallet build - broken on master, (continued)
- [taler-grid5k] 16/73: fix wallet build - broken on master, gnunet, 2021/12/14
- [taler-grid5k] 61/73: refactor db.sh, gnunet, 2021/12/14
- [taler-grid5k] 30/73: increase default pool size, gnunet, 2021/12/14
- [taler-grid5k] 43/73: update config of db and exch, gnunet, 2021/12/14
- [taler-grid5k] 44/73: -resolve conflict, gnunet, 2021/12/14
- [taler-grid5k] 41/73: update installer script, gnunet, 2021/12/14
- [taler-grid5k] 54/73: enable huge_pages, implement exchange scrape logic, gnunet, 2021/12/14
- [taler-grid5k] 48/73: update install script, gnunet, 2021/12/14
- [taler-grid5k] 37/73: bootstrap seems to work with sudo, gnunet, 2021/12/14
- [taler-grid5k] 47/73: fix stupid bug and fix arguments for bank, gnunet, 2021/12/14
- [taler-grid5k] 55/73: db disk mount,
gnunet <=
- [taler-grid5k] 42/73: fix setup.sh, gnunet, 2021/12/14
- [taler-grid5k] 50/73: note about postgres huge pages, gnunet, 2021/12/14
- [taler-grid5k] 39/73: fix typo, gnunet, 2021/12/14
- [taler-grid5k] 60/73: fix logbackup so it gets rotated correctly, gnunet, 2021/12/14
- [taler-grid5k] 57/73: improve wallet script, gnunet, 2021/12/14
- [taler-grid5k] 58/73: sanitize scripts, gnunet, 2021/12/14
- [taler-grid5k] 36/73: Update image build, add install script to install taler binaries in running experiment, gnunet, 2021/12/14
- [taler-grid5k] 63/73: fix, gnunet, 2021/12/14
- [taler-grid5k] 46/73: remove previous builds, gnunet, 2021/12/14
- [taler-grid5k] 62/73: fix monitor, gnunet, 2021/12/14