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