From ec1463806a3a111f6dbebd8616dcc69f1d324abe Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Fri, 12 Jul 2024 11:41:57 -0400 Subject: [PATCH] Provide more guidance for using arvbox the first time. When arvbox is ready, now provides more information about things that need to be done before you log in to arvbox workbench. Also add a workbench banner with text and links to the Arvados docs, based on the playground banner. no issue # Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- tools/arvbox/bin/arvbox | 29 +- .../lib/arvbox/docker/cluster-config.sh | 8 + .../docker/service/banner/log/main/.gitstub | 0 .../lib/arvbox/docker/service/banner/log/run | 1 + .../lib/arvbox/docker/service/banner/run | 9 + .../arvbox/docker/service/banner/run-service | 469 ++++++++++++++++++ .../arvbox/docker/service/ready/run-service | 4 + 7 files changed, 515 insertions(+), 5 deletions(-) create mode 100644 tools/arvbox/lib/arvbox/docker/service/banner/log/main/.gitstub create mode 120000 tools/arvbox/lib/arvbox/docker/service/banner/log/run create mode 100755 tools/arvbox/lib/arvbox/docker/service/banner/run create mode 100755 tools/arvbox/lib/arvbox/docker/service/banner/run-service diff --git a/tools/arvbox/bin/arvbox b/tools/arvbox/bin/arvbox index 13583ba288..f71ac404ff 100755 --- a/tools/arvbox/bin/arvbox +++ b/tools/arvbox/bin/arvbox @@ -116,11 +116,34 @@ wait_for_arvbox() { done < $FF rm $FF echo + if test -n "$localip" ; then echo "export ARVADOS_API_HOST=$localip:8000" else echo "export ARVADOS_API_HOST=$(gethost):8000" fi + echo + + echo "NOTE: Arvbox uses a self-signed certificate for its HTTPS endpoint." + echo + echo "When connecting to Workbench for the first time, you will likely get an error titled:" + echo " 'Your connection is not private' or 'Potential security risk'" + echo "This mean you need to install the private root certificate that was generated for" + echo "this arvbox instance." + echo + echo "Use 'arvbox root-cert' to get the certificate file, then import it into the" + echo "certificate store for your browser and operating system." + echo + echo "For detailed instructions see:" + echo " https://doc.arvados.org/v2.7/install/arvbox.html#root-cert" + echo + + if [[ "$(listusers)" =~ ^\{\} ]] ; then + echo "NOTE: No users defined, use 'arvbox adduser' to add user logins" + else + echo "Use 'arvbox listusers' to see user logins" + fi + echo } docker_run_dev() { @@ -307,13 +330,9 @@ run() { arvados/arvbox-dev$TAG updateconf wait_for_arvbox + echo echo "The Arvados source code is checked out at: $ARVADOS_ROOT" echo "The Arvados testing root certificate is $VAR_DATA/root-cert.pem" - if [[ "$(listusers)" =~ ^\{\} ]] ; then - echo "No users defined, use 'arvbox adduser' to add user logins" - else - echo "Use 'arvbox listusers' to see user logins" - fi else echo "Unknown configuration '$CONFIG'" fi diff --git a/tools/arvbox/lib/arvbox/docker/cluster-config.sh b/tools/arvbox/lib/arvbox/docker/cluster-config.sh index d07fc3d34d..0839ac6138 100755 --- a/tools/arvbox/lib/arvbox/docker/cluster-config.sh +++ b/tools/arvbox/lib/arvbox/docker/cluster-config.sh @@ -46,6 +46,11 @@ if ! test -s $ARVADOS_CONTAINER_PATH/vm-uuid ; then fi vm_uuid=$(cat $ARVADOS_CONTAINER_PATH/vm-uuid) +if ! test -s $ARVADOS_CONTAINER_PATH/banner-uuid ; then + echo $uuid_prefix-4zz18-$(ruby -e 'puts rand(2**400).to_s(36)[0,15]') > $ARVADOS_CONTAINER_PATH/banner-uuid +fi +banner_uuid=$(cat $ARVADOS_CONTAINER_PATH/banner-uuid) + if ! test -f $ARVADOS_CONTAINER_PATH/api_database_pw ; then ruby -e 'puts rand(2**128).to_s(36)' > $ARVADOS_CONTAINER_PATH/api_database_pw fi @@ -126,6 +131,9 @@ Clusters: AutoAdminFirstUser: true AutoSetupNewUsers: true AutoSetupNewUsersWithVmUUID: $vm_uuid + Workbench: + ArvadosDocsite: http://$localip:${services[doc]}/ + BannerUUID: ${banner_uuid} Volumes: ${uuid_prefix}-nyw5e-000000000000000: Driver: Directory diff --git a/tools/arvbox/lib/arvbox/docker/service/banner/log/main/.gitstub b/tools/arvbox/lib/arvbox/docker/service/banner/log/main/.gitstub new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/arvbox/lib/arvbox/docker/service/banner/log/run b/tools/arvbox/lib/arvbox/docker/service/banner/log/run new file mode 120000 index 0000000000..d6aef4a77d --- /dev/null +++ b/tools/arvbox/lib/arvbox/docker/service/banner/log/run @@ -0,0 +1 @@ +/usr/local/lib/arvbox/logger \ No newline at end of file diff --git a/tools/arvbox/lib/arvbox/docker/service/banner/run b/tools/arvbox/lib/arvbox/docker/service/banner/run new file mode 100755 index 0000000000..009ba7bf5f --- /dev/null +++ b/tools/arvbox/lib/arvbox/docker/service/banner/run @@ -0,0 +1,9 @@ +#!/bin/sh +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + +set -e + +/usr/local/lib/arvbox/runsu.sh $0-service $1 +sv stop banner diff --git a/tools/arvbox/lib/arvbox/docker/service/banner/run-service b/tools/arvbox/lib/arvbox/docker/service/banner/run-service new file mode 100755 index 0000000000..2a9e8ac40e --- /dev/null +++ b/tools/arvbox/lib/arvbox/docker/service/banner/run-service @@ -0,0 +1,469 @@ +#!/bin/bash +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + +exec 2>&1 +set -ex -o pipefail + +. /usr/local/lib/arvbox/common.sh + +while [ ! -f $ARVADOS_CONTAINER_PATH/api.ready ]; do + sleep 1 +done + +set -u + +export ARVADOS_API_HOST=$localip:${services[controller-ssl]} +export ARVADOS_API_HOST_INSECURE=1 +export ARVADOS_API_TOKEN=$(cat $ARVADOS_CONTAINER_PATH/superuser_token) +export ARVADOS_BANNER_UUID=$(cat $ARVADOS_CONTAINER_PATH/banner-uuid) + +cat > /tmp/banner.html < + + + + + + + +

