[arvados] updated: 2.7.0-5354-g6442a780c6
git repository hosting
git at public.arvados.org
Sun Nov 12 06:21:51 UTC 2023
Summary of changes:
build/run-tests.sh | 4 -
cmd/arvados-package/cmd.go | 2 +-
lib/boot/cmd.go | 2 +-
lib/boot/rails_db.go | 3 +
lib/boot/supervisor.go | 7 +-
lib/boot/workbench2.go | 27 ++++--
lib/cmd/cmd.go | 20 ++++-
lib/install/deps.go | 169 ++++++++++++++++--------------------
sdk/python/tests/nginx.conf | 76 ++++++++++++----
sdk/python/tests/run_test_server.py | 5 --
10 files changed, 180 insertions(+), 135 deletions(-)
via 6442a780c60d9144a062c8af6b887f3213005751 (commit)
via 58a5a38850bb8669abf7b75fd33b0eea056f07a4 (commit)
via 07a8dbd5a1b087ba23d85b1f26732a85ece4c791 (commit)
via 27a68b61f36c166633dacdefa8b30b77fc28a846 (commit)
via db1bc1ffbe4ffc2e3e3356402b3a80efa90e7d53 (commit)
via 64100cc9af07cd513fb26187f72dafec16d76d9a (commit)
via dc9e6161a589bb702a4df6baac4ee5332140fbcd (commit)
via b541d548386847893df54c89c8edad75ede65714 (commit)
via ab753afe981dc91df13bb50906813ca648b3242e (commit)
from c7cf228372bee18d84b14fc4089a758bc157fe76 (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 6442a780c60d9144a062c8af6b887f3213005751
Author: Tom Clegg <tom at curii.com>
Date: Sun Nov 12 00:55:54 2023 -0500
20690: Remove phantomjs and geckodriver (wb1 test deps).
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/build/run-tests.sh b/build/run-tests.sh
index a869d0f6a7..2aa42b2c3b 100755
--- a/build/run-tests.sh
+++ b/build/run-tests.sh
@@ -241,14 +241,10 @@ sanity_checks() {
|| fatal "No libpam pam_appl.h. Try: apt-get install libpam0g-dev"
echo -n 'postgresql: '
psql --version || fatal "No postgresql. Try: apt-get install postgresql postgresql-client-common"
- echo -n 'phantomjs: '
- phantomjs --version || fatal "No phantomjs. Try: apt-get install phantomjs"
echo -n 'xvfb: '
which Xvfb || fatal "No xvfb. Try: apt-get install xvfb"
echo -n 'graphviz: '
dot -V || fatal "No graphviz. Try: apt-get install graphviz"
- echo -n 'geckodriver: '
- geckodriver --version | grep ^geckodriver || echo "No geckodriver. Try: arvados-server install"
echo -n 'singularity: '
singularity --version || fatal "No singularity. Try: arvados-server install"
echo -n 'docker client: '
diff --git a/lib/install/deps.go b/lib/install/deps.go
index de61c5cd43..5bdc71fddd 100644
--- a/lib/install/deps.go
+++ b/lib/install/deps.go
@@ -36,8 +36,6 @@ const (
rubyversion = "2.7.7"
bundlerversion = "2.2.19"
singularityversion = "3.10.4"
- pjsversion = "1.9.8"
- geckoversion = "0.24.0"
gradleversion = "5.3.1"
nodejsversion = "v12.22.12"
devtestDatabasePassword = "insecure_arvados_test"
@@ -340,32 +338,6 @@ ln -sfv /var/lib/arvados/go/bin/* /usr/local/bin/
}
if !prod && !pkg {
- if havepjsversion, err := exec.Command("/usr/local/bin/phantomjs", "--version").CombinedOutput(); err == nil && string(havepjsversion) == "1.9.8\n" {
- logger.Print("phantomjs " + pjsversion + " already installed")
- } else {
- err = inst.runBash(`
-PJS=phantomjs-`+pjsversion+`-linux-x86_64
-wget --progress=dot:giga -O- https://cache.arvados.org/$PJS.tar.bz2 | tar -C /var/lib/arvados -xjf -
-ln -sfv /var/lib/arvados/$PJS/bin/phantomjs /usr/local/bin/
-`, stdout, stderr)
- if err != nil {
- return 1
- }
- }
-
- if havegeckoversion, err := exec.Command("/usr/local/bin/geckodriver", "--version").CombinedOutput(); err == nil && strings.Contains(string(havegeckoversion), " "+geckoversion+" ") {
- logger.Print("geckodriver " + geckoversion + " already installed")
- } else {
- err = inst.runBash(`
-GD=v`+geckoversion+`
-wget --progress=dot:giga -O- https://github.com/mozilla/geckodriver/releases/download/$GD/geckodriver-$GD-linux64.tar.gz | tar -C /var/lib/arvados/bin -xzf - geckodriver
-ln -sfv /var/lib/arvados/bin/geckodriver /usr/local/bin/
-`, stdout, stderr)
- if err != nil {
- return 1
- }
- }
-
if havegradleversion, err := exec.Command("/usr/local/bin/gradle", "--version").CombinedOutput(); err == nil && strings.Contains(string(havegradleversion), "Gradle "+gradleversion+"\n") {
logger.Print("gradle " + gradleversion + " already installed")
} else {
commit 58a5a38850bb8669abf7b75fd33b0eea056f07a4
Author: Tom Clegg <tom at curii.com>
Date: Sat Nov 11 20:07:16 2023 -0500
18874: Fix wb2 install/boot to accommodate readonly source tree.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/lib/boot/workbench2.go b/lib/boot/workbench2.go
index 149487cdb6..8c8c607f45 100644
--- a/lib/boot/workbench2.go
+++ b/lib/boot/workbench2.go
@@ -38,21 +38,30 @@ func (runner runWorkbench2) Run(ctx context.Context, fail func(error), super *Su
user: "www-data",
}, "arvados-server", "workbench2", super.cluster.Services.Controller.ExternalURL.Host, net.JoinHostPort(host, port), ".")
} else {
- stdinr, stdinw := io.Pipe()
- defer stdinw.Close()
- go func() {
- <-ctx.Done()
- stdinw.Close()
- }()
- if err = os.Mkdir(super.SourcePath+"/services/workbench2/public/_health", 0777); err != nil && !errors.Is(err, fs.ErrExist) {
+ // super.SourcePath might be readonly, so for
+ // dev/test mode we make a copy in a writable
+ // dir.
+ livedir := super.wwwtempdir + "/workbench2"
+ if err := super.RunProgram(ctx, super.SourcePath+"/services/workbench2", runOptions{}, "rsync", "-a", "--delete-after", super.SourcePath+"/services/workbench2/", livedir); err != nil {
+ fail(err)
+ return
+ }
+ if err = os.Mkdir(livedir+"/public/_health", 0777); err != nil && !errors.Is(err, fs.ErrExist) {
fail(err)
return
}
- if err = ioutil.WriteFile(super.SourcePath+"/services/workbench2/public/_health/ping", []byte(`{"health":"OK"}`), 0666); err != nil {
+ if err = ioutil.WriteFile(livedir+"/public/_health/ping", []byte(`{"health":"OK"}`), 0666); err != nil {
fail(err)
return
}
- err = super.RunProgram(ctx, super.SourcePath+"/services/workbench2", runOptions{
+
+ stdinr, stdinw := io.Pipe()
+ defer stdinw.Close()
+ go func() {
+ <-ctx.Done()
+ stdinw.Close()
+ }()
+ err = super.RunProgram(ctx, livedir, runOptions{
env: []string{
"CI=true",
"HTTPS=false",
diff --git a/lib/install/deps.go b/lib/install/deps.go
index 4dcbf88994..de61c5cd43 100644
--- a/lib/install/deps.go
+++ b/lib/install/deps.go
@@ -691,9 +691,12 @@ done
// Install workbench2 app to /var/lib/arvados/workbench2/
if err = inst.runBash(`
-cd "`+inst.SourcePath+`/services/workbench2"
-VERSION="`+inst.PackageVersion+`" BUILD_NUMBER=1 GIT_COMMIT="`+inst.Commit[:9]+`" yarn build
-rsync -a --delete-after build/ /var/lib/arvados/workbench2/
+src="`+inst.SourcePath+`/services/workbench2"
+tmp=/var/lib/arvados/tmp/workbench2
+dst=/var/lib/arvados/workbench2
+rsync -a --delete-after "$src/" "$tmp/"
+env -C "$tmp" VERSION="`+inst.PackageVersion+`" BUILD_NUMBER=1 GIT_COMMIT="`+inst.Commit[:9]+`" yarn build
+rsync -a --delete-after "$tmp/build/" "$dst/"
`, stdout, stderr); err != nil {
return 1
}
commit 07a8dbd5a1b087ba23d85b1f26732a85ece4c791
Author: Tom Clegg <tom at curii.com>
Date: Sat Nov 11 18:33:27 2023 -0500
18874: Embed real git commit in wb2 build.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/lib/cmd/cmd.go b/lib/cmd/cmd.go
index 3d4092e6b8..2b08ab4822 100644
--- a/lib/cmd/cmd.go
+++ b/lib/cmd/cmd.go
@@ -14,6 +14,7 @@ import (
"path/filepath"
"regexp"
"runtime"
+ "runtime/debug"
"sort"
"strings"
@@ -35,7 +36,13 @@ func (f HandlerFunc) RunCommand(prog string, args []string, stdin io.Reader, std
// 0.
var Version versionCommand
-var version = "dev"
+var (
+ // These default version/commit strings should be set at build
+ // time: `go install -buildvcs=false -ldflags "-X
+ // git.arvados.org/arvados.git/lib/cmd.version=1.2.3"`
+ version = "dev"
+ commit = "0000000000000000000000000000000000000000"
+)
type versionCommand struct{}
@@ -43,6 +50,17 @@ func (versionCommand) String() string {
return fmt.Sprintf("%s (%s)", version, runtime.Version())
}
+func (versionCommand) Commit() string {
+ if bi, ok := debug.ReadBuildInfo(); ok {
+ for _, bs := range bi.Settings {
+ if bs.Key == "vcs.revision" {
+ return bs.Value
+ }
+ }
+ }
+ return commit
+}
+
func (versionCommand) RunCommand(prog string, args []string, stdin io.Reader, stdout, stderr io.Writer) int {
prog = regexp.MustCompile(` -*version$`).ReplaceAllLiteralString(prog, "")
fmt.Fprintf(stdout, "%s %s (%s)\n", prog, version, runtime.Version())
diff --git a/lib/install/deps.go b/lib/install/deps.go
index 95a1df4dbd..4dcbf88994 100644
--- a/lib/install/deps.go
+++ b/lib/install/deps.go
@@ -49,6 +49,7 @@ var arvadosServiceFile []byte
type installCommand struct {
ClusterType string
SourcePath string
+ Commit string
PackageVersion string
EatMyData bool
}
@@ -71,6 +72,7 @@ func (inst *installCommand) RunCommand(prog string, args []string, stdin io.Read
versionFlag := flags.Bool("version", false, "Write version information to stdout and exit 0")
flags.StringVar(&inst.ClusterType, "type", "production", "cluster `type`: development, test, production, or package")
flags.StringVar(&inst.SourcePath, "source", "/arvados", "source tree location (required for -type=package)")
+ flags.StringVar(&inst.Commit, "commit", "", "source commit `hash` to embed (blank means use 'git log' or all-zero placeholder)")
flags.StringVar(&inst.PackageVersion, "package-version", "0.0.0", "version string to embed in executable files")
flags.BoolVar(&inst.EatMyData, "eatmydata", false, "use eatmydata to speed up install")
@@ -80,6 +82,14 @@ func (inst *installCommand) RunCommand(prog string, args []string, stdin io.Read
return cmd.Version.RunCommand(prog, args, stdin, stdout, stderr)
}
+ if inst.Commit == "" {
+ if commit, err := exec.Command("env", "-C", inst.SourcePath, "git", "log", "-n1", "--format=%H").CombinedOutput(); err == nil {
+ inst.Commit = strings.TrimSpace(string(commit))
+ } else {
+ inst.Commit = "0000000000000000000000000000000000000000"
+ }
+ }
+
var dev, test, prod, pkg bool
switch inst.ClusterType {
case "development":
@@ -563,7 +573,10 @@ ln -sfv /var/lib/arvados/node-`+nodejsversion+`-linux-x64/bin/{yarn,yarnpkg} /us
// container using a non-root-owned git tree
// mounted from the host -- as in
// "arvados-package build".
- cmd := exec.Command("go", "install", "-buildvcs=false", "-ldflags", "-X git.arvados.org/arvados.git/lib/cmd.version="+inst.PackageVersion+" -X main.version="+inst.PackageVersion+" -s -w")
+ cmd := exec.Command("go", "install", "-buildvcs=false",
+ "-ldflags", "-s -w"+
+ " -X git.arvados.org/arvados.git/lib/cmd.version="+inst.PackageVersion+
+ " -X git.arvados.org/arvados.git/lib/cmd.commit="+inst.Commit)
cmd.Env = append(cmd.Env, os.Environ()...)
cmd.Env = append(cmd.Env, "GOBIN=/var/lib/arvados/bin")
cmd.Dir = filepath.Join(inst.SourcePath, srcdir)
@@ -678,8 +691,8 @@ done
// Install workbench2 app to /var/lib/arvados/workbench2/
if err = inst.runBash(`
-cd `+inst.SourcePath+`/services/workbench2
-VERSION="`+inst.PackageVersion+`" BUILD_NUMBER=1 GIT_COMMIT=000000000 yarn build
+cd "`+inst.SourcePath+`/services/workbench2"
+VERSION="`+inst.PackageVersion+`" BUILD_NUMBER=1 GIT_COMMIT="`+inst.Commit[:9]+`" yarn build
rsync -a --delete-after build/ /var/lib/arvados/workbench2/
`, stdout, stderr); err != nil {
return 1
commit 27a68b61f36c166633dacdefa8b30b77fc28a846
Author: Tom Clegg <tom at curii.com>
Date: Sat Nov 11 17:03:12 2023 -0500
18874: Update package-building test OS to debian:11.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/cmd/arvados-package/cmd.go b/cmd/arvados-package/cmd.go
index db3d63f277..c16d8a1c95 100644
--- a/cmd/arvados-package/cmd.go
+++ b/cmd/arvados-package/cmd.go
@@ -71,7 +71,7 @@ type opts struct {
func parseFlags(prog string, args []string, stderr io.Writer) (_ opts, ok bool, exitCode int) {
opts := opts{
SourceDir: ".",
- TargetOS: "debian:10",
+ TargetOS: "debian:11",
Maintainer: "Arvados Package Maintainers <packaging at arvados.org>",
Vendor: "The Arvados Project",
}
commit db1bc1ffbe4ffc2e3e3356402b3a80efa90e7d53
Author: Tom Clegg <tom at curii.com>
Date: Sat Nov 11 16:42:28 2023 -0500
20690: Silently ignore editor backup files in db/migrate dir.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/lib/boot/rails_db.go b/lib/boot/rails_db.go
index 16e150172d..3464e52b9a 100644
--- a/lib/boot/rails_db.go
+++ b/lib/boot/rails_db.go
@@ -106,6 +106,9 @@ func migrationList(dir string, log logrus.FieldLogger) (map[string]bool, error)
return nil
}
fnm := d.Name()
+ if strings.HasSuffix(fnm, "~") {
+ return nil
+ }
if !strings.HasSuffix(fnm, ".rb") {
log.Warnf("unexpected file in db/migrate dir: %s", fnm)
return nil
commit 64100cc9af07cd513fb26187f72dafec16d76d9a
Author: Tom Clegg <tom at curii.com>
Date: Sat Nov 11 16:37:39 2023 -0500
20690: add wb1->wb2 path redirects to arvados-server boot.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/sdk/python/tests/nginx.conf b/sdk/python/tests/nginx.conf
index d853c08f18..b4650cb7a8 100644
--- a/sdk/python/tests/nginx.conf
+++ b/sdk/python/tests/nginx.conf
@@ -160,6 +160,52 @@ http {
proxy_request_buffering off;
}
}
+ # wb1->wb2 redirects copied from
+ # /tools/salt-install/config_examples/multi_host/aws/pillars/nginx_workbench_configuration.sls
+ map $request_uri $wb1_redirect {
+ default 0;
+
+ ~^/actions\?uuid=(.*-4zz18-.*) /collections/$1;
+ ~^/actions\?uuid=(.*-j7d0g-.*) /projects/$1;
+ ~^/actions\?uuid=(.*-tpzed-.*) /projects/$1;
+ ~^/actions\?uuid=(.*-7fd4e-.*) /workflows/$1;
+ ~^/actions\?uuid=(.*-xvhdp-.*) /processes/$1;
+ ~^/actions\?uuid=(.*) /;
+
+ ^/work_units/(.*) /processes/$1;
+ ^/container_requests/(.*) /processes/$1;
+ ^/users/(.*) /user/$1;
+ ^/groups/(.*) /group/$1;
+
+ ^/virtual_machines.* /virtual-machines-admin;
+ ^/users/.*/virtual_machines /virtual-machines-user;
+ ^/authorized_keys.* /ssh-keys-admin;
+ ^/users/.*/ssh_keys /ssh-keys-user;
+ ^/containers.* /all_processes;
+ ^/container_requests /all_processes;
+ ^/job.* /all_processes;
+ ^/users/link_account /link_account;
+ ^/search.* /search-results;
+ ^/keep_services.* /keep-services;
+ ^/trash_items.* /trash;
+
+ ^/themes.* /;
+ ^/keep_disks.* /;
+ ^/user_agreements.* /;
+ ^/nodes.* /;
+ ^/humans.* /;
+ ^/traits.* /;
+ ^/sessions.* /;
+ ^/logout.* /;
+ ^/logged_out.* /;
+ ^/current_token /;
+ ^/logs.* /;
+ ^/factory_jobs.* /;
+ ^/uploaded_datasets.* /;
+ ^/specimens.* /;
+ ^/pipeline_templates.* /;
+ ^/pipeline_instances.* /;
+ }
upstream workbench2 {
server {{UPSTREAMHOST}}:{{WORKBENCH2PORT}};
}
@@ -169,6 +215,19 @@ http {
server_name workbench2 workbench2.* workbench1 workbench1.* workbench workbench.*;
ssl_certificate "{{SSLCERT}}";
ssl_certificate_key "{{SSLKEY}}";
+
+ if ($wb1_redirect) {
+ return 301 $wb1_redirect;
+ }
+
+ # file download redirects
+ if ($arg_disposition = attachment) {
+ rewrite ^/collections/([^/]*)/(.*) /?redirectToDownload=/c=$1/$2? redirect;
+ }
+ if ($arg_disposition = inline) {
+ rewrite ^/collections/([^/]*)/(.*) /?redirectToPreview=/c=$1/$2? redirect;
+ }
+
location / {
proxy_pass http://workbench2;
proxy_set_header Host $http_host;
commit dc9e6161a589bb702a4df6baac4ee5332140fbcd
Author: Tom Clegg <tom at curii.com>
Date: Sat Nov 11 16:21:04 2023 -0500
20690: Update arvados-server boot to serve wb2 at wb1 url.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/lib/boot/supervisor.go b/lib/boot/supervisor.go
index abec2b0f4a..28be8f3a14 100644
--- a/lib/boot/supervisor.go
+++ b/lib/boot/supervisor.go
@@ -845,7 +845,7 @@ func (super *Supervisor) autofillConfig() error {
if super.NoWorkbench1 && svc == &super.cluster.Services.Workbench1 ||
super.NoWorkbench2 && svc == &super.cluster.Services.Workbench2 ||
!super.cluster.Containers.CloudVMs.Enable && svc == &super.cluster.Services.DispatchCloud {
- // When workbench1 is disabled, it gets an
+ // When Workbench is disabled, it gets an
// ExternalURL (so we have a valid listening
// port to write in our Nginx config) but no
// InternalURLs (so health checker doesn't
diff --git a/sdk/python/tests/nginx.conf b/sdk/python/tests/nginx.conf
index 1716291fe8..d853c08f18 100644
--- a/sdk/python/tests/nginx.conf
+++ b/sdk/python/tests/nginx.conf
@@ -160,28 +160,13 @@ http {
proxy_request_buffering off;
}
}
- upstream workbench1 {
- server {{UPSTREAMHOST}}:{{WORKBENCH1PORT}};
- }
- server {
- listen {{LISTENHOST}}:{{WORKBENCH1SSLPORT}} ssl;
- server_name workbench1 workbench1.* workbench.*;
- ssl_certificate "{{SSLCERT}}";
- ssl_certificate_key "{{SSLKEY}}";
- location / {
- proxy_pass http://workbench1;
- proxy_set_header Host $http_host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto https;
- proxy_redirect off;
- }
- }
upstream workbench2 {
server {{UPSTREAMHOST}}:{{WORKBENCH2PORT}};
}
server {
listen {{LISTENHOST}}:{{WORKBENCH2SSLPORT}} ssl;
- server_name workbench2 workbench2.*;
+ listen {{LISTENHOST}}:{{WORKBENCH1SSLPORT}} ssl;
+ server_name workbench2 workbench2.* workbench1 workbench1.* workbench workbench.*;
ssl_certificate "{{SSLCERT}}";
ssl_certificate_key "{{SSLKEY}}";
location / {
diff --git a/sdk/python/tests/run_test_server.py b/sdk/python/tests/run_test_server.py
index a5dd88a9c5..467a818cdc 100644
--- a/sdk/python/tests/run_test_server.py
+++ b/sdk/python/tests/run_test_server.py
@@ -670,7 +670,6 @@ def run_nginx():
nginxconf['HEALTHSSLPORT'] = external_port_from_config("Health")
nginxconf['WSPORT'] = internal_port_from_config("Websocket")
nginxconf['WSSSLPORT'] = external_port_from_config("Websocket")
- nginxconf['WORKBENCH1PORT'] = internal_port_from_config("Workbench1")
nginxconf['WORKBENCH1SSLPORT'] = external_port_from_config("Workbench1")
nginxconf['WORKBENCH2PORT'] = internal_port_from_config("Workbench2")
nginxconf['WORKBENCH2SSLPORT'] = external_port_from_config("Workbench2")
@@ -706,7 +705,6 @@ def setup_config():
controller_external_port = find_available_port()
websocket_port = find_available_port()
websocket_external_port = find_available_port()
- workbench1_port = find_available_port()
workbench1_external_port = find_available_port()
workbench2_port = find_available_port()
workbench2_external_port = find_available_port()
@@ -758,9 +756,6 @@ def setup_config():
},
"Workbench1": {
"ExternalURL": "https://%s:%s/" % (localhost, workbench1_external_port),
- "InternalURLs": {
- "http://%s:%s"%(localhost, workbench1_port): {},
- },
},
"Workbench2": {
"ExternalURL": "https://%s:%s/" % (localhost, workbench2_external_port),
commit b541d548386847893df54c89c8edad75ede65714
Author: Tom Clegg <tom at curii.com>
Date: Wed Oct 25 15:52:58 2023 -0400
20846: Disable workbench1 in `arvados-server boot`.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/lib/boot/cmd.go b/lib/boot/cmd.go
index 41a2dab5ed..3d653e97af 100644
--- a/lib/boot/cmd.go
+++ b/lib/boot/cmd.go
@@ -69,7 +69,7 @@ func (bcmd bootCommand) run(ctx context.Context, prog string, args []string, std
flags.StringVar(&super.ClusterType, "type", "production", "cluster `type`: development, test, or production")
flags.StringVar(&super.ListenHost, "listen-host", "127.0.0.1", "host name or interface address for internal services whose InternalURLs are not configured")
flags.StringVar(&super.ControllerAddr, "controller-address", ":0", "desired controller address, `host:port` or `:port`")
- flags.BoolVar(&super.NoWorkbench1, "no-workbench1", false, "do not run workbench1")
+ flags.BoolVar(&super.NoWorkbench1, "no-workbench1", true, "do not run workbench1")
flags.BoolVar(&super.NoWorkbench2, "no-workbench2", false, "do not run workbench2")
flags.BoolVar(&super.OwnTemporaryDatabase, "own-temporary-database", false, "bring up a postgres server and create a temporary database")
timeout := flags.Duration("timeout", 0, "maximum time to wait for cluster to be ready")
diff --git a/lib/boot/supervisor.go b/lib/boot/supervisor.go
index e913a7fe08..abec2b0f4a 100644
--- a/lib/boot/supervisor.go
+++ b/lib/boot/supervisor.go
@@ -371,10 +371,7 @@ func (super *Supervisor) runCluster() error {
}},
}
if !super.NoWorkbench1 {
- tasks = append(tasks,
- installPassenger{src: "apps/workbench", varlibdir: "workbench1", depends: []supervisedTask{railsDatabase{}}}, // dependency ensures workbench doesn't delay api install/startup
- runPassenger{src: "apps/workbench", varlibdir: "workbench1", svc: super.cluster.Services.Workbench1, depends: []supervisedTask{installPassenger{src: "apps/workbench", varlibdir: "workbench1"}}},
- )
+ return errors.New("workbench1 is no longer supported")
}
if !super.NoWorkbench2 {
tasks = append(tasks,
commit ab753afe981dc91df13bb50906813ca648b3242e
Author: Tom Clegg <tom at curii.com>
Date: Wed Oct 25 15:49:21 2023 -0400
20846: Remove workbench1 from `arvados-server install`.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/lib/install/deps.go b/lib/install/deps.go
index 62438645ff..95a1df4dbd 100644
--- a/lib/install/deps.go
+++ b/lib/install/deps.go
@@ -611,75 +611,70 @@ done
return 1
}
- // Install Rails apps to /var/lib/arvados/{railsapi,workbench1}/
- for dstdir, srcdir := range map[string]string{
- "railsapi": "services/api",
- "workbench1": "apps/workbench",
+ // Install RailsAPI to /var/lib/arvados/railsapi/
+ fmt.Fprintln(stderr, "building railsapi...")
+ cmd = exec.Command("rsync",
+ "-a", "--no-owner", "--no-group", "--delete-after", "--delete-excluded",
+ "--exclude", "/coverage",
+ "--exclude", "/log",
+ "--exclude", "/node_modules",
+ "--exclude", "/tmp",
+ "--exclude", "/public/assets",
+ "--exclude", "/vendor",
+ "--exclude", "/config/environments",
+ "./", "/var/lib/arvados/railsapi/")
+ cmd.Dir = filepath.Join(inst.SourcePath, "services", "api")
+ cmd.Stdout = stdout
+ cmd.Stderr = stderr
+ err = cmd.Run()
+ if err != nil {
+ return 1
+ }
+ for _, cmdline := range [][]string{
+ {"mkdir", "-p", "log", "public/assets", "tmp", "vendor", ".bundle", "/var/www/.bundle", "/var/www/.gem", "/var/www/.npm", "/var/www/.passenger"},
+ {"touch", "log/production.log"},
+ {"chown", "-R", "--from=root", "www-data:www-data", "/var/www/.bundle", "/var/www/.gem", "/var/www/.npm", "/var/www/.passenger", "log", "tmp", "vendor", ".bundle", "Gemfile.lock", "config.ru", "config/environment.rb"},
+ {"sudo", "-u", "www-data", "/var/lib/arvados/bin/gem", "install", "--user", "--conservative", "--no-document", "bundler:" + bundlerversion},
+ {"sudo", "-u", "www-data", "/var/lib/arvados/bin/bundle", "config", "set", "--local", "deployment", "true"},
+ {"sudo", "-u", "www-data", "/var/lib/arvados/bin/bundle", "config", "set", "--local", "path", "/var/www/.gem"},
+ {"sudo", "-u", "www-data", "/var/lib/arvados/bin/bundle", "config", "set", "--local", "without", "development test diagnostics performance"},
+ {"sudo", "-u", "www-data", "/var/lib/arvados/bin/bundle", "install", "--jobs", fmt.Sprintf("%d", runtime.NumCPU())},
+
+ {"chown", "www-data:www-data", ".", "public/assets"},
+ // {"sudo", "-u", "www-data", "/var/lib/arvados/bin/bundle", "config", "set", "--local", "system", "true"},
+ {"sudo", "-u", "www-data", "ARVADOS_CONFIG=none", "RAILS_GROUPS=assets", "RAILS_ENV=production", "PATH=/var/lib/arvados/bin:" + os.Getenv("PATH"), "/var/lib/arvados/bin/bundle", "exec", "rake", "npm:install"},
+ {"sudo", "-u", "www-data", "ARVADOS_CONFIG=none", "RAILS_GROUPS=assets", "RAILS_ENV=production", "PATH=/var/lib/arvados/bin:" + os.Getenv("PATH"), "/var/lib/arvados/bin/bundle", "exec", "rake", "assets:precompile"},
+ {"chown", "root:root", "."},
+ {"chown", "-R", "root:root", "public/assets", "vendor"},
+
+ {"sudo", "-u", "www-data", "/var/lib/arvados/bin/bundle", "exec", "passenger-config", "build-native-support"},
+ {"sudo", "-u", "www-data", "/var/lib/arvados/bin/bundle", "exec", "passenger-config", "install-standalone-runtime"},
} {
- fmt.Fprintf(stderr, "building %s...\n", srcdir)
- cmd := exec.Command("rsync",
- "-a", "--no-owner", "--no-group", "--delete-after", "--delete-excluded",
- "--exclude", "/coverage",
- "--exclude", "/log",
- "--exclude", "/node_modules",
- "--exclude", "/tmp",
- "--exclude", "/public/assets",
- "--exclude", "/vendor",
- "--exclude", "/config/environments",
- "./", "/var/lib/arvados/"+dstdir+"/")
- cmd.Dir = filepath.Join(inst.SourcePath, srcdir)
- cmd.Stdout = stdout
- cmd.Stderr = stderr
- err = cmd.Run()
- if err != nil {
- return 1
+ if cmdline[len(cmdline)-2] == "rake" {
+ continue
}
- for _, cmdline := range [][]string{
- {"mkdir", "-p", "log", "public/assets", "tmp", "vendor", ".bundle", "/var/www/.bundle", "/var/www/.gem", "/var/www/.npm", "/var/www/.passenger"},
- {"touch", "log/production.log"},
- {"chown", "-R", "--from=root", "www-data:www-data", "/var/www/.bundle", "/var/www/.gem", "/var/www/.npm", "/var/www/.passenger", "log", "tmp", "vendor", ".bundle", "Gemfile.lock", "config.ru", "config/environment.rb"},
- {"sudo", "-u", "www-data", "/var/lib/arvados/bin/gem", "install", "--user", "--conservative", "--no-document", "bundler:" + bundlerversion},
- {"sudo", "-u", "www-data", "/var/lib/arvados/bin/bundle", "config", "set", "--local", "deployment", "true"},
- {"sudo", "-u", "www-data", "/var/lib/arvados/bin/bundle", "config", "set", "--local", "path", "/var/www/.gem"},
- {"sudo", "-u", "www-data", "/var/lib/arvados/bin/bundle", "config", "set", "--local", "without", "development test diagnostics performance"},
- {"sudo", "-u", "www-data", "/var/lib/arvados/bin/bundle", "install", "--jobs", fmt.Sprintf("%d", runtime.NumCPU())},
-
- {"chown", "www-data:www-data", ".", "public/assets"},
- // {"sudo", "-u", "www-data", "/var/lib/arvados/bin/bundle", "config", "set", "--local", "system", "true"},
- {"sudo", "-u", "www-data", "ARVADOS_CONFIG=none", "RAILS_GROUPS=assets", "RAILS_ENV=production", "PATH=/var/lib/arvados/bin:" + os.Getenv("PATH"), "/var/lib/arvados/bin/bundle", "exec", "rake", "npm:install"},
- {"sudo", "-u", "www-data", "ARVADOS_CONFIG=none", "RAILS_GROUPS=assets", "RAILS_ENV=production", "PATH=/var/lib/arvados/bin:" + os.Getenv("PATH"), "/var/lib/arvados/bin/bundle", "exec", "rake", "assets:precompile"},
- {"chown", "root:root", "."},
- {"chown", "-R", "root:root", "public/assets", "vendor"},
-
- {"sudo", "-u", "www-data", "/var/lib/arvados/bin/bundle", "exec", "passenger-config", "build-native-support"},
- {"sudo", "-u", "www-data", "/var/lib/arvados/bin/bundle", "exec", "passenger-config", "install-standalone-runtime"},
- } {
- if cmdline[len(cmdline)-2] == "rake" && dstdir != "workbench1" {
- continue
- }
- cmd = exec.Command(cmdline[0], cmdline[1:]...)
- cmd.Dir = "/var/lib/arvados/" + dstdir
- cmd.Stdout = stdout
- cmd.Stderr = stderr
- fmt.Fprintf(stderr, "... %s\n", cmd.Args)
- err = cmd.Run()
- if err != nil {
- return 1
- }
- }
- cmd = exec.Command("sudo", "-u", "www-data", "/var/lib/arvados/bin/bundle", "exec", "passenger-config", "validate-install")
- cmd.Dir = "/var/lib/arvados/" + dstdir
+ cmd = exec.Command(cmdline[0], cmdline[1:]...)
+ cmd.Dir = "/var/lib/arvados/railsapi"
cmd.Stdout = stdout
cmd.Stderr = stderr
+ fmt.Fprintf(stderr, "... %s\n", cmd.Args)
err = cmd.Run()
- if err != nil && !strings.Contains(err.Error(), "exit status 2") {
- // Exit code 2 indicates there were warnings (like
- // "other passenger installations have been detected",
- // which we can't expect to avoid) but no errors.
- // Other non-zero exit codes (1, 9) indicate errors.
+ if err != nil {
return 1
}
}
+ cmd = exec.Command("sudo", "-u", "www-data", "/var/lib/arvados/bin/bundle", "exec", "passenger-config", "validate-install")
+ cmd.Dir = "/var/lib/arvados/railsapi"
+ cmd.Stdout = stdout
+ cmd.Stderr = stderr
+ err = cmd.Run()
+ if err != nil && !strings.Contains(err.Error(), "exit status 2") {
+ // Exit code 2 indicates there were warnings (like
+ // "other passenger installations have been detected",
+ // which we can't expect to avoid) but no errors.
+ // Other non-zero exit codes (1, 9) indicate errors.
+ return 1
+ }
// Install workbench2 app to /var/lib/arvados/workbench2/
if err = inst.runBash(`
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list