gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-grid5k] 27/141: update dns config and scripts


From: gnunet
Subject: [taler-grid5k] 27/141: update dns config and scripts
Date: Thu, 18 Nov 2021 14:49:28 +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 3a22360b387d281df008acd49860900d440b38c4
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Sat Oct 9 14:06:51 2021 +0200

    update dns config and scripts
---
 configs/etc/bind/named.conf.options | 20 +++++++++----------
 configs/var/lib/bind/perf.taler     |  2 +-
 experiment/scripts/database.sh      | 13 ++++++-------
 experiment/scripts/dns.sh           | 12 ++++++++++++
 experiment/scripts/proxy.sh         |  2 +-
 experiment/setup.sh                 | 28 ++++++++++----------------
 experiment/taler-perf-any.rspec     | 39 +++++++++++++++++++++++++++++++++++++
 image/notes.txt => notes.txt        |  4 ++++
 8 files changed, 83 insertions(+), 37 deletions(-)

diff --git a/configs/etc/bind/named.conf.options 
b/configs/etc/bind/named.conf.options
index b3c6db8..3646662 100644
--- a/configs/etc/bind/named.conf.options
+++ b/configs/etc/bind/named.conf.options
@@ -1,16 +1,16 @@
+acl grid5000 {
+        172.16.0.0/12;
+};
+
 options {
-       directory "/var/cache/bind";
+        directory "/var/cache/bind";
 
-       //forwarders {
-       //    8.8.8.8;
-       //};
+        allow-query { grid5000; };
+        allow-update { grid5000; };
 
-       dnssec-validation auto;
-       
-       //recursion yes;
+        dnssec-validation auto;
 
-       rrset-order { order random; };
+        rrset-order { order random; };
 
-       listen-on-v6 { any; };
+        listen-on-v6 { any; };
 };
-
diff --git a/configs/var/lib/bind/perf.taler b/configs/var/lib/bind/perf.taler
index e691a0a..6846c58 100644
--- a/configs/var/lib/bind/perf.taler
+++ b/configs/var/lib/bind/perf.taler
@@ -1,5 +1,5 @@
 $ORIGIN .
