gnunet-svn
[Top][All Lists]
Advanced

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

[taler-grid5k] 161/189: add centos image


From: gnunet
Subject: [taler-grid5k] 161/189: add centos image
Date: Thu, 28 Apr 2022 10:48:51 +0200

This is an automated email from the git hooks/post-receive script.

marco-boss pushed a commit to branch master
in repository grid5k.

commit 9277752bbe6fd15fbfc1b6af45c360fd99426557
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Wed Apr 20 09:21:00 2022 +0200

    add centos image
---
 docker/README.md     |  1 +
 docker/entrypoint.sh | 30 ++++++++++++++++++------------
 2 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/docker/README.md b/docker/README.md
index 44af46d..325a939 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -78,6 +78,7 @@ docker-compose run --entrypoint /bin/bash taler-build
 **ARGUMENTS**: args to pass to entrypoint, one of 
   -r|--rebuild (rebuild the image)
   -n|--no-copy (do not copy the generated image to Grid5000 - make sure output 
volume is mounted)
+  --centos     (build the centos8 image instead of the default debian11)
  As per default, running the docker command again will not clean or rebuild 
the image
 
 ##### Additional
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index 21ecd8f..f21ed14 100644
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -5,6 +5,8 @@
 
 set -e
 
+IMAGE=debian11
+
 while [[ $# -gt 0 ]]; do
   case "$1" in 
     -r|--rebuild)
@@ -17,6 +19,10 @@ while [[ $# -gt 0 ]]; do
       echo "INFO will not copy image to Grid5000"
       shift
       ;;
+    --centos)
+      IMAGE="centos8"
+      shift
+      ;;
     *)
       shift
       ;;
@@ -85,18 +91,18 @@ prepare grid5k "${GRID5K_COMMIT_SHA}"
 
 # Test if the image specification is correct
 run_command \
-    "kameleon dryrun -g g5k_user:${G5K_USER} 
${TALER_HOME}/grid5k/image/taler-debian11.yaml" \
+    "kameleon dryrun -g g5k_user:${G5K_USER} 
${TALER_HOME}/grid5k/image/${IMAGE}/taler-${IMAGE}.yaml" \
     "dryrun.log"
 
-cd ${TALER_HOME}/grid5k/image
+cd ${TALER_HOME}/grid5k/image/${IMAGE}
 
-if [ ! -f "build/taler-debian11/taler-debian11.tar.zst" ] || \
+if [ ! -f "build/taler-${IMAGE}/taler-${IMAGE}.tar.zst" ] || \
    [ "$REBUILD" = true ];
 then
-  rm -rf /tmp/taler-debian11 ${TALER_HOME}/taler-debian11 || true
+  rm -rf /tmp/taler-${IMAGE} ${TALER_HOME}/taler-${IMAGE} || true
   echo "INFO building image"
   yes r | kameleon build \
-          -b /tmp taler-debian11.yaml \
+          -b /tmp taler-${IMAGE}.yaml \
           -g gnunet_commit_sha:${GNUNET_COMMIT_SHA:-master} \
              exchange_commit_sha:${EXCHANGE_COMMIT_SHA:-master} \
              merchant_commit_sha:${MERCHANT_COMMIT_SHA:-master} \
@@ -108,14 +114,14 @@ then
             merchant_cflags:"${MERCHANT_CFLAGS:--O2}" \
              g5k_user:${GRID5K_USER} \
        | tee build.log
-  mv /tmp/taler-debian11 ${TALER_HOME}
+  mv /tmp/taler-${IMAGE} ${TALER_HOME}
 fi
 
-cd ${TALER_HOME}/taler-debian11
+cd ${TALER_HOME}/taler-${IMAGE}
 
 if [ -f "/root/cert.pem" ] && [ "$COPY" != false ]; then
 
-  mv taler-debian11.dsc taler-debian11.dsc.bak
+  mv taler-${IMAGE}.dsc taler-${IMAGE}.dsc.bak
   
   IFS=, read -ra G5K_HOSTS <<< "${GRID5K_DEST}" 
 
@@ -123,9 +129,9 @@ if [ -f "/root/cert.pem" ] && [ "$COPY" != false ]; then
     echo "Copying image to ${G5K_HOST}"
 
     sed "/g5k_tar_path/s/lyon/${G5K_HOST}/g" \
-        taler-debian11.dsc.bak > taler-debian11.dsc
+        taler-${IMAGE}.dsc.bak > taler-${IMAGE}.dsc
 
-    scp -o StrictHostKeyChecking=no taler-debian11.tar.zst taler-debian11.dsc \
+    scp -o StrictHostKeyChecking=no taler-${IMAGE}.tar.zst taler-${IMAGE}.dsc \
         "${GRID5K_USER}@access.grid5000.fr:${G5K_HOST}"/public/
   done 
 
@@ -133,6 +139,6 @@ fi
 
 if [ -d "/root/output" ]; then
   echo "INFO copying image to output (mounted volume)" 
-  mv taler-debian11.dsc.bak taler-debian11.dsc || true
-  cp taler-debian11.tar.zst taler-debian11.dsc /root/output/ 
+  mv taler-${IMAGE}.dsc.bak taler-${IMAGE}.dsc || true
+  cp taler-${IMAGE}.tar.zst taler-${IMAGE}.dsc /root/output/ 
 fi

-- 
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]