|
|
@ -34,7 +34,7 @@ resource "hcloud_placement_group" "spread-group" {
|
|
|
|
|
|
|
|
|
|
|
|
resource "hcloud_server" "control" {
|
|
|
|
resource "hcloud_server" "control" {
|
|
|
|
name = "cluster-control"
|
|
|
|
name = "cluster-control"
|
|
|
|
image = "fedora-38"
|
|
|
|
image = "ubuntu-22.04"
|
|
|
|
location = "nbg1"
|
|
|
|
location = "nbg1"
|
|
|
|
ssh_keys = ["archomen_cloud1", "deepthought_cloud1"]
|
|
|
|
ssh_keys = ["archomen_cloud1", "deepthought_cloud1"]
|
|
|
|
server_type = "cx11"
|
|
|
|
server_type = "cx11"
|
|
|
@ -57,7 +57,7 @@ resource "hcloud_server" "control" {
|
|
|
|
|
|
|
|
|
|
|
|
resource "hcloud_server" "worker-1" {
|
|
|
|
resource "hcloud_server" "worker-1" {
|
|
|
|
name = "cluster-worker-1"
|
|
|
|
name = "cluster-worker-1"
|
|
|
|
image = "fedora-38"
|
|
|
|
image = "ubuntu-22.04"
|
|
|
|
location = "nbg1"
|
|
|
|
location = "nbg1"
|
|
|
|
ssh_keys = ["archomen_cloud2", "deepthought_cloud2"]
|
|
|
|
ssh_keys = ["archomen_cloud2", "deepthought_cloud2"]
|
|
|
|
server_type = "cx21"
|
|
|
|
server_type = "cx21"
|
|
|
@ -119,4 +119,27 @@ resource "hcloud_firewall" "firewall" {
|
|
|
|
"::/0"
|
|
|
|
"::/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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|