20680: Set concurrency to num_cpus * 2 with a minimum of 8
[arvados.git] / tools / salt-install / config_examples / multi_host / aws / pillars / arvados.sls
1 ---
2 # Copyright (C) The Arvados Authors. All rights reserved.
3 #
4 # SPDX-License-Identifier: AGPL-3.0
5
6 {%- set _workers = ("__CONTROLLER_MAX_WORKERS__" or grains['num_cpus']*2)|int %}
7 {%- set max_workers = [_workers, 8]|max %}
8 {%- set max_reqs = ("__CONTROLLER_MAX_QUEUED_REQUESTS__" or 128)|int %}
9
10 # The variables commented out are the default values that the formula uses.
11 # The uncommented values are REQUIRED values. If you don't set them, running
12 # this formula will fail.
13 arvados:
14   ### GENERAL CONFIG
15   version: '__VERSION__'
16   ## It makes little sense to disable this flag, but you can, if you want :)
17   # use_upstream_repo: true
18
19   ## Repo URL is built with grains values. If desired, it can be completely
20   ## overwritten with the pillar parameter 'repo_url'
21   # repo:
22   #   humanname: Arvados Official Repository
23
24   release: __RELEASE__
25
26   ## IMPORTANT!!!!!
27   ## api, workbench and shell require some gems, so you need to make sure ruby
28   ## and deps are installed in order to install and compile the gems.
29   ## We default to `false` in these two variables as it's expected you already
30   ## manage OS packages with some other tool and you don't want us messing up
31   ## with your setup.
32   ruby:
33     ## We set these to `true` here for testing purposes.
34     ## They both default to `false`.
35     manage_ruby: true
36     manage_gems_deps: true
37     # pkg: ruby
38     # gems_deps:
39     #     - curl
40     #     - g++
41     #     - gcc
42     #     - git
43     #     - libcurl4
44     #     - libcurl4-gnutls-dev
45     #     - libpq-dev
46     #     - libxml2
47     #     - libxml2-dev
48     #     - make
49     #     - python3-dev
50     #     - ruby-dev
51     #     - zlib1g-dev
52
53   # config:
54   #   file: /etc/arvados/config.yml
55   #   user: root
56   ## IMPORTANT!!!!!
57   ## If you're intalling any of the rails apps (api, workbench), the group
58   ## should be set to that of the web server, usually `www-data`
59   #   group: root
60   #   mode: 640
61   dispatcher:
62     pkg:
63       name: arvados-dispatch-cloud
64     service:
65       name: arvados-dispatch-cloud
66
67   ### ARVADOS CLUSTER CONFIG
68   cluster:
69     name: __CLUSTER__
70     domain: __DOMAIN__
71
72     database:
73       # max concurrent connections per arvados server daemon
74       # connection_pool_max: 32
75       name: __CLUSTER___arvados
76       host: __DATABASE_INT_IP__
77       password: "__DATABASE_PASSWORD__"
78       user: __CLUSTER___arvados
79       encoding: en_US.utf8
80       client_encoding: UTF8
81
82     tls:
83       # certificate: ''
84       # key: ''
85       # required to test with arvados-snakeoil certs
86       insecure: false
87
88     resources:
89       virtual_machines:
90         shell:
91           name: shell.__DOMAIN__
92           backend: __SHELL_INT_IP__
93           port: 4200
94
95     ### TOKENS
96     tokens:
97       system_root: __SYSTEM_ROOT_TOKEN__
98       management: __MANAGEMENT_TOKEN__
99       anonymous_user: __ANONYMOUS_USER_TOKEN__
100
101     ### KEYS
102     secrets:
103       blob_signing_key: __BLOB_SIGNING_KEY__
104       workbench_secret_key: __WORKBENCH_SECRET_KEY__
105
106     Login:
107       Test:
108         Enable: true
109         Users:
110           __INITIAL_USER__:
111             Email: __INITIAL_USER_EMAIL__
112             Password: __INITIAL_USER_PASSWORD__
113
114     ### API
115     API:
116       MaxConcurrentRequests: {{ max_workers * 2 }}
117       MaxQueuedRequests: {{ max_reqs }}
118
119     ### CONTAINERS
120     {%- set dispatcher_ssh_privkey = "__DISPATCHER_SSH_PRIVKEY__" %}
121     Containers:
122       MaxRetryAttempts: 10
123       CloudVMs:
124         ResourceTags:
125           Name: __CLUSTER__-compute-node
126         BootProbeCommand: 'systemctl is-system-running'
127         ImageID: __COMPUTE_AMI__
128         Driver: ec2
129         DriverParameters:
130           Region: __COMPUTE_AWS_REGION__
131           EBSVolumeType: gp3
132           AdminUsername: __COMPUTE_USER__
133           ### This SG should allow SSH from the dispatcher to the compute nodes
134           SecurityGroupIDs: ['__COMPUTE_SG__']
135           SubnetID: __COMPUTE_SUBNET__
136           IAMInstanceProfile: __CLUSTER__-compute-node-00-iam-role
137       DispatchPrivateKey: {{ dispatcher_ssh_privkey|yaml_dquote }}
138
139     ### VOLUMES
140     ## This should usually match all your `keepstore` instances
141     Volumes:
142       # the volume name will be composed with
143       # <cluster>-nyw5e-<volume>
144       __CLUSTER__-nyw5e-000000000000000:
145         Replication: 2
146         Driver: S3
147         DriverParameters:
148           Bucket: __CLUSTER__-nyw5e-000000000000000-volume
149           IAMRole: __CLUSTER__-keepstore-00-iam-role
150           Region: __KEEP_AWS_REGION__
151
152     Users:
153       NewUsersAreActive: true
154       AutoAdminFirstUser: true
155       AutoSetupNewUsers: true
156       AutoSetupNewUsersWithRepository: true
157
158     Services:
159       Controller:
160         ExternalURL: 'https://__DOMAIN__:__CONTROLLER_EXT_SSL_PORT__'
161         InternalURLs:
162           'http://localhost:8003': {}
163       DispatchCloud:
164         InternalURLs:
165           'http://__DISPATCHER_INT_IP__:9006': {}
166       Keepbalance:
167         InternalURLs:
168           'http://__KEEPBALANCE_INT_IP__:9005': {}
169       Keepproxy:
170         ExternalURL: 'https://keep.__DOMAIN__:__KEEP_EXT_SSL_PORT__'
171         InternalURLs:
172           'http://localhost:25107': {}
173       Keepstore:
174         InternalURLs:
175           'http://__KEEPSTORE0_INT_IP__:25107': {}
176       RailsAPI:
177         InternalURLs:
178           'http://localhost:8004': {}
179       WebDAV:
180         ExternalURL: 'https://*.collections.__DOMAIN__:__KEEPWEB_EXT_SSL_PORT__/'
181         InternalURLs:
182           'http://__KEEPWEB_INT_IP__:9002': {}
183       WebDAVDownload:
184         ExternalURL: 'https://download.__DOMAIN__:__KEEPWEB_EXT_SSL_PORT__'
185       WebShell:
186         ExternalURL: 'https://webshell.__DOMAIN__:__KEEPWEB_EXT_SSL_PORT__'
187       Websocket:
188         ExternalURL: 'wss://ws.__DOMAIN__/websocket'
189         InternalURLs:
190           'http://localhost:8005': {}
191       Workbench1:
192         ExternalURL: 'https://workbench.__DOMAIN__:__WORKBENCH1_EXT_SSL_PORT__'
193       Workbench2:
194         ExternalURL: 'https://workbench2.__DOMAIN__:__WORKBENCH2_EXT_SSL_PORT__'
195
196     InstanceTypes:
197       t3small:
198         ProviderType: t3.small
199         VCPUs: 2
200         RAM: 2GiB
201         AddedScratch: 50GB
202         Price: 0.0208
203       c5large:
204         ProviderType: c5.large
205         VCPUs: 2
206         RAM: 4GiB
207         AddedScratch: 50GB
208         Price: 0.085
209       m5large:
210         ProviderType: m5.large
211         VCPUs: 2
212         RAM: 8GiB
213         AddedScratch: 50GB
214         Price: 0.096
215       c5xlarge:
216         ProviderType: c5.xlarge
217         VCPUs: 4
218         RAM: 8GiB
219         AddedScratch: 100GB
220         Price: 0.17
221       m5xlarge:
222         ProviderType: m5.xlarge
223         VCPUs: 4
224         RAM: 16GiB
225         AddedScratch: 100GB
226         Price: 0.192
227       m5xlarge_extradisk:
228         ProviderType: m5.xlarge
229         VCPUs: 4
230         RAM: 16GiB
231         AddedScratch: 400GB
232         Price: 0.193
233       c52xlarge:
234         ProviderType: c5.2xlarge
235         VCPUs: 8
236         RAM: 16GiB
237         AddedScratch: 200GB
238         Price: 0.34
239       m52xlarge:
240         ProviderType: m5.2xlarge
241         VCPUs: 8
242         RAM: 32GiB
243         AddedScratch: 200GB
244         Price: 0.384
245       c54xlarge:
246         ProviderType: c5.4xlarge
247         VCPUs: 16
248         RAM: 32GiB
249         AddedScratch: 400GB
250         Price: 0.68
251       m54xlarge:
252         ProviderType: m5.4xlarge
253         VCPUs: 16
254         RAM: 64GiB
255         AddedScratch: 400GB
256         Price: 0.768