[ARVADOS] updated: 1.3.0-2497-g79e2f32bc

Git user git at public.arvados.org
Thu Apr 16 23:53:40 UTC 2020


Summary of changes:
 lib/boot/example.sh | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100755 lib/boot/example.sh

       via  79e2f32bc15609555894ff344fdc3229ba69f746 (commit)
      from  91aeea6d741f2bec6ecdc32d24537cf0f2a7328a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 79e2f32bc15609555894ff344fdc3229ba69f746
Author: Tom Clegg <tom at tomclegg.ca>
Date:   Thu Apr 16 19:52:47 2020 -0400

    Add example of scripting arvados-server boot.
    
    No issue #
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at tomclegg.ca>

diff --git a/lib/boot/example.sh b/lib/boot/example.sh
new file mode 100755
index 000000000..c6a66e337
--- /dev/null
+++ b/lib/boot/example.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+# Example of using `arvados-server boot` in a script. Bring up a test
+# cluster, wait for it to come up, fetch something from its discovery
+# doc, and shut down.
+
+set -e -o pipefail
+
+cleanup() {
+    set -x
+    kill ${boot_PID} ${consume_stdout_PID}
+    wait ${boot_PID} ${consume_stdout_PID} || true
+    echo >&2 "done"
+}
+
+coproc boot (arvados-server boot -type test -config doc/examples/config/zzzzz.yml -own-temporary-database -timeout 20m)
+trap cleanup ERR EXIT
+
+read controllerURL <&"${boot[0]}"
+
+# Copy coproc's stdout to stderr, to ensure `arvados-server boot`
+# doesn't get blocked trying to write stdout.
+exec 7<&"${boot[0]}"; coproc consume_stdout (cat <&7 >&2)
+
+keepwebURL=$(curl --silent --fail --insecure "${controllerURL}/discovery/v1/apis/arvados/v1/rest" | jq -r .keepWebServiceUrl)
+echo >&2 "controller is at $controllerURL"
+echo >&2 "keep-web is at $keepwebURL"

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list