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: implement bootstrap in meroctl #1016

Merged
merged 13 commits into from
Dec 20, 2024

Conversation

MatejVukosav
Copy link
Member

@MatejVukosav MatejVukosav commented Dec 17, 2024

TODO v2

  • remove manual sleep and wait for actual action to finish

Test
cargo run -p meroctl -- --node-name node1 --home data bootstrap start --merod-path {path} --app-path {path}
or with app download
cargo run -p meroctl -- --node-name node1 --home data bootstrap start --merod-path {path}
If user didn't provide app-path, instructions at the bottom of log are provided. Otherwise not.

Log

Starting bootstrap process
Downloading demo app...
Demo app downloaded successfully.
Initializing node "node1"
Starting node "node1".
Node "node1" started successfully.
Creating context in "node1"
{"data":{"applicationId":"QhbtK4fe25jCbFLFDxBMEe5YrHBeHYd3ynQxjzZ8yzf"}}
{"data":{"contextId":"AdZmi9s5bZhW5be8TndLV51ZM5dxBWrjUKxSRM4Z3GJr","memberPublicKey":"3iWqdX7aSfkJumFepbuGxAL7hZFYiFKrwsLKZnX9HV1j"}}
Context created: "AdZmi9s5bZhW5be8TndLV51ZM5dxBWrjUKxSRM4Z3GJr"
Initializing node "node2"
Starting node "node2".
Node "node2" started successfully.
Inviting node "node2" to context "AdZmi9s5bZhW5be8TndLV51ZM5dxBWrjUKxSRM4Z3GJr"
{"data":"223oXn7wzDFF7LS76Z5vbqgGZn4bea8hVGXUaBPkwc8ZHxs5F26zFBeqUpTisCEaGshfSL37M9QqThw23fpox8Xpy1sgbHvoB6tQoX547BSEHBYDgUhBayvfVp6uqLx1qrRksxXJQa7prbV9fSH3Y3wCYVtSNKzBvb"}
Node "node2" successfully invited.
Joining node "node2" to context.
{"data":{"contextId":"AdZmi9s5bZhW5be8TndLV51ZM5dxBWrjUKxSRM4Z3GJr","memberPublicKey":"DREcrMahB4EA5oytkdsntejuXP5YMnNDPE3NTPFFYzNs"}}
Node "node2" joined successfully.
************************************************
🚀 Bootstrap finished. Nodes are ready to use! 🚀
Context id is "AdZmi9s5bZhW5be8TndLV51ZM5dxBWrjUKxSRM4Z3GJr" 
Connect to the node from https://calimero-network.github.io/core-app-template/
Open application in two separate windows to use it with two different nodes.
Application setup screen requires application id and node url.
Application id is "QhbtK4fe25jCbFLFDxBMEe5YrHBeHYd3ynQxjzZ8yzf" 
Node "node1" url is http://localhost:2428
Node "node1" url is http://localhost:2429
************************************************

@MatejVukosav MatejVukosav self-assigned this Dec 17, 2024
@MatejVukosav MatejVukosav force-pushed the feat--add-bootstrap-to-meroctl branch from bef6caa to ad12be9 Compare December 17, 2024 02:33
@MatejVukosav MatejVukosav force-pushed the feat--add-bootstrap-to-meroctl branch from ad12be9 to 829851b Compare December 17, 2024 02:35
@MatejVukosav MatejVukosav force-pushed the feat--add-bootstrap-to-meroctl branch from 829851b to 6d1006f Compare December 17, 2024 02:36
@MatejVukosav MatejVukosav requested review from fbozic, miraclx, xilosada and chefsale and removed request for fbozic December 18, 2024 16:06
@MatejVukosav MatejVukosav marked this pull request as ready for review December 18, 2024 16:09
@MatejVukosav MatejVukosav force-pushed the feat--add-bootstrap-to-meroctl branch 6 times, most recently from 0ded450 to 4bf359f Compare December 18, 2024 16:37
@MatejVukosav MatejVukosav force-pushed the feat--add-bootstrap-to-meroctl branch from 4bf359f to 8fcd2a1 Compare December 18, 2024 16:40
@MatejVukosav MatejVukosav force-pushed the feat--add-bootstrap-to-meroctl branch from 7d39a46 to fb2e228 Compare December 19, 2024 14:36
@MatejVukosav
Copy link
Member Author

Run tests locally and they are passing
cargo build -p meroctl -p merod -p e2e-tests

@fbozic did you saw this error before?

crates/merod/src/cli/init.rs Show resolved Hide resolved
crates/meroctl/src/cli/app/install.rs Outdated Show resolved Hide resolved
crates/meroctl/src/cli/bootstrap/start.rs Outdated Show resolved Hide resolved
crates/meroctl/src/cli/bootstrap/start.rs Outdated Show resolved Hide resolved
crates/meroctl/src/cli/bootstrap/start.rs Outdated Show resolved Hide resolved
@MatejVukosav MatejVukosav force-pushed the feat--add-bootstrap-to-meroctl branch from bfce2d4 to 8a92b6a Compare December 20, 2024 06:00
@MatejVukosav MatejVukosav requested a review from miraclx December 20, 2024 06:01
@MatejVukosav MatejVukosav force-pushed the feat--add-bootstrap-to-meroctl branch 5 times, most recently from c99fef6 to 123a6d8 Compare December 20, 2024 06:53
@MatejVukosav MatejVukosav force-pushed the feat--add-bootstrap-to-meroctl branch from 123a6d8 to 629b569 Compare December 20, 2024 06:54
crates/merod/Cargo.toml Outdated Show resolved Hide resolved
Copy link
Member

@fbozic fbozic left a comment

Choose a reason for hiding this comment

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

You shouldn't use println in the commands, please use environment.output.. Because we consume command output in multiple formats. Potentially, this breaks your e2e-tests.

@MatejVukosav MatejVukosav force-pushed the feat--add-bootstrap-to-meroctl branch 2 times, most recently from 3794bd8 to d49f87e Compare December 20, 2024 14:20
crates/meroctl/src/cli/context/join.rs Outdated Show resolved Hide resolved
@MatejVukosav MatejVukosav force-pushed the feat--add-bootstrap-to-meroctl branch from d49f87e to 3744997 Compare December 20, 2024 20:00
@MatejVukosav MatejVukosav merged commit f6ccc81 into master Dec 20, 2024
11 checks passed
@MatejVukosav MatejVukosav deleted the feat--add-bootstrap-to-meroctl branch December 20, 2024 20:09
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.

5 participants