add beacon_node_netkey to be able to deploy node private key

This is used by Nimbus Eth2 bootnodes.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2021-01-29 13:25:59 +01:00
parent 5eecc0ae6f
commit b4e3c32af0
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
5 changed files with 33 additions and 18 deletions

View File

@ -36,5 +36,9 @@ beacon_node_consul_metrics_service_name: '{{ beacon_node_consul_service_name }}-
# Goerli RPC
beacon_node_web3_url: 'wss://goerli.infura.io/ws/v3/6224f3c792cc443fafb64e70a98f871e'
# Netkey file contents, optional.
#beacon_node_netkey: '{"key":"json"}'
beacon_node_netkey_cont_path: 'data/netkey'
# general container management
compose_recreate: false

View File

@ -1,19 +1,4 @@
---
- name: 'Create container dir: {{ beacon_node_cont_name }}'
file:
path: '{{ beacon_node_cont_vol }}/data'
state: directory
owner: dockremap
group: docker
mode: 0750
with_items:
- '{{ beacon_node_cont_vol }}/data'
- '{{ beacon_node_secrets_path }}'
- name: Verify network name
assert:
that: '{{ beacon_node_network in ["toledo", "pyrmont", "mainnet"] }}'
- name: 'Create container config: {{ beacon_node_cont_name }}'
set_fact:
beacon_node_compose:
@ -45,7 +30,7 @@
--log-level={{ beacon_node_log_level }}
--tcp-port={{ beacon_node_listening_port }}
--udp-port={{ beacon_node_discovery_port }}
--netkey-file=/data/netkey
--netkey-file=/{{ beacon_node_netkey_cont_path }}
--insecure-netkey-password=true
--rpc
--rpc-address=0.0.0.0

25
tasks/config.yml Normal file
View File

@ -0,0 +1,25 @@
---
- name: 'Create container dir: {{ beacon_node_cont_name }}'
file:
path: '{{ beacon_node_cont_vol }}/data'
state: directory
owner: dockremap
group: docker
mode: 0750
with_items:
- '{{ beacon_node_cont_vol }}/data'
- '{{ beacon_node_secrets_path }}'
- name: 'Create netkey file (optional)'
copy:
dest: '{{ beacon_node_cont_vol }}/{{ beacon_node_netkey_cont_path }}'
content: '{{ beacon_node_netkey }}'
owner: dockremap
group: docker
mode: 0600
when: beacon_node_netkey is defined
- name: Verify network name
assert:
that: '{{ beacon_node_network in ["toledo", "pyrmont", "mainnet"] }}'

View File

@ -1,8 +1,8 @@
---
- name: Install docker-compose
- name: Install docker-compose utility
apt:
name: docker-compose
- name: Install docker-compose
- name: Install docker-compose python module
pip:
name: docker-compose

View File

@ -1,5 +1,6 @@
---
- import_tasks: install.yml
- import_tasks: config.yml
- import_tasks: compose.yml
- import_tasks: container.yml
- import_tasks: firewall.yml