ClusterID string
Domain string
PostgreSQLPassword string
+ Login string
}
func (initcmd *initCommand) RunCommand(prog string, args []string, stdin io.Reader, stdout, stderr io.Writer) int {
versionFlag := flags.Bool("version", false, "Write version information to stdout and exit 0")
flags.StringVar(&initcmd.ClusterID, "cluster-id", "", "cluster `id`, like x1234 for a dev cluster")
flags.StringVar(&initcmd.Domain, "domain", hostname, "cluster public DNS `name`, like x1234.arvadosapi.com")
- err = flags.Parse(args)
- if err == flag.ErrHelp {
- err = nil
- return 0
- } else if err != nil {
- return 2
+ flags.StringVar(&initcmd.Login, "login", "", "login `backend`: test, pam, or ''")
+ if ok, code := cmd.ParseFlags(flags, prog, args, "", stderr); !ok {
+ return code
} else if *versionFlag {
return cmd.Version.RunCommand(prog, args, stdin, stdout, stderr)
- } else if len(flags.Args()) > 0 {
- err = fmt.Errorf("unrecognized command line arguments: %v", flags.Args())
- return 2
} else if !regexp.MustCompile(`^[a-z][a-z0-9]{4}`).MatchString(initcmd.ClusterID) {
err = fmt.Errorf("cluster ID %q is invalid; must be an ASCII letter followed by 4 alphanumerics (try -help)", initcmd.ClusterID)
return 1
Controller:
InternalURLs:
"http://0.0.0.0:8003/": {}
- ExternalURL: {{printf "%q" ( print "https://" .Domain "/" ) }}
+ ExternalURL: {{printf "%q" ( print "https://" .Domain ":4430/" ) }}
RailsAPI:
InternalURLs:
"http://0.0.0.0:8004/": {}
Websocket:
InternalURLs:
"http://0.0.0.0:8005/": {}
- ExternalURL: {{printf "%q" ( print "wss://ws." .Domain "/" ) }}
+ ExternalURL: {{printf "%q" ( print "wss://" .Domain ":4435/websocket" ) }}
Keepbalance:
InternalURLs:
"http://0.0.0.0:9005/": {}
GitHTTP:
InternalURLs:
"http://0.0.0.0:9001/": {}
- ExternalURL: {{printf "%q" ( print "https://git." .Domain "/" ) }}
+ ExternalURL: {{printf "%q" ( print "https://" .Domain ":4436/" ) }}
DispatchCloud:
InternalURLs:
"http://0.0.0.0:9006/": {}
Keepproxy:
InternalURLs:
"http://0.0.0.0:25108/": {}
- ExternalURL: {{printf "%q" ( print "https://keep." .Domain "/" ) }}
+ ExternalURL: {{printf "%q" ( print "https://" .Domain ":4437/" ) }}
WebDAV:
InternalURLs:
"http://0.0.0.0:9002/": {}
- ExternalURL: {{printf "%q" ( print "https://*.collections." .Domain "/" ) }}
+ ExternalURL: {{printf "%q" ( print "https://" .Domain ":4438/" ) }}
WebDAVDownload:
InternalURLs:
"http://0.0.0.0:8004/": {}
- ExternalURL: {{printf "%q" ( print "https://download." .Domain "/" ) }}
+ ExternalURL: {{printf "%q" ( print "https://" .Domain ":4439/" ) }}
Keepstore:
InternalURLs:
"http://0.0.0.0:25107/": {}
Composer:
- ExternalURL: {{printf "%q" ( print "https://workbench." .Domain "/composer" ) }}
+ ExternalURL: {{printf "%q" ( print "https://" .Domain ":4440/composer" ) }}
Workbench1:
InternalURLs:
"http://0.0.0.0:8001/": {}
- ExternalURL: {{printf "%q" ( print "https://workbench." .Domain "/" ) }}
- #Workbench2:
- # InternalURLs:
- # "http://0.0.0.0:8002/": {}
- # ExternalURL: {{printf "%q" ( print "https://workbench2." .Domain "/" ) }}
+ ExternalURL: {{printf "%q" ( print "https://" .Domain ":4441/" ) }}
+ Workbench2:
+ ExternalURL: {{printf "%q" ( print "https://" .Domain ":4442/" ) }}
Health:
InternalURLs:
"http://0.0.0.0:9007/": {}
- API:
- RailsSessionSecretToken: {{printf "%q" ( .RandomHex 50 )}}
Collections:
BlobSigningKey: {{printf "%q" ( .RandomHex 50 )}}
Containers:
Replication: 2
Workbench:
SecretKeyBase: {{printf "%q" ( .RandomHex 50 )}}
+ Login:
+ {{if eq .Login "pam"}}
+ PAM:
+ Enable: true
+ {{else if eq .Login "test"}}
+ Test:
+ Enable: true
+ Users:
+ admin:
+ Email: admin@example.com
+ Password: admin
+ {{else}}
+ {}
+ {{end}}
+ Users:
+ {{if eq .Login "test"}}
+ AutoAdminUserWithEmail: admin@example.com
+ {{else}}
+ {}
+ {{end}}
`)
if err != nil {
return 1