-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Towards #465. Here we define a container image that wraps the upstream cosmos/relayer image with the custom scripting for bootstrapping clients on the Penumbra testnet and preview networks. No other chain configs are part of this container image as of yet. The container image will be publicly available as `ghcr.io/penumbra-zone/relayer`. It isn't yet deployed to the cluster: that'll come next.
- Loading branch information
Showing
6 changed files
with
98 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
notes/** | ||
.github | ||
.firebaserc | ||
theme | ||
book.toml | ||
*.md | ||
Dockerfile | ||
docker-compose.yml | ||
*.json | ||
target/** | ||
docs/ | ||
.github/ | ||
target/** | ||
|
||
# We'll generate relayer configs dynamically for now | ||
deployments/relayer/configs/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM ghcr.io/cosmos/relayer:main AS upstream | ||
FROM docker.io/debian:stable | ||
|
||
# Normal user config build args | ||
ARG UID=1000 | ||
ARG GID=1000 | ||
ARG USERNAME=penumbra | ||
|
||
# Install apt deps. | ||
RUN apt-get update && apt-get install -y \ | ||
gettext-base \ | ||
curl \ | ||
jq \ | ||
&& rm -r /var/lib/apt/lists | ||
|
||
# Copy rly binary from upstream image | ||
COPY --from=upstream /bin/rly /bin/rly | ||
|
||
# Create normal user account | ||
RUN groupadd -g ${GID} ${USERNAME} && useradd -m -d /home/${USERNAME} -g ${GID} -u ${UID} ${USERNAME} | ||
|
||
# Prepare custom config script | ||
RUN mkdir -p /usr/src/penumbra-relayer | ||
COPY deployments/relayer/ /usr/src/penumbra-relayer/ | ||
WORKDIR /usr/src/penumbra-relayer | ||
RUN chown -R ${USERNAME}:${USERNAME} /usr/src/penumbra-relayer | ||
USER ${USERNAME} | ||
ENTRYPOINT ["/usr/src/penumbra-relayer/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
# Container entrypoint for running an IBC relayer for Penumbra, | ||
# specifically between penumbra-testnet and penumbra-preview. | ||
set -euo pipefail | ||
|
||
|
||
# Generate latest configs, polling chain id from RPC endpoints | ||
cd /usr/src/penumbra-relayer || exit 1 | ||
./generate-configs preview | ||
./generate-configs testnet | ||
|
||
# Generate relayer YAML config, specifying Penumbra path. | ||
./configure-relayer | ||
rly --debug transact link penumbra_path | ||
cat <<EOM | ||
############################################## | ||
Finished configuring the relayer for Penumbra! | ||
Starting service... | ||
############################################## | ||
EOM | ||
# Run the relayer as a blocking service | ||
exec rly start penumbra_path |