fix up things

This commit is contained in:
Matt Reeves 2024-10-12 13:23:20 -04:00
parent 3e0a1bfe20
commit 7727fdf040
8 changed files with 61 additions and 182 deletions

View file

@ -1,72 +0,0 @@
resource "proxmox_virtual_environment_vm" "AI" {
# VM General Settings
node_name = "pve2"
vm_id = 322
name = "AI"
machine = "q35"
description = "Stable-Diffusion"
tags = ["tofu", "ubuntu-22", "iac-repo"]
started = false
agent {
enabled = true
}
clone {
vm_id = 9999
}
# VM CPU Settings
cpu {
cores = 10
type = "host"
architecture = "x86_64"
}
# VM Memory Settings
memory {
dedicated = 16384
}
# VM Network Settings
network_device {
bridge = "vmbr0"
vlan_id = 1
}
# VM Disk Settings
disk {
datastore_id = "local-lvm"
size = 100
interface = "scsi0"
}
hostpci {
device = "hostpci0"
pcie = true
mapping = "gpu2"
rombar = true
}
initialization {
ip_config {
ipv4 {
address = "dhcp"
}
}
user_data_file_id = proxmox_virtual_environment_file.cloud_config2.id
}
lifecycle {
ignore_changes = [
initialization[0].user_account[0].keys,
initialization[0].user_account[0].password,
initialization[0].user_account[0].username,
initialization[0].user_data_file_id
]
}
}

View file

@ -11,6 +11,11 @@ resource "proxmox_virtual_environment_vm" "TrueNAS" {
"infrastructure",
]
agent {
enabled = true
type = "virtio"
}
# CPU Settings
cpu {
cores = 6

View file

@ -59,18 +59,4 @@ resource "proxmox_virtual_environment_vm" "Kasm" {
initialization[0].user_data_file_id
]
}
provisioner "remote-exec" {
inline = [
"cd /home/mafyuh/iac/docker/kasm",
"git pull",
"docker compose up -d"
]
connection {
type = "ssh"
user = "mafyuh"
private_key = file("/home/mafyuh/.ssh/id_rsa")
host = var.kasm_ssh_ip
}
}
}

View file

@ -1,9 +1,23 @@
terraform {
required_providers {
proxmox = {
source = "bpg/proxmox"
version = ">= 0.60.1"
version = ">= 0.65.0"
}
}
backend "s3" {
bucket = "BigBuckets"
region = "us-ashburn-1"
key = "tf.tfstate"
skip_region_validation = true
skip_credentials_validation = true
skip_requesting_account_id = true
use_path_style = true
skip_s3_checksum = true
skip_metadata_api_check = true
endpoints = {
s3 = "https://id8kdbgzbggf.compat.objectstorage.us-ashburn-1.oraclecloud.com"
}
}
}
@ -18,9 +32,15 @@ provider "proxmox" {
agent = true
username = "root"
password = var.ssh_password
node {
name = "prox"
address = var.prox_ip_address
}
node {
name = "pve2"
address = var.pve2_ip_address
}
}
}

View file

@ -37,4 +37,11 @@ vga {
type = "serial0"
}
cpu {
cores = 2
type = "host"
architecture = "x86_64"
}
}

View file

@ -37,4 +37,9 @@ vga {
type = "serial0"
}
cpu {
cores = 2
type = "host"
architecture = "x86_64"
}
}

View file

@ -57,3 +57,7 @@ variable "kasm_ssh_ip" {
variable "ubu_ip_address" {
type = string
}
variable "pve2_ip_address" {
type = string
}

View file

@ -1,76 +0,0 @@
resource "proxmox_virtual_environment_vm" "Whisper" {
# VM General Settings
node_name = "prox"
vm_id = 203
name = "Whisper"
machine = "q35"
description = "Creates subtitles for Bazarr and stable-diffusion"
tags = ["tofu", "ubuntu-22", "auto-homelab-repo"]
started = false
agent {
enabled = true # read 'Qemu guest agent' section, change to true only when ready
}
clone {
vm_id = 8000
}
# VM CPU Settings
cpu {
cores = 2
type = "host"
architecture = "x86_64"
}
# VM Memory Settings
memory {
dedicated = 4096
}
# VM Network Settings
network_device {
bridge = "vmbr0"
vlan_id = 1
}
# VM Disk Settings
disk {
datastore_id = "Fast2Tb"
size = 40
interface = "scsi0"
}
vga {
type = "serial0"
}
hostpci {
device = "hostpci0"
pcie = true
mapping = "gpu"
rombar = true
}
initialization {
ip_config {
ipv4 {
address = var.whisper_ip_address
gateway = var.vlan_gateway
}
}
user_account {}
}
lifecycle {
ignore_changes = [
initialization[0].user_account[0].keys,
initialization[0].user_account[0].password,
initialization[0].user_account[0].username,
initialization[0].user_data_file_id
]
}
}