Project

General

Profile

Cluster configuration » History » Version 11

Tom Clegg, 07/09/2018 02:55 PM

1 1 Tom Clegg
h1. Cluster configuration
2
3
We are (2018) consolidating configuration from per-microservice yaml/json/ini files into a single cluster configuration document that is used by all components.
4
* Long term: system nodes automatically keep their configs synchronized (using something like consul).
5
* Short term: sysadmin uses tools like puppet and terraform to ensure /etc/arvados/config.yml is identical on all system nodes.
6
* Hosts without config files (e.g., hosts outside the cluster) can retrieve the config document from the API server.
7
8
h2. Discovery document
9
10
Previously, we copied selected config values from the API server config into the API discovery document so clients could see them. When clients can get the configuration document itself, this won't be needed. The discovery document should advertise APIs provided by the server, not cluster configuration.
11
12 7 Tom Clegg
h2. Secrets
13
14
Secrets like BlobSigningKey can be given literally in the config file (convenient for dev/test, consul-template, etc) or indirectly using a secret backend. Anticipated backends:
15
* <code class="yaml">BlobSigningKey: foobar</code> &rArr; the secret is literally <code>foobar</code>
16
* <code class="yaml">BlobSigningKey: "vault:foobar"</code> &rArr; the secret can be obtained from vault using the vault key "foobar"
17
* <code class="yaml">BlobSigningKey: "file:/foobar"</code> &rArr; the secret can be read from the local file @/foobar@
18
* <code class="yaml">BlobSigningKey: "env:FOOBAR"</code> &rArr; the secret can be read from the environment variable @FOOBAR@
19
20 1 Tom Clegg
h2. Example config file
21
22
(Format not yet frozen!)
23
24
<pre><code class="yaml">
25
Clusters:
26
  xyzzy:
27
    BlobSigningKey: ungu355able
28
    BlobSignatureTTL: 172800
29 6 Tom Clegg
    SessionKey: 186005aa54cab1ca95a3738e6e954e0a35a96d3d13a8ea541f4156e8d067b4f3
30 4 Tom Clegg
    PostgreSQL:
31 11 Tom Clegg
      ConnectionPool: 32 # max concurrent connections per arvados server daemon
32 10 Tom Clegg
      Connection:
33
        # All parameters here are passed to the PG client library in a connection string;
34
        # see https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-PARAMKEYWORDS
35
        Host: localhost
36
        Port: 5432
37
        User: arvados
38
        Password: s3cr3t
39
        DBName: arvados_production
40
        client_encoding: utf8
41
        fallback_application_name: arvados
42 4 Tom Clegg
    HTTPRequestTimeout: 5m
43 6 Tom Clegg
    Defaults:
44
      CollectionReplication: 2
45
      TrashLifetime: 2w
46
    UserActivation:
47
      ActivateNewUsers: true
48
      AutoAdminUser: root@example.com
49
      UserProfileNotificationAddress: notify@example.com
50 8 Tom Clegg
      NewUserNotificationRecipients: {}
51
      NewInactiveUserNotificationRecipients: {}
52 6 Tom Clegg
    Limits:
53
      MaxRequestLogParamsSize: 2KB
54
      MaxRequestSize: 128MiB
55
      MaxIndexDatabaseRead: 128MiB
56
      MaxItemsPerResponse: 1000
57
    AuditLogs:
58
      MaxAge: 2w
59
      DeleteBatchSize: 100000
60 8 Tom Clegg
      UnloggedAttributes: {} # example: {"manifest_text": true}
61 6 Tom Clegg
    ContainerLogStream:
62
      BatchSize: 4KiB
63
      BatchTime: 1s
64
      ThrottlePeriod: 1m
65
      ThrottleThresholdSize: 64KiB
66
      ThrottleThresholdLines: 1024
67
      TruncateSize: 64MiB
68
      PartialLineThrottlePeriod: 5s
69
    Timers:
