support raising and lowering the number of running nodes
This commit is contained in:
parent
f9db5421e3
commit
3889a17e48
|
@ -2,6 +2,7 @@
|
|||
beacon_node_build_flavour: 'rlpx'
|
||||
beacon_node_network: 'testnet0'
|
||||
beacon_node_total_nodes: 1
|
||||
beacon_node_running_nodes: 1
|
||||
beacon_node_log_level: INFO
|
||||
|
||||
# Image source: https://github.com/status-im/nimbus/tree/master/docker/beacon_node
|
||||
|
@ -12,6 +13,5 @@ beacon_node_discovery_port: 9000
|
|||
beacon_node_listening_port: 9000
|
||||
|
||||
# general container management
|
||||
cont_state: started
|
||||
cont_recreate: false
|
||||
cont_restart: false
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
image: '{{ beacon_node_cont_image }}'
|
||||
pull: true
|
||||
restart_policy: always
|
||||
state: '{{ cont_state }}'
|
||||
state: '{{ "started" if is_running else "stopped" }}'
|
||||
recreate: '{{ cont_recreate }}'
|
||||
restart: '{{ cont_restart }}'
|
||||
# enable image updates via watchtower
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
public_udp_port: '{{ beacon_node_discovery_port + loop_index }}'
|
||||
container_name: 'beacon-node-{{ beacon_node_build_flavour }}-{{ beacon_node_network}}-{{loop_index }}'
|
||||
index: '{{ loop_index }}'
|
||||
is_running: '{{ loop_index < beacon_node_running_nodes }}'
|
||||
loop: '{{ range(0, beacon_node_total_nodes) | list }}'
|
||||
loop_control:
|
||||
index_var: loop_index
|
||||
|
|
Loading…
Reference in New Issue