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: bootstrap dolos from tarball snapshot #153

Merged
merged 1 commit into from
Oct 21, 2024
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
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'
Loading