diff --git a/ansible/group_vars/nimbus-mainnet-small.yml b/ansible/group_vars/nimbus-mainnet-small.yml index 9e969fe..b556492 100644 --- a/ansible/group_vars/nimbus-mainnet-small.yml +++ b/ansible/group_vars/nimbus-mainnet-small.yml @@ -1,4 +1,4 @@ --- beacon_node_network: 'mainnet' -beacon_node_cont_tag: 'master-small' +beacon_node_cont_tag: 'stable-small' beacon_node_web3_url: 'wss://mainnet.infura.io/ws/v3/9e2f2cc13f70432f8b87dbe7d51b81db' diff --git a/ansible/group_vars/nimbus-pyrmont-stable.yml b/ansible/group_vars/nimbus-pyrmont-stable.yml new file mode 100644 index 0000000..911e6ef --- /dev/null +++ b/ansible/group_vars/nimbus-pyrmont-stable.yml @@ -0,0 +1,3 @@ +--- +beacon_node_network: 'pyrmont' +beacon_node_cont_tag: 'stable-{{ (hostname is search("large")) | ternary("large", "small") }}' diff --git a/ansible/group_vars/nimbus-pyrmont-testing.yml b/ansible/group_vars/nimbus-pyrmont-testing.yml new file mode 100644 index 0000000..7a9ba14 --- /dev/null +++ b/ansible/group_vars/nimbus-pyrmont-testing.yml @@ -0,0 +1,3 @@ +--- +beacon_node_network: 'pyrmont' +beacon_node_cont_tag: 'testing-{{ (hostname is search("large")) | ternary("large", "small") }}' diff --git a/ansible/group_vars/nimbus-pyrmont-unstable-libp2p.yml b/ansible/group_vars/nimbus-pyrmont-unstable-libp2p.yml new file mode 100644 index 0000000..50d3e54 --- /dev/null +++ b/ansible/group_vars/nimbus-pyrmont-unstable-libp2p.yml @@ -0,0 +1,3 @@ +--- +beacon_node_network: 'pyrmont' +beacon_node_cont_tag: 'libp2p-{{ (hostname is search("large")) | ternary("large", "small") }}' diff --git a/ansible/group_vars/nimbus-pyrmont-unstable.yml b/ansible/group_vars/nimbus-pyrmont-unstable.yml new file mode 100644 index 0000000..5ce21e0 --- /dev/null +++ b/ansible/group_vars/nimbus-pyrmont-unstable.yml @@ -0,0 +1,3 @@ +--- +beacon_node_network: 'pyrmont' +beacon_node_cont_tag: 'unstable-{{ (hostname is search("large")) | ternary("large", "small") }}' diff --git a/ansible/host_vars/testing-large-01.aws-eu-central-1a.nimbus.pyrmont.yml b/ansible/host_vars/testing-large-01.aws-eu-central-1a.nimbus.pyrmont.yml new file mode 100644 index 0000000..f508cf0 --- /dev/null +++ b/ansible/host_vars/testing-large-01.aws-eu-central-1a.nimbus.pyrmont.yml @@ -0,0 +1,26 @@ +--- +# Docker image builds +beacon_node_builds_docker_hub_user: '{{lookup("passwordstore", "cloud/DockerHub/user")}}' +beacon_node_builds_docker_hub_token: '{{lookup("passwordstore", "cloud/DockerHub/token")}}' + +# Use Infura instead of Geth for comparison +beacon_node_web3_url: 'wss://goerli.infura.io/ws/v3/675db4626923473591cf6418e4dae175' + +# The -large suffix is because of native compilation. +beacon_node_builds_branches: + - name: 'unstable-large' + version: 'unstable' + targets: ['nimbus_beacon_node', 'nimbus_signing_process'] + frequency: '*-*-* 10:00:00' + - name: 'testing-large' + version: 'testing' + targets: ['nimbus_beacon_node', 'nimbus_signing_process'] + frequency: '*-*-* 02:00:00' + - name: 'stable-large' + version: 'stable' + targets: ['nimbus_beacon_node', 'nimbus_signing_process'] + frequency: '*-*-* 02:00:00' + - name: 'deploy-eth2-prod' + version: 'v1.0.6' + targets: ['nimbus_beacon_node', 'nimbus_signing_process'] + enabled: false diff --git a/ansible/host_vars/testing-small-01.aws-eu-central-1a.nimbus.pyrmont.yml b/ansible/host_vars/testing-small-01.aws-eu-central-1a.nimbus.pyrmont.yml new file mode 100644 index 0000000..972d55b --- /dev/null +++ b/ansible/host_vars/testing-small-01.aws-eu-central-1a.nimbus.pyrmont.yml @@ -0,0 +1,23 @@ +--- +# Docker image builds +beacon_node_builds_docker_hub_user: '{{lookup("passwordstore", "cloud/DockerHub/user")}}' +beacon_node_builds_docker_hub_token: '{{lookup("passwordstore", "cloud/DockerHub/token")}}' + +# The -small suffix is because of native compilation +beacon_node_builds_branches: + - name: 'unstable-small' + version: 'unstable' + targets: ['nimbus_beacon_node', 'nimbus_signing_process'] + frequency: '*-*-* 10:00:00' + - name: 'testing-small' + version: 'testing' + targets: ['nimbus_beacon_node', 'nimbus_signing_process'] + frequency: '*-*-* 02:00:00' + - name: 'stable-small' + version: 'stable' + targets: ['nimbus_beacon_node', 'nimbus_signing_process'] + frequency: '*-*-* 02:00:00' + - name: 'libp2p-small' + version: 'nim-libp2p-auto-bump' + targets: ['nimbus_beacon_node', 'nimbus_signing_process'] + frequency: '*-*-* 18:00:00' diff --git a/ansible/pyrmont.yml b/ansible/pyrmont.yml index bfaca56..f600059 100644 --- a/ansible/pyrmont.yml +++ b/ansible/pyrmont.yml @@ -9,16 +9,26 @@ - name: Configure build nodes hosts: + # Legacy - master-large-01.aws-eu-central-1a.nimbus.pyrmont - master-small-01.aws-eu-central-1a.nimbus.pyrmont + # Current + - unstable-large-01.aws-eu-central-1a.nimbus.pyrmont + - unstable-small-01.aws-eu-central-1a.nimbus.pyrmont roles: - { role: beacon-node-builds, tags: beacon-node-builds } - name: Configure network pyrmont hosts: + # Legacy - nimbus-pyrmont-master - nimbus-pyrmont-devel - nimbus-pyrmont-libp2p + # Current + - nimbus-pyrmont-stable + - nimbus-pyrmont-testing + - nimbus-pyrmont-unstable + - nimbus-pyrmont-unstable-libp2p pre_tasks: - name: Discover Goerli Geth WebSocket endpoint tags: [ infra-role-beacon-node, beacon-node ] diff --git a/pyrmont_new.tf b/pyrmont_new.tf new file mode 100644 index 0000000..0e0c6bb --- /dev/null +++ b/pyrmont_new.tf @@ -0,0 +1,202 @@ +locals { + /* Volumes */ + pyrmont_root_vol_size = 20 + pyrmont_data_vol_size = 150 + pyrmont_data_vol_type = "io1" + pyrmont_data_vol_iops = 2000 + /* Instances */ + pyrmont_large_instance_type = "z1d.large" + pyrmont_small_instance_type = "t3a.medium" +} + +module "nimbus_nodes_pyrmont_stable_large" { + source = "github.com/status-im/infra-tf-amazon-web-services" + + name = "stable-large" + env = "nimbus" + stage = "pyrmont" + group = "nimbus-pyrmont-stable" + domain = var.domain + + /* Scaling */ + instance_type = local.pyrmont_large_instance_type + root_vol_size = local.pyrmont_root_vol_size + data_vol_size = local.pyrmont_data_vol_size + data_vol_type = local.pyrmont_data_vol_type + data_vol_iops = local.pyrmont_data_vol_iops + host_count = 1 + + /* Firewall */ + open_udp_ports = local.nimbus_ports + open_tcp_ports = local.nimbus_ports + + /* Plumbing */ + vpc_id = module.nimbus_network.vpc.id + subnet_id = module.nimbus_network.subnets[0].id + secgroup_id = module.nimbus_network.secgroup.id + keypair_name = aws_key_pair.jakubgs.key_name +} + +module "nimbus_nodes_pyrmont_stable_small" { + source = "github.com/status-im/infra-tf-amazon-web-services" + + name = "stable-small" + env = "nimbus" + stage = "pyrmont" + group = "nimbus-pyrmont-stable" + domain = var.domain + + /* Scaling */ + instance_type = local.pyrmont_small_instance_type + root_vol_size = local.pyrmont_root_vol_size + data_vol_size = local.pyrmont_data_vol_size + data_vol_type = local.pyrmont_data_vol_type + host_count = 1 + + /* Firewall */ + open_udp_ports = local.nimbus_ports + open_tcp_ports = local.nimbus_ports + + /* Plumbing */ + vpc_id = module.nimbus_network.vpc.id + subnet_id = module.nimbus_network.subnets[0].id + secgroup_id = module.nimbus_network.secgroup.id + keypair_name = aws_key_pair.jakubgs.key_name +} + +module "nimbus_nodes_pyrmont_testing_large" { + source = "github.com/status-im/infra-tf-amazon-web-services" + + name = "testing-large" + env = "nimbus" + stage = "pyrmont" + group = "nimbus-pyrmont-testing" + domain = var.domain + + /* Scaling */ + instance_type = local.pyrmont_large_instance_type + root_vol_size = local.pyrmont_root_vol_size + data_vol_size = local.pyrmont_data_vol_size + data_vol_type = local.pyrmont_data_vol_type + data_vol_iops = local.pyrmont_data_vol_iops + host_count = 1 + + /* Firewall */ + open_udp_ports = local.nimbus_ports + open_tcp_ports = local.nimbus_ports + + /* Plumbing */ + vpc_id = module.nimbus_network.vpc.id + subnet_id = module.nimbus_network.subnets[0].id + secgroup_id = module.nimbus_network.secgroup.id + keypair_name = aws_key_pair.jakubgs.key_name +} + +module "nimbus_nodes_pyrmont_testing_small" { + source = "github.com/status-im/infra-tf-amazon-web-services" + + name = "testing-small" + env = "nimbus" + stage = "pyrmont" + group = "nimbus-pyrmont-testing" + domain = var.domain + + /* Scaling */ + instance_type = local.pyrmont_small_instance_type + root_vol_size = local.pyrmont_root_vol_size + data_vol_size = local.pyrmont_data_vol_size + data_vol_type = local.pyrmont_data_vol_type + host_count = 4 + + /* Firewall */ + open_udp_ports = local.nimbus_ports + open_tcp_ports = local.nimbus_ports + + /* Plumbing */ + vpc_id = module.nimbus_network.vpc.id + subnet_id = module.nimbus_network.subnets[0].id + secgroup_id = module.nimbus_network.secgroup.id + keypair_name = aws_key_pair.jakubgs.key_name +} + +module "nimbus_nodes_pyrmont_unstable_large" { + source = "github.com/status-im/infra-tf-amazon-web-services" + + name = "unstable-large" + env = "nimbus" + stage = "pyrmont" + group = "nimbus-pyrmont-unstable" + domain = var.domain + + /* Scaling */ + instance_type = local.pyrmont_large_instance_type + root_vol_size = local.pyrmont_root_vol_size + data_vol_size = local.pyrmont_data_vol_size + data_vol_type = local.pyrmont_data_vol_type + data_vol_iops = local.pyrmont_data_vol_iops + host_count = 2 + + /* Firewall */ + open_udp_ports = local.nimbus_ports + open_tcp_ports = local.nimbus_ports + + /* Plumbing */ + vpc_id = module.nimbus_network.vpc.id + subnet_id = module.nimbus_network.subnets[0].id + secgroup_id = module.nimbus_network.secgroup.id + keypair_name = aws_key_pair.jakubgs.key_name +} + +module "nimbus_nodes_pyrmont_unstable_small" { + source = "github.com/status-im/infra-tf-amazon-web-services" + + name = "unstable-small" + env = "nimbus" + stage = "pyrmont" + group = "nimbus-pyrmont-unstable" + domain = var.domain + + /* Scaling */ + instance_type = local.pyrmont_small_instance_type + root_vol_size = local.pyrmont_root_vol_size + data_vol_size = local.pyrmont_data_vol_size + data_vol_type = local.pyrmont_data_vol_type + host_count = 4 + + /* Firewall */ + open_udp_ports = local.nimbus_ports + open_tcp_ports = local.nimbus_ports + + /* Plumbing */ + vpc_id = module.nimbus_network.vpc.id + subnet_id = module.nimbus_network.subnets[0].id + secgroup_id = module.nimbus_network.secgroup.id + keypair_name = aws_key_pair.jakubgs.key_name +} + +module "nimbus_nodes_pyrmont_unstable_libp2p_small" { + source = "github.com/status-im/infra-tf-amazon-web-services" + + name = "unstable-libp2p-small" + env = "nimbus" + stage = "pyrmont" + group = "nimbus-pyrmont-unstable-libp2p" + domain = var.domain + + /* Scaling */ + instance_type = local.pyrmont_small_instance_type + root_vol_size = local.pyrmont_root_vol_size + data_vol_size = local.pyrmont_data_vol_size + data_vol_type = local.pyrmont_data_vol_type + host_count = 1 + + /* Firewall */ + open_udp_ports = local.nimbus_ports + open_tcp_ports = local.nimbus_ports + + /* Plumbing */ + vpc_id = module.nimbus_network.vpc.id + subnet_id = module.nimbus_network.subnets[0].id + secgroup_id = module.nimbus_network.secgroup.id + keypair_name = aws_key_pair.jakubgs.key_name +} diff --git a/pyrmont.tf b/pyrmont_old.tf similarity index 100% rename from pyrmont.tf rename to pyrmont_old.tf