Skip to content

Commit

Permalink
feat: bootstrap dolos from tarball snapshot
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Gianelloni <[email protected]>
  • Loading branch information
wolf31o2 committed Oct 21, 2024
1 parent 8a2dc4f commit 5e2acd3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 6 additions & 2 deletions roles/dolos/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ dolos_network: mainnet
cardano_node_dir: /opt/cardano

# DB directory for host/container
dolos_db_dir: '{{ cardano_node_dir }}/dolos'
dolos_db_container_dir: '/data'
dolos_db_dir: '{{ cardano_node_dir }}/dolos-data/db'
dolos_db_container_dir: '/data/db'

# Config directory for host/container (cardano-node)
cardano_node_config_dir: '{{ cardano_node_dir }}/config'
Expand All @@ -35,6 +35,10 @@ dolos_docker_image: 'ghcr.io/txpipe/dolos:v{{ dolos_version }}'
# Docker container name
dolos_docker_container_name: dolos

# Snapshots
dolos_snapshot_enabled: true
dolos_snapshot_url: https://dolos-snapshots.s3.amazonaws.com/v0/764824073/full/latest.tar.gz

# Port for host/container (relay)
dolos_relay_container_port: 30013
dolos_relay_port: '{{ dolos_relay_container_port }}'
Expand Down
7 changes: 7 additions & 0 deletions roles/dolos/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@
group: '{{ cardano_node_group | string }}'
mode: 0644

- name: Unarchive Dolos snapshot
src: '{{ dolos_snapshot_url | string }}'
dest: '{{ dolos_db_dir }}'
remote_src: yes
creates: '{{ dolos_db_dir }}/ledger'
when: dolos_snapshot_enabled

- name: Include docker-related tasks
ansible.builtin.include_tasks: docker.yml
when: dolos_install_method == 'docker'

0 comments on commit 5e2acd3

Please sign in to comment.