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

FEATURE: Allow pulling a genesis file from AWS Secrets Manager #1612

Merged
merged 1 commit into from
Jun 18, 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
9 changes: 9 additions & 0 deletions docker/scripts/sequencer-awssecretsmanager.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
set -eEu -o pipefail

if [[ -v ESPRESSO_SEQUENCER_GENESIS_SECRET ]]; then
echo "Loading genesis file from AWS secrets manager"
aws secretsmanager get-secret-value --secret-id ${ESPRESSO_SEQUENCER_GENESIS_SECRET} --query SecretString --output text | tee /genesis/injected.toml >/dev/null
fi

/bin/sequencer "$@"
4 changes: 4 additions & 0 deletions docker/sequencer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ RUN chmod +x /bin/pub-key
# setting `ESPRESSO_SEQUENCER_GENESIS_FILE`.
COPY data/genesis /genesis

# Allow injecting a genesis file with aws secretsmanager
# Set `ESPRESSO_SEQUENCER_GENESIS_SECRET`
COPY docker/scripts/sequencer-awssecretsmanager.sh /bin/sequencer-awssecretsmanager.sh

# Set a path to save the consensus config on startup.
#
# Upon restart, the config will be loaded from this file and the node will be able to resume
Expand Down
Loading