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

feat: isolate components #81

Merged
merged 12 commits into from
May 16, 2024
Merged

feat: isolate components #81

merged 12 commits into from
May 16, 2024

Conversation

AquiGorka
Copy link
Contributor

@AquiGorka AquiGorka commented May 10, 2024

These changes introduce a handful of new features. From the top:

Local setup

To run a local Lilypad network a local blockchain, a solver service, a resource provider service, a bacalhau node and a job creator service are required.

First, start the blockchain from scratch: ./stack chain-docker-build and ./stack chain-docker-run ./path-to-local-folder-for-data, then ./stack chain-fund-admin and finally ./stack chain-boot (fund accounts, and compile and deploy contracts). The docker container includes a handy ./reset script to go back to a clean slate (it funds the admin account so you can skip that step if reset is used).

Second, start a solver service: ./stack solver (or ./stack solver-docker-build and ./stack solver-docker-run). The output here will let us know that the solver's server address has been set in the blockchain (for local dev this is http://localhost:8080). Which is required for the mediator, resource-provider and job-creator services as these all connect to the solver via a web socket.

Third, start a job creator service: ./stack job-creator (or ./stack job-creator-docker-build and ./stack job-creator-docker-run).

Fourth, start a resource provider service: ./stack resource-provider.

Fifth, start a bacalhau node: ./stack bacalhau-node

  • These last two are under development, as I'm still working on being able to execute the bacalhau node inside a container (it needs to run in a container that has a docker daemon - containers inside containers); when I can successfully run a job with the node running in a container, then I plan to pack together the resource-provider and bacalhau into 1 image, as these 2 are required to setup a node to join the network.

Sixth, trigger an onchain job: ./stack run-cowsay-onchain and see how the whole flow works out.

  • This last item still needs the doppler cmd to be put in place.

Remaining

  • mediator this service is not required to run a job. I've yet to implement the Dockerfile and cmds to run this task
  • integration-tests I've yet to set the doppler cmd in place to run this.
  • all work related to the faucet task
  • add cloudflare tunnels to expose the services that should be public
  • github actions to deploy the whole infra
    • fix the tests
  • diagram the flow task
  • Update the CONTRIBUTING instructions (and potentially remove the TESTNETDEPLOY file) task

Notes

  • No need to rebuild the images if there are no changes to the code. It is faster to run the non containerized components if there are changes to be tested but for the components that don't have changes (since the images use the built code).
  • I highly suggest reading through the commits in order to review the code.

Copy link

@10d9e 10d9e left a comment

Choose a reason for hiding this comment

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

LGTM

@AquiGorka AquiGorka force-pushed the gorka/isolate-components branch 18 times, most recently from 6335211 to 7fdc5f6 Compare May 16, 2024 18:00
@AquiGorka AquiGorka force-pushed the gorka/isolate-components branch 2 times, most recently from 3ffe18f to ed4b2ad Compare May 16, 2024 18:44
@AquiGorka AquiGorka force-pushed the gorka/isolate-components branch from ed4b2ad to 8c95bb0 Compare May 16, 2024 18:49
@AquiGorka AquiGorka merged commit e04d15e into main May 16, 2024
4 checks passed
@AquiGorka AquiGorka deleted the gorka/isolate-components branch May 16, 2024 18:56
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.

2 participants