From 7d6c9b26c227679a73d8ab05836ff140161dff54 Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Sun, 19 Nov 2023 12:10:32 -0500 Subject: [PATCH] feat: more configuration for cardano-node Signed-off-by: Chris Gianelloni --- roles/cardano_node/defaults/main.yml | 20 ++++++++++++++++---- roles/cardano_node/tasks/docker.yml | 1 + 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/roles/cardano_node/defaults/main.yml b/roles/cardano_node/defaults/main.yml index 05fbf09..9ef212f 100644 --- a/roles/cardano_node/defaults/main.yml +++ b/roles/cardano_node/defaults/main.yml @@ -5,9 +5,16 @@ cardano_node_install_method: 'docker' # Cardano node version cardano_node_version: '1.35.7' +# Cardano network +cardano_node_network: mainnet + # Base host directory for node data cardano_node_dir: /opt/cardano +# Config directory for host/container +cardano_node_config_dir: '{{ cardano_node_dir }}/config' +cardano_node_config_container_dir: '{{ cardano_node_config_dir }}' + # DB directory for host/container cardano_node_db_dir: '{{ cardano_node_dir }}/data' cardano_node_db_container_dir: '{{ cardano_node_db_dir }}' @@ -16,6 +23,10 @@ cardano_node_db_container_dir: '{{ cardano_node_db_dir }}' cardano_node_ipc_dir: '{{ cardano_node_dir }}/ipc' cardano_node_ipc_container_dir: '{{ cardano_node_ipc_dir }}' +# Topology directory for host/container +cardano_node_topology_dir: '{{ cardano_node_config_dir }}' +cardano_node_topology_container_dir: '{{ cardano_node_topology_dir }}' + # User/group for file/directory ownership cardano_node_user: root cardano_node_group: root @@ -40,14 +51,15 @@ cardano_node_metrics_port: '{{ cardano_node_metrics_container_port }}' # Socket file name cardano_node_socket_name: node.socket -# Cardano network -cardano_node_network: mainnet +# RTS tuning +cardano_node_rts_flags: '-N2 -A64m -I0 -qg -qb --disable-delayed-os-memory-return' # Config -cardano_node_config_file: '{{ cardano_node_dir }}/config/{{ cardano_node_network }}-config.json' +cardano_node_manage_config: false # this currently does nothing +cardano_node_config_file: '{{ cardano_node_config_container_dir }}/{{ cardano_node_network }}-config.json' # Topology -cardano_node_topology_file: '{{ cardano_node_dir }}/config/{{ cardano_node_network }}-topology.json' +cardano_node_topology_file: '{{ cardano_node_topology_container_dir }}/{{ cardano_node_network }}-topology.json' # Install chrony chrony_enabled: true diff --git a/roles/cardano_node/tasks/docker.yml b/roles/cardano_node/tasks/docker.yml index a9fc568..7143f09 100644 --- a/roles/cardano_node/tasks/docker.yml +++ b/roles/cardano_node/tasks/docker.yml @@ -23,6 +23,7 @@ CARDANO_NETWORK: '{{ cardano_node_network }}' CARDANO_NODE_SOCKET_PATH: '{{ cardano_node_ipc_container_dir }}/{{ cardano_node_socket_name }}' CARDANO_PORT: '{{ cardano_node_port | string }}' + CARDANO_RTS_OPTS: '{{ cardano_node_rts_flags }}' CARDANO_SOCKET_PATH: '{{ cardano_node_ipc_container_dir }}/{{ cardano_node_socket_name }}' CARDANO_TOPOLOGY: '{{ cardano_node_topology_file }}' volumes: