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