ansible-debops-infrastructure

DebOps and Ansible scripts to manage my infrastructure
git clone git://git.erethon.com/ansible-debops-infrastructure
Log | Files | Refs

commit 473d8f8cf1ac57c635e3b578d3fe91d4a0cb2719
parent 1965386b39bff8ebf045e5837e5a0c2b41534fd9
Author: Dionysis Grigoropoulos <dgrig@erethon.com>
Date:   Sun, 15 May 2022 20:21:21 +0300

Remove ansible mentions and TF for autonomous

Diffstat:
ansible/inventory/host_vars/productiongrafana/prometheus.yml | 3+--
terraform/infrastructure/autonomous/main.tf | 46----------------------------------------------
terraform/infrastructure/autonomous/variables.tf | 9---------
terraform/infrastructure/autonomous/versions.tf | 9---------
4 files changed, 1 insertion(+), 66 deletions(-)

diff --git a/ansible/inventory/host_vars/productiongrafana/prometheus.yml b/ansible/inventory/host_vars/productiongrafana/prometheus.yml @@ -3,8 +3,7 @@ prometheus__node_targets: ['127.0.0.1', 'matrix.int.erethon.com', 'pgmatrix.int.erethon.com', 'oricono.int.erethon.com', 'spinny.int.erethon.com', 'kagari.int.erethon.com', 'rpi.int.erethon.com', - 'lenny.int.erethon.com', 'docker.int.erethon.com', 'thor.int.erethon.com', - 'autonomous.erethon.com'] + 'lenny.int.erethon.com', 'docker.int.erethon.com', 'thor.int.erethon.com'] prometheus__http_targets: ['https://erethon.com', 'https://blog.erethon.com', 'https://grafana.erethon.com', 'https://riot.dgrig.com', 'https://matrix.erethon.com', diff --git a/terraform/infrastructure/autonomous/main.tf b/terraform/infrastructure/autonomous/main.tf @@ -1,46 +0,0 @@ -provider "libvirt" { - uri = var.libvirt_uri -} - -module "autonomous_network" { - source = "../../modules/libvirt_network" - - network_bridge_interface = "virbr1" - network_name = "autonomous_network" - network_cidr = ["192.168.133.0/24", "2a01:4f8:211:1418::/116"] - network_dns_enabled = false -} - -resource "libvirt_pool" "tf_pool" { - name = var.libvirt_storage_pool - type = "dir" - path = "/opt/Disks/${var.libvirt_storage_pool}" -} - -resource "libvirt_volume" "base_debian_volume" { - name = "debian_base_volume" - pool = var.libvirt_storage_pool - format = "qcow2" - source = "/opt/Disks/packer-debian10-base" -} - -module "k3s_1" { - source = "../../modules/libvirt_host" - for_each = toset(["2", "3", "4"]) - - host_name = "k3s_${each.key}" - host_memory = "2048" - host_vcpu = 2 - storage_pool = var.libvirt_storage_pool - volume_name = "k3s_${each.key}" - base_volume_id = libvirt_volume.base_debian_volume.id - disks = [{ "volume_id" : libvirt_volume.base_debian_volume.id }] - network_id = module.autonomous_network.id - network_cidr = module.autonomous_network.cidr[0] - network_host = each.key - enable_cloud_init = true - cloudinit_user_template = <<EOF -runcmd: - - echo 'source /etc/network/interfaces.d/*' > /etc/network/interfaces -EOF -} diff --git a/terraform/infrastructure/autonomous/variables.tf b/terraform/infrastructure/autonomous/variables.tf @@ -1,9 +0,0 @@ -variable "libvirt_uri" { - description = "URI for libvirt to use" - default = "qemu:///system" -} - -variable "libvirt_storage_pool" { - description = "Storage pool to use for VM disks" - default = "tf_pool" -} diff --git a/terraform/infrastructure/autonomous/versions.tf b/terraform/infrastructure/autonomous/versions.tf @@ -1,9 +0,0 @@ -terraform { - required_providers { - libvirt = { - source = "erethon.com/third-party/libvirt" - version = "0.6.2" - } - } - required_version = ">= 0.13" -}