Module: Kitsune::Kit::Configuration
- Defined in:
- lib/kitsune/kit/configuration.rb
Defined Under Namespace
Classes: Compose, Config, Dns, Loader, Provider, Server, Service, Services, Ssh, System, Validator
Constant Summary collapse
- SCHEMA_VERSION =
1- SUPPORTED_PROVIDERS =
["digitalocean"].freeze
- SUPPORTED_IMAGES =
%w[ubuntu-22-04-x64 ubuntu-24-04-x64].freeze
- DEFAULTS =
{ "version" => SCHEMA_VERSION, "provider" => { "name" => "digitalocean", "token_env" => "DO_API_TOKEN" }, "server" => { "region" => "sfo3", "size" => "s-1vcpu-1gb", "image" => "ubuntu-24-04-x64", "tags" => ["kitsune-managed"] }, "ssh" => { "user" => "deploy", "port" => 22, "key_path" => "~/.ssh/id_ed25519", "allowed_cidrs" => [] }, "services" => { "postgres" => { "enabled" => false, "mode" => "managed", "host" => nil, "image" => "postgres:17", "publish" => false, "bind" => "127.0.0.1", "allowed_cidrs" => [], "port" => 5432, "password_env" => "POSTGRES_PASSWORD", "compose" => { "mode" => "generated", "file" => nil, "allow_unsafe" => false } }, "redis" => { "enabled" => false, "mode" => "managed", "host" => nil, "image" => "redis:7.2", "publish" => false, "bind" => "127.0.0.1", "allowed_cidrs" => [], "port" => 6379, "password_env" => "REDIS_PASSWORD", "compose" => { "mode" => "generated", "file" => nil, "allow_unsafe" => false } } }, "system" => { "swap_size_gb" => 2, "swap_swappiness" => 10, "unattended_upgrades" => true, "metrics" => false, "metrics_installer_sha256" => nil }, "dns" => { "domains" => [], "ttl" => 3600 } }.freeze
- ENV_PATHS =
{ "KITSUNE_PROVIDER" => %w[provider name], "KITSUNE_SERVER_NAME" => %w[server name], "KITSUNE_REGION" => %w[server region], "KITSUNE_SIZE" => %w[server size], "KITSUNE_IMAGE" => %w[server image], "KITSUNE_SSH_KEY_ID" => %w[server ssh_key_id], "KITSUNE_SSH_USER" => %w[ssh user], "KITSUNE_SSH_PORT" => %w[ssh port], "KITSUNE_SSH_KEY_PATH" => %w[ssh key_path], "KITSUNE_METRICS_INSTALLER_SHA256" => %w[system metrics_installer_sha256] }.freeze
- SCHEMA_KEYS =
{ [] => %w[version provider server ssh services system dns], %w[provider] => %w[name token_env], %w[server] => %w[name region size image ssh_key_id tags], %w[ssh] => %w[user port key_path allowed_cidrs], %w[services] => %w[postgres redis], %w[services postgres] => %w[enabled mode host image publish bind allowed_cidrs port password_env compose], %w[services redis] => %w[enabled mode host image publish bind allowed_cidrs port password_env compose], %w[services postgres compose] => %w[mode file allow_unsafe], %w[services redis compose] => %w[mode file allow_unsafe], %w[system] => %w[swap_size_gb swap_swappiness unattended_upgrades metrics metrics_installer_sha256], %w[dns] => %w[domains ttl] }.freeze