7478: Fixes child CR default preemptable setting logic.
[arvados.git] / services / api / config / application.default.yml
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 # Do not use this file for site configuration. Create application.yml
6 # instead (see application.yml.example).
7 #
8 # The order of precedence is:
9 # 1. config/environments/{RAILS_ENV}.rb (deprecated)
10 # 2. Section in application.yml corresponding to RAILS_ENV (e.g., development)
11 # 3. Section in application.yml called "common"
12 # 4. Section in application.default.yml corresponding to RAILS_ENV
13 # 5. Section in application.default.yml called "common"
14
15 common:
16   ###
17   ### Essential site configuration
18   ###
19
20   # The prefix used for all database identifiers to identify the record as
21   # originating from this site.  Must be exactly 5 alphanumeric characters
22   # (lowercase ASCII letters and digits).
23   uuid_prefix: ~
24
25   # secret_token is a string of alphanumeric characters used by Rails
26   # to sign session tokens. IMPORTANT: This is a site secret. It
27   # should be at least 50 characters.
28   secret_token: ~
29
30   # blob_signing_key is a string of alphanumeric characters used to
31   # generate permission signatures for Keep locators. It must be
32   # identical to the permission key given to Keep. IMPORTANT: This is
33   # a site secret. It should be at least 50 characters.
34   #
35   # Modifying blob_signing_key will invalidate all existing
36   # signatures, which can cause programs to fail (e.g., arv-put,
37   # arv-get, and Crunch jobs).  To avoid errors, rotate keys only when
38   # no such processes are running.
39   blob_signing_key: ~
40
41   # These settings are provided by your OAuth2 provider (e.g.,
42   # sso-provider).
43   sso_app_secret: ~
44   sso_app_id: ~
45   sso_provider_url: ~
46
47   # If this is not false, HTML requests at the API server's root URL
48   # are redirected to this location, and it is provided in the text of
49   # user activation notification email messages to remind them where
50   # to log in.
51   workbench_address: false
52
53   # Client-facing URI for websocket service. Nginx should be
54   # configured to proxy this URI to arvados-ws; see
55   # http://doc.arvados.org/install/install-ws.html
56   #
57   # If websocket_address is false (which is the default), no websocket
58   # server will be advertised to clients. This configuration is not
59   # supported.
60   #
61   # Example:
62   #websocket_address: wss://ws.zzzzz.arvadosapi.com/websocket
63   websocket_address: false
64
65   # Maximum number of websocket connections allowed
66   websocket_max_connections: 500
67
68   # Maximum number of events a single connection can be backlogged
69   websocket_max_notify_backlog: 1000
70
71   # Maximum number of subscriptions a single websocket connection can have
72   # active.
73   websocket_max_filters: 10
74
75   # Git repositories must be readable by api server, or you won't be
76   # able to submit crunch jobs. To pass the test suites, put a clone
77   # of the arvados tree in {git_repositories_dir}/arvados.git or
78   # {git_repositories_dir}/arvados/.git
79   git_repositories_dir: /var/lib/arvados/git/repositories
80
81   # This is a (bare) repository that stores commits used in jobs.  When a job
82   # runs, the source commits are first fetched into this repository, then this
83   # repository is used to deploy to compute nodes.  This should NOT be a
84   # subdirectory of {git_repositiories_dir}.
85   git_internal_dir: /var/lib/arvados/internal.git
86
87   # Default replication level for collections. This is used when a
88   # collection's replication_desired attribute is nil.
89   default_collection_replication: 2
90
91
92   ###
93   ### Overriding default advertised hostnames/URLs
94   ###
95
96   # If not false, this is the hostname that will be used for root_url and
97   # advertised in the discovery document.  By default, use the default Rails
98   # logic for deciding on a hostname.
99   host: false
100
101   # Base part of SSH git clone url given with repository resources. If
102   # true, the default "git@git.(uuid_prefix).arvadosapi.com:" is
103   # used. If false, SSH clone URLs are not advertised. Include a
104   # trailing ":" or "/" if needed: it will not be added automatically.
105   git_repo_ssh_base: true
106
107   # Base part of HTTPS git clone urls given with repository
108   # resources. This is expected to be an arv-git-httpd service which
109   # accepts API tokens as HTTP-auth passwords. If true, the default
110   # "https://git.(uuid_prefix).arvadosapi.com/" is used. If false,
111   # HTTPS clone URLs are not advertised. Include a trailing ":" or "/"
112   # if needed: it will not be added automatically.
113   git_repo_https_base: true
114
115
116   ###
117   ### New user and & email settings
118   ###
119
120   # Config parameters to automatically setup new users.
121   # The params auto_setup_new_users_with_* are meaningful only when auto_setup_new_users is turned on.
122   # auto_setup_name_blacklist is a list of usernames to be blacklisted for auto setup.
123   auto_setup_new_users: false
124   auto_setup_new_users_with_vm_uuid: false
125   auto_setup_new_users_with_repository: false
126   auto_setup_name_blacklist: [arvados, git, gitolite, gitolite-admin, root, syslog]
127
128   # When new_users_are_active is set to true, the user agreement check is skipped.
129   new_users_are_active: false
130
131   # The e-mail address of the user you would like to become marked as an admin
132   # user on their first login.
133   # In the default configuration, authentication happens through the Arvados SSO
134   # server, which uses OAuth2 against Google's servers, so in that case this
135   # should be an address associated with a Google account.
136   auto_admin_user: false
137
138   # If auto_admin_first_user is set to true, the first user to log in when no
139   # other admin users exist will automatically become an admin user.
140   auto_admin_first_user: false
141
142   # Email address to notify whenever a user creates a profile for the
143   # first time
144   user_profile_notification_address: false
145
146   admin_notifier_email_from: arvados@example.com
147   email_subject_prefix: "[ARVADOS] "
148   user_notifier_email_from: arvados@example.com
149   new_user_notification_recipients: [ ]
150   new_inactive_user_notification_recipients: [ ]
151
152
153   ###
154   ### Limits, timeouts and durations
155   ###
156
157   # Lifetime (in seconds) of blob permission signatures generated by
158   # the API server. This determines how long a client can take (after
159   # retrieving a collection record) to retrieve the collection data
160   # from Keep. If the client needs more time than that (assuming the
161   # collection still has the same content and the relevant user/token
162   # still has permission) the client can retrieve the collection again
163   # to get fresh signatures.
164   #
165   # This must be exactly equal to the -blob-signature-ttl flag used by
166   # keepstore servers.  Otherwise, reading data blocks and saving
167   # collections will fail with HTTP 403 permission errors.
168   #
169   # Modifying blob_signature_ttl invalidates existing signatures; see
170   # blob_signing_key note above.
171   #
172   # The default is 2 weeks.
173   blob_signature_ttl: 1209600
174
175   # Default lifetime for ephemeral collections: 2 weeks. This must not
176   # be less than blob_signature_ttl.
177   default_trash_lifetime: 1209600
178
179   # Interval (seconds) between trash sweeps. During a trash sweep,
180   # collections are marked as trash if their trash_at time has
181   # arrived, and deleted if their delete_at time has arrived.
182   trash_sweep_interval: 60
183
184   # Maximum characters of (JSON-encoded) query parameters to include
185   # in each request log entry. When params exceed this size, they will
186   # be JSON-encoded, truncated to this size, and logged as
187   # params_truncated.
188   max_request_log_params_size: 2000
189
190   # Maximum size (in bytes) allowed for a single API request.  This
191   # limit is published in the discovery document for use by clients.
192   # Note: You must separately configure the upstream web server or
193   # proxy to actually enforce the desired maximum request size on the
194   # server side.
195   max_request_size: 134217728
196
197   # Limit the number of bytes read from the database during an index
198   # request (by retrieving and returning fewer rows than would
199   # normally be returned in a single response).
200   # Note 1: This setting never reduces the number of returned rows to
201   # zero, no matter how big the first data row is.
202   # Note 2: Currently, this is only checked against a specific set of
203   # columns that tend to get large (collections.manifest_text,
204   # containers.mounts, workflows.definition). Other fields (e.g.,
205   # "properties" hashes) are not counted against this limit.
206   max_index_database_read: 134217728
207
208   # Maximum number of items to return when responding to a APIs that
209   # can return partial result sets using limit and offset parameters
210   # (e.g., *.index, groups.contents). If a request specifies a "limit"
211   # parameter higher than this value, this value is used instead.
212   max_items_per_response: 1000
213
214   # When you run the db:delete_old_job_logs task, it will find jobs that
215   # have been finished for at least this many seconds, and delete their
216   # stderr logs from the logs table.
217   clean_job_log_rows_after: <%= 30.days %>
218
219   # When you run the db:delete_old_container_logs task, it will find
220   # containers that have been finished for at least this many seconds,
221   # and delete their stdout, stderr, arv-mount, crunch-run, and
222   # crunchstat logs from the logs table.
223   clean_container_log_rows_after: <%= 30.days %>
224
225   # Time to keep audit logs, in seconds. (An audit log is a row added
226   # to the "logs" table in the PostgreSQL database each time an
227   # Arvados object is created, modified, or deleted.)
228   #
229   # Currently, websocket event notifications rely on audit logs, so
230   # this should not be set lower than 600 (5 minutes).
231   max_audit_log_age: 1209600
232
233   # Maximum number of log rows to delete in a single SQL transaction.
234   #
235   # If max_audit_log_delete_batch is 0, log entries will never be
236   # deleted by Arvados. Cleanup can be done by an external process
237   # without affecting any Arvados system processes, as long as very
238   # recent (<5 minutes old) logs are not deleted.
239   #
240   # 100000 is a reasonable batch size for most sites.
241   max_audit_log_delete_batch: 0
242
243   # The maximum number of compute nodes that can be in use simultaneously
244   # If this limit is reduced, any existing nodes with slot number >= new limit
245   # will not be counted against the new limit. In other words, the new limit
246   # won't be strictly enforced until those nodes with higher slot numbers
247   # go down.
248   max_compute_nodes: 64
249
250   # These two settings control how frequently log events are flushed to the
251   # database.  Log lines are buffered until either crunch_log_bytes_per_event
252   # has been reached or crunch_log_seconds_between_events has elapsed since
253   # the last flush.
254   crunch_log_bytes_per_event: 4096
255   crunch_log_seconds_between_events: 1
256
257   # The sample period for throttling logs, in seconds.
258   crunch_log_throttle_period: 60
259
260   # Maximum number of bytes that job can log over crunch_log_throttle_period
261   # before being silenced until the end of the period.
262   crunch_log_throttle_bytes: 65536
263
264   # Maximum number of lines that job can log over crunch_log_throttle_period
265   # before being silenced until the end of the period.
266   crunch_log_throttle_lines: 1024
267
268   # Maximum bytes that may be logged by a single job.  Log bytes that are
269   # silenced by throttling are not counted against this total.
270   crunch_limit_log_bytes_per_job: 67108864
271
272   crunch_log_partial_line_throttle_period: 5
273
274   # Attributes to suppress in events and audit logs.  Notably,
275   # specifying ["manifest_text"] here typically makes the database
276   # smaller and faster.
277   #
278   # Warning: Using any non-empty value here can have undesirable side
279   # effects for any client or component that relies on event logs.
280   # Use at your own risk.
281   unlogged_attributes: []
282
283   # API methods to disable. Disabled methods are not listed in the
284   # discovery document, and respond 404 to all requests.
285   # Example: ["jobs.create", "pipeline_instances.create"]
286   disable_api_methods: []
287
288   ###
289   ### Crunch, DNS & compute node management
290   ###
291
292   # Preemptable instance support (e.g. AWS Spot Instances)
293   # When true, child containers will get created with the preemptable
294   # scheduling parameter parameter set.
295   preemptable_instances: false
296
297   # Docker image to be used when none found in runtime_constraints of a job
298   default_docker_image_for_jobs: false
299
300   # List of supported Docker Registry image formats that compute nodes
301   # are able to use. `arv keep docker` will error out if a user tries
302   # to store an image with an unsupported format. Use an empty array
303   # to skip the compatibility check (and display a warning message to
304   # that effect).
305   #
306   # Example for sites running docker < 1.10: ["v1"]
307   # Example for sites running docker >= 1.10: ["v2"]
308   # Example for disabling check: []
309   docker_image_formats: ["v2"]
310
311   # :none or :slurm_immediate
312   crunch_job_wrapper: :none
313
314   # username, or false = do not set uid when running jobs.
315   crunch_job_user: crunch
316
317   # The web service must be able to create/write this file, and
318   # crunch-job must be able to stat() it.
319   crunch_refresh_trigger: /tmp/crunch_refresh_trigger
320
321   # Path to dns server configuration directory
322   # (e.g. /etc/unbound.d/conf.d). If false, do not write any config
323   # files or touch restart.txt (see below).
324   dns_server_conf_dir: false
325
326   # Template file for the dns server host snippets. See
327   # unbound.template in this directory for an example. If false, do
328   # not write any config files.
329   dns_server_conf_template: false
330
331   # String to write to {dns_server_conf_dir}/restart.txt (with a
332   # trailing newline) after updating local data. If false, do not
333   # open or write the restart.txt file.
334   dns_server_reload_command: false
335
336   # Command to run after each DNS update. Template variables will be
337   # substituted; see the "unbound" example below. If false, do not run
338   # a command.
339   dns_server_update_command: false
340
341   ## Example for unbound:
342   #dns_server_conf_dir: /etc/unbound/conf.d
343   #dns_server_conf_template: /path/to/your/api/server/config/unbound.template
344   ## ...plus one of the following two methods of reloading:
345   #dns_server_reload_command: unbound-control reload
346   #dns_server_update_command: echo %{hostname} %{hostname}.%{uuid_prefix} %{hostname}.%{uuid_prefix}.arvadosapi.com %{ptr_domain} | xargs -n 1 unbound-control local_data_remove && unbound-control local_data %{hostname} IN A %{ip_address} && unbound-control local_data %{hostname}.%{uuid_prefix} IN A %{ip_address} && unbound-control local_data %{hostname}.%{uuid_prefix}.arvadosapi.com IN A %{ip_address} && unbound-control local_data %{ptr_domain}. IN PTR %{hostname}.%{uuid_prefix}.arvadosapi.com
347
348   compute_node_domain: false
349   compute_node_nameservers:
350     - 192.168.1.1
351
352   # Hostname to assign to a compute node when it sends a "ping" and the
353   # hostname in its Node record is nil.
354   # During bootstrapping, the "ping" script is expected to notice the
355   # hostname given in the ping response, and update its unix hostname
356   # accordingly.
357   # If false, leave the hostname alone (this is appropriate if your compute
358   # nodes' hostnames are already assigned by some other mechanism).
359   #
360   # One way or another, the hostnames of your node records should agree
361   # with your DNS records and your /etc/slurm-llnl/slurm.conf files.
362   #
363   # Example for compute0000, compute0001, ....:
364   # assign_node_hostname: compute%<slot_number>04d
365   # (See http://ruby-doc.org/core-2.2.2/Kernel.html#method-i-format for more.)
366   assign_node_hostname: compute%<slot_number>d
367
368
369   ###
370   ### Job and container reuse logic.
371   ###
372
373   # Include details about job reuse decisions in the server log. This
374   # causes additional database queries to run, so it should not be
375   # enabled unless you expect to examine the resulting logs for
376   # troubleshooting purposes.
377   log_reuse_decisions: false
378
379   # Control job reuse behavior when two completed jobs match the
380   # search criteria and have different outputs.
381   #
382   # If true, in case of a conflict, reuse the earliest job (this is
383   # similar to container reuse behavior).
384   #
385   # If false, in case of a conflict, do not reuse any completed job,
386   # but do reuse an already-running job if available (this is the
387   # original job reuse behavior, and is still the default).
388   reuse_job_if_outputs_differ: false
389
390   ###
391   ### Federation support.
392   ###
393
394   # You can enable use of this cluster by users who are authenticated
395   # by a remote Arvados site. Control which remote hosts are trusted
396   # to authenticate which user IDs by configuring remote_hosts,
397   # remote_hosts_via_dns, or both. The default configuration disables
398   # remote authentication.
399
400   # Map known prefixes to hosts. For example, if user IDs beginning
401   # with "zzzzz-" should be authenticated by the Arvados server at
402   # "zzzzz.example.com", use:
403   #
404   # remote_hosts:
405   #   zzzzz: zzzzz.example.com
406   remote_hosts: {}
407
408   # Use {prefix}.arvadosapi.com for any prefix not given in
409   # remote_hosts above.
410   remote_hosts_via_dns: false
411
412   ###
413   ### Remaining assorted configuration options.
414   ###
415
416   arvados_theme: default
417
418   # Permit insecure (OpenSSL::SSL::VERIFY_NONE) connections to the
419   # Single Sign On (sso) server and remote Arvados sites.  Should only
420   # be enabled during development when the SSO server is using a
421   # self-signed cert.
422   sso_insecure: false
423
424   ## Set Time.zone default to the specified zone and make Active
425   ## Record auto-convert to this zone.  Run "rake -D time" for a list
426   ## of tasks for finding time zone names. Default is UTC.
427   #time_zone: Central Time (US & Canada)
428
429   ## Default encoding used in templates for Ruby 1.9.
430   encoding: utf-8
431
432   # Enable the asset pipeline
433   assets.enabled: true
434
435   # Version of your assets, change this if you want to expire all your assets
436   assets.version: "1.0"
437
438   # Allow clients to create collections by providing a manifest with
439   # unsigned data blob locators. IMPORTANT: This effectively disables
440   # access controls for data stored in Keep: a client who knows a hash
441   # can write a manifest that references the hash, pass it to
442   # collections.create (which will create a permission link), use
443   # collections.get to obtain a signature for that data locator, and
444   # use that signed locator to retrieve the data from Keep. Therefore,
445   # do not turn this on if your users expect to keep data private from
446   # one another!
447   permit_create_collection_with_unsigned_manifest: false
448
449   default_openid_prefix: https://www.google.com/accounts/o8/id
450
451   # Override the automatic version string. With the default value of
452   # false, the version string is read from git-commit.version in
453   # Rails.root (included in vendor packages) or determined by invoking
454   # "git log".
455   source_version: false
456
457   # Enable asynchronous permission graph rebuild.  Must run
458   # script/permission-updater.rb as a separate process.  When the permission
459   # cache is invalidated, the background process will update the permission
460   # graph cache.  This feature is experimental!
461   async_permissions_update: false
462
463   # Default value for container_count_max for container requests.  This is the
464   # number of times Arvados will create a new container to satisfy a container
465   # request.  If a container is cancelled it will retry a new container if
466   # container_count < container_count_max on any container requests associated
467   # with the cancelled container.
468   container_count_max: 3
469
470   # Default value for keep_cache_ram of a container's runtime_constraints.
471   container_default_keep_cache_ram: 268435456
472
473   # Token to be included in all healthcheck requests. Disabled by default.
474   # Server expects request header of the format "Authorization: Bearer xxx"
475   ManagementToken: false
476
477   # URL of keep-web service.  Provides read/write access to collections via
478   # HTTP and WebDAV protocols.
479   #
480   # Example:
481   # keep_web_service_url: https://download.uuid_prefix.arvadosapi.com/
482   keep_web_service_url: false
483
484 development:
485   force_ssl: false
486   cache_classes: false
487   whiny_nils: true
488   consider_all_requests_local: true
489   action_controller.perform_caching: false
490   action_mailer.raise_delivery_errors: false
491   action_mailer.perform_deliveries: false
492   active_support.deprecation: :log
493   action_dispatch.best_standards_support: :builtin
494   active_record.auto_explain_threshold_in_seconds: 0.5
495   assets.compress: false
496   assets.debug: true
497
498 production:
499   force_ssl: true
500   cache_classes: true
501   consider_all_requests_local: false
502   action_controller.perform_caching: true
503   serve_static_files: false
504   assets.compress: true
505   assets.compile: false
506   assets.digest: true
507
508 test:
509   force_ssl: false
510   cache_classes: true
511   serve_static_files: true
512   static_cache_control: public, max-age=3600
513   whiny_nils: true
514   consider_all_requests_local: true
515   action_controller.perform_caching: false
516   action_dispatch.show_exceptions: false
517   action_controller.allow_forgery_protection: false
518   action_mailer.delivery_method: :test
519   active_support.deprecation: :stderr
520   uuid_prefix: zzzzz
521   sso_app_id: arvados-server
522   sso_app_secret: <%= rand(2**512).to_s(36) %>
523   sso_provider_url: http://localhost:3002
524   secret_token: <%= rand(2**512).to_s(36) %>
525   blob_signing_key: zfhgfenhffzltr9dixws36j1yhksjoll2grmku38mi7yxd66h5j4q9w4jzanezacp8s6q0ro3hxakfye02152hncy6zml2ed0uc
526   user_profile_notification_address: arvados@example.com
527   workbench_address: https://localhost:3001/
528   git_repositories_dir: <%= Rails.root.join 'tmp', 'git', 'test' %>
529   git_internal_dir: <%= Rails.root.join 'tmp', 'internal.git' %>
530   websocket_address: "wss://0.0.0.0:<%= ENV['ARVADOS_TEST_WSS_PORT'] %>/websocket"
531   trash_sweep_interval: -1
532   docker_image_formats: ["v1"]