adaptai / platform /dataops /dto /integrations /syncthing_config.yaml
ADAPT-Chase's picture
Add files using upload-large-folder tool
fd357f4 verified
# Syncthing Configuration for DTO Class B/C Mirrors
# Automated distributed file synchronization for non-critical data transfers
# Global Syncthing Settings
syncthing:
host: "localhost"
port: 8384
api_key: "${SYNCTHING_API_KEY}"
config_dir: "/data/adaptai/platform/dataops/dto/syncthing"
# DTO Mirror Environments
environments:
production:
devices:
vast1:
device_id: "${VAST1_SYNCTHING_DEVICE_ID}"
name: "vast1-prod-mirror"
address: "vast1.adapt.ai:22000"
role: "primary"
vast2:
device_id: "${VAST2_SYNCTHING_DEVICE_ID}"
name: "vast2-prod-mirror"
address: "vast2.adapt.ai:22000"
role: "secondary"
archive1:
device_id: "${ARCHIVE1_SYNCTHING_DEVICE_ID}"
name: "archive1-prod-mirror"
address: "archive1.adapt.ai:22000"
role: "archive"
staging:
devices:
vast1-staging:
device_id: "${VAST1_STAGING_SYNCTHING_DEVICE_ID}"
name: "vast1-staging-mirror"
address: "vast1-staging.adapt.ai:22000"
role: "primary"
vast2-staging:
device_id: "${VAST2_STAGING_SYNCTHING_DEVICE_ID}"
name: "vast2-staging-mirror"
address: "vast2-staging.adapt.ai:22000"
role: "secondary"
# Data Class Configurations
data_classes:
CLASS_B:
# Research and development data - moderate sync frequency
sync_config:
rescan_interval: 1800 # 30 minutes
folder_type: "sendreceive"
versioning:
type: "simple"
keep: 3
bandwidth:
max_send_kbps: 50000 # 50 MB/s limit
max_recv_kbps: 50000
options:
ignore_perms: false
auto_normalize: true
fs_watcher_enabled: true
fs_watcher_delay: 10
weak_hash_threshold: 25
# Storage paths by environment
storage_paths:
production: "/data/adaptai/platform/dataops/dto/mirrors/class_b/prod"
staging: "/data/adaptai/platform/dataops/dto/mirrors/class_b/staging"
# Priority and scheduling
priority: "normal"
schedule:
active_hours: "00:00-23:59" # Always active
maintenance_window: "02:00-04:00"
CLASS_C:
# Archive and backup data - low sync frequency
sync_config:
rescan_interval: 3600 # 1 hour
folder_type: "sendreceive"
versioning:
type: "simple"
keep: 5
bandwidth:
max_send_kbps: 20000 # 20 MB/s limit (lower priority)
max_recv_kbps: 20000
options:
ignore_perms: true
auto_normalize: true
fs_watcher_enabled: false # Manual scan only
weak_hash_threshold: 50 # More aggressive weak hashing
# Storage paths by environment
storage_paths:
production: "/data/adaptai/platform/dataops/dto/mirrors/class_c/prod"
staging: "/data/adaptai/platform/dataops/dto/mirrors/class_c/staging"
archive: "/data/adaptai/platform/dataops/dto/mirrors/class_c/archive"
# Priority and scheduling
priority: "low"
schedule:
active_hours: "22:00-06:00" # Night hours only
maintenance_window: "02:00-04:00"
# Mirror Policies
mirror_policies:
# Automatic mirror setup based on data patterns
auto_setup:
enabled: true
data_size_threshold: 10737418240 # 10GB minimum for auto-mirror
file_count_threshold: 100
data_types:
- "research_datasets"
- "model_checkpoints"
- "experiment_results"
- "backup_archives"
# Retention policies
retention:
CLASS_B:
keep_days: 30
archive_after_days: 90
cleanup_failed_syncs: true
CLASS_C:
keep_days: 90
archive_after_days: 365
cleanup_failed_syncs: true
# Health monitoring
health_checks:
interval_seconds: 300
connection_timeout: 30
max_disconnect_time: 3600 # 1 hour before alert
# Integration Settings
integrations:
# NATS event publishing
nats:
subjects:
mirror_setup: "dto.events.syncthing.mirror_setup"
sync_progress: "dto.events.syncthing.sync_progress"
sync_completed: "dto.events.syncthing.sync_completed"
health_status: "dto.events.syncthing.health_status"
# Slack notifications for sync issues
slack:
notify_on:
- "device_disconnected"
- "sync_failed"
- "mirror_setup_failed"
- "health_check_failed"
channels:
alerts: "#dto-alerts"
status: "#dto-status"
# Prometheus metrics
metrics:
enabled: true
port: 8385
metrics:
- "syncthing_device_connections"
- "syncthing_folder_sync_status"
- "syncthing_bandwidth_usage"
- "syncthing_sync_completion_time"
# Security Settings
security:
# Device discovery and auto-accept
discovery:
enabled: true
global_discovery: false # Local network only
local_discovery: true
# Device authentication
authentication:
auto_accept_devices: false
device_verification_required: true
certificate_validation: true
# Folder sharing
folder_security:
auto_accept_folders: false
folder_verification_required: true
ignore_patterns:
- ".git/*"
- "*.tmp"
- "*.log"
- "__pycache__/*"
- ".DS_Store"
# Performance Tuning
performance:
# Connection limits
connections:
max_concurrent_requests: 64
request_timeout: 60
connect_timeout: 30
# Scanning performance
scanning:
max_concurrent_scans: 2
scan_progress_interval: 2
weak_hash_selection_method: "auto"
# Bandwidth management
bandwidth:
limit_enabled: true
peak_hours: "08:00-18:00"
peak_limit_factor: 0.7 # 70% of max during peak hours
# Memory and CPU limits
resources:
max_memory_mb: 2048
max_cpu_percent: 50
gc_interval: 300
# Logging Configuration
logging:
level: "INFO"
file: "/data/adaptai/platform/dataops/dto/logs/syncthing-automation.log"
max_size_mb: 100
max_files: 5
format: "json"
# Backup and Recovery
backup:
config_backup:
enabled: true
interval_hours: 24
backup_dir: "/data/adaptai/platform/dataops/dto/syncthing/backups"
keep_backups: 7
disaster_recovery:
config_restore_script: "/data/adaptai/platform/dataops/dto/syncthing/restore_config.sh"
device_id_backup: "/data/adaptai/platform/dataops/dto/syncthing/device_ids.json"