diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-09-02 12:41:38 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-09-02 12:41:38 +0200 |
commit | 1015ca9e02315f13e23b4b441ceb77284f2f2f4b (patch) | |
tree | 681e2570249129a9aa6544a224bff79afee2cfc0 | |
parent | 4234a2882f0812be37721b6b7a58156260d52379 (diff) | |
download | grid5k-1015ca9e02315f13e23b4b441ceb77284f2f2f4b.tar.gz grid5k-1015ca9e02315f13e23b4b441ceb77284f2f2f4b.tar.bz2 grid5k-1015ca9e02315f13e23b4b441ceb77284f2f2f4b.zip |
plan for in-grid updates
-rw-r--r-- | README | 5 | ||||
-rw-r--r-- | at-boot.sh | 9 | ||||
-rw-r--r-- | debian10-taler.yaml | 13 | ||||
-rw-r--r-- | etc/.empty | 0 | ||||
-rw-r--r-- | gridboot.service | 13 | ||||
-rw-r--r-- | steps/setup/#taler_install.yaml# | 2 | ||||
l--------- | steps/setup/.#taler_install.yaml | 2 | ||||
-rw-r--r-- | update.sh | 9 |
8 files changed, 50 insertions, 3 deletions
@@ -0,0 +1,5 @@ +Use + +$ kameleon build debian10-taler.yaml --enable-cache + +to build the image. diff --git a/at-boot.sh b/at-boot.sh new file mode 100644 index 0000000..1764cc5 --- /dev/null +++ b/at-boot.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# Run by the gridboot.service at boot. Updates +# the grid5k.git and then runs a script from that +# Git. +# +cd /root/grid5k +git pull +chmod +x update.sh +exec update.sh diff --git a/debian10-taler.yaml b/debian10-taler.yaml index 615cea5..86f804d 100644 --- a/debian10-taler.yaml +++ b/debian10-taler.yaml @@ -36,7 +36,7 @@ global: # g5k_kernel_params: "" ## Environment visibility # g5k_visibility: "shared" - other_packages_no_clean: nginx postgresql-13 taler-exchange taler-auditor taler-merchant taler-exchange-offline taler-wallet-cli sudo + other_packages_no_clean: nginx postgresql-13 taler-exchange taler-auditor taler-merchant taler-exchange-offline taler-wallet-cli sudo git zile ## Other parameters can be changed, see kameleon info debian10-taler.yaml @@ -55,7 +55,16 @@ setup: ## The following is given as example only, replace with your steps. - a_customization_step: - microstep1: - - exec_in: echo "Hello world!" + - exec_in: | + cd /root + git clone git://git.taler.net/grid5k.git + cp grid5k/gridboot.service /etc/systemd/system/gridboot.service + chmod 640 /etc/systemd/system/gridboot.service + cp grid5k/at-boot.sh /usr/local/bin/at-boot.sh + chmod +x /usr/local/bin/at-boot.sh + systemctl daemon-reload + systemctl enable gridboot + - microstep1: # This breakpoint will stop the build for inspecting the environment - breakpoint diff --git a/etc/.empty b/etc/.empty new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/etc/.empty diff --git a/gridboot.service b/gridboot.service new file mode 100644 index 0000000..59fd8ee --- /dev/null +++ b/gridboot.service @@ -0,0 +1,13 @@ +[Unit] +Description=Modify image based on grid5k Git on boot + +Wants=network.target +After=syslog.target network-online.target + +[Service] +Type=oneshot +ExecStart=/usr/local/bin/at-boot.sh +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/steps/setup/#taler_install.yaml# b/steps/setup/#taler_install.yaml# index b28de9d..f1ff167 100644 --- a/steps/setup/#taler_install.yaml# +++ b/steps/setup/#taler_install.yaml# @@ -5,3 +5,5 @@ apt-get update apt-upgrade apt-get install -y nginx postgresql-13 taler-exchange taler-auditor taler-merchant taler-exchange-offline taler-wallet-cli + apt-get install git zile +
\ No newline at end of file diff --git a/steps/setup/.#taler_install.yaml b/steps/setup/.#taler_install.yaml index 2a29569..61fbcde 120000 --- a/steps/setup/.#taler_install.yaml +++ b/steps/setup/.#taler_install.yaml @@ -1 +1 @@ -grothoff@lifeline.7254:1630226585
\ No newline at end of file +grothoff@lifeline.32428:1630569155
\ No newline at end of file diff --git a/update.sh b/update.sh new file mode 100644 index 0000000..bce9ea6 --- /dev/null +++ b/update.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# Script run when a machine boots. (Always this +# latest version from Git). +set -eu + +# Override default /etc/ with the one from this Git. +cp -r /root/grid5k/etc/* /etc + +exit 0 |