This repository has been archived by the owner on Apr 24, 2023. It is now read-only.
/
config.edn
88 lines (88 loc) · 5.3 KB
/
config.edn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{:agent-query-cache {:ttl-ms 1000}
:authorization {;; Note that internally, Cook will select :http-basic if it's set to true,
;; and fall back to :one-user only if :http-basic is false.
:http-basic #config/env-bool "COOK_HTTP_BASIC_AUTH"
:one-user #config/env "COOK_ONE_USER_AUTH"}
:authorization-config {;; These users have admin privileges when using configfile-admins-auth;
;; e.g., they can view and modify other users' jobs.
;; Sets "admin" and the user defined in "COOK_ONE_USER_AUTH" to be admins for local development.
:admins #{"admin" #config/env "COOK_ONE_USER_AUTH"}
;; What function should be used to perform user authorization?
;; See the docstring in cook.rest.authorization for details.
:authorization-fn cook.rest.authorization/configfile-admins-auth-open-gets
;; users that are allowed to do things on behalf of others
:impersonators #{"poser" "other-impersonator"}}
:mesos {:leader-path "/cook-scheduler"}
:compute-clusters [{:factory-fn cook.mesos.mesos-compute-cluster/factory-fn
:config {:failover-timeout-ms nil ; When we close the instance of Cook, all its tasks are killed by Mesos
:master #config/env "MESOS_MASTER"
:framework-id #config/env "COOK_FRAMEWORK_ID"
:compute-cluster-name "local-mesos"
:container-defaults {:volumes [{:host-path "/tmp/cook-integration-mount"
:container-path "/mnt/cook-integration"
:mode "RW"}]}
:compute-cluster-launch-rate-limits {:expire-minutes 1200
:enforce? true
:bucket-size 10000
:tokens-replenished-per-minute 5000}}}]
:cors-origins ["https?://cors.example.com"]
:database {:datomic-uri #config/env "COOK_DATOMIC_URI"}
:executor {:command #config/env "COOK_EXECUTOR_COMMAND"
:environment {"EXECUTOR_DEFAULT_PROGRESS_OUTPUT_NAME" "stdout"}
:portion #config/env-int "COOK_EXECUTOR_PORTION"
:uri {:cache false
:executable false
:extract true
:value #config/env "COOK_EXECUTOR"}}
:plugins {:job-submission-validator {:batch-timeout-seconds 40
:factory-fns ["cook.plugins.demo-plugin/submission-factory"
"cook.plugins.demo-plugin/submission-factory2"]}
:job-launch-filter {:age-out-last-seen-deadline-minutes 10
:age-out-first-seen-deadline-minutes 10000
:age-out-seen-count 10
:factory-fn "cook.plugins.demo-plugin/launch-factory"}}
:hostname #config/env "COOK_HOSTNAME"
:log {:file #config/env "COOK_LOG_FILE"
:levels {"datomic.db" :warn
"datomic.kv-cluster" :warn
"datomic.peer" :warn
"cook.scheduler.fenzo-utils" :debug
"cook.scheduler.rebalancer" :debug
"cook.scheduler.scheduler" :debug
:default :info}}
:metrics {:jmx true
:user-metrics-interval-seconds 60}
:nrepl {:enabled? true
:port #config/env-int "COOK_NREPL_PORT"}
:pools {:default "mesos-gamma"}
:port #config/env-int "COOK_PORT"
:ssl {:port #config/env-int "COOK_SSL_PORT"
:keystore-path #config/env "COOK_KEYSTORE_PATH"
:keystore-type "pkcs12"
:keystore-pass "cookstore"}
:rate-limit {:expire-minutes 1200 ; Expire unused rate limit entries after 20 hours.
; Keep job-submission values as they are for integration tests. Making them smaller can cause
; spurious failures, and making them larger will cause test_rate_limit_launching_jobs to skip itself.
:per-user-per-pool-job-launch {:expire-minutes 1440
:enforce? true}
:job-submission {:bucket-size 1000
:enforce? true
:tokens-replenished-per-minute 600}
:user-limit-per-m 1000000}
:rebalancer {:dru-scale 1
:interval-seconds 30
:max-preemption 500.0
:min-dru-diff 1.0
:safe-dru-threshold 1.0}
:sandbox-syncer {:sync-interval-ms 1000}
:scheduler {:offer-incubate-ms 15000
:task-constraints {:command-length-limit 5000
:cpus 10
:memory-gb 48
:retry-limit 15
:timeout-hours 1
:timeout-interval-minutes 1
:docker-parameters-allowed #{"device" "env" "user" "workdir"}}}
:unhandled-exceptions {:log-level :error}
:zookeeper {:local? #config/env-bool "COOK_ZOOKEEPER_LOCAL"
:connection #config/env "COOK_ZOOKEEPER"}}