-$TTL 60 ; 1 minute
+$TTL 60 ; 
 perf.taler IN SOA ns1.perf.taler. admin.perf.taler. (
     202110031;
     604800;
diff --git a/experiment/scripts/database.sh b/experiment/scripts/database.sh
index 010dace..ac33ba4 100755
--- a/experiment/scripts/database.sh
+++ b/experiment/scripts/database.sh
@@ -5,26 +5,25 @@ sed -i "s\<DB_URL_HERE>\postgresql:///${DB_NAME}\g" \
        /etc/taler/secrets/exchange-db.secret.conf
 
 echo "listen_addresses='*'" >> /etc/postgresql/13/main/postgresql.conf
-echo "host all all 172.16.0.0/16 md5" >> /etc/postgresql/13/main/pg_hba.conf
+echo "host all all 172.16.0.0/12 md5" >> /etc/postgresql/13/main/pg_hba.conf
 
 systemctl start postgresql
 
 su postgres << EOF
 createuser taler-exchange-httpd
 createdb -O taler-exchange-httpd ${DB_NAME}
-psql 
-create user "${DB_USER}" with encrypted password '${DB_PASSWORD}';
 EOF
 
 sudo -u taler-exchange-httpd taler-exchange-dbinit
 
+su postgres << EOF
+psql 
+create user "${DB_USER}" with encrypted password '${DB_PASSWORD}';
+EOF
+
 su taler-exchange-httpd -s /bin/bash << EOF
 psql -d "${DB_NAME}"
 GRANT SELECT,INSERT,UPDATE ON ALL TABLES IN SCHEMA public TO "${DB_USER}";
-GRANT SELECT,INSERT,UPDATE ON ALL TABLES IN SCHEMA public TO "${DB_USER}";
-GRANT SELECT,INSERT,UPDATE ON ALL TABLES IN SCHEMA public TO "${DB_USER}";
-GRANT USAGE ON ALL SEQUENCES IN SCHEMA public TO "${DB_USER}";
-GRANT USAGE ON ALL SEQUENCES IN SCHEMA public TO "${DB_USER}";
 GRANT USAGE ON ALL SEQUENCES IN SCHEMA public TO "${DB_USER}";
 EOF
 
diff --git a/experiment/scripts/dns.sh b/experiment/scripts/dns.sh
index 191e8f0..173f0c5 100755
--- a/experiment/scripts/dns.sh
+++ b/experiment/scripts/dns.sh
@@ -6,4 +6,16 @@ sed -i "s/<DNS_KEY_HERE>/${DNS_HMAC_SHA256}/g" \
 
 systemctl restart named.service
 
+# Delete all old dns entries of the experitment
+while IFS='=' read -r name value; do
+  if [[ $name == *"_DOMAIN" && $value == *".${DNS_ZONE}" ]]; then 
+    nsupdate -k /root/ddns.key -v << EOF
+server ${NS_IP}
+zone ${DNS_ZONE}
+update delete ${value} A
+send
+EOF
+  fi
+done < <(env)
+
 exit 0
diff --git a/experiment/scripts/proxy.sh b/experiment/scripts/proxy.sh
index cad6cb3..ebb851b 100755
--- a/experiment/scripts/proxy.sh
+++ b/experiment/scripts/proxy.sh
@@ -6,7 +6,7 @@ sed "s\<EXCHANGE_URL_HERE>\http://${EXCHANGE_DOMAIN}\g"; \
 
 # Nginx does not start until the destination server is reachable - wait here 
 # nginx: [emerg] host not found in upstream "exch.perf.taler" ...
-until wget http://${PROXY_DOMAIN}/management/keys \
+until wget http://${EXCHANGE_DOMAIN}/management/keys \
        --spider \
        -q;
 do
diff --git a/experiment/setup.sh b/experiment/setup.sh
index 3ee2687..faa25c5 100755
--- a/experiment/setup.sh
+++ b/experiment/setup.sh
@@ -12,6 +12,7 @@ PROXY_DOMAIN=proxy.${DNS_ZONE}
 EXCHANGE_DOMAIN=exch.${DNS_ZONE}
 DATABASE_DOMAIN=db.${DNS_ZONE}
 BANK_DOMAIN=bank.${DNS_ZONE}
+DNS_DOMAIN=dns.${DNS_ZONE}
 
 NS_IP=$(host ${DNS_HOST} | sed -n 1p | awk '{print $4}')
 
@@ -36,35 +37,25 @@ rm /etc/nginx/sites-enabled/default > /dev/null 2>&1 || true
 cp -r "${G5K_HOME}"/configs/etc/* /etc
 cp -r "${G5K_HOME}"/configs/var/* /var
 
-if [[ "${HOSTNAME}" != "${DNS_HOST}" ]]; then
-
-  # Add the dyndns key which will be used by the dns update
-  cat << EOF > /root/ddns.key 
+# Add the dyndns key which will be used by the dns update
+cat << EOF > /root/ddns.key 
 key "ddns-key.perf.taler" {
   algorithm hmac-sha256;
   secret "${DNS_HMAC_SHA256}";
 };
 EOF
 
+if [[ "${HOSTNAME}" != "${DNS_HOST}" ]]; then
+
   if ! grep -Fxq "nameserver ${NS_IP}" /etc/resolv.conf ; then
     sed -i "3i\\
 nameserver ${NS_IP}" /etc/resolv.conf
   fi
 
-  # Delete all old dns entries of the experitment
-  while IFS='=' read -r name value; do
-    if [[ $name == *"_DOMAIN" && $value == *".${DNS_ZONE}" ]]; then 
-      nsupdate -k /root/ddns.key -v << EOF
-server ${NS_IP}
-zone ${DNS_ZONE}
-update delete ${value} A
-send
-EOF
-    fi
-  done < <(env)
-
-  # wait for the dns to be initialized before continuing
-  sleep 5
+  until host -r "${DNS_DOMAIN}"; do
+    echo "DNS not ready yet"
+    sleep 1
+  done
 
   case "${HOSTNAME}" in 
     ${BANK_HOSTS}) 
@@ -96,6 +87,7 @@ EOF
 else
   echo "DNS"
   exec ~/scripts/dns.sh
+  set_ddn ${DNS_DOMAIN}
 fi
 
 exit 0
diff --git a/experiment/taler-perf-any.rspec b/experiment/taler-perf-any.rspec
new file mode 100644
index 0000000..245ed53
--- /dev/null
+++ b/experiment/taler-perf-any.rspec
@@ -0,0 +1,39 @@
+<?xml version='1.0'?>
+<rspec xmlns="http://www.geni.net/resources/rspec/3"; type="request" 
generated_by="jFed RSpec Editor" generated="2021-10-07T21:58:38.715+02:00" 
xmlns:emulab="http://www.protogeni.net/resources/rspec/ext/emulab/1"; 
xmlns:delay="http://www.protogeni.net/resources/rspec/ext/delay/1"; 
xmlns:jfed-command="http://jfed.iminds.be/rspec/ext/jfed-command/1"; 
xmlns:client="http://www.protogeni.net/resources/rspec/ext/client/1"; 
xmlns:jfed-ssh-keys="http://jfed.iminds.be/rspec/ext/jfed-ssh-keys/1"; xmlns: 
[...]
+  <node client_id="DB" exclusive="true" 
component_manager_id="urn:publicid:IDN+am.grid5000.fr+authority+am">
+    <sliver_type name="raw-pc">
+      <disk_image 
name="http://public.lyon.grid5000.fr/~bfhch01/taler-debian11.dsc"/>
+    </sliver_type>
+    <location xmlns="http://jfed.iminds.be/rspec/ext/jfed/1"; x="514.0" 
y="84.5"/>
+  </node>
+  <node client_id="Exchange" exclusive="true" 
component_manager_id="urn:publicid:IDN+am.grid5000.fr+authority+am">
+    <sliver_type name="raw-pc">
+      <disk_image 
name="http://public.lyon.grid5000.fr/~bfhch01/taler-debian11.dsc"/>
+    </sliver_type>
+    <location xmlns="http://jfed.iminds.be/rspec/ext/jfed/1"; x="607.0" 
y="188.5"/>
+  </node>
+  <node client_id="Wallet" exclusive="true" 
component_manager_id="urn:publicid:IDN+am.grid5000.fr+authority+am">
+    <sliver_type name="raw-pc">
+      <disk_image 
name="http://public.lyon.grid5000.fr/~bfhch01/taler-debian11.dsc"/>
+    </sliver_type>
+    <location xmlns="http://jfed.iminds.be/rspec/ext/jfed/1"; x="607.5" 
y="347.5"/>
+  </node>
+  <node client_id="Bank" exclusive="true" 
component_manager_id="urn:publicid:IDN+am.grid5000.fr+authority+am">
+    <sliver_type name="raw-pc">
+      <disk_image 
name="http://public.lyon.grid5000.fr/~bfhch01/taler-debian11.dsc"/>
+    </sliver_type>
+    <location xmlns="http://jfed.iminds.be/rspec/ext/jfed/1"; x="699.0" 
y="82.5"/>
+  </node>
+  <node client_id="DNS" exclusive="true" 
component_manager_id="urn:publicid:IDN+am.grid5000.fr+authority+am">
+    <sliver_type name="raw-pc">
+      <disk_image 
name="http://public.lyon.grid5000.fr/~bfhch01/taler-debian11.dsc"/>
+    </sliver_type>
+    <location xmlns="http://jfed.iminds.be/rspec/ext/jfed/1"; x="920.0" 
y="142.5"/>
+  </node>
+  <node client_id="Exch-Proxy" exclusive="true" 
component_manager_id="urn:publicid:IDN+am.grid5000.fr+authority+am">
+    <sliver_type name="raw-pc">
+      <disk_image 
name="http://public.lyon.grid5000.fr/~bfhch01/taler-debian11.dsc"/>
+    </sliver_type>
+    <location xmlns="http://jfed.iminds.be/rspec/ext/jfed/1"; x="603.5" 
y="226.5"/>
+  </node>
+</rspec>
\ No newline at end of file
diff --git a/image/notes.txt b/notes.txt
similarity index 50%
rename from image/notes.txt
rename to notes.txt
index 48bf03c..80beb10 100644
--- a/image/notes.txt
+++ b/notes.txt
@@ -2,3 +2,7 @@
   not properly documented, forced us to hunt down why explictily
   installed packages were removed again after the setup step
   (found in grid5000/steps/setup/debian/clean_unnecessary_packages.yaml)
+* jFed: Reserve not working for grid5000 resources
+* jFed: Error do not clearly show which nodes failed allocating
+  its hard to detect problems when using many nodes - should be clearer
+* jFed: Changing Node or HW type does sometimes not apply and is not saved

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]