rafactor to make use of infra-role-dist-validators
This way we can handle hosts with multiple nodes in different folders. Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
a14c9afe02
commit
992c8a43a4
|
@ -18,6 +18,14 @@ beacon_node_cont_update_enabled: true
|
|||
# Subfolders for separate read-only mounting
|
||||
beacon_node_secrets_path: '{{ beacon_node_cont_vol }}/data/{{ beacon_node_data_folder }}/secrets'
|
||||
|
||||
# Automatically distribute validators
|
||||
beacon_node_dist_validators_enabled: false
|
||||
beacon_node_dist_validators_name: '{{ beacon_node_network }}_deposits'
|
||||
beacon_node_dist_validators_data_path: '{{ beacon_node_cont_vol }}/data/{{ beacon_node_data_folder }}'
|
||||
#beacon_node_dist_validators_name: ~
|
||||
#beacon_node_dist_validators_start: ~
|
||||
#beacon_node_dist_validators_end: ~
|
||||
|
||||
# connectivity settings
|
||||
beacon_node_discovery_port: 9000
|
||||
beacon_node_listening_port: 9000
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
---
|
||||
- name: Save iptables rules
|
||||
shell: iptables-save > /etc/iptables/rules.v4
|
||||
shell: 'iptables-save > /etc/iptables/rules.v4'
|
||||
|
|
|
@ -10,4 +10,7 @@
|
|||
- name: Verify network name
|
||||
assert:
|
||||
that: '{{ beacon_node_network in beacon_node_valid_network_names }}'
|
||||
|
||||
quiet: true
|
||||
fail_msg: |
|
||||
Provided network name does not match any of expected values.
|
||||
Expected: {{ beacon_node_valid_network_names | join(", ") }}'
|
||||
|
|
|
@ -3,5 +3,7 @@
|
|||
- import_tasks: install.yml
|
||||
- import_tasks: config.yml
|
||||
- import_tasks: container.yml
|
||||
- import_tasks: validators.yml
|
||||
when: beacon_node_dist_validators_enabled
|
||||
- import_tasks: firewall.yml
|
||||
- import_tasks: consul.yml
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
- name: 'Distribute validators and secrets'
|
||||
include_role: name=infra-role-dist-validators
|
||||
vars:
|
||||
dist_validators_name: '{{ beacon_node_dist_validators_name }}'
|
||||
dist_validators_start: '{{ beacon_node_dist_validators_start | mandatory }}'
|
||||
dist_validators_end: '{{ beacon_node_dist_validators_end | mandatory }}'
|
||||
dist_validators_data_path: '{{ beacon_node_dist_validators_data_path | mandatory }}'
|
||||
|
||||
- when: dist_validators_deployed is defined
|
||||
block:
|
||||
- name: 'Show number of validators deployed'
|
||||
debug: msg='Deployed {{ dist_validators_deployed|length }} validators'
|
||||
|
||||
- name: 'Restart beacon node container'
|
||||
command: 'docker-compose restart'
|
||||
args:
|
||||
chdir: '{{ beacon_node_cont_vol }}'
|
Loading…
Reference in New Issue