+["#{::Rails.root.to_s}/config/config.defaults.yml", "/etc/arvados/config.yml"].each do |path|
+ if File.exist? path
+ confs = YAML.load(IO.read(path), deserialize_symbols: false)
+ if confs
+ clusters = confs["Clusters"].first
+ $arvados_config["ClusterID"] = clusters[0]
+ $arvados_config.merge!(clusters[1])
+ end
+ end
+end
+
+config_key_map =
+ {
+ "git_repositories_dir": "Git.Repositories",
+ "disable_api_methods": "API.DisabledAPIs",
+ "max_request_size": "API.MaxRequestSize",
+ "max_index_database_read": "API.MaxIndexDatabaseRead",
+ "max_items_per_response": "API.MaxItemsPerResponse",
+ "auto_setup_new_users": "Users.AutoSetupNewUsers",
+ "auto_setup_new_users_with_vm_uuid": "Users.AutoSetupNewUsersWithVmUUID",
+ "auto_setup_new_users_with_repository": "Users.AutoSetupNewUsersWithRepository",
+ "auto_setup_name_blacklist": "Users.AutoSetupUsernameBlacklist",
+ "new_users_are_active": "Users.NewUsersAreActive",
+ "auto_admin_user": "Users.AutoAdminUserWithEmail",
+ "auto_admin_first_user": "Users.AutoAdminFirstUser",
+ "user_profile_notification_address": "Users.UserProfileNotificationAddress",
+ "admin_notifier_email_from": "Users.AdminNotifierEmailFrom",
+ "email_subject_prefix": "Users.EmailSubjectPrefix",
+ "user_notifier_email_from": "Users.UserNotifierEmailFrom",
+ "new_user_notification_recipients": "Users.NewUserNotificationRecipients",
+ "new_inactive_user_notification_recipients": "Users.NewInactiveUserNotificationRecipients",
+ "sso_app_secret": "Login.ProviderAppSecret",
+ "sso_app_id": "Login.ProviderAppID",
+ "max_audit_log_age": "AuditLogs.MaxAge",
+ "max_audit_log_delete_batch": "AuditLogs.MaxDeleteBatch",
+ "unlogged_attributes": "AuditLogs.UnloggedAttributes",
+ "max_request_log_params_size": "SystemLogs.MaxRequestLogParamsSize",
+ "default_collection_replication": "Collections.DefaultReplication",
+ "default_trash_lifetime": "Collections.DefaultTrashLifetime",
+ "collection_versioning": "Collections.CollectionVersioning",
+ "preserve_version_if_idle": "Collections.PreserveVersionIfIdle",
+ "trash_sweep_interval": "Collections.TrashSweepInterval",
+ "blob_signing_key": "Collections.BlobSigningKey",
+ "blob_signature_ttl": "Collections.BlobSigningTTL",
+ "permit_create_collection_with_unsigned_manifest": "Collections.BlobSigning",
+ "docker_image_formats": "Containers.SupportedDockerImageFormats",
+ "log_reuse_decisions": "Containers.LogReuseDecisions",
+ "container_default_keep_cache_ram": "Containers.DefaultKeepCacheRAM",
+ "max_container_dispatch_attempts": "Containers.MaxDispatchAttempts",
+ "container_count_max": "Containers.MaxRetryAttempts",
+ "preemptible_instances": "Containers.UsePreemptibleInstances",
+ "max_compute_nodes": "Containers.MaxComputeVMs",
+ "crunch_log_bytes_per_event": "Containers.Logging.LogBytesPerEvent",
+ "crunch_log_seconds_between_events": "Containers.Logging.LogSecondsBetweenEvents",
+ "crunch_log_throttle_period": "Containers.Logging.LogThrottlePeriod",
+ "crunch_log_throttle_bytes": "Containers.Logging.LogThrottleBytes",
+ "crunch_log_throttle_lines": "Containers.Logging.LogThrottleLines",
+ "crunch_limit_log_bytes_per_job": "Containers.Logging.LimitLogBytesPerJob",
+ "crunch_log_partial_line_throttle_period": "Containers.Logging.LogPartialLineThrottlePeriod",
+ "crunch_log_update_period": "Containers.Logging.LogUpdatePeriod",
+ "crunch_log_update_size": "Containers.Logging.LogUpdateSize",
+ "clean_container_log_rows_after": "Containers.Logging.MaxAge",
+ "dns_server_conf_dir": "Containers.SLURM.Managed.DNSServerConfDir",
+ "dns_server_conf_template": "Containers.SLURM.Managed.DNSServerConfTemplate",
+ "dns_server_reload_command": "Containers.SLURM.Managed.DNSServerReloadCommand",
+ "dns_server_update_command": "Containers.SLURM.Managed.DNSServerUpdateCommand",
+ "compute_node_domain": "Containers.SLURM.Managed.ComputeNodeDomain",
+ "compute_node_nameservers": "Containers.SLURM.Managed.ComputeNodeNameservers",
+ "assign_node_hostname": "Containers.SLURM.Managed.AssignNodeHostname",
+ "crunch_job_wrapper": "Containers.JobsAPI.CrunchJobWrapper",
+ "crunch_job_user": "Containers.JobsAPI.CrunchJobUser",
+ "crunch_refresh_trigger": "Containers.JobsAPI.CrunchRefreshTrigger",
+ "git_internal_dir": "Containers.JobsAPI.GitInternalDir",
+ "reuse_job_if_outputs_differ": "Containers.JobsAPI.ReuseJobIfOutputsDiffer",
+ "default_docker_image_for_jobs": "Containers.JobsAPI.DefaultDockerImage",
+ "mailchimp_api_key": "Mail.MailchimpAPIKey",
+ "mailchimp_list_id": "Mail.MailchimpListID",
+}
+
+application_config = {}