add master and regular nodes(1 for now) for nimbus
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
5f8a3cd4e4
commit
280729edf6
|
@ -4,7 +4,12 @@
|
||||||
roles:
|
roles:
|
||||||
- origin-cert
|
- origin-cert
|
||||||
|
|
||||||
|
#- name: Configure Nimbus master
|
||||||
|
# hosts: nimbus-master
|
||||||
|
# roles:
|
||||||
|
# - nimbus
|
||||||
|
|
||||||
- name: Configure Nimbus cluster
|
- name: Configure Nimbus cluster
|
||||||
hosts: nimbus
|
hosts: nimbus-nodes
|
||||||
roles:
|
roles:
|
||||||
- nimbus
|
- nimbus
|
||||||
|
|
38
main.tf
38
main.tf
|
@ -37,4 +37,40 @@ terraform {
|
||||||
|
|
||||||
/* RESOURCES ------------------------------------*/
|
/* RESOURCES ------------------------------------*/
|
||||||
|
|
||||||
/* TODO */
|
module "nimbus-master" {
|
||||||
|
source = "github.com/status-im/infra-tf-digital-ocean"
|
||||||
|
name = "master"
|
||||||
|
env = "nimbus"
|
||||||
|
group = "nimbus-master"
|
||||||
|
size = "s-4vcpu-8gb"
|
||||||
|
count = 1
|
||||||
|
domain = "${var.domain}"
|
||||||
|
open_ports = [
|
||||||
|
"80", /* HTTP */
|
||||||
|
"443", /* HTTPS */
|
||||||
|
"9630-9633", /* Nimbus ports */
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "cloudflare_record" "serenity-testnets" {
|
||||||
|
domain = "${var.public_domain}"
|
||||||
|
name = "serenity-testnets"
|
||||||
|
type = "A"
|
||||||
|
proxied = true
|
||||||
|
value = "${module.nimbus-master.public_ips[0]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
module "nimbus-nodes" {
|
||||||
|
source = "github.com/status-im/infra-tf-digital-ocean"
|
||||||
|
name = "node"
|
||||||
|
env = "nimbus"
|
||||||
|
group = "nimbus-slaves"
|
||||||
|
size = "s-4vcpu-8gb"
|
||||||
|
domain = "${var.domain}"
|
||||||
|
count = "${var.hosts_count}"
|
||||||
|
open_ports = [
|
||||||
|
"80", /* HTTP */
|
||||||
|
"443", /* HTTPS */
|
||||||
|
"40404", /* peer connection */
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
|
@ -40,3 +40,10 @@ variable domain {
|
||||||
description = "DNS Domain to update"
|
description = "DNS Domain to update"
|
||||||
default = "statusim.net"
|
default = "statusim.net"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* RESOURCES ------------------------------------*/
|
||||||
|
|
||||||
|
variable hosts_count {
|
||||||
|
description = "Count of hosts in nimbus cluster"
|
||||||
|
default = 1
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue