Преглед на файлове

added hetzner sample with 2 balancers, 2 floating IPs, 4 backend nodes and SSH key

master
Vladimir Smagin преди 1 година
родител
ревизия
28e122b698

+ 16
- 0
hetzner-2-balancers-4-nodes/balancers.tf Целия файл

@@ -0,0 +1,16 @@
resource "hcloud_server" "balancer0" {
name = "balancer0"
image = "ubuntu-18.04"
server_type = "cx51"
ssh_keys = [ "${hcloud_ssh_key.masterkey.id}" ]
datacenter = "fsn1-dc8"
}

resource "hcloud_server" "balancer1" {
name = "balancer1"
image = "ubuntu-18.04"
server_type = "cx51"
ssh_keys = [ "${hcloud_ssh_key.masterkey.id}" ]
datacenter = "fsn1-dc8"
}


+ 17
- 0
hetzner-2-balancers-4-nodes/floating_IPs.tf Целия файл

@@ -0,0 +1,17 @@
resource "hcloud_floating_ip" "balancer0" {
type = "ipv4"
home_location = "fsn1"
description = "balancer0"
lifecycle {
prevent_destroy = true
}
}

resource "hcloud_floating_ip" "balancer1" {
type = "ipv4"
home_location = "fsn1"
description = "balancer1"
lifecycle {
prevent_destroy = true
}
}

+ 9
- 0
hetzner-2-balancers-4-nodes/floating_IPs_assign.tf Целия файл

@@ -0,0 +1,9 @@
resource "hcloud_floating_ip_assignment" "IPassign0" {
floating_ip_id = "${hcloud_floating_ip.balancer0.id}"
server_id = "${hcloud_server.balancer0.id}"
}

resource "hcloud_floating_ip_assignment" "IPassign1" {
floating_ip_id = "${hcloud_floating_ip.balancer1.id}"
server_id = "${hcloud_server.balancer1.id}"
}

+ 31
- 0
hetzner-2-balancers-4-nodes/nodes.tf Целия файл

@@ -0,0 +1,31 @@
resource "hcloud_server" "node0" {
name = "node0"
image = "ubuntu-18.04"
server_type = "cx51"
ssh_keys = [ "${hcloud_ssh_key.masterkey.id}" ]
datacenter = "fsn1-dc8"
}

resource "hcloud_server" "node1" {
name = "node1"
image = "ubuntu-18.04"
server_type = "cx51"
ssh_keys = [ "${hcloud_ssh_key.masterkey.id}" ]
datacenter = "fsn1-dc8"
}

resource "hcloud_server" "node2" {
name = "node2"
image = "ubuntu-18.04"
server_type = "cx51"
ssh_keys = [ "${hcloud_ssh_key.masterkey.id}" ]
datacenter = "fsn1-dc8"
}

resource "hcloud_server" "node3" {
name = "node3"
image = "ubuntu-18.04"
server_type = "cx51"
ssh_keys = [ "${hcloud_ssh_key.masterkey.id}" ]
datacenter = "fsn1-dc8"
}

+ 14
- 0
hetzner-2-balancers-4-nodes/project.tf Целия файл

@@ -0,0 +1,14 @@
variable "hcloud_token" {
type = "string"
default = "arObmfdkjldfksjfKJHKLSJDHFLKJHSDKFJHfjdhsfjkdhfLJKHKJHDLf453444"
}

provider "hcloud" {
token = "${var.hcloud_token}"
}

resource "hcloud_ssh_key" "masterkey" {
name = "Master Key"
public_key = "${file("secrets/master.key.pub")}"
}


+ 27
- 0
hetzner-2-balancers-4-nodes/secrets/master.key Целия файл

@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAxBEY3WzMAzQ/yFWKNAiqXXleS/EkAVKOD4dCdSTZVcy8Qw8z
ev5FP8gbKmUvAvd8RpWW5CGO86q0mKJjKZDhMcl1AKadDwkY8P0zOerTtZI88dqX
dxr/ylr791DL6DuWHNnElhSLLfvfPRQZGLwIc0U/XwyYsJCBkLjp4IQWWWMpaK3P
7ckm/VQeXNfURL3N6KMFzid9zdibVjc6dvi5IezOyPBkbVT+epKRYdpWxK3Vc5ts
7kBhvgAGwjIjNVbcDnY3WiNgsNdi7Dbw9zkYwBoK50ON9+67Yih8gxY3Y5Fu+aQf
PrUr0S1GRUvdaE0fEmZU++5zDEopM0kcsjpjiwIDAQABAoIBAQCxmuMxQOqVRHE6
ofHtLKRWxChdFnUNFaFGA7p5rwWIqUsoW87AbTCBlFy3TK0HPPRAZCUpRhTeORYa
5Y56CplTpi/shQDkq9MCCfqrTkK0yWGXm/F0nOp0fXKdF31+Quu5+rIPWVCyOOSB
yYDqXPoyoNnE2f4+gsg7NqX1EPHFyW21IU2cAh7oKMRGRb05n0Y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zner-2-balancers-4-nodes/secrets/master.key.pub Целия файл

@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDEERjdbMwDND/IVYo0CKpdeV5L8SQBUo4Ph0J1JNlVzLxDDzN6/kU/yBsqZS8C93xGlZbkIY7zqrSYomMpkOExyXUApp0PCRjw/TM56tO1kjzx2pd3Gv/KWvv3UMvoO5Yc2cSWFIst+989FBkYvAhzRT9fDJiwkIGQuOnghBZZYylorc/tySb9VB5c19REvc3oowXOJ33N2JtWNzp2+Lkh7M7I8GRtVP56kpFh2lbErdVzm2zuQGG+AAbCMiM1VtwOdjdaI2Cw12LsNvD3ORjAGgrnQ4337rtiKHyDFjdjkW75pB8+tSvRLUZFS91oTR8SZlT77nMMSikzSRyyOmOL masterkey

wordpress/docker.tf → wordpress-in-docker-containers/docker.tf Целия файл


wordpress/images.tf → wordpress-in-docker-containers/images.tf Целия файл


wordpress/network.tf → wordpress-in-docker-containers/network.tf Целия файл


Loading…
Отказ
Запис