# Hypervisor Swarm Configuration
# Generated from directives for eliosys-rhiz hypervisor

# Core Swarm Configuration
swarm:
  manager_url: "http://192.168.0.7:2377"
  manager_token: "SWMTKN-1-4j3u3-6x7y8z9a0b1c2d3e4f5g6h7i8j9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6"
  health_enabled: true
  join_token: "eJyrVkrLz1eyUkpKLFKqBQA7iwZ0"
  docker_host: "tcp://192.168.0.7:2375"
  context_name: "eliosys-rhiz"
  expose_join_token: true

# LXC Container Configuration
lxc:
  container_name: "rhiz-klaster-hypervisor"
  host: "eliosys-rhiz"
  network:
    type: "bridged"
    bridge: "lxdbr0"
    ipv4_address: "192.168.0.7/24"
    ipv4_gateway: "192.168.0.1"
  resources:
    cpu: 4
    memory: "8GB"
    storage: "50GB"

# Module Configuration
modules:
  factory_app:
    endpoint: "http://factory-app.exosys:3000"
    database:
      container: "factory-app-mongo"
      port: 27017
      auth:
        username: "factory_admin"
        password: "secure_password_123"
  
  hypergraph_webapp:
    endpoint: "http://hypergraph-webapp:8080"
    database:
      container: "hypergraph-mongo"
      port: 27017
  
  admin_dashboard:
    endpoint: "http://admin-dashboard:8000"
    sso:
      provider: "keycloak"
      realm: "hypergraph"
      client_id: "admin-dashboard"

# Network Configuration
network:
  vpn:
    type: "wireguard"
    interface: "wg0"
    port: 51820
    peers:
      - name: "factory-app-peer"
        public_key: "factory_app_public_key"
        endpoint: "factory-app.exosys:51820"
        allowed_ips: "10.0.0.0/24"
  
  overlay:
    name: "hypergraph_overlay"
    driver: "overlay"
    subnet: "10.0.9.0/24"
    encrypt: true

# Security Configuration
security:
  sso:
    provider: "keycloak"
    realm: "hypergraph"
    url: "http://keycloak.hypergraph:8080"
    admin_username: "admin"
    admin_password: "admin_password"
  
  certificates:
    ca_cert: "/etc/hypergraph/certs/ca.crt"
    server_cert: "/etc/hypergraph/certs/server.crt"
    server_key: "/etc/hypergraph/certs/server.key"
  
  authentication:
    jwt:
      secret: "hypergraph_jwt_secret_12345"
      expiration: "24h"
    
    api_keys:
      master_key: "hypergraph_master_key_67890"

# Data Model Integration
data_models:
  meta_heuristic:
    ingestors:
      - name: "factory-data-ingestor"
        type: "mongodb-connector"
        source: "factory-app-mongo"
        target: "hypergraph-mongo"
        sync_interval: "60s"
      
      - name: "exosys-data-ingestor"
        type: "mongodb-connector"
        source: "exosys-mongo"
        target: "hypergraph-mongo"
    
    schema_mapping:
      factory_products: "hypergraph.products"
      exosys_services: "hypergraph.services"
      user_data: "hypergraph.users"

# Monitoring Configuration
monitoring:
  infrastructure:
    prometheus:
      port: 9090
      scrape_interval: "15s"
    
    grafana:
      port: 3000
      admin_password: "grafana_admin"
  
  hypergraph:
    metrics:
      - "node_health"
      - "swarm_performance"
      - "database_connections"
      - "api_response_times"

# Public Endpoint Configuration
public_endpoint:
  host: "hypergraph.afrho.net"
  port: 443
  ssl:
    cert: "/etc/hypergraph/certs/hypergraph.afrho.net.crt"
    key: "/etc/hypergraph/certs/hypergraph.afrho.net.key"
  
  hub:
    path: "/api/hub"
    authentication: "jwt"
  
  install_scripts:
    endpoint: "/api/hub/install"
    auth_required: true
    allowed_ips:
      - "192.168.0.0/24"
      - "10.0.0.0/16"

# Automation Configuration
automation:
  config_generation:
    output_dir: "/etc/hypergraph/automation"
    templates:
      - "swarm-config.yaml"
      - "module-config.json"
      - "network-config.yml"
  
  token_generation:
    types:
      - "swarm_join"
      - "api_access"
      - "database_auth"
    expiration: "72h"
  
  handshake:
    timeout: "30s"
    retries: 3
    ping_interval: "5s"
  
  vpn_fallback:
    threshold: "1000ms"

# Integration Points
integration:
  factory_app:
    endpoint: "http://factory-app.exosys:3000"
    api_version: "v1"
  
  exosys:
    endpoint: "http://exosys.afrho.net:8080"
    api_version: "v2"
  
  hypergraph_webapp:
    endpoint: "http://hypergraph-webapp:8080"
    api_version: "v1"

# End of Configuration