use dist-validators role to deploy validators

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2021-07-16 15:10:54 +02:00
parent cc3ad53c33
commit 42d5dfa5e9
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
5 changed files with 35 additions and 2 deletions

View File

@ -15,6 +15,7 @@ beacon_node_build_script: '{{ beacon_node_service_path }}/build.sh'
# shared testnet name: mainnet, pyrmont, prater, etc.
beacon_node_network: 'mainnet'
beacon_node_log_level: 'INFO'
beacon_node_data_folder: 'shared_{{ beacon_node_network }}_0'
beacon_node_subscribe_all: false
beacon_node_doppelganger_detection: true
@ -24,6 +25,13 @@ beacon_node_data_path: '{{ beacon_node_service_path }}/data'
# For validation
beacon_node_valid_network_names: ["pyrmont", "prater", "mainnet", "steklo", "nocturne"]
# 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_data_path }}/{{ beacon_node_data_folder }}'
#beacon_node_dist_validators_start: ~
#beacon_node_dist_validators_end: ~
# connectivity settings
beacon_node_discovery_port: 9000
beacon_node_listening_port: 9000

View File

@ -13,3 +13,6 @@ galaxy_info:
- name: infra-role-winsw
src: git+git@github.com:status-im/infra-role-winsw.git
scm: git
- name: infra-role-dist-validators
src: git+git@github.com:status-im/infra-role-dist-validators.git
scm: git

View File

@ -2,7 +2,9 @@
- import_tasks: checks.yml
- import_tasks: user.yml
- import_tasks: install.yml
- import_tasks: firewall.yml
- import_tasks: schedule.yml
- import_tasks: service.yml
- import_tasks: validators.yml
when: beacon_node_dist_validators_enabled
- import_tasks: firewall.yml
- import_tasks: consul.yml

View File

@ -13,7 +13,7 @@
winsw_service_arguments: |
--non-interactive
--network={{ beacon_node_network }}
--data-dir={{ beacon_node_data_path }}/shared_{{ beacon_node_network }}_0
--data-dir={{ beacon_node_data_path }}/{{ beacon_node_data_folder }}
{% for url in beacon_node_web3_urls | mandatory %}
--web3-url={{ url | mandatory }}
{% endfor %}

20
tasks/validators.yml Normal file
View File

@ -0,0 +1,20 @@
---
- name: 'Distribute validators and secrets'
include_role: name=infra-role-dist-validators
vars:
dist_validators_user: '{{ beacon_node_service_user_name }}'
dist_validators_user_pass: '{{ beacon_node_service_user_pass }}'
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 }} validators'
- name: Restart beacon node
win_service:
name: '{{ beacon_node_service_name }}'
state: 'restarted'