2.6 KiB
2.6 KiB
Distributor Configuration
Config file location
distributor run --config <path> --dry-run loads the YAML config at the path provided by --config.
If --config is omitted during dry-run, the built-in default path is:
/usr/local/etc/distributor/config.yml
The current implementation loads and validates configuration only. Bundle discovery and publication are not implemented yet.
Minimal config
pipelines:
- id: reports
source:
backend: local
path: /var/spool/distributor/reports
destinations:
- id: archive
backend: local
path: /srv/reports/archive
This uses the default publish policy of source files only and the default transfer policy.
Production-oriented config
pipelines:
- id: reports
source:
backend: local
path: /var/spool/distributor/reports
validation:
on_digest_mismatch: fail
destinations:
- id: archive
backend: s3
endpoint: https://s3.example.com
bucket: reports
prefix: archive
region: us-east-1
force_path_style: true
credentials:
access_key_id_env: DISTRIBUTOR_S3_ACCESS_KEY_ID
secret_access_key_env: DISTRIBUTOR_S3_SECRET_ACCESS_KEY
publish:
source: true
html: false
Reference
Top level:
pipelines: required non-empty list.
Pipeline:
id: required unique identifier.source: required backend config.destinations: required non-empty destination list.validation.on_digest_mismatch: optional, defaults tofail; onlyfailis supported.
Backends:
local: requirespath.ssh: requiresuriandpath.s3: requiresendpointandbucket; supports optionalprefix,region,force_path_style, andcredentials.
Destination policy:
publish.source: publish source artifacts.publish.html: publish generated HTML artifacts.transfer.on_destination_same:skiporfail, defaults toskip.transfer.on_destination_older:replaceorfail, defaults toreplace.transfer.on_destination_newer:skiporfail, defaults toskip.transfer.on_conflict: onlyfail, defaults tofail.
When publish.html is true, transform.markdown_to_html.enabled: true and transform.markdown_to_html.mode: sidecar are required.
Secrets
Do not put literal secrets in config files. S3 credentials may refer to environment variable names with:
credentials.access_key_id_envcredentials.secret_access_key_env
Examples
Maintained examples live under examples/.