halve the number of containers (#15)

* halve the number of containers

and cleanup some vars

* dedicate some slaves to testnet2

* use list slices for hosts
This commit is contained in:
Ștefan Talpalaru 2020-06-26 22:37:59 +02:00 committed by GitHub
parent 08b6fe9050
commit d88720874d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 6 deletions

View File

@ -4,9 +4,7 @@ cont_restart: false
cont_recreate: false
cont_state: 'present'
# general compose config
compose_restart: false
compose_recreate: 'smart'
compose_state: 'present'
compose_recreate: true
# CloudFlare Origin certificates
origin_certs:

View File

@ -17,7 +17,7 @@
- name: Configure Nimbus cluster
hosts:
- nimbus-master
- nimbus-slaves
- nimbus-slaves[0:4]
tags: beacon-node
roles:
- { role: swap-file, tags: swap-file }
@ -25,7 +25,7 @@
- include_role:
name: infra-role-beacon-node
tags: beacon-node
with_sequence: count=2
with_sequence: count=1
vars:
beacon_node_network: 'testnet0'
beacon_node_rpc_port: '{{ 10000 - 1 + item|int }}'
@ -37,7 +37,7 @@
- include_role:
name: infra-role-beacon-node
tags: beacon-node
with_sequence: count=2
with_sequence: count=1
vars:
beacon_node_network: 'testnet1'
beacon_node_rpc_port: '{{ 11000 - 1 + item|int }}'
@ -45,3 +45,22 @@
beacon_node_listening_port: '{{ 9100 - 1 + item|int }}'
beacon_node_discovery_port: '{{ 9100 - 1 + item|int }}'
beacon_node_cont_name: 'beacon-node-{{ beacon_node_network}}-{{ item }}'
- name: Configure shared testnet
hosts:
- nimbus-slaves[5:8]
tags: beacon-node
roles:
- { role: swap-file, tags: swap-file }
tasks:
- include_role:
name: infra-role-beacon-node
tags: beacon-node
with_sequence: count=1
vars:
beacon_node_network: 'testnet2'
beacon_node_rpc_port: '{{ 11000 - 1 + item|int }}'
beacon_node_metrics_port : '{{ 9300 - 1 + item|int }}'
beacon_node_listening_port: '{{ 9100 - 1 + item|int }}'
beacon_node_discovery_port: '{{ 9100 - 1 + item|int }}'
beacon_node_cont_name: 'beacon-node-{{ beacon_node_network}}-{{ item }}'