X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/ef25b3d6bef2288c1aaf99f6bff68b0d9d05ef89..dc9e6161a589bb702a4df6baac4ee5332140fbcd:/lib/boot/supervisor.go?ds=sidebyside diff --git a/lib/boot/supervisor.go b/lib/boot/supervisor.go index ca88653fa6..28be8f3a14 100644 --- a/lib/boot/supervisor.go +++ b/lib/boot/supervisor.go @@ -61,8 +61,7 @@ type Supervisor struct { // explicitly configured in config file. If blank, use a // random port on ListenHost. ControllerAddr string - // Path to arvados-workbench2 source tree checkout. - Workbench2Source string + NoWorkbench1 bool NoWorkbench2 bool OwnTemporaryDatabase bool @@ -325,13 +324,13 @@ func (super *Supervisor) runCluster() error { } else if super.SourceVersion == "" { // Find current source tree version. var buf bytes.Buffer - err = super.RunProgram(super.ctx, ".", runOptions{output: &buf}, "git", "diff", "--shortstat") + err = super.RunProgram(super.ctx, super.SourcePath, runOptions{output: &buf}, "git", "diff", "--shortstat") if err != nil { return err } dirty := buf.Len() > 0 buf.Reset() - err = super.RunProgram(super.ctx, ".", runOptions{output: &buf}, "git", "log", "-n1", "--format=%H") + err = super.RunProgram(super.ctx, super.SourcePath, runOptions{output: &buf}, "git", "log", "-n1", "--format=%H") if err != nil { return err } @@ -356,22 +355,23 @@ func (super *Supervisor) runCluster() error { createCertificates{}, runPostgreSQL{}, runNginx{}, - runServiceCommand{name: "controller", svc: super.cluster.Services.Controller, depends: []supervisedTask{seedDatabase{}}}, + railsDatabase{}, + runServiceCommand{name: "controller", svc: super.cluster.Services.Controller, depends: []supervisedTask{railsDatabase{}}}, runServiceCommand{name: "git-httpd", svc: super.cluster.Services.GitHTTP}, runServiceCommand{name: "health", svc: super.cluster.Services.Health}, runServiceCommand{name: "keepproxy", svc: super.cluster.Services.Keepproxy, depends: []supervisedTask{runPassenger{src: "services/api"}}}, runServiceCommand{name: "keepstore", svc: super.cluster.Services.Keepstore}, runServiceCommand{name: "keep-web", svc: super.cluster.Services.WebDAV}, - runServiceCommand{name: "ws", svc: super.cluster.Services.Websocket, depends: []supervisedTask{seedDatabase{}}}, + runServiceCommand{name: "ws", svc: super.cluster.Services.Websocket, depends: []supervisedTask{railsDatabase{}}}, installPassenger{src: "services/api", varlibdir: "railsapi"}, - runPassenger{src: "services/api", varlibdir: "railsapi", svc: super.cluster.Services.RailsAPI, depends: []supervisedTask{createCertificates{}, seedDatabase{}, installPassenger{src: "services/api", varlibdir: "railsapi"}}}, - seedDatabase{}, + runPassenger{src: "services/api", varlibdir: "railsapi", svc: super.cluster.Services.RailsAPI, depends: []supervisedTask{ + createCertificates{}, + installPassenger{src: "services/api", varlibdir: "railsapi"}, + railsDatabase{}, + }}, } if !super.NoWorkbench1 { - tasks = append(tasks, - installPassenger{src: "apps/workbench", varlibdir: "workbench1", depends: []supervisedTask{seedDatabase{}}}, // 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, @@ -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