Compare commits

...

15 Commits

Author SHA1 Message Date
Damien
eaa329e70d Update prod VM disk size to 80GB
All checks were successful
Terraform Deploy / Validate (push) Successful in 5s
Terraform Deploy / Plan (push) Successful in 7s
Terraform Deploy / Apply (push) Successful in 4m0s
2026-06-21 13:01:37 +02:00
Damien
eee527a9bc Increase IP Fabric VM disk size to 64GB
Some checks failed
Terraform Deploy / Validate (push) Successful in 5s
Terraform Deploy / Plan (push) Successful in 4s
Terraform Deploy / Apply (push) Failing after 2m24s
2026-06-21 12:58:30 +02:00
d0e49254ab Merge pull request 'Add IP Fabric VM to production' (#19) from feat/ipfabric_vm into dev
Some checks failed
Terraform Deploy / Validate (push) Successful in 5s
Terraform Deploy / Plan (push) Successful in 6s
Terraform Deploy / Apply (push) Failing after 1m22s
Reviewed-on: #19
2026-06-21 10:55:01 +00:00
Damien
fc32f62aa2 Add IP Fabric VM to production
All checks were successful
Terraform PR / Validate (pull_request) Successful in 7s
Terraform PR / Plan (pull_request) Successful in 6s
2026-06-21 12:40:48 +02:00
Damien
28e0ee7369 Update prod VM configuration for Komodo
All checks were successful
Terraform Deploy / Validate (push) Successful in 6s
Terraform Deploy / Plan (push) Successful in 5s
Terraform Deploy / Apply (push) Successful in 2m27s
Replace IP Fabric VM with Komodo VM using Alpine OS and increased
resources
2026-06-14 15:39:47 +02:00
Damien
df9934b48a Remove komodo VM from prod configuration
Some checks failed
Terraform Deploy / Validate (push) Successful in 6s
Terraform Deploy / Plan (push) Successful in 5s
Terraform Deploy / Apply (push) Has been cancelled
2026-06-14 15:35:24 +02:00
Damien
09d3c84a87 Update user creation and Tailscale setup
Add Debian/Ubuntu/Rocky-specific user configuration
Improve Tailscale installation and bringup reliability
2026-06-10 10:49:49 +02:00
Damien
b1b165c752 Add komodo VM to production
All checks were successful
Terraform Deploy / Validate (push) Successful in 4s
Terraform Deploy / Plan (push) Successful in 4s
Terraform Deploy / Apply (push) Successful in 49s
2026-06-10 10:43:28 +02:00
Damien
0e2593234a Remove komodo virtual machine from prod
All checks were successful
Terraform Deploy / Validate (push) Successful in 5s
Terraform Deploy / Plan (push) Successful in 4s
Terraform Deploy / Apply (push) Successful in 8s
2026-06-10 10:42:09 +02:00
Damien
842c24acd8 Unlock user account on Alpine
Use `passwd -u` workaround for reliable unlocking
2026-06-10 10:41:40 +02:00
Damien
adbc4ff64b Add komodo VM to production
All checks were successful
Terraform Deploy / Validate (push) Successful in 9s
Terraform Deploy / Plan (push) Successful in 9s
Terraform Deploy / Apply (push) Successful in 1m1s
2026-06-10 10:10:34 +02:00
Damien
fa33c842db Remove komodo virtual machine from prod configuration
All checks were successful
Terraform Deploy / Validate (push) Successful in 10s
Terraform Deploy / Plan (push) Successful in 11s
Terraform Deploy / Apply (push) Successful in 17s
2026-06-10 10:08:56 +02:00
Damien
06df079bfb Add lock_passwd false to Alpine user config 2026-06-10 10:08:06 +02:00
9bce5603fc Merge pull request 'Add production VMs for IP Fabric and Komodo' (#18) from vm/ipfabric_komodo into dev
All checks were successful
Terraform Deploy / Validate (push) Successful in 5s
Terraform Deploy / Plan (push) Successful in 5s
Terraform Deploy / Apply (push) Successful in 1m35s
Reviewed-on: #18
2026-06-10 07:44:02 +00:00
Damien
66106c5ac0 Add production VMs for IP Fabric and Komodo
All checks were successful
Terraform PR / Validate (pull_request) Successful in 4s
Terraform PR / Plan (pull_request) Successful in 6s
2026-06-10 09:41:54 +02:00
3 changed files with 56 additions and 5 deletions

View File

@@ -8,10 +8,19 @@ preserve_hostname: false
# 2. User creation # 2. User creation
# On Alpine, the privilege escalation group is "wheel" (not "sudo"). # On Alpine, the privilege escalation group is "wheel" (not "sudo").
# Keep the default shell (ash/busybox) to stay lightweight. # Keep the default shell (ash/busybox) to stay lightweight.
#
# IMPORTANT: lock_passwd MUST be false on Alpine.
# cloud-init's default (lock_passwd: true) sets shadow to "!", which Alpine's
# OpenSSH (compiled without PAM) interprets as "account locked" and refuses
# pubkey auth with "User ... not allowed because account is locked".
# Setting lock_passwd: false lets cloud-init use "*" instead: no password
# login possible, but pubkey works.
users: users:
- name: ${username} - name: ${username}
sudo: ALL=(ALL) NOPASSWD:ALL sudo: ALL=(ALL) NOPASSWD:ALL
groups: wheel groups: wheel
shell: /bin/ash
lock_passwd: false
ssh_authorized_keys: ssh_authorized_keys:
- ${ssh_key} - ${ssh_key}
@@ -49,6 +58,11 @@ runcmd:
# Enable and start qemu-guest-agent via OpenRC # Enable and start qemu-guest-agent via OpenRC
- [ rc-update, add, qemu-guest-agent, default ] - [ rc-update, add, qemu-guest-agent, default ]
- [ rc-service, qemu-guest-agent, start ] - [ rc-service, qemu-guest-agent, start ]
# Unlock the user account: cloud-init's lock_passwd: false is unreliable on
# Alpine (passwd -u refuses on passwordless accounts), so we force the shadow
# entry to "*" ourselves. "*" means: no password login possible, but pubkey
# auth works (unlike "!" which sshd treats as locked).
- [ sh, -c, "sed -i 's/^${username}:!:/${username}:*:/' /etc/shadow" ]
# Enable and start Tailscale via OpenRC # Enable and start Tailscale via OpenRC
- [ rc-update, add, tailscale, default ] - [ rc-update, add, tailscale, default ]
- [ rc-service, tailscale, start ] - [ rc-service, tailscale, start ]

View File

@@ -6,11 +6,24 @@ fqdn: ${hostname}
preserve_hostname: false preserve_hostname: false
# 2. User creation # 2. User creation
#
# Unlike Alpine, sshd on Debian/Ubuntu/Rocky is built with PAM, which accepts
# pubkey auth even when the shadow entry is locked ("!"). So the Alpine
# /etc/shadow workaround is NOT needed here.
#
# Groups:
# - Debian/Ubuntu: sudo group grants admin rights
# - Rocky/RHEL: wheel group grants admin rights
# We include both so the same template works for all supported distros; cloud-
# init silently skips groups that don't exist on the target system.
# (The "admin" group is intentionally NOT included: it was deprecated on
# Ubuntu 12.04 and absent on RHEL-family distros.)
users: users:
- name: ${username} - name: ${username}
sudo: ALL=(ALL) NOPASSWD:ALL sudo: ALL=(ALL) NOPASSWD:ALL
groups: sudo, admin groups: [sudo, wheel]
shell: /bin/bash shell: /bin/bash
lock_passwd: true
ssh_authorized_keys: ssh_authorized_keys:
- ${ssh_key} - ${ssh_key}
@@ -23,10 +36,15 @@ packages:
- qemu-guest-agent - qemu-guest-agent
- curl - curl
# 5. Tailscale installation and configuration # 5. Services and Tailscale
# Order matters: qemu-guest-agent FIRST so Terraform can read the VM IP
# without waiting for the (potentially slow) Tailscale install.
runcmd: runcmd:
# Enable and start qemu-guest-agent (systemd) # Enable and start qemu-guest-agent (systemd)
- [ systemctl, enable, qemu-guest-agent, --now ] - [ systemctl, enable, qemu-guest-agent, --now ]
# Install and configure Tailscale # Install Tailscale (official installer detects the distro)
- [ sh, -c, "curl -fsSL https://tailscale.com/install.sh | sh" ] - [ sh, -c, "curl -fsSL https://tailscale.com/install.sh | sh" ]
- [ tailscale, up, --authkey=${tailscale_auth_key}, --hostname=${vm_name} ] # Bring the node up on the tailnet. Retry a few times to absorb the small
# delay between `systemctl start tailscaled` and the daemon's socket being
# ready to accept commands.
- [ sh, -c, "for i in 1 2 3 4 5; do tailscale up --authkey=${tailscale_auth_key} --hostname=${vm_name} && break; sleep 2; done" ]

View File

@@ -33,7 +33,26 @@ admin_ssh_public_key_path = "~/.ssh/keys/id_rsa.pub"
# Utilisateur par défaut sur les VMs # Utilisateur par défaut sur les VMs
default_vm_user = "damien" default_vm_user = "damien"
virtual_machines = {} virtual_machines = {
"komodo" = {
os = "alpine"
cores = 16
memory = 32768
disk_gb = 32
ip = "192.168.1.161"
gateway = "192.168.1.254"
tags = ["docker"]
},
"ipfabric" = {
os = "ipfabric"
cores = 16
memory = 32768
disk_gb = 80
ip = "192.168.1.162"
gateway = "192.168.1.254"
tags = ["ipfabric"]
}
}
############################# #############################
# Notes de configuration # Notes de configuration