|
| 1 | +# verbose prints log to stdout. |
| 2 | +verbose: true |
| 3 | + |
| 4 | +log: |
| 5 | + # Specify the logging level [trace, debug, info, warn, error] |
| 6 | + level: info |
| 7 | + |
| 8 | +# host is the host configuration for dfdaemon. |
| 9 | +host: |
| 10 | + ## idc is the idc of the host. |
| 11 | + idc: '' |
| 12 | + ## location is the location of the host. |
| 13 | + location: '' |
| 14 | + ## hostname is the hostname of the host. |
| 15 | + # hostname: "" |
| 16 | + ## ip is the advertise ip of the host. |
| 17 | + ip: __IP__ |
| 18 | + |
| 19 | +server: |
| 20 | + # pluginDir is the directory to store plugins. |
| 21 | + pluginDir: /var/lib/dragonfly/plugins/dfdaemon/ |
| 22 | + # cacheDir is the directory to store cache files. |
| 23 | + cacheDir: /var/cache/dragonfly/dfdaemon/ |
| 24 | + |
| 25 | +download: |
| 26 | + server: |
| 27 | + # socketPath is the unix socket path for dfdaemon GRPC service. |
| 28 | + socketPath: /var/run/dragonfly/dfdaemon.sock |
| 29 | + # rateLimit is the default rate limit of the download speed in KiB/MiB/GiB per second, default is 10GiB/s. |
| 30 | + rateLimit: 10GiB |
| 31 | + # pieceTimeout is the timeout for downloading a piece from source. |
| 32 | + pieceTimeout: 30s |
| 33 | + # concurrentPieceCount is the number of concurrent pieces to download. |
| 34 | + concurrentPieceCount: 10 |
| 35 | + |
| 36 | +upload: |
| 37 | + server: |
| 38 | + # port is the port to the grpc server. |
| 39 | + port: 4000 |
| 40 | + ## ip is the listen ip of the grpc server. |
| 41 | + # ip: "" |
| 42 | + # disableShared indicates whether disable to share data for other peers. |
| 43 | + disableShared: false |
| 44 | + # rateLimit is the default rate limit of the upload speed in KiB/MiB/GiB per second, default is 10GiB/s. |
| 45 | + rateLimit: 10GiB |
| 46 | + |
| 47 | +manager: |
| 48 | + # addrs is manager addresses. |
| 49 | + addrs: |
| 50 | + - http://__IP__:65003 |
| 51 | + |
| 52 | +scheduler: |
| 53 | + # announceInterval is the interval to announce peer to the scheduler. |
| 54 | + # Announcer will provide the scheduler with peer information for scheduling, |
| 55 | + # peer information includes cpu, memory, etc. |
| 56 | + announceInterval: 10s |
| 57 | + # scheduleTimeout is the timeout for scheduling. If the scheduling timesout, dfdaemon will back-to-source |
| 58 | + # download if enableBackToSource is true, otherwise dfdaemon will return download failed. |
| 59 | + scheduleTimeout: 30s |
| 60 | + # maxScheduleCount is the max count of schedule. |
| 61 | + maxScheduleCount: 5 |
| 62 | + # enableBackToSource indicates whether enable back-to-source download, when the scheduling failed. |
| 63 | + enableBackToSource: true |
| 64 | + |
| 65 | +dynconfig: |
| 66 | + # refreshInterval is the interval to refresh dynamic configuration from manager. |
| 67 | + refreshInterval: 1m |
| 68 | + |
| 69 | +storage: |
| 70 | + # dir is the directory to store task's metadata and content. |
| 71 | + dir: /var/lib/dragonfly/ |
| 72 | + # keep indicates whether keep the task's metadata and content when the dfdaemon restarts. |
| 73 | + keep: true |
| 74 | + # writeBufferSize is the buffer size for writing piece to disk, default is 128KB. |
| 75 | + writeBufferSize: 131072 |
| 76 | + # readBufferSize is the buffer size for reading piece from disk, default is 128KB. |
| 77 | + readBufferSize: 131072 |
| 78 | + |
| 79 | +gc: |
| 80 | + # interval is the interval to do gc. |
| 81 | + interval: 900s |
| 82 | + policy: |
| 83 | + # taskTTL is the ttl of the task. |
| 84 | + taskTTL: 21600s |
| 85 | + # distHighThresholdPercent is the high threshold percent of the disk usage. |
| 86 | + # If the disk usage is greater than the threshold, dfdaemon will do gc. |
| 87 | + distHighThresholdPercent: 80 |
| 88 | + # distLowThresholdPercent is the low threshold percent of the disk usage. |
| 89 | + # If the disk usage is less than the threshold, dfdaemon will stop gc. |
| 90 | + distLowThresholdPercent: 60 |
| 91 | + |
| 92 | +proxy: |
| 93 | + server: |
| 94 | + # port is the port to the proxy server. |
| 95 | + port: 4001 |
| 96 | + ## ip is the listen ip of the proxy server. |
| 97 | + # ip: "" |
| 98 | + ## caCert is the root CA cert path with PEM format for the proxy server to generate the server cert. |
| 99 | + ## If ca_cert is empty, proxy will generate a smaple CA cert by rcgen::generate_simple_self_signed. |
| 100 | + ## When client requests via the proxy, the client should not verify the server cert and set |
| 101 | + ## insecure to true. If ca_cert is not empty, proxy will sign the server cert with the CA cert. If openssl is installed, |
| 102 | + ## you can use openssl to generate the root CA cert and make the system trust the root CA cert. |
| 103 | + ## Then set the ca_cert and ca_key to the root CA cert and key path. Dfdaemon generates the server cert |
| 104 | + ## and key, and signs the server cert with the root CA cert. When client requests via the proxy, |
| 105 | + ## the proxy can intercept the request by the server cert. |
| 106 | + # caCert: "" |
| 107 | + ## caKey is the root CA key path with PEM format for the proxy server to generate the server cert. |
| 108 | + ## If ca_key is empty, proxy will generate a smaple CA key by rcgen::generate_simple_self_signed. |
| 109 | + ## When client requests via the proxy, the client should not verify the server cert and set |
| 110 | + ## insecure to true. If ca_key is not empty, proxy will sign the server cert with the CA cert. If openssl is installed, |
| 111 | + ## you can use openssl to generate the root CA cert and make the system trust the root CA cert. |
| 112 | + ## Then set the ca_cert and ca_key to the root CA cert and key path. Dfdaemon generates the server cert |
| 113 | + ## and key, and signs the server cert with the root CA cert. When client requests via the proxy, |
| 114 | + ## the proxy can intercept the request by the server cert. |
| 115 | + # caKey: "" |
| 116 | + # rules is the list of rules for the proxy server. |
| 117 | + # regex is the regex of the request url. |
| 118 | + # useTLS indicates whether use tls for the proxy backend. |
| 119 | + # redirect is the redirect url. |
| 120 | + # filteredQueryParams is the filtered query params to generate the task id. |
| 121 | + # When filter is ["Signature", "Expires", "ns"], for example: |
| 122 | + # http://example.com/xyz?Expires=e1&Signature=s1&ns=docker.io and http://example.com/xyz?Expires=e2&Signature=s2&ns=docker.io |
| 123 | + # will generate the same task id. |
| 124 | + # Default value includes the filtered query params of s3, gcs, oss, obs, cos. |
| 125 | + # `X-Dragonfly-Use-P2P` header can instead of the regular expression of the rule. If the value is "true", |
| 126 | + # the request will use P2P technology to distribute the content. If the value is "false", |
| 127 | + # but url matches the regular expression in rules. The request will also use P2P technology to distribute the content. |
| 128 | + rules: |
| 129 | + - regex: 'blobs/sha256.*' |
| 130 | + # useTLS: false |
| 131 | + # redirect: "" |
| 132 | + # filteredQueryParams: [] |
| 133 | + registryMirror: |
| 134 | + # addr is the default address of the registry mirror. Proxy will start a registry mirror service for the |
| 135 | + # client to pull the image. The client can use the default address of the registry mirror in |
| 136 | + # configuration to pull the image. The `X-Dragonfly-Registry` header can instead of the default address |
| 137 | + # of registry mirror. |
| 138 | + addr: https://index.docker.io |
| 139 | + ## certs is the client certs path with PEM format for the registry. |
| 140 | + ## If registry use self-signed cert, the client should set the |
| 141 | + ## cert for the registry mirror. |
| 142 | + # certs: "" |
| 143 | + # disableBackToSource indicates whether disable to download back-to-source when download failed. |
| 144 | + disableBackToSource: false |
| 145 | + # prefetch pre-downloads full of the task when download with range request. |
| 146 | + prefetch: false |
| 147 | + # readBufferSize is the buffer size for reading piece from disk, default is 32KB. |
| 148 | + readBufferSize: 32768 |
| 149 | + |
| 150 | +security: |
| 151 | + # enable indicates whether enable security. |
| 152 | + enable: false |
| 153 | + |
| 154 | +metrics: |
| 155 | + server: |
| 156 | + # port is the port to the metrics server. |
| 157 | + port: 4002 |
| 158 | + ## ip is the listen ip of the metrics server. |
| 159 | + # ip: "" |
| 160 | + |
| 161 | +## tracing is the tracing configuration for dfdaemon. |
| 162 | +# tracing: |
| 163 | +## addr is the address to report tracing log. |
| 164 | +# addr: "" |
0 commit comments