WELCOME TO ARVBOX

+

+

Arvbox is a self-contained instance of Arvados for development and evaluation. +You are currently on the Arvados Workbench, an web application for interactively accessing Arvados + functionality.

+
+ + + + +
+

If you + close this message and want to retrieve it, use the bell icon 🔔 located left of the user menu on the + upper right hand corner of the Workbench window.

+
+ +

+
+

Getting Started with Arvados

+
+
+

Arvados Walkthrough + A walkthrough tutorial of both interactive and programmatic Arvados functionality using a + Whole Genome Sequencing (WGS) processing example. +

+
+
+ +
+

Arvados User Guide + + Documentation for utilizing Arvados including using both Arvados Workbench and command line + including running workflows and managing data.

+
+
+ +
+

Arvados + Overview Video + Video introducing Arvados technical components including Keep (contentaddressable storage + system) and Crunch (workflow orchestration system).

+
+
+ +
+

Getting Started with CWL + This training will walk you through developing, running, and debugging a best-practices Common + Workflow Language (CWL) workflow using the Arvados platform.

+
+
+
+

Arvados Support

+
+ +
+

Community Live Chat + + Join developers, power users, and newcomers for live chat in the arvados/community channel on + Gitter.

+
+ +
+ +
+

Community Forum + The Arvados forum has topic-based discussion, Q&A and community support.

+
+ +
+ + +
+

Enterprise Level + Support + Curii Corporation provides managed installations as well as + commercial support.

+
+ +
+
+

Note: Using Arvbox to run Arvados is not recommended or supported for production use. + For production use, Curii can help you. You can also install it yourself.

+ + + + + +EOF + +set +e +read -rd $'\000' banner < /dev/null; then gemcount=$(ls /var/lib/arvados/lib/ruby/gems/*/gems /var/lib/arvados-arvbox/.gem/ruby/*/gems 2>/dev/null | wc -l) -- 2.30.2