Files
a13labs.infra/terraform/apps/dev-01/config.tf
T
alexandre.pires e9e28a5ca8 Add new model files and update Ansible playbooks for Qwen3.5 and Qwen3.6
- Created model files for Qwen3.5 with different context lengths.
- Added a new Ansible host variable file for CI server configuration.
- Updated GPU server host variables to include Ollama models and model files.
- Enhanced playbooks for Podman to manage Ollama models, including copying model files and checking existing models.
- Introduced a new playbook for setting up Qwen3.6 with specific configurations.
- Updated Windows SSH tasks to improve security and configuration management.
- Added a Python utility to parse Ollama model names from command output.
- Modified Terraform configurations to include new DNS entries and proxy settings.
- Improved Nginx proxy configurations with timeout settings.
2026-05-27 23:53:00 +02:00

262 lines
6.5 KiB
Terraform

locals {
# storage
persistent_folder = "/mnt/srv"
lab_domain = "lab.alexpires.me"
internal_issuer = "internal-ca"
# open-webui
open_webui_fqdn = "open-webui.${local.lab_domain}"
open_webui_log_level = "DEBUG"
# samba
samba_shares = [
{
name = "Storage"
path = "/mnt/md0/storage"
comment = "Main Storage"
}
]
# DNS
dns_nameservers = [
"192.168.0.252",
"1.1.1.1",
"8.8.8.8"
]
override_hosts = [
{
name = "cloud.alexpires.me"
ip = "10.19.4.136"
},
]
zones = [
{
fqdn = "${local.lab_domain}"
records = [
{
name = "vh-01"
type = "A"
content = "10.19.4.254"
},
{
name = "gpu-01"
type = "A"
content = "10.19.4.106"
},
{
name = "dev-01"
type = "A"
content = "10.19.4.136"
},
{
name = "ollama"
type = "CNAME"
content = "dev-01.${local.lab_domain}."
},
{
name = "kokoro"
type = "CNAME"
content = "gpu-01.${local.lab_domain}."
},
{
name = "open-webui"
type = "CNAME"
content = "dev-01.${local.lab_domain}."
},
{
name = "comfyui-backend"
type = "CNAME"
content = "gpu-01.${local.lab_domain}."
},
{
name = "comfyui"
type = "CNAME"
content = "dev-01.${local.lab_domain}."
},
{
name = "smb"
type = "CNAME"
content = "dev-01.${local.lab_domain}."
},
{
name = "grafana"
type = "CNAME"
content = "dev-01.${local.lab_domain}."
},
{
name = "prometheus"
type = "CNAME"
content = "dev-01.${local.lab_domain}."
},
{
name = "game-01"
type = "A"
content = "10.19.4.245"
},
{
name = "prod-01"
type = "A"
content = "10.5.5.2"
},
{
name = "hpz440"
type = "A"
content = "10.19.4.121"
},
{
name = "music"
type = "CNAME"
content = "dev-01.${local.lab_domain}."
},
{
name = "search"
type = "CNAME"
content = "dev-01.${local.lab_domain}."
},
{
name = "ci-01"
type = "A"
content = "10.19.4.207"
}
]
}
]
proxy_services = {
"comfyui" = {
http_port = 8080
https_port = 8443
tls = true
fqdn = ["comfyui.lab.alexpires.me"]
upstream = "http://upstream.comfyui.svc.cluster.local:8188"
resolver = "kube-dns.kube-system.svc.cluster.local"
locations = [
{
path = "/"
"Upgrade" = "$http_upgrade"
"Connection" = "upgrade"
},
]
}
}
streams = {
"dns" = {
port = 53
host_port = 53
upstream = "dns.dns.svc.cluster.local"
protocol = "udp"
}
"smb" = {
port = 445
host_port = 445
upstream = "smb.samba.svc.cluster.local"
protocol = "tcp"
}
"netbios" = {
port = 139
host_port = 139
upstream = "netbios.samba.svc.cluster.local"
protocol = "tcp"
}
}
ollama_proxy = {
enabled = true
mac = "04:7c:16:d6:63:66"
ip = "10.19.4.106"
port = "11434"
scheme = "http"
}
comfyui_proxy = {
mac = "04:7c:16:d6:63:66"
ip = "10.19.4.106"
port = "8188"
scheme = "http"
}
scaleway_smtp_host = "smtp.tem.scw.cloud"
nextcloud_fqdn = "cloud.alexpires.me"
nextcloud_db_passwd = var.nextcloud_db_passwd
nextcloud_db_root_password = var.nextcloud_db_root_password
nextcloud_db_path = "/mnt/md0/nextcloud.db"
nextcloud_backup = "/mnt/md0/nextcloud.backups"
nextcloud_data = "/mnt/md0/nextcloud.files"
nextcloud_config = {
mail_from = "cloud"
mail_domain = "alexpires.me"
smtp_user = var.scaleway_project_id
smtp_password = local.mail_app_api_secret_key
smtp_host = local.scaleway_smtp_host
admin_password = var.nextcloud_admin_password
db_host = module.nextcloud_db.host
db_name = module.nextcloud_db.db_name
db_user = module.nextcloud_db.app_crendentials_name
db_password = module.nextcloud_db.app_crendentials_name
}
backup_retention_days = 3
backup_cron_schedule = "0 2 * * *" # Daily at 2 AM
backup_bucket_name = data.terraform_remote_state.scaleway.outputs.backup_bucket_name
backup_app_api_secret_key = data.terraform_remote_state.scaleway.outputs.backup_app_api_secret_key
backup_app_api_access_key = data.terraform_remote_state.scaleway.outputs.backup_app_api_access_key
mail_app_api_secret_key = data.terraform_remote_state.scaleway.outputs.mail_app_api_secret_key
# prometheus and grafana
prometheus_config = file("${path.module}/resources/prometheus.yml")
prometheus_rules = file("${path.module}/resources/prometheus-rules.yml")
alertmanager_config = file("${path.module}/resources/alertmanager.yml")
alertmanager_email_config = {
to = "c.alexandre.pires@alexpires.me"
from = "alertmanager@${local.lab_domain}"
smarthost = "smtp.tem.scw.cloud:587"
auth_username = var.scaleway_project_id
auth_password = local.mail_app_api_secret_key
}
smartctl_static_version = "8.0-198-g34e7e4975211"
smartctl_sha256 = "d7e779664248942bb519b254dcb49cddaec2593e192cc468254c58e64da20840"
telegram_chat_id = "5432313610" # a13labs channel
telegram_message = file("${path.module}/resources/telegram.tpl")
grafana_fqdn = "grafana.${local.lab_domain}"
devolo_devices = {
devolo_620 = {
ip = "192.168.0.199"
model = "620"
}
# devolo_326 = {
# ip = "192.168.0.200"
# model = "326"
# }
}
# mstream
mstream_music_folder = "/mnt/storage/Music"
mstream_fqdn = "music.${local.lab_domain}"
# searxng
searxng_folder = "/mnt/md0/searxng"
searxng_fqdn = "search.${local.lab_domain}"
searxng_issuer = "letsencrypt-prod"
}
data "terraform_remote_state" "scaleway" {
backend = "s3"
config = {
bucket = "a13labs.infra.eu"
key = "scaleway.core.infra.tfstate"
region = "eu-west-1"
}
}