Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#35 #36 #37

Merged
merged 9 commits into from
Jun 29, 2021
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Bridges 🌉

![Alt text](docs/assets/clu2.jpg?raw=true "Title")

This is a test edit @ 1624437564
1624677601
8 changes: 4 additions & 4 deletions terraform/dhcp.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ resource "proxmox_lxc" "dhcp" {
start = each.value.start
network {
name = each.value.network_interface
bridge = each.value.bridge_id
ip = each.value.cidr
gw = each.value.gateway
firewall = each.value.firewall
tag = each.value.vlan_id
bridge = var.network.magcloud.bridge_id
gw = var.network.magcloud.gateway
firewall = var.network.magcloud.firewall
tag = var.network.magcloud.vlan_id
}
ostemplate = each.value.ostemplate
password = var.root_pass
claughinghouse marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
23 changes: 23 additions & 0 deletions terraform/test_lxc_instance.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
resource "proxmox_lxc" "basic" {
count = 1
target_node = "pve1"
claughinghouse marked this conversation as resolved.
Show resolved Hide resolved
hostname = "provisioning-template-${count.index}.magevent.net"
ostemplate = "wowza:vztmpl/ubuntu-20.04-standard_20.04-1_amd64.tar.gz"
ssh_public_keys = var.common.ssh_public_keys
unprivileged = true

// Terraform will crash without rootfs defined
rootfs {
storage = "ceph"
size = "8G"
}

network {
name = "eth0"
ip = "dhcp"
bridge = var.network.magcloud.bridge_id
gw = var.network.magcloud.gateway
firewall = var.network.magcloud.firewall
tag = var.network.magcloud.vlan_id
}
}
30 changes: 18 additions & 12 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ variable "common" {
}
}

variable "network" {
type = map(string)
default = {
magcloud = {
network_interface = "eth0"
bridge_id = "vmbr999"
cidr = "10.101.22.0/24"
gateway = "10.101.22.1"
firewall = true
vlan_id = "22"
}
}
}

variable "root_pass" {
type = string
}
claughinghouse marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -19,16 +33,12 @@ variable "dhcp" {
hostname = "dhcp1"
target_node = "pve1"
vmid = "7007"
memory = "8192"
cores = "4"
memory = "1024"
cores = "1"
swap = "512"
start = true
network_interface = "eth0"
bridge_id = "vmbr999"
cidr = "10.101.22.253/24"
gateway = "10.101.22.1"
vlan_id = "22"
firewall = true
ostemplate = "wowza:vztmpl/ubuntu-20.04-standard_20.04-1_amd64.tar.gz"
disk_size = "8G"
unprivileged = true
Expand All @@ -37,16 +47,12 @@ variable "dhcp" {
hostname = "dhcp2"
target_node = "pve2"
vmid = "7008"
memory = "8192"
cores = "4"
memory = "1024"
cores = "1"
swap = "512"
start = true
network_interface = "eth0"
bridge_id = "vmbr999"
cidr = "10.101.22.254/24"
gateway = "10.101.22.1"
vlan_id = "22"
firewall = true
ostemplate = "wowza:vztmpl/ubuntu-20.04-standard_20.04-1_amd64.tar.gz"
disk_size = "8G"
unprivileged = true
Expand Down