Skip to content
Open
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
1 change: 1 addition & 0 deletions ansible/roles/ethlambda/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
--node-key /config/{{ node_name }}.key
--metrics-address 0.0.0.0
--metrics-port {{ ethlambda_metrics_port }}
{{ ('--checkpoint-sync-url ' + checkpoint_sync_url) if (checkpoint_sync_url is defined and checkpoint_sync_url | length > 0) else '' }}
register: ethlambda_container
changed_when: ethlambda_container.rc == 0
when: deployment_mode == 'docker'
1 change: 1 addition & 0 deletions ansible/roles/grandine/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
--metrics
--http-address 0.0.0.0
--http-port {{ grandine_metrics_port }}
{{ ('--checkpoint-sync-url ' + checkpoint_sync_url) if (checkpoint_sync_url is defined and checkpoint_sync_url | length > 0) else '' }}
register: grandine_container
changed_when: grandine_container.rc == 0
when: deployment_mode == 'docker'
1 change: 1 addition & 0 deletions ansible/roles/lantern/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
--metrics-port {{ lantern_metrics_port }}
--http-port 5055
--hash-sig-key-dir /config/hash-sig-keys
{{ ('--checkpoint-sync-url ' + checkpoint_sync_url) if (checkpoint_sync_url is defined and checkpoint_sync_url | length > 0) else '' }}
register: lantern_container
changed_when: lantern_container.rc == 0
when: deployment_mode == 'docker'
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/lighthouse/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
--metrics
--metrics-address 0.0.0.0
--metrics-port {{ lighthouse_metrics_port }}
{{ ('--checkpoint-sync-url ' + checkpoint_sync_url) if (checkpoint_sync_url is defined and checkpoint_sync_url | length > 0) else '' }}
register: lighthouse_container
changed_when: lighthouse_container.rc == 0
when: deployment_mode == 'docker'
1 change: 1 addition & 0 deletions ansible/roles/qlean/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
--node-key /config/{{ node_name }}.key
--listen-addr /ip4/0.0.0.0/udp/{{ qlean_quic_port }}/quic-v1
--prometheus-port {{ qlean_metrics_port }}
{{ ('--checkpoint-sync-url ' + checkpoint_sync_url) if (checkpoint_sync_url is defined and checkpoint_sync_url | length > 0) else '' }}
-ldebug
register: qlean_container
changed_when: qlean_container.rc == 0
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/ream/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
--metrics-address 0.0.0.0
--metrics-port {{ ream_metrics_port }}
--http-address 0.0.0.0
{{ ('--checkpoint-sync-url ' + checkpoint_sync_url) if (checkpoint_sync_url is defined and checkpoint_sync_url | length > 0) else '' }}
register: ream_container
changed_when: ream_container.rc == 0
when: deployment_mode == 'docker'
1 change: 1 addition & 0 deletions ansible/roles/zeam/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
--node-key /config/{{ node_name }}.key
--metrics_enable
--api-port {{ zeam_metrics_port }}
{{ ('--checkpoint-sync-url ' + checkpoint_sync_url) if (checkpoint_sync_url is defined and checkpoint_sync_url | length > 0) else '' }}
register: zeam_container_result
changed_when: zeam_container_result.rc == 0

Expand Down
5 changes: 5 additions & 0 deletions run-ansible.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ useRoot="$7" # Flag to use root user (defaults to current user)
action="$8" # Action: "stop" to stop nodes, otherwise deploy
coreDumps="$9" # Core dump configuration: "all", node names, or client types
skipGenesis="${10}" # Set to "true" to skip genesis generation (e.g. when restarting with checkpoint sync)
checkpointSyncUrl="${11}" # URL for checkpoint sync (when restarting with --restart-client)

# Determine SSH user: use root if --useRoot flag is set, otherwise use current user
if [ "$useRoot" == "true" ]; then
Expand Down Expand Up @@ -117,6 +118,10 @@ if [ "$skipGenesis" == "true" ]; then
EXTRA_VARS="$EXTRA_VARS skip_genesis=true"
fi

if [ -n "$checkpointSyncUrl" ]; then
EXTRA_VARS="$EXTRA_VARS checkpoint_sync_url=$checkpointSyncUrl"
fi

# Determine deployment mode (docker/binary) - read default from group_vars/all.yml
# Default to 'docker' if not specified in group_vars
GROUP_VARS_FILE="$ANSIBLE_DIR/inventory/group_vars/all.yml"
Expand Down
8 changes: 6 additions & 2 deletions spin-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,14 @@ if [ "$deployment_mode" == "ansible" ]; then
ansible_skip_genesis="false"
[[ "$restart_with_checkpoint_sync" == "true" ]] && ansible_skip_genesis="true"

# Determine checkpoint_sync_url for Ansible (when restarting with checkpoint sync)
ansible_checkpoint_url=""
[[ "$restart_with_checkpoint_sync" == "true" ]] && [[ -n "$checkpointSyncUrl" ]] && ansible_checkpoint_url="$checkpointSyncUrl"

# Handle stop action
if [ -n "$stopNodes" ] && [ "$stopNodes" == "true" ]; then
echo "Stopping nodes via Ansible..."
if ! "$scriptDir/run-ansible.sh" "$configDir" "$ansible_node_arg" "$cleanData" "$validatorConfig" "$validator_config_file" "$sshKeyFile" "$useRoot" "stop" "$coreDumps" "$ansible_skip_genesis"; then
if ! "$scriptDir/run-ansible.sh" "$configDir" "$ansible_node_arg" "$cleanData" "$validatorConfig" "$validator_config_file" "$sshKeyFile" "$useRoot" "stop" "$coreDumps" "$ansible_skip_genesis" ""; then
echo "❌ Ansible stop operation failed. Exiting."
exit 1
fi
Expand All @@ -210,7 +214,7 @@ if [ "$deployment_mode" == "ansible" ]; then

# Call separate Ansible execution script
# If Ansible deployment fails, exit immediately (don't fall through to local deployment)
if ! "$scriptDir/run-ansible.sh" "$configDir" "$ansible_node_arg" "$cleanData" "$validatorConfig" "$validator_config_file" "$sshKeyFile" "$useRoot" "" "$coreDumps" "$ansible_skip_genesis"; then
if ! "$scriptDir/run-ansible.sh" "$configDir" "$ansible_node_arg" "$cleanData" "$validatorConfig" "$validator_config_file" "$sshKeyFile" "$useRoot" "" "$coreDumps" "$ansible_skip_genesis" "$ansible_checkpoint_url"; then
echo "❌ Ansible deployment failed. Exiting."
exit 1
fi
Expand Down
Loading