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

Making start-docker Contract-Agnostic #93

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

amessbee
Copy link
Contributor

@amessbee amessbee commented Aug 19, 2024

This is a twin of a PR in dapp-agoric-basics repo.

Goal of this PR is to (maybe partially) close #92. Currently running of agoriclocal chain and deploying and starting contract are intertwined in this dapp. This is somewhat unnatural as chain should not depend on the files of any specific contract - apart from the ones that designated essential for its running.
Further, running a chain independent of a specific contract will allow testing of multiple dapp simultaneously running and interacting with each other which may unlock several scenarios that a developer may want to test for.

As per discussion with @toliaqat, here is a plan:

  • docker compose file should not mount the contract directory as a volume. Rather it should mount (ideally) a single script (run-chain.sh) that necessary tasks for running of chain independently.
  • run-chain.sh should do just that - run the chain and nothing else!

yarn start:contract should handle most of the heavy work including:

  • setup a dedicated workspace for the contract (ws-offer-up here)
  • copy tools needed for building, i.e., Makefile
  • copy scripts and tools needed for required for making install-bundle, submit-proposal, vote etc. calls.
  • create contract bundles on host machine, and then copy them to the workspace in docker container.
  • copy all relevant files to workspace directory on the container.
  • make build-proposal, install-bundle, submit-proposal, vote etc. calls needed to deploy and run the contract using scripts as before.
  • update relevant docs. In particular, add guides to install agoric and agd CLI.
  • Update getting-started docs if needed.

Link to IBIS document.

@amessbee amessbee changed the title Ms/creating contract agnostic docker --WIP-- Making start-docker Contract-Agnostic --WIP-- Aug 19, 2024
@amessbee amessbee marked this pull request as ready for review August 30, 2024 14:47
@amessbee amessbee assigned frazarshad and unassigned frazarshad Aug 30, 2024
Copy link

@usmanmani1122 usmanmani1122 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion:
Instead of running a container within a container (which further reduces the resources available to the child container), why don't we run two parallel docker containers and use a network bridge to communicate between them?

@@ -0,0 +1,19 @@
#!/bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is there code related to codespaces here? That should be in a different PR to make sure that we have a shorter PR to review here.

@frazarshad frazarshad removed their request for review October 15, 2024 05:41
@amessbee amessbee force-pushed the ms/creating-contract-agnostic-docker branch from ec15741 to 1b21a98 Compare October 22, 2024 12:19
@amessbee amessbee changed the title Making start-docker Contract-Agnostic --WIP-- Making start-docker Contract-Agnostic Oct 22, 2024
@amessbee
Copy link
Contributor Author

Asking users to install agoric and agd CLI to interact with getting-started seems like a big ask therefore we are moving towards the easier solution of running these commands inside the docker container ATM. T
here is little to no change needed in the docs.

@toliaqat
Copy link
Contributor

toliaqat commented Nov 6, 2024

I am removing myself from the review. I think @Jovonni or @mujahidkay are best suited to review and help make progress in this area.

@toliaqat toliaqat removed their request for review November 6, 2024 17:05
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.

docker image should be independent of host contract
4 participants