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

Developer experience improvements: SSH auth from workstations, entirely local "devnet" functionality with Compose #434

Merged
merged 6 commits into from
Oct 18, 2023

Conversation

vitropy
Copy link
Contributor

@vitropy vitropy commented Oct 18, 2023

This PR bundles two major developer experience improvements together:

  1. SSH authentication for private entropyxyz GitHub Organization repositories during Docker image builds, and
  2. entirely local "devnet"-ish functionality that can spin up two validators ("chains") and two threshold signature scheme servers ("TSS servers") for the hypothetical node operators "Alice" and "Bob."

Do this to spin up the local devnet with this configuration:

  1. Please have already run the entropy-workstation-setup utility to ensure your workstation has the required software installed locally.
  2. From the root of the entropy-core repository with the code in this PR checked out, run:
    docker compose build # Builds images locally.
    docker compose up -d # Uses those built images as the "local devnet" services.

This commit introduces the possibility of using a developer's local SSH
agent as part of the build process. It therefore also removes the hard
requirement of a "`credentials`" secret being available to the builder.

The change merely provides flexibility. Developers usually prefer to use
their own SSH credentials to authenticate to the remote repository, but
many CI/CD systems have more friction when doing this. This enhancement
simply lets us continue to use a single, canonical Dockerfile but still
create a situation where as many consumers of it are as happy as I can
reasonably make them, for the time being. <3

We also introduce a hardcoded GitHub.com SSH key (the ED25519 one), in
order to avoid any Trust On First Use (TOFU) vulnerability associated
with making connections to SSH servers impersonating GitHub.com's own.
@vercel
Copy link

vercel bot commented Oct 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
entropy-core ✅ Ready (Inspect) Visit Preview Oct 18, 2023 6:19pm

@vitropy vitropy requested review from ameba23 and jawndiego October 18, 2023 18:19
@ameba23
Copy link
Contributor

ameba23 commented Oct 18, 2023

Im loving this (after having some help figuring out how to start it). Never again will i open 5 terminals to try something out.

@ameba23
Copy link
Contributor

ameba23 commented Oct 18, 2023

Im loving this (after having some help figuring out how to start it). Never again will i open 5 terminals to try something out.

Although having said that i have not yet managed to successfully sign a message using it (getting errors). I'm curious if anyone else has.

@vitropy
Copy link
Contributor Author

vitropy commented Oct 18, 2023

i have not yet managed to successfully sign a message using it (getting errors). I'm curious if anyone else has.

I'd like to know how to try to do that. 😅 This PR is just a start, the Compose configurations will improve, thanks for the ✅.

@vitropy vitropy merged commit 5098026 into master Oct 18, 2023
@vitropy vitropy deleted the vi/docker-compose-for-local-devnet branch October 18, 2023 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants