Project

General

Profile

Cluster configuration » History » Version 14

Tom Clegg, 09/05/2018 05:31 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 14 Tom Clegg
    LogLevel: info
58
    CloudVMs:
59
      BootTimeout: 20m
60
      Driver: Amazon
61
      DriverParameters:
62 13 Lucas Di Pentima
        Region: us-east-1
63 14 Tom Clegg
        APITimeout: 20s
64
        EC2Key: abcdef
65
        EC2Secret: abcdefghijklmnopqrstuvwxyz
66
        StorageKey: abcdef
67
        StorageSecret: abcdefghijklmnopqrstuvwxyz
68
        ImageID: ami-0a01b48b88d14541e
69
        SubnetID: subnet-24f5ae62
70
        SecurityGroups: sg-3ec53e2a
71 13 Lucas Di Pentima
    AuditLogs:
72
      MaxAge: 2w
73 6 Tom Clegg
      DeleteBatchSize: 100000
74
      UnloggedAttributes: {} # example: {"manifest_text": true}
75
    ContainerLogStream:
76 8 Tom Clegg
      BatchSize: 4KiB
77 6 Tom Clegg
      BatchTime: 1s
78
      ThrottlePeriod: 1m
79
      ThrottleThresholdSize: 64KiB
80
      ThrottleThresholdLines: 1024
81
      TruncateSize: 64MiB
82
      PartialLineThrottlePeriod: 5s
83
    Timers:
84
      TrashSweepInterval: 60s
85 14 Tom Clegg
      ContainerDispatchPollInterval: 10s
86
      APIRequestTimeout: 20s
87 6 Tom Clegg
    Scaling:
88
      MaxComputeNodes: 64
89
      EnablePreemptibleInstances: false
90 8 Tom Clegg
    DisableAPIMethods: {} # example: {"jobs.create": true}
91
    DockerImageFormats: {"v2": true}
92 6 Tom Clegg
    Crunch1:
93
      Enable: true
94
      CrunchJobWrapper: none
95
      CrunchJobUser: crunch
96 12 Tom Clegg
      CrunchRefreshTrigger: /tmp/crunch_refresh_trigger
97 6 Tom Clegg
      DefaultDockerImage: false
98 4 Tom Clegg
    NodeProfiles:
99
      # Key is a profile name; can be specified on service prog command line, defaults to $(hostname)
100
      keep:
101
        # Don’t run other services automatically -- only specified ones
102
        Default: {Disable: true}
103
        Keepstore: {Listen: ":25107"}
104
      apiserver:
105
        Default: {Disable: true}
106
        RailsAPI: {Listen: ":9000", TLS: true}
107
        Controller: {Listen: ":9100"}
108 1 Tom Clegg
        Websocket: {Listen: ":9101"}
109
        Health: {Listen: ":9199"}
110
      keep:
111
        Default: {Disable: true}
112
        KeepProxy: {Listen: ":9102"}
113
        KeepWeb: {Listen: ":9103"}
114
      *:
115
        # This section used for a node whose profile name is not listed above
116 13 Lucas Di Pentima
        Default: {Disable: false} # (this is the default behavior)
117
    Volumes:
118
      xyzzy-keep-0:
119
        Type: s3
120
        Region: us-east
121
        Bucket: xyzzy-keep-0
122
        # [rest of keepstore volume config goes here]
123 4 Tom Clegg
    WebRoutes:
124 5 Tom Clegg
      # “default” means route according to method/host/path (e.g., if host is a login shell, route there)
125 4 Tom Clegg
      xyzzy.arvadosapi.com: default
126
      # “collections” means always route to keep-web
127
      collections.xyzzy.arvadosapi.com: collections
128
      # leading * is a wildcard (longest match wins)
129
      "*--collections.xyzzy.arvadosapi.com": collections
130
      cloud.curoverse.com: workbench
131
      workbench.xyzzy.arvadosapi.com: workbench
132
      "*.xyzzy.arvadosapi.com": default
133 3 Tom Clegg
    InstanceTypes:
134 8 Tom Clegg
      m4.large:
135
        VCPUs: 2
136
        RAM: 8000000000
137
        Scratch: 31000000000
138
        Price: 0.1
139
      m4.large-1t:
140
        # same instance type as m4.large but our scripts attach more scratch
141
        ProviderType: m4.large
142
        VCPUs: 2
143
        RAM: 8000000000
144
        Scratch: 999000000000
145
        Price: 0.12
146
      m4.xlarge:
147
        VCPUs: 4
148
        RAM: 16000000000
149
        Scratch: 78000000000
150
        Price: 0.2
151
      m4.8xlarge:
152
        VCPUs: 40
153
        RAM: 160000000000
154
        Scratch: 156000000000
155
        Price: 2
156
      m4.16xlarge:
157
        VCPUs: 64
158
        RAM: 256000000000
159
        Scratch: 310000000000
160
        Price: 3.2
161
      c4.large:
162
        VCPUs: 2
163
        RAM: 3750000000
164
        Price: 0.1
165
      c4.8xlarge:
166
        VCPUs: 36
167
        RAM: 60000000000
168
        Price: 1.591
169 9 Tom Clegg
    RemoteClusters:
170
      xrrrr:
171
        Host: xrrrr.arvadosapi.com
172
        Proxy: true        # proxy requests to xrrrr on behalf of our clients
173
        AuthProvider: true # users authenticated by xrrrr can use our cluster
174 1 Tom Clegg
</code></pre>