X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/9c03bedaa6aa6a64b42dc61efcd6d46154fe6732..9a0172e4aa5ef715db657a6d0d2cadbf6a54344e:/sdk/go/arvados/config.go diff --git a/sdk/go/arvados/config.go b/sdk/go/arvados/config.go index 9cf1ed3cd1..9dc9e17dd8 100644 --- a/sdk/go/arvados/config.go +++ b/sdk/go/arvados/config.go @@ -17,9 +17,8 @@ import ( var DefaultConfigFile = func() string { if path := os.Getenv("ARVADOS_CONFIG"); path != "" { return path - } else { - return "/etc/arvados/config.yml" } + return "/etc/arvados/config.yml" }() type Config struct { @@ -50,12 +49,12 @@ func (sc *Config) GetCluster(clusterID string) (*Cluster, error) { } } } - if cc, ok := sc.Clusters[clusterID]; !ok { + cc, ok := sc.Clusters[clusterID] + if !ok { return nil, fmt.Errorf("cluster %q is not configured", clusterID) - } else { - cc.ClusterID = clusterID - return &cc, nil } + cc.ClusterID = clusterID + return &cc, nil } type WebDAVCacheConfig struct { @@ -87,7 +86,6 @@ type Cluster struct { MaxKeepBlobBuffers int MaxRequestAmplification int MaxRequestSize int - RailsSessionSecretToken string RequestTimeout Duration SendTimeout Duration WebsocketClientEventQueue int @@ -121,6 +119,7 @@ type Cluster struct { TrashSweepInterval Duration TrustAllContent bool ForwardSlashNameSubstitution string + S3FolderObjects bool BlobMissingReport string BalancePeriod Duration @@ -176,8 +175,14 @@ type Cluster struct { ProviderAppID string ProviderAppSecret string } + Test struct { + Enable bool + Users map[string]TestUser + } LoginCluster string RemoteTokenRefresh Duration + TokenLifetime Duration + TrustedClients map[string]struct{} } Mail struct { MailchimpAPIKey string @@ -214,6 +219,7 @@ type Cluster struct { UserNotifierEmailFrom string UserProfileNotificationAddress string PreferDomainForUsername string + UserSetupMailText string } Volumes map[string]Volume Workbench struct { @@ -254,6 +260,7 @@ type Cluster struct { InactivePageHTML string SSHHelpPageHTML string SSHHelpHostSuffix string + IdleTimeout Duration } ForceLegacyAPI14 bool @@ -314,7 +321,6 @@ type Services struct { Keepbalance Service Keepproxy Service Keepstore Service - Nodemanager Service RailsAPI Service SSO Service WebDAVDownload Service @@ -330,6 +336,11 @@ type Service struct { ExternalURL URL } +type TestUser struct { + Email string + Password string +} + // URL is a url.URL that is also usable as a JSON key/value. type URL url.URL @@ -437,23 +448,25 @@ type ContainersConfig struct { type CloudVMsConfig struct { Enable bool - BootProbeCommand string - DeployRunnerBinary string - ImageID string - MaxCloudOpsPerSecond int - MaxProbesPerSecond int - PollInterval Duration - ProbeInterval Duration - SSHPort string - SyncInterval Duration - TimeoutBooting Duration - TimeoutIdle Duration - TimeoutProbe Duration - TimeoutShutdown Duration - TimeoutSignal Duration - TimeoutTERM Duration - ResourceTags map[string]string - TagKeyPrefix string + BootProbeCommand string + DeployRunnerBinary string + ImageID string + MaxCloudOpsPerSecond int + MaxProbesPerSecond int + MaxConcurrentInstanceCreateOps int + PollInterval Duration + ProbeInterval Duration + SSHPort string + SyncInterval Duration + TimeoutBooting Duration + TimeoutIdle Duration + TimeoutProbe Duration + TimeoutShutdown Duration + TimeoutSignal Duration + TimeoutStaleRunLock Duration + TimeoutTERM Duration + ResourceTags map[string]string + TagKeyPrefix string Driver string DriverParameters json.RawMessage @@ -567,7 +580,6 @@ const ( ServiceNameController ServiceName = "arvados-controller" ServiceNameDispatchCloud ServiceName = "arvados-dispatch-cloud" ServiceNameHealth ServiceName = "arvados-health" - ServiceNameNodemanager ServiceName = "arvados-node-manager" ServiceNameWorkbench1 ServiceName = "arvados-workbench1" ServiceNameWorkbench2 ServiceName = "arvados-workbench2" ServiceNameWebsocket ServiceName = "arvados-ws" @@ -585,7 +597,6 @@ func (svcs Services) Map() map[ServiceName]Service { ServiceNameController: svcs.Controller, ServiceNameDispatchCloud: svcs.DispatchCloud, ServiceNameHealth: svcs.Health, - ServiceNameNodemanager: svcs.Nodemanager, ServiceNameWorkbench1: svcs.Workbench1, ServiceNameWorkbench2: svcs.Workbench2, ServiceNameWebsocket: svcs.Websocket,