70
      TrashSweepInterval: 60s
71
    Scaling:
72
      MaxComputeNodes: 64
73
      EnablePreemptibleInstances: false
74 8 Tom Clegg
    DisableAPIMethods: {} # example: {"jobs.create": true}
75
    DockerImageFormats: {"v2": true}
76 6 Tom Clegg
    Crunch1:
77
      Enable: true
78
      CrunchJobWrapper: none
79
      CrunchJobUser: crunch
80
      CrunchRefreshTrigge: /tmp/crunch_refresh_trigger
81
      DefaultDockerImage: false
82 4 Tom Clegg
    NodeProfiles:
83
      # Key is a profile name; can be specified on service prog command line, defaults to $(hostname)
84
      keep:
85
        # Don’t run other services automatically -- only specified ones
86
        Default: {Disable: true}
87
        Keepstore: {Listen: ":25107"}
88
      apiserver:
89
        Default: {Disable: true}
90
        RailsAPI: {Listen: ":9000", TLS: true}
91
        Controller: {Listen: ":9100"}
92
        Websocket: {Listen: ":9101"}
93
        Health: {Listen: ":9199"}
94
      keep:
95
        Default: {Disable: true}
96
        KeepProxy: {Listen: ":9102"}
97
        KeepWeb: {Listen: ":9103"}
98
      *:
99
        # This section used for a node whose profile name is not listed above
100
        Default: {Disable: false} # (this is the default behavior)
101 1 Tom Clegg
    Volumes:
102
      xyzzy-keep-0:
103
        Type: s3
104
        Region: us-east
105
        Bucket: xyzzy-keep-0
106
        # [rest of keepstore volume config goes here]
107
    Providers:
108
      AWS:
109
        # [credentials and stuff go here]
110 4 Tom Clegg
    WebRoutes:
111 5 Tom Clegg
      # “default” means route according to method/host/path (e.g., if host is a login shell, route there)
112 4 Tom Clegg
      xyzzy.arvadosapi.com: default
113
      # “collections” means always route to keep-web
114
      collections.xyzzy.arvadosapi.com: collections
115
      # leading * is a wildcard (longest match wins)
116
      "*--collections.xyzzy.arvadosapi.com": collections
117
      cloud.curoverse.com: workbench
118
      workbench.xyzzy.arvadosapi.com: workbench
119
      "*.xyzzy.arvadosapi.com": default
120 3 Tom Clegg
    InstanceTypes:
121 8 Tom Clegg
      m4.large:
122
        VCPUs: 2
123
        RAM: 8000000000
124
        Scratch: 31000000000
125
        Price: 0.1
126
      m4.large-1t:
127
        # same instance type as m4.large but our scripts attach more scratch
128
        ProviderType: m4.large
129
        VCPUs: 2
130
        RAM: 8000000000
131
        Scratch: 999000000000
132
        Price: 0.12
133
      m4.xlarge:
134
        VCPUs: 4
135
        RAM: 16000000000
136
        Scratch: 78000000000
137
        Price: 0.2
138
      m4.8xlarge:
139
        VCPUs: 40
140
        RAM: 160000000000
141
        Scratch: 156000000000
142
        Price: 2
143
      m4.16xlarge:
144
        VCPUs: 64
145
        RAM: 256000000000
146
        Scratch: 310000000000
147
        Price: 3.2
148
      c4.large:
149
        VCPUs: 2
150
        RAM: 3750000000
151
        Price: 0.1
152
      c4.8xlarge:
153
        VCPUs: 36
154
        RAM: 60000000000
155
        Price: 1.591
156 9 Tom Clegg
    RemoteClusters:
157
      xrrrr:
158
        Host: xrrrr.arvadosapi.com
159
        Proxy: true        # proxy requests to xrrrr on behalf of our clients
160
        AuthProvider: true # users authenticated by xrrrr can use our cluster
161 1 Tom Clegg
</code></pre>