09ce8b6359dc528007e753e59fe48caa2cc25e4d
[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   # Git repositories must be readable by api server, or you won't be
74   # able to submit crunch jobs. To pass the test suites, put a clone
75   # of the arvados tree in {git_repositories_dir}/arvados.git or
76   # {git_repositories_dir}/arvados/.git
77   git_repositories_dir: /var/lib/arvados/git/repositories
78
79   # This is a (bare) repository that stores commits used in jobs.  When a job
80   # runs, the source commits are first fetched into this repository, then this
81   # repository is used to deploy to compute nodes.  This should NOT be a
82   # subdirectory of {git_repositiories_dir}.
83   git_internal_dir: /var/lib/arvados/internal.git
84
85   # Default replication level for collections. This is used when a
86   # collection's replication_desired attribute is nil.
87   default_collection_replication: 2
88
89
90   ###
91   ### Overriding default advertised hostnames/URLs
92   ###
93
94   # If not false, this is the hostname that will be used for root_url and
95   # advertised in the discovery document.  By default, use the default Rails
96   # logic for deciding on a hostname.
97   host: false
98
99   # Base part of SSH git clone url given with repository resources. If
100   # true, the default "git@git.(uuid_prefix).arvadosapi.com:" is
101   # used. If false, SSH clone URLs are not advertised. Include a
102   # trailing ":" or "/" if needed: it will not be added automatically.
103   git_repo_ssh_base: true
104
105   # Base part of HTTPS git clone urls given with repository
106   # resources. This is expected to be an arv-git-httpd service which
107   # accepts API tokens as HTTP-auth passwords. If true, the default
108   # "https://git.(uuid_prefix).arvadosapi.com/" is used. If false,
109   # HTTPS clone URLs are not advertised. Include a trailing ":" or "/"
110   # if needed: it will not be added automatically.
111   git_repo_https_base: true
112
113
114   ###
115   ### New user and & email settings
116   ###
117
118   # Config parameters to automatically setup new users.
119   # The params auto_setup_new_users_with_* are meaningful only when auto_setup_new_users is turned on.
120   # auto_setup_name_blacklist is a list of usernames to be blacklisted for auto setup.
121   auto_setup_new_users: false
122   auto_setup_new_users_with_vm_uuid: false
123   auto_setup_new_users_with_repository: false
124   auto_setup_name_blacklist: [arvados, git, gitolite, gitolite-admin, root, syslog]
125
126   # When new_users_are_active is set to true, the user agreement check is skipped.
127   new_users_are_active: false
128
129   # The e-mail address of the user you would like to become marked as an admin
130   # user on their first login.
131   # In the default configuration, authentication happens through the Arvados SSO
132   # server, which uses OAuth2 against Google's servers, so in that case this
133   # should be an address associated with a Google account.
134   auto_admin_user: false
135
136   # If auto_admin_first_user is set to true, the first user to log in when no
137   # other admin users exist will automatically become an admin user.
138   auto_admin_first_user: false
139
140   # Email address to notify whenever a user creates a profile for the
141   # first time
142   user_profile_notification_address: false
143
144   admin_notifier_email_from: arvados@example.com
145   email_subject_prefix: "[ARVADOS] "
146   user_notifier_email_from: arvados@example.com
147   new_user_notification_recipients: [ ]
148   new_inactive_user_notification_recipients: [ ]
149
150
151   ###
152   ### Limits, timeouts and durations
153   ###
154
155   # Lifetime (in seconds) of blob permission signatures generated by
156   # the API server. This will become a part of the blob signing key,
157   # and will cause clients to retry or fail if changed while they are
158   # in progres.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.
176   default_trash_lifetime: 1209600
177
178   # Maximum size (in bytes) allowed for a single API request.  This
179   # limit is published in the discovery document for use by clients.
180   # Note: You must separately configure the upstream web server or
181   # proxy to actually enforce the desired maximum request size on the
182   # server side.
183   max_request_size: 134217728
184
185   # Limit the number of bytes read from the database during an index
186   # request (by retrieving and returning fewer rows than would
187   # normally be returned in a single response).
188   # Note 1: This setting never reduces the number of returned rows to
189   # zero, no matter how big the first data row is.
190   # Note 2: Currently, this only limits the
191   # arvados.v1.collections.list API (GET /arvados/v1/collections), and
192   # only takes the size of manifest_text into account. Other fields
193   # (e.g., "properties" hashes) are not counted against this limit
194   # when returning collections, and the limit is not applied at all
195   # for other data types.
196   max_index_database_read: 134217728
197
198   # Maximum number of items to return when responding to a APIs that
199   # can return partial result sets using limit and offset parameters
200   # (e.g., *.index, groups.contents). If a request specifies a "limit"
201   # parameter higher than this value, this value is used instead.
202   max_items_per_response: 1000
203
204   # When you run the db:delete_old_job_logs task, it will find jobs that
205   # have been finished for at least this many seconds, and delete their
206   # stderr logs from the logs table.
207   clean_job_log_rows_after: <%= 30.days %>
208
209   # The maximum number of compute nodes that can be in use simultaneously
210   # If this limit is reduced, any existing nodes with slot number >= new limit
211   # will not be counted against the new limit. In other words, the new limit
212   # won't be strictly enforced until those nodes with higher slot numbers
213   # go down.
214   max_compute_nodes: 64
215
216   # These two settings control how frequently log events are flushed to the
217   # database.  Log lines are buffered until either crunch_log_bytes_per_event
218   # has been reached or crunch_log_seconds_between_events has elapsed since
219   # the last flush.
220   crunch_log_bytes_per_event: 4096
221   crunch_log_seconds_between_events: 1
222
223   # The sample period for throttling logs, in seconds.
224   crunch_log_throttle_period: 60
225
226   # Maximum number of bytes that job can log over crunch_log_throttle_period
227   # before being silenced until the end of the period.
228   crunch_log_throttle_bytes: 65536
229
230   # Maximum number of lines that job can log over crunch_log_throttle_period
231   # before being silenced until the end of the period.
232   crunch_log_throttle_lines: 1024
233
234   # Maximum bytes that may be logged by a single job.  Log bytes that are
235   # silenced by throttling are not counted against this total.
236   crunch_limit_log_bytes_per_job: 67108864
237
238
239   ###
240   ### Crunch, DNS & compute node management
241   ###
242
243   # Docker image to be used when none found in runtime_constraints of a job
244   default_docker_image_for_jobs: false
245
246   # :none or :slurm_immediate
247   crunch_job_wrapper: :none
248
249   # username, or false = do not set uid when running jobs.
250   crunch_job_user: crunch
251
252   # The web service must be able to create/write this file, and
253   # crunch-job must be able to stat() it.
254   crunch_refresh_trigger: /tmp/crunch_refresh_trigger
255
256   # Path to dns server configuration directory
257   # (e.g. /etc/unbound.d/conf.d). If false, do not write any config
258   # files or touch restart.txt (see below).
259   dns_server_conf_dir: false
260
261   # Template file for the dns server host snippets. See
262   # unbound.template in this directory for an example. If false, do
263   # not write any config files.
264   dns_server_conf_template: false
265
266   # String to write to {dns_server_conf_dir}/restart.txt (with a
267   # trailing newline) after updating local data. If false, do not
268   # open or write the restart.txt file.
269   dns_server_reload_command: false
270
271   # Command to run after each DNS update. Template variables will be
272   # substituted; see the "unbound" example below. If false, do not run
273   # a command.
274   dns_server_update_command: false
275
276   ## Example for unbound:
277   #dns_server_conf_dir: /etc/unbound/conf.d
278   #dns_server_conf_template: /path/to/your/api/server/config/unbound.template
279   ## ...plus one of the following two methods of reloading:
280   #dns_server_reload_command: unbound-control reload
281   #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
282
283   compute_node_domain: false
284   compute_node_nameservers:
285     - 192.168.1.1
286
287   # Hostname to assign to a compute node when it sends a "ping" and the
288   # hostname in its Node record is nil.
289   # During bootstrapping, the "ping" script is expected to notice the
290   # hostname given in the ping response, and update its unix hostname
291   # accordingly.
292   # If false, leave the hostname alone (this is appropriate if your compute
293   # nodes' hostnames are already assigned by some other mechanism).
294   #
295   # One way or another, the hostnames of your node records should agree
296   # with your DNS records and your /etc/slurm-llnl/slurm.conf files.
297   #
298   # Example for compute0000, compute0001, ....:
299   # assign_node_hostname: compute%<slot_number>04d
300   # (See http://ruby-doc.org/core-2.2.2/Kernel.html#method-i-format for more.)
301   assign_node_hostname: compute%<slot_number>d
302
303
304   ###
305   ### Remaining assorted configuration options.
306   ###
307
308   arvados_theme: default
309
310   # Permit insecure (OpenSSL::SSL::VERIFY_NONE) connections to the Single Sign
311   # On (sso) server.  Should only be enabled during development when the SSO
312   # server is using a self-signed cert.
313   sso_insecure: false
314
315   ## Set Time.zone default to the specified zone and make Active
316   ## Record auto-convert to this zone.  Run "rake -D time" for a list
317   ## of tasks for finding time zone names. Default is UTC.
318   #time_zone: Central Time (US & Canada)
319
320   ## Default encoding used in templates for Ruby 1.9.
321   encoding: utf-8
322
323   # Enable the asset pipeline
324   assets.enabled: true
325
326   # Version of your assets, change this if you want to expire all your assets
327   assets.version: "1.0"
328
329   # Allow clients to create collections by providing a manifest with
330   # unsigned data blob locators. IMPORTANT: This effectively disables
331   # access controls for data stored in Keep: a client who knows a hash
332   # can write a manifest that references the hash, pass it to
333   # collections.create (which will create a permission link), use
334   # collections.get to obtain a signature for that data locator, and
335   # use that signed locator to retrieve the data from Keep. Therefore,
336   # do not turn this on if your users expect to keep data private from
337   # one another!
338   permit_create_collection_with_unsigned_manifest: false
339
340   default_openid_prefix: https://www.google.com/accounts/o8/id
341
342   # Override the automatic version string. With the default value of
343   # false, the version string is read from git-commit.version in
344   # Rails.root (included in vendor packages) or determined by invoking
345   # "git log".
346   source_version: false
347
348   crunch_log_partial_line_throttle_period: 5
349
350 development:
351   force_ssl: false
352   cache_classes: false
353   whiny_nils: true
354   consider_all_requests_local: true
355   action_controller.perform_caching: false
356   action_mailer.raise_delivery_errors: false
357   action_mailer.perform_deliveries: false
358   active_support.deprecation: :log
359   action_dispatch.best_standards_support: :builtin
360   active_record.mass_assignment_sanitizer: :strict
361   active_record.auto_explain_threshold_in_seconds: 0.5
362   assets.compress: false
363   assets.debug: true
364
365 production:
366   force_ssl: true
367   cache_classes: true
368   consider_all_requests_local: false
369   action_controller.perform_caching: true
370   serve_static_assets: false
371   assets.compress: true
372   assets.compile: false
373   assets.digest: true
374
375 test:
376   force_ssl: false
377   cache_classes: true
378   serve_static_assets: true
379   static_cache_control: public, max-age=3600
380   whiny_nils: true
381   consider_all_requests_local: true
382   action_controller.perform_caching: false
383   action_dispatch.show_exceptions: false
384   action_controller.allow_forgery_protection: false
385   action_mailer.delivery_method: :test
386   active_support.deprecation: :stderr
387   active_record.mass_assignment_sanitizer: :strict
388   uuid_prefix: zzzzz
389   sso_app_id: arvados-server
390   sso_app_secret: <%= rand(2**512).to_s(36) %>
391   sso_provider_url: http://localhost:3002
392   secret_token: <%= rand(2**512).to_s(36) %>
393   blob_signing_key: zfhgfenhffzltr9dixws36j1yhksjoll2grmku38mi7yxd66h5j4q9w4jzanezacp8s6q0ro3hxakfye02152hncy6zml2ed0uc
394   user_profile_notification_address: arvados@example.com
395   workbench_address: https://localhost:3001/
396   git_repositories_dir: <%= Rails.root.join 'tmp', 'git', 'test' %>
397   git_internal_dir: <%= Rails.root.join 'tmp', 'internal.git' %>