diff --git a/infra/STEPS.md b/infra/STEPS.md new file mode 100644 index 0000000..a83d6d2 --- /dev/null +++ b/infra/STEPS.md @@ -0,0 +1,11 @@ +# Additional manual steps + +## Control + +(as root) +```sh +apt update && apt upgrade -y +reboot +apt install apparmor apparmor-utils -y +``` +Follow https://community.hetzner.com/tutorials/k3s-glusterfs-loadbalancer \ No newline at end of file diff --git a/infra/init.tf b/infra/init.tf index 48b18c8..75e8636 100644 --- a/infra/init.tf +++ b/infra/init.tf @@ -34,7 +34,7 @@ resource "hcloud_placement_group" "spread-group" { resource "hcloud_server" "control" { name = "cluster-control" - image = "fedora-38" + image = "ubuntu-22.04" location = "nbg1" ssh_keys = ["archomen_cloud1", "deepthought_cloud1"] server_type = "cx11" @@ -57,7 +57,7 @@ resource "hcloud_server" "control" { resource "hcloud_server" "worker-1" { name = "cluster-worker-1" - image = "fedora-38" + image = "ubuntu-22.04" location = "nbg1" ssh_keys = ["archomen_cloud2", "deepthought_cloud2"] server_type = "cx21" @@ -119,4 +119,27 @@ resource "hcloud_firewall" "firewall" { "::/0" ] } + + rule { + direction = "in" + protocol = "tcp" + port = "6443" + source_ips = [ + "0.0.0.0/0", + "::/0" + ] + } +} + +resource "hcloud_load_balancer" "load_balancer" { + name = "cloud_lb" + load_balancer_type = "lb11" + location = "nbg1" + network_zone = "eu-central" +} + +resource "hcloud_load_balancer_network" "srvnetwork" { + load_balancer_id = hcloud_load_balancer.load_balancer.id + network_id = hcloud_network.vnet.id + ip = "10.0.0.254" }