Skip to content

Commit

Permalink
Merge pull request #27 from blinklabs-io/feat/cardano-node-more-config
Browse files Browse the repository at this point in the history
feat: more configuration for cardano-node
  • Loading branch information
wolf31o2 authored Nov 19, 2023
2 parents bc5e269 + 7d6c9b2 commit 605aadf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
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

0 comments on commit 605aadf

Please sign in to comment.