diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 2b25edc..b8cce44 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -18,6 +18,14 @@ consul_catalog_url: 'http://localhost:8500/v1/catalog' # Root password bootstrap__root_pass: '{{lookup("passwordstore", "hosts/admin-pass")}}' +# TRACE needs more disk space +bootstrap__rsyslog_docker_logs_path: '/docker/log' +# The volume of logs is too big and Nimbus team doesn't use their own cluster +bootstrap__rsyslog_docker_logstash_send: false +# lower local retention to save space +bootstrap__logrotate_frequency: 'hourly' +bootstrap__logrotate_count: 3 +bootstrap__logrotate_mbytes: 500 # Consul Encryption consul_encryption_key: '{{lookup("passwordstore", "services/consul/encryption-key")}}' @@ -44,3 +52,25 @@ bootstrap__inactive_users: - { name: igor, uid: 7015, groups: [] } - { name: bruno, uid: 7026, groups: [] } - { name: yglukhov,uid: 7027, groups: [] } + +# Nimbus ------------------------------ +beacon_node_cont_name: 'beacon-node-{{ beacon_node_network }}-{{ beacon_node_cont_tag }}' +beacon_node_log_level: DEBUG +beacon_node_timer_rebuild: true + +# ports +beacon_node_rpc_port: '11000' +beacon_node_metrics_port : '9300' +beacon_node_listening_port: '9100' +beacon_node_discovery_port: '9100' + +# Infura URL +beacon_node_web3_url: '{{ lookup("passwordstore", "service/Nimbus/infura-url") }}' + +# resource limits +beacon_node_mem_limit: '{{ (ansible_memtotal_mb * 0.60) | int }}' +beacon_node_mem_reserve: '{{ (ansible_memtotal_mb * 0.4) | int }}' + +# Validators -------------------------- +dist_validators_name: '{{ beacon_node_network }}_deposits' +dist_validators_data_path: '{{ beacon_node_cont_vol }}/data/{{ beacon_node_data_folder }}' diff --git a/ansible/group_vars/nimbus.test.yml b/ansible/group_vars/nimbus.test.yml deleted file mode 100644 index 19cb389..0000000 --- a/ansible/group_vars/nimbus.test.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -# TRACE needs more disk space -bootstrap__rsyslog_docker_logs_path: '/docker/log' -# The volume of logs is too big and Nimbus team doesn't use their own cluster -bootstrap__rsyslog_docker_logstash_send: false - -# lower local retention to save space -bootstrap__logrotate_frequency: 'hourly' -bootstrap__logrotate_count: 3 -bootstrap__logrotate_mbytes: 500 - -# Nimbus ------------------------------ -beacon_node_cont_name: 'beacon-node-{{ beacon_node_network }}-{{ beacon_node_cont_tag }}' -beacon_node_log_level: DEBUG -beacon_node_timer_rebuild: true - -# ports -beacon_node_rpc_port: '11000' -beacon_node_metrics_port : '9300' -beacon_node_listening_port: '9100' -beacon_node_discovery_port: '9100' - -# Infura URL -beacon_node_web3_url: '{{ lookup("passwordstore", "service/Nimbus/infura-url") }}' - -# resource limits -beacon_node_mem_limit: '{{ (ansible_memtotal_mb * 0.60) | int }}' -beacon_node_mem_reserve: '{{ (ansible_memtotal_mb * 0.4) | int }}' - -# Validators -------------------------- -dist_validators_name: '{{ beacon_node_network }}_deposits' -dist_validators_data_path: '{{ beacon_node_cont_vol }}/data/{{ beacon_node_data_folder }}' diff --git a/ansible/master.yml b/ansible/master.yml new file mode 100644 index 0000000..4acb941 --- /dev/null +++ b/ansible/master.yml @@ -0,0 +1,13 @@ +--- +- name: Pre-playbook checks + hosts: localhost + tasks: + - name: 'Verify Ansible version is 2.8 or newer' + assert: + that: 'ansible_version.full is version_compare("2.8", ">=")' + msg: 'Your Ansible version is lower than 2.8. Upgrade it.' + +- name: Configure beacon node builds + hosts: nimbus-master + roles: + - { role: beacon-node-builds, tags: beacon-node-builds } diff --git a/ansible/nimbus.yml b/ansible/nimbus.yml deleted file mode 100644 index a8a92d5..0000000 --- a/ansible/nimbus.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -- name: Pre-playbook checks - hosts: localhost - tasks: - - name: 'Verify Ansible version is 2.8 or newer' - assert: - that: 'ansible_version.full is version_compare("2.8", ">=")' - msg: 'Your Ansible version is lower than 2.8. Upgrade it.' - -- name: Configure beacon node builds - hosts: nimbus-master - roles: - - { role: beacon-node-builds, tags: beacon-node-builds } - -- name: Configure network medalla using master - hosts: nimbus.test[0:3] - vars: - beacon_node_cont_tag: 'master' - # Legacy binary necessary for medalla network - beacon_node_cont_entrypoint: '/usr/local/bin/nimbus_beacon_node_spec_0_12_3' - roles: - - { role: infra-role-beacon-node, tags: [ infra-role-beacon-node, beacon-node ] } - - { role: network-debug-script, tags: [ network-debug-script ] } - -- name: Configure network medalla using devel - hosts: nimbus.test[4:7] - vars: - beacon_node_cont_tag: 'devel' - # Legacy binary necessary for medalla network - beacon_node_cont_entrypoint: '/usr/local/bin/nimbus_beacon_node_spec_0_12_3' - roles: - - { role: infra-role-beacon-node, tags: [ infra-role-beacon-node, beacon-node ] } - - { role: network-debug-script, tags: [ network-debug-script ] } - -- name: Configure network medalla using libp2p - hosts: nimbus.test[8:9] - vars: - beacon_node_cont_tag: 'libp2p' - # Legacy binary necessary for medalla network - beacon_node_cont_entrypoint: '/usr/local/bin/nimbus_beacon_node_spec_0_12_3' - roles: - - { role: infra-role-beacon-node, tags: [ infra-role-beacon-node, beacon-node ] } - - { role: network-debug-script, tags: [ network-debug-script ] } diff --git a/nimbus.tf b/nimbus.tf index 457efe1..ef09ac4 100644 --- a/nimbus.tf +++ b/nimbus.tf @@ -23,29 +23,3 @@ module "nimbus_master" { secgroup_id = module.nimbus_network.secgroup.id keypair_name = aws_key_pair.jakubgs.key_name } - -module "nimbus_nodes" { - source = "github.com/status-im/infra-tf-amazon-web-services" - - name = "node" - env = "nimbus" - group = "nimbus-slaves" - domain = var.domain - - /* Scaling */ - instance_type = "t3a.medium" - root_vol_size = 20 - data_vol_size = 150 - data_vol_type = "gp2" - host_count = var.hosts_count - - /* 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 -}