Skip to content

Commit ffddb08

Browse files
authored
feat: bootstrap dolos from tarball snapshot (#153)
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent 7b4fbf1 commit ffddb08

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

roles/dolos/defaults/main.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ dolos_network: mainnet
1212
cardano_node_dir: /opt/cardano
1313

1414
# DB directory for host/container
15-
dolos_db_dir: '{{ cardano_node_dir }}/dolos'
16-
dolos_db_container_dir: '/data'
15+
dolos_db_dir: '{{ cardano_node_dir }}/dolos-data/db'
16+
dolos_db_container_dir: '/data/db'
1717

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

38+
# Snapshots
39+
dolos_snapshot_enabled: true
40+
dolos_snapshot_url: https://dolos-snapshots.s3.amazonaws.com/v0/764824073/full/latest.tar.gz
41+
3842
# Port for host/container (relay)
3943
dolos_relay_container_port: 30013
4044
dolos_relay_port: '{{ dolos_relay_container_port }}'

roles/dolos/tasks/main.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@
2828
group: '{{ cardano_node_group | string }}'
2929
mode: 0644
3030

31+
- name: Unarchive Dolos snapshot
32+
src: '{{ dolos_snapshot_url | string }}'
33+
dest: '{{ dolos_db_dir }}'
34+
remote_src: yes
35+
creates: '{{ dolos_db_dir }}/ledger'
36+
when: dolos_snapshot_enabled
37+
3138
- name: Include docker-related tasks
3239
ansible.builtin.include_tasks: docker.yml
3340
when: dolos_install_method == 'docker'

0 commit comments

Comments
 (0)