Merge branch 'master' into 10797-ruby-2.3
[arvados.git] / services / api / config / application.default.yml
1 # Do not use this file for site configuration. Create application.yml
2 # instead (see application.yml.example).
3 #
4 # The order of precedence is:
5 # 1. config/environments/{RAILS_ENV}.rb (deprecated)
6 # 2. Section in application.yml corresponding to RAILS_ENV (e.g., development)
7 # 3. Section in application.yml called "common"
8 # 4. Section in application.default.yml corresponding to RAILS_ENV
9 # 5. Section in application.default.yml called "common"
10
11 common:
12   ###
13   ### Essential site configuration
14   ###
15
16   # The prefix used for all database identifiers to identify the record as
17   # originating from this site.  Must be exactly 5 alphanumeric characters
18   # (lowercase ASCII letters and digits).
19   uuid_prefix: ~
20
21   # secret_token is a string of alphanumeric characters used by Rails
22   # to sign session tokens. IMPORTANT: This is a site secret. It
23   # should be at least 50 characters.
24   secret_token: ~
25
26   # blob_signing_key is a string of alphanumeric characters used to
27   # generate permission signatures for Keep locators. It must be
28   # identical to the permission key given to Keep. IMPORTANT: This is
29   # a site secret. It should be at least 50 characters.
30   #
31   # Modifying blob_signing_key will invalidate all existing
32   # signatures, which can cause programs to fail (e.g., arv-put,
33   # arv-get, and Crunch jobs).  To avoid errors, rotate keys only when
34   # no such processes are running.
35   blob_signing_key: ~
36
37   # These settings are provided by your OAuth2 provider (e.g.,
38   # sso-provider).
39   sso_app_secret: ~
40   sso_app_id: ~
41   sso_provider_url: ~
42
43   # If this is not false, HTML requests at the API server's root URL
44   # are redirected to this location, and it is provided in the text of
45   # user activation notification email messages to remind them where
46   # to log in.
47   workbench_address: false
48
49   # The ARVADOS_WEBSOCKETS environment variable determines whether to
50   # serve http, websockets, or both.
51   #
52   # If ARVADOS_WEBSOCKETS="true", http and websockets are both served
53   # from the same process.
54   #
55   # If ARVADOS_WEBSOCKETS="ws-only", only websockets is served.
56   #
57   # If ARVADOS_WEBSOCKETS="false" or not set at all, only http is
58   # served. In this case, you should have a separate process serving
59   # websockets, and the address of that service should be given here
60   # as websocket_address.
61   #
62   # If websocket_address is false (which is the default), the
63   # discovery document will tell clients to use the current server as
64   # the websocket service, or (if the current server does not have
65   # websockets enabled) not to use websockets at all.
66   #
67   # Example: Clients will connect to the specified endpoint.
68   #websocket_address: wss://127.0.0.1:3333/websocket
69   # Default: Clients will connect to this server if it's running
70   # websockets, otherwise none at all.
71   websocket_address: false
72
73   # Maximum number of websocket connections allowed
74   websocket_max_connections: 500
75
76   # Maximum number of events a single connection can be backlogged
77   websocket_max_notify_backlog: 1000
78
79   # Maximum number of subscriptions a single websocket connection can have
80   # active.
81   websocket_max_filters: 10
82
83   # Git repositories must be readable by api server, or you won't be
84   # able to submit crunch jobs. To pass the test suites, put a clone
85   # of the arvados tree in {git_repositories_dir}/arvados.git or
86   # {git_repositories_dir}/arvados/.git
87   git_repositories_dir: /var/lib/arvados/git/repositories
88
89   # This is a (bare) repository that stores commits used in jobs.  When a job
90   # runs, the source commits are first fetched into this repository, then this
91   # repository is used to deploy to compute nodes.  This should NOT be a
92   # subdirectory of {git_repositiories_dir}.
93   git_internal_dir: /var/lib/arvados/internal.git
94
95   # Default replication level for collections. This is used when a
96   # collection's replication_desired attribute is nil.
97   default_collection_replication: 2
98
99
100   ###
101   ### Overriding default advertised hostnames/URLs
102   ###
103
104   # If not false, this is the hostname that will be used for root_url and
105   # advertised in the discovery document.  By default, use the default Rails
106   # logic for deciding on a hostname.
107   host: false
108
109   # Base part of SSH git clone url given with repository resources. If
110   # true, the default "git@git.(uuid_prefix).arvadosapi.com:" is
111   # used. If false, SSH clone URLs are not advertised. Include a
112   # trailing ":" or "/" if needed: it will not be added automatically.
113   git_repo_ssh_base: true
114
115   # Base part of HTTPS git clone urls given with repository
116   # resources. This is expected to be an arv-git-httpd service which
117   # accepts API tokens as HTTP-auth passwords. If true, the default
118   # "https://git.(uuid_prefix).arvadosapi.com/" is used. If false,
119   # HTTPS clone URLs are not advertised. Include a trailing ":" or "/"
120   # if needed: it will not be added automatically.
121   git_repo_https_base: true
122
123
124   ###
125   ### New user and & email settings
126   ###
127
128   # Config parameters to automatically setup new users.
129   # The params auto_setup_new_users_with_* are meaningful only when auto_setup_new_users is turned on.
130   # auto_setup_name_blacklist is a list of usernames to be blacklisted for auto setup.
131   auto_setup_new_users: false
132   auto_setup_new_users_with_vm_uuid: false
133   auto_setup_new_users_with_repository: false
134   auto_setup_name_blacklist: [arvados, git, gitolite, gitolite-admin, root, syslog]
135
136   # When new_users_are_active is set to true, the user agreement check is skipped.
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 only limits the
211   # arvados.v1.collections.list API (GET /arvados/v1/collections), and
212   # only takes the size of manifest_text into account. Other fields
213   # (e.g., "properties" hashes) are not counted against this limit
214   # when returning collections, and the limit is not applied at all
215   # for other data types.
216   max_index_database_read: 134217728
217
218   # Maximum number of items to return when responding to a APIs that
219   # can return partial result sets using limit and offset parameters
220   # (e.g., *.index, groups.contents). If a request specifies a "limit"
221   # parameter higher than this value, this value is used instead.
222   max_items_per_response: 1000
223
224   # When you run the db:delete_old_job_logs task, it will find jobs that
225   # have been finished for at least this many seconds, and delete their
226   # stderr logs from the logs table.
227   clean_job_log_rows_after: <%= 30.days %>
228
229   # When you run the db:delete_old_container_logs task, it will find
230   # containers that have been finished for at least this many seconds,
231   # and delete their stdout, stderr, arv-mount, crunch-run, and
232   # crunchstat logs from the logs table.
233   clean_container_log_rows_after: <%= 30.days %>
234
235   # The maximum number of compute nodes that can be in use simultaneously
236   # If this limit is reduced, any existing nodes with slot number >= new limit
237   # will not be counted against the new limit. In other words, the new limit
238   # won't be strictly enforced until those nodes with higher slot numbers
239   # go down.
240   max_compute_nodes: 64
241
242   # These two settings control how frequently log events are flushed to the
243   # database.  Log lines are buffered until either crunch_log_bytes_per_event
244   # has been reached or crunch_log_seconds_between_events has elapsed since
245   # the last flush.
246   crunch_log_bytes_per_event: 4096
247   crunch_log_seconds_between_events: 1
248
249   # The sample period for throttling logs, in seconds.
250   crunch_log_throttle_period: 60
251
252   # Maximum number of bytes that job can log over crunch_log_throttle_period
253   # before being silenced until the end of the period.
254   crunch_log_throttle_bytes: 65536
255
256   # Maximum number of lines that job can log over crunch_log_throttle_period
257   # before being silenced until the end of the period.
258   crunch_log_throttle_lines: 1024
259
260   # Maximum bytes that may be logged by a single job.  Log bytes that are
261   # silenced by throttling are not counted against this total.
262   crunch_limit_log_bytes_per_job: 67108864
263
264   # Attributes to suppress in events and audit logs.  Notably,
265   # specifying ["manifest_text"] here typically makes the database
266   # smaller and faster.
267   #
268   # Warning: Using any non-empty value here can have undesirable side
269   # effects for any client or component that relies on event logs.
270   # Use at your own risk.
271   unlogged_attributes: []
272
273   # API methods to disable. Disabled methods are not listed in the
274   # discovery document, and respond 404 to all requests.
275   # Example: ["jobs.create", "pipeline_instances.create"]
276   disable_api_methods: []
277
278   ###
279   ### Crunch, DNS & compute node management
280   ###
281
282   # Docker image to be used when none found in runtime_constraints of a job
283   default_docker_image_for_jobs: false
284
285   # List of supported Docker Registry image formats that compute nodes
286   # are able to use. `arv keep docker` will error out if a user tries
287   # to store an image with an unsupported format. Use an empty array
288   # to skip the compatibility check (and display a warning message to
289   # that effect).
290   #
291   # Example for sites running docker < 1.10: ["v1"]
292   # Example for sites running docker >= 1.10: ["v2"]
293   # Example for disabling check: []
294   docker_image_formats: ["v2"]
295
296   # :none or :slurm_immediate
297   crunch_job_wrapper: :none
298
299   # username, or false = do not set uid when running jobs.
300   crunch_job_user: crunch
301
302   # The web service must be able to create/write this file, and
303   # crunch-job must be able to stat() it.
304   crunch_refresh_trigger: /tmp/crunch_refresh_trigger
305
306   # Path to dns server configuration directory
307   # (e.g. /etc/unbound.d/conf.d). If false, do not write any config
308   # files or touch restart.txt (see below).
309   dns_server_conf_dir: false
310
311   # Template file for the dns server host snippets. See
312   # unbound.template in this directory for an example. If false, do
313   # not write any config files.
314   dns_server_conf_template: false
315
316   # String to write to {dns_server_conf_dir}/restart.txt (with a
317   # trailing newline) after updating local data. If false, do not
318   # open or write the restart.txt file.
319   dns_server_reload_command: false
320
321   # Command to run after each DNS update. Template variables will be
322   # substituted; see the "unbound" example below. If false, do not run
323   # a command.
324   dns_server_update_command: false
325
326   ## Example for unbound:
327   #dns_server_conf_dir: /etc/unbound/conf.d
328   #dns_server_conf_template: /path/to/your/api/server/config/unbound.template
329   ## ...plus one of the following two methods of reloading:
330   #dns_server_reload_command: unbound-control reload
331   #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
332
333   compute_node_domain: false
334   compute_node_nameservers:
335     - 192.168.1.1
336
337   # Hostname to assign to a compute node when it sends a "ping" and the
338   # hostname in its Node record is nil.
339   # During bootstrapping, the "ping" script is expected to notice the
340   # hostname given in the ping response, and update its unix hostname
341   # accordingly.
342   # If false, leave the hostname alone (this is appropriate if your compute
343   # nodes' hostnames are already assigned by some other mechanism).
344   #
345   # One way or another, the hostnames of your node records should agree
346   # with your DNS records and your /etc/slurm-llnl/slurm.conf files.
347   #
348   # Example for compute0000, compute0001, ....:
349   # assign_node_hostname: compute%<slot_number>04d
350   # (See http://ruby-doc.org/core-2.2.2/Kernel.html#method-i-format for more.)
351   assign_node_hostname: compute%<slot_number>d
352
353
354   ###
355   ### Remaining assorted configuration options.
356   ###
357
358   arvados_theme: default
359
360   # Permit insecure (OpenSSL::SSL::VERIFY_NONE) connections to the Single Sign
361   # On (sso) server.  Should only be enabled during development when the SSO
362   # server is using a self-signed cert.
363   sso_insecure: false
364
365   ## Set Time.zone default to the specified zone and make Active
366   ## Record auto-convert to this zone.  Run "rake -D time" for a list
367   ## of tasks for finding time zone names. Default is UTC.
368   #time_zone: Central Time (US & Canada)
369
370   ## Default encoding used in templates for Ruby 1.9.
371   encoding: utf-8
372
373   # Enable the asset pipeline
374   assets.enabled: true
375
376   # Version of your assets, change this if you want to expire all your assets
377   assets.version: "1.0"
378
379   # Allow clients to create collections by providing a manifest with
380   # unsigned data blob locators. IMPORTANT: This effectively disables
381   # access controls for data stored in Keep: a client who knows a hash
382   # can write a manifest that references the hash, pass it to
383   # collections.create (which will create a permission link), use
384   # collections.get to obtain a signature for that data locator, and
385   # use that signed locator to retrieve the data from Keep. Therefore,
386   # do not turn this on if your users expect to keep data private from
387   # one another!
388   permit_create_collection_with_unsigned_manifest: false
389
390   default_openid_prefix: https://www.google.com/accounts/o8/id
391
392   # Override the automatic version string. With the default value of
393   # false, the version string is read from git-commit.version in
394   # Rails.root (included in vendor packages) or determined by invoking
395   # "git log".
396   source_version: false
397
398   crunch_log_partial_line_throttle_period: 5
399
400   # Enable asynchronous permission graph rebuild.  Must run
401   # script/permission-updater.rb as a separate process.  When the permission
402   # cache is invalidated, the background process will update the permission
403   # graph cache.  This feature is experimental!
404   async_permissions_update: false
405
406   # Default value for container_count_max for container requests.  This is the
407   # number of times Arvados will create a new container to satisfy a container
408   # request.  If a container is cancelled it will retry a new container if
409   # container_count < container_count_max on any container requests associated
410   # with the cancelled container.
411   container_count_max: 3
412
413   # Default value for keep_cache_ram of a container's runtime_constraints.
414   container_default_keep_cache_ram: 268435456
415
416 development:
417   force_ssl: false
418   cache_classes: false
419   whiny_nils: true
420   consider_all_requests_local: true
421   action_controller.perform_caching: false
422   action_mailer.raise_delivery_errors: false
423   action_mailer.perform_deliveries: false
424   active_support.deprecation: :log
425   action_dispatch.best_standards_support: :builtin
426   active_record.mass_assignment_sanitizer: :strict
427   active_record.auto_explain_threshold_in_seconds: 0.5
428   assets.compress: false
429   assets.debug: true
430
431 production:
432   force_ssl: true
433   cache_classes: true
434   consider_all_requests_local: false
435   action_controller.perform_caching: true
436   serve_static_assets: false
437   assets.compress: true
438   assets.compile: false
439   assets.digest: true
440
441 test:
442   force_ssl: false
443   cache_classes: true
444   serve_static_assets: true
445   static_cache_control: public, max-age=3600
446   whiny_nils: true
447   consider_all_requests_local: true
448   action_controller.perform_caching: false
449   action_dispatch.show_exceptions: false
450   action_controller.allow_forgery_protection: false
451   action_mailer.delivery_method: :test
452   active_support.deprecation: :stderr
453   active_record.mass_assignment_sanitizer: :strict
454   uuid_prefix: zzzzz
455   sso_app_id: arvados-server
456   sso_app_secret: <%= rand(2**512).to_s(36) %>
457   sso_provider_url: http://localhost:3002
458   secret_token: <%= rand(2**512).to_s(36) %>
459   blob_signing_key: zfhgfenhffzltr9dixws36j1yhksjoll2grmku38mi7yxd66h5j4q9w4jzanezacp8s6q0ro3hxakfye02152hncy6zml2ed0uc
460   user_profile_notification_address: arvados@example.com
461   workbench_address: https://localhost:3001/
462   git_repositories_dir: <%= Rails.root.join 'tmp', 'git', 'test' %>
463   git_internal_dir: <%= Rails.root.join 'tmp', 'internal.git' %>
464   websocket_address: <% if ENV['ARVADOS_TEST_EXPERIMENTAL_WS'] %>"wss://0.0.0.0:<%= ENV['ARVADOS_TEST_WSS_PORT'] %>/websocket"<% else %>false<% end %>
465   trash_sweep_interval: -1