add master and regular nodes(1 for now) for nimbus

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-03-21 13:27:16 +01:00
parent 5f8a3cd4e4
commit 280729edf6
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
3 changed files with 50 additions and 2 deletions

View File

@ -4,7 +4,12 @@
roles:
- origin-cert
#- name: Configure Nimbus master
# hosts: nimbus-master
# roles:
# - nimbus
- name: Configure Nimbus cluster
hosts: nimbus
hosts: nimbus-nodes
roles:
- nimbus

38
main.tf
View File

@ -37,4 +37,40 @@ terraform {
/* 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 */
]
}

View File

@ -40,3 +40,10 @@ variable domain {
description = "DNS Domain to update"
default = "statusim.net"
}
/* RESOURCES ------------------------------------*/
variable hosts_count {
description = "Count of hosts in nimbus cluster"
default = 1
}