Project

General

Profile

Cluster configuration » History » Version 7

Tom Clegg, 06/19/2018 08:34 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
      Host: localhost
32
      Port: 5432
33
      Username: arvados
34
      Password: s3cr3t
35
      Database: arvados_production
36
      Encoding: utf8
37
    HTTPRequestTimeout: 5m
38 6 Tom Clegg
    Defaults:
39
      CollectionReplication: 2
40
      TrashLifetime: 2w
41
    UserActivation:
42
      ActivateNewUsers: true
43
      AutoAdminUser: root@example.com
44
      UserProfileNotificationAddress: notify@example.com
45
      NewUserNotificationRecipients: []
46
      NewInactiveUserNotificationRecipients: []
47
    Limits:
48
      MaxRequestLogParamsSize: 2KB
49
      MaxRequestSize: 128MiB
50
      MaxIndexDatabaseRead: 128MiB
51
      MaxItemsPerResponse: 1000
52
    AuditLogs:
53
      MaxAge: 2w
54
      DeleteBatchSize: 100000
55
      UnloggedAttributes: []
56
    ContainerLogStream:
57
      BatchSize: 4KiB
58
      BatchTime: 1s
59
      ThrottlePeriod: 1m
60
      ThrottleThresholdSize: 64KiB
61
      ThrottleThresholdLines: 1024
62
      TruncateSize: 64MiB
63
      PartialLineThrottlePeriod: 5s
64
    Timers:
65
      TrashSweepInterval: 60s
66
    Scaling:
67
      MaxComputeNodes: 64
68
      EnablePreemptibleInstances: false
69
    DisableAPIMethods: []
70
    DockerImageFormats: ["v2"]
71
    Crunch1:
72
      Enable: true
73
      CrunchJobWrapper: none
74
      CrunchJobUser: crunch
75
      CrunchRefreshTrigge: /tmp/crunch_refresh_trigger
76
      DefaultDockerImage: false
77 4 Tom Clegg
    NodeProfiles:
78
      # Key is a profile name; can be specified on service prog command line, defaults to $(hostname)
79
      keep:
80
        # Don’t run other services automatically -- only specified ones
81
        Default: {Disable: true}
82
        Keepstore: {Listen: ":25107"}
83
      apiserver:
84
        Default: {Disable: true}
85
        RailsAPI: {Listen: ":9000", TLS: true}
86
        Controller: {Listen: ":9100"}
87
        Websocket: {Listen: ":9101"}
88
        Health: {Listen: ":9199"}
89
      keep:
90
        Default: {Disable: true}
91
        KeepProxy: {Listen: ":9102"}
92
        KeepWeb: {Listen: ":9103"}
93
      *:
94
        # This section used for a node whose profile name is not listed above
95
        Default: {Disable: false} # (this is the default behavior)
96 1 Tom Clegg
    Volumes:
97
      xyzzy-keep-0:
98
        Type: s3
99
        Region: us-east
100
        Bucket: xyzzy-keep-0
101
        # [rest of keepstore volume config goes here]
102
    Providers:
103
      AWS:
104
        # [credentials and stuff go here]
105 4 Tom Clegg
    WebRoutes:
106 5 Tom Clegg
      # “default” means route according to method/host/path (e.g., if host is a login shell, route there)
107 4 Tom Clegg
      xyzzy.arvadosapi.com: default
108
      # “collections” means always route to keep-web
109
      collections.xyzzy.arvadosapi.com: collections
110
      # leading * is a wildcard (longest match wins)
111
      "*--collections.xyzzy.arvadosapi.com": collections
112
      cloud.curoverse.com: workbench
113
      workbench.xyzzy.arvadosapi.com: workbench
114
      "*.xyzzy.arvadosapi.com": default
115 3 Tom Clegg
    InstanceTypes:
116 2 Tom Clegg
    - Name: m4.large
117 1 Tom Clegg
      VCPUs: 2
118
      RAM: 8000000000
119 2 Tom Clegg
      Scratch: 31000000000
120 1 Tom Clegg
      Price: 0.1
121
    - Name: m4.large-1t
122 2 Tom Clegg
      # same instance type as m4.large but our scripts attach more scratch
123
      ProviderType: m4.large
124
      VCPUs: 2
125
      RAM: 8000000000
126 1 Tom Clegg
      Scratch: 999000000000
127
      Price: 0.12
128 2 Tom Clegg
    - Name: m4.xlarge
129
      VCPUs: 4
130 1 Tom Clegg
      RAM: 16000000000
131 3 Tom Clegg
      Scratch: 78000000000
132 1 Tom Clegg
      Price: 0.2
133
    - Name: m4.8xlarge
134
      VCPUs: 40
135
      RAM: 160000000000
136
      Scratch: 156000000000
137
      Price: 2
138
    - Name: m4.16xlarge
139
      VCPUs: 64
140 3 Tom Clegg
      RAM: 256000000000
141 1 Tom Clegg
      Scratch: 310000000000
142
      Price: 3.2
143
    - Name: c4.large
144
      VCPUs: 2
145
      RAM: 3750000000
146
      Price: 0.1
147
    - Name: c4.8xlarge
148
      VCPUs: 36
149
      RAM: 60000000000
150 2 Tom Clegg
      Price: 1.591
151 1 Tom Clegg
</code></pre>