Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: more configuration for cardano-node #27

Merged
merged 1 commit into from
Nov 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions roles/cardano_node/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}'
Expand All @@ -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
Expand All @@ -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
1 change: 1 addition & 0 deletions roles/cardano_node/tasks/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading