change VM architecture

This commit is contained in:
Pim Kunis 2023-07-22 12:06:49 +02:00
parent 1a527394b3
commit 3887b9979b
4 changed files with 69 additions and 80 deletions

View file

@ -1,25 +0,0 @@
docker_node_labels:
- hostname: maestro
labels: {}
- hostname: swarmpub1
labels:
public: "true"
mastodon: "true"
- hostname: swarmpub2
labels:
public: "true"
jitsi: "true"
- hostname: swarmpriv1
labels:
private: "true"
overleaf: "true"
syncthing: "true"
hedgedoc: "true"
radicale: "true"
- hostname: swarmpriv2
labels:
private: "true"
seafile: "true"
freshrss: "true"
pihole: "true"
discourse: "true"

View file

@ -7,11 +7,5 @@ all:
children:
workers:
hosts:
swarmpub1:
ansible_host: swarmpub1.dmz
swarmpub2:
ansible_host: swarmpub2.dmz
swarmpriv1:
ansible_host: swarmpriv1.dmz
swarmpriv2:
ansible_host: swarmpriv2.dmz
bancomart:
ansible_host: bancomart.dmz

View file

@ -8,7 +8,7 @@ provider "powerdns" {
}
resource "powerdns_record" "subdomain_pim" {
for_each = toset(["dav", "git", "meet", "rss", "latex", "md", "swarm", "traefik", "syncthing", "cloud", "pihole", "ntfy", "apprise", "uptime", "concourse", "discourse"])
for_each = toset(["dav", "git", "meet", "rss", "latex", "md", "swarm", "traefik", "syncthing", "cloud", "pihole", "ntfy", "apprise", "uptime", "concourse"])
zone = "pim.kunis.nl."
name = "${each.key}.pim.kunis.nl."
type = "CNAME"

View file

@ -1,7 +1,6 @@
terraform {
backend "pg" {
schema_name = "shoarma"
conn_str = "postgres://terraform@10.42.0.1/terraform_state"
}
required_providers {
@ -25,58 +24,79 @@ provider "libvirt" {
uri = "qemu+ssh://root@jefke.hyp/system"
}
module "manager" {
source = "git::https://git.kun.is/home/tf-modules.git//debian"
name = "maestro"
domain_name = "tf-maestro"
memory = 1024
mac = "CA:FE:C0:FF:EE:08"
hypervisor_host = "atlas.hyp"
module "maestro" {
source = "../../tf-modules/debian"
name = "maestro"
domain_name = "tf-maestro"
memory = 1024 * 10
mac = "CA:FE:C0:FF:EE:08"
providers = {
libvirt = libvirt
}
}
module "swarmpub1" {
source = "git::https://git.kun.is/home/tf-modules.git//debian"
name = "swarmpub1"
domain_name = "tf-swarmpub1"
memory = 1024 * 5
hypervisor_host = "atlas.hyp"
providers = {
libvirt = libvirt
}
}
module "swarmpriv1" {
source = "git::https://git.kun.is/home/tf-modules.git//debian"
name = "swarmpriv1"
domain_name = "tf-swarmpriv1"
memory = 1024 * 5
hypervisor_host = "atlas.hyp"
providers = {
libvirt = libvirt
}
}
module "swarmpub2" {
source = "git::https://git.kun.is/home/tf-modules.git//debian"
name = "swarmpub2"
domain_name = "tf-swarmpub2"
memory = 1024 * 3
hypervisor_host = "jefke.hyp"
module "bancomart" {
source = "../../tf-modules/debian"
name = "bancomart"
domain_name = "tf-bancomart"
memory = 1024 * 10
providers = {
libvirt = libvirt.jefke
}
}
module "swarmpriv2" {
source = "git::https://git.kun.is/home/tf-modules.git//debian"
name = "swarmpriv2"
domain_name = "tf-swarmpriv2"
memory = 1024 * 3
hypervisor_host = "jefke.hyp"
providers = {
libvirt = libvirt.jefke
}
}
#module "manager" {
# source = "git::https://git.kun.is/home/tf-modules.git//debian"
# name = "maestro"
# domain_name = "tf-maestro"
# memory = 1024
# mac = "CA:FE:C0:FF:EE:08"
# hypervisor_host = "atlas.hyp"
# providers = {
# libvirt = libvirt
# }
#}
#
#module "swarmpub1" {
# source = "git::https://git.kun.is/home/tf-modules.git//debian"
# name = "swarmpub1"
# domain_name = "tf-swarmpub1"
# memory = 1024 * 5
# hypervisor_host = "atlas.hyp"
# providers = {
# libvirt = libvirt
# }
#}
#
#module "swarmpriv1" {
# source = "git::https://git.kun.is/home/tf-modules.git//debian"
# name = "swarmpriv1"
# domain_name = "tf-swarmpriv1"
# memory = 1024 * 5
# hypervisor_host = "atlas.hyp"
# providers = {
# libvirt = libvirt
# }
#}
#
#module "swarmpub2" {
# source = "git::https://git.kun.is/home/tf-modules.git//debian"
# name = "swarmpub2"
# domain_name = "tf-swarmpub2"
# memory = 1024 * 3
# hypervisor_host = "jefke.hyp"
# providers = {
# libvirt = libvirt.jefke
# }
#}
#
#module "swarmpriv2" {
# source = "git::https://git.kun.is/home/tf-modules.git//debian"
# name = "swarmpriv2"
# domain_name = "tf-swarmpriv2"
# memory = 1024 * 3
# hypervisor_host = "jefke.hyp"
# providers = {
# libvirt = libvirt.jefke
# }
#}