Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Commit b3c3282

Browse files
authored
Merge pull request #668 from iotaledger/feat/use-local-snapshot
use local snapshot instead of uploading and downloading it again
2 parents 57a14a4 + c4594b7 commit b3c3282

File tree

3 files changed

+4
-20
lines changed

3 files changed

+4
-20
lines changed

Diff for: .github/workflows/feature-network-deploy.yml

-14
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ on:
44
branches:
55
- develop
66
workflow_dispatch:
7-
inputs:
8-
snapshotUrl:
9-
description: 'Custom snapshot URL:'
10-
required: false
11-
default: ""
127

138
concurrency:
149
group: feature-network-deploy-group
@@ -62,13 +57,6 @@ jobs:
6257
working-directory: tools/genesis-snapshot
6358
run: go run -tags=rocksdb . --config feature --seed 7R1itJx5hVuo9w9hjg5cwKFmek4HMSoBDgJZN8hKGxih --filename genesis-snapshot.bin
6459

65-
- name: Upload snapshot
66-
id: upload-snapshot
67-
run: |
68-
SNAPSHOT_URL=$(curl -T ./tools/genesis-snapshot/genesis-snapshot.bin https://transfer.sh)
69-
echo "Snapshot URL: $SNAPSHOT_URL"
70-
echo "snapshot_url=$SNAPSHOT_URL" >> $GITHUB_OUTPUT
71-
7260
- # Temp fix
7361
# https://github.com/docker/build-push-action/issues/252
7462
# https://github.com/moby/buildkit/issues/1896
@@ -92,8 +80,6 @@ jobs:
9280
9381
- name: Ansible deploy
9482
env:
95-
CUSTOM_SNAPSHOT_URL: '${{ github.event.inputs.snapshotUrl }}'
96-
DEFAULT_SNAPSHOT_URL: '${{ steps.upload-snapshot.outputs.snapshot_url }}'
9783
NETWORK_ENVIRONMENT: '${{ secrets.NETWORK_ENVIRONMENT }}'
9884
IOTA_CORE_DOCKER_IMAGE_REPO: 'iotaledger/iota-core'
9985
IOTA_CORE_DOCKER_IMAGE_TAG: 'feature'

Diff for: deploy/ansible/roles/iota-core-node/tasks/main.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
state: directory
1818
mode: '0755'
1919

20-
- name: Download snapshot file
21-
get_url:
22-
url: "{{ customSnapshotUrl if customSnapshotUrl else defaultSnapshotUrl }}"
20+
- name: Copy genesis snapshot
21+
copy:
22+
src: ../../tools/genesis-snapshot/genesis-snapshot.bin
2323
dest: /opt/iota-core/snapshot.bin
2424
mode: '0644'
2525

Diff for: deploy/ansible/run.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ ARGS=("$@")
88
ansible-playbook -u root -i deploy/ansible/hosts/"${1:-feature.yml}" \
99
--forks 20 --ssh-common-args "-o ControlMaster=auto -o ControlPersist=5m" \
1010
--extra-vars \
11-
"customSnapshotUrl=$CUSTOM_SNAPSHOT_URL
12-
defaultSnapshotUrl=$DEFAULT_SNAPSHOT_URL
13-
iota_core_docker_image_repo=$IOTA_CORE_DOCKER_IMAGE_REPO
11+
"iota_core_docker_image_repo=$IOTA_CORE_DOCKER_IMAGE_REPO
1412
iota_core_docker_image_tag=$IOTA_CORE_DOCKER_IMAGE_TAG
1513
wireguard_server_private_key=$WIREGUARD_SERVER_PRIVKEY
1614
elkElasticUser=$ELASTIC_USER

0 commit comments

Comments
 (0)