Allow overriding more CLI settings

This commit is contained in:
Zahary Karadjov 2021-09-20 14:20:12 +03:00 committed by Jakub
parent cb69ed19f0
commit 292b6336fa
2 changed files with 33 additions and 7 deletions

View File

@ -26,18 +26,30 @@ beacon_node_dist_validators_data_path: '{{ beacon_node_cont_vol }}/data/{{ beaco
#beacon_node_dist_validators_start: ~
#beacon_node_dist_validators_end: ~
# connectivity settings
# Connectivity settings
beacon_node_discovery_port: 9000
beacon_node_listening_port: 9000
beacon_node_public_address: '{{ ansible_host }}'
beacon_node_max_peers: 160
# metrics
# Number of hardware threads to use
beacon_node_threads: 1
# Scraping of metrics done via VPN. Protected by firewall.
beacon_node_metrics_enabled: true
beacon_node_metrics_address: '0.0.0.0'
beacon_node_metrics_port: 9200
# rpc / administrative
# The JSON-RPC service is disabled because this is a legacy
# functionality that will be removed from Nimbus eventually
beacon_node_rpc_enabled: false
beacon_node_rpc_address: '127.0.0.1'
beacon_node_rpc_port: 9900
beacon_node_rest_enabled: true
beacon_node_rest_address: '127.0.0.1'
beacon_node_rest_port: 5052
# resource limits, mem in MB
beacon_node_mem_limit: '{{ (ansible_memtotal_mb * 0.5) | int }}'
beacon_node_mem_reserve: '{{ (ansible_memtotal_mb * 0.4) | int }}'

View File

@ -12,8 +12,12 @@ services:
labels:
com.centurylinklabs.watchtower.enable: '{{ beacon_node_cont_update_enabled|string }}'
ports:
{% if beacon_node_rpc_enabled %}
- '127.0.0.1:{{ beacon_node_rpc_port }}:{{ beacon_node_rpc_port }}/tcp' # RPC
{% endif %}
{% if beacon_node_metrics_enabled %}
- '{{ beacon_node_metrics_port }}:{{ beacon_node_metrics_port }}/tcp' # Metrics
{% endif %}
- '{{ beacon_node_listening_port }}:{{ beacon_node_listening_port }}/tcp' # LibP2P
- '{{ beacon_node_discovery_port }}:{{ beacon_node_discovery_port }}/udp' # Discovery
volumes:
@ -30,14 +34,24 @@ services:
--tcp-port={{ beacon_node_listening_port }}
--udp-port={{ beacon_node_discovery_port }}
--max-peers={{ beacon_node_max_peers }}
--num-threads={{ beacon_node_threads }}
--netkey-file=/{{ beacon_node_netkey_cont_path }}
--slashing-db-kind={{ beacon_node_slashing_db_kind }}
--insecure-netkey-password=true
--subscribe-all-subnets={{ beacon_node_subscribe_all | to_json }}
--doppelganger-detection={{ beacon_node_doppelganger_detection | to_json }}
--rpc
--rpc-address=0.0.0.0
{% if beacon_node_rpc_enabled %}
--rpc-address={{ beacon_node_rpc_address }}
--rpc-port={{ beacon_node_rpc_port }}
--metrics
--metrics-address=0.0.0.0
{% endif %}
--rest={{ beacon_node_rest_enabled | to_json }}
{% if beacon_node_rest_enabled %}
--rest-address={{ beacon_node_rest_address }}
--rest-port={{ beacon_node_rest_port }}
{% endif %}
--metrics={{ beacon_node_metrics_enabled | to_json }}
{% if beacon_node_metrics_enabled %}
--metrics-address={{ beacon_node_metrics_address }}
--metrics-port={{ beacon_node_metrics_port }}
{% endif %}