Skip to content

Conversation

@mplsgrant
Copy link
Collaborator

Issue

New users have a hard time getting going with Warnet.

Cause

Warnet has lots of dependencies that stand in the way of starting up warnet.

Solution

Create a quickstart script that checks for dependencies and points the user in the right direction for meeting those dependencies. The quickstart should also fire up a basic 12 node default warnet.

  • minikube
  • kubectl
  • docker
  • docker permissions
  • just
  • python3
  • venv
  • BPF

@mplsgrant mplsgrant force-pushed the 2024-05-ez-startup branch from f680677 to 7a0181a Compare May 27, 2024 02:57
@willcl-ark
Copy link
Contributor

A few shellcheck suggestions:

will@ubuntu in ~/src/warnet on  2024-05-ez-startup [$?] : 🐍 (warnet)
₿ shellcheck quick_start.sh

In quick_start.sh line 42:
current_git=$(basename `git rev-parse --show-toplevel` || true)
                       ^-----------------------------^ SC2046 (warning): Quote this to prevent word splitting.
                       ^-----------------------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean:
current_git=$(basename $(git rev-parse --show-toplevel) || true)


In quick_start.sh line 113:
bpf_status=$(grep CONFIG_BPF /boot/config-$(uname -r) || true)
                                          ^---------^ SC2046 (warning): Quote this to prevent word splitting.


In quick_start.sh line 132:
source .venv/bin/activate
       ^----------------^ SC1091 (info): Not following: .venv/bin/activate was not specified as input (see shellcheck -x).

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC1091 -- Not following: .venv/bin/activate...
  https://www.shellcheck.net/wiki/SC2006 -- Use $(...) notation instead of le...

@willcl-ark
Copy link
Contributor

This is lush, love it:

image

make `shellcheck -x` happy
@mplsgrant mplsgrant force-pushed the 2024-05-ez-startup branch from 7a0181a to 311efca Compare May 30, 2024 17:06
@mplsgrant mplsgrant requested a review from willcl-ark May 30, 2024 17:08
@mplsgrant
Copy link
Collaborator Author

mplsgrant commented May 30, 2024

Looks like the build test is failing. https://github.com/bitcoin-dev-project/warnet/actions/runs/9306448844/job/25616111319#step:4:2456

Will look into this.

Update: appears to be some kind of issue on a 'remote providers' end:

build-test
Received request to deprovision: The request was cancelled by the remote provider.

Update 2: It passes on re-run. Maybe some kind of hang-up with a remote server (docker hub's?). I created an issue (#374) to keep an eye on it.

@mplsgrant
Copy link
Collaborator Author

A few shellcheck suggestions:

@willcl-ark Solved. Thank you.

Copy link
Contributor

@willcl-ark willcl-ark left a comment

Choose a reason for hiding this comment

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

Looks great to me, nice work! Tested on Linux where everything was already installed, and macos where it failed midway. Didn't test each step, but code looks good to me.

Left a few comments with optional changes -- feel free to ignore them (all), or make changes you agree with. Let me know when you're done and I will hit that merge button!

@mplsgrant
Copy link
Collaborator Author

One thing I noticed is that warcli network connected gobbles up the output somehow. So, I can't do this..

while `warcli` network connected | grep -q "False"; do
    echo "Something reassuring for the user"
    sleep 2
done

@mplsgrant
Copy link
Collaborator Author

mplsgrant commented May 30, 2024

Let me know when you're done and I will hit that merge button!

@willcl-ark I updated with your recommendations.

What was up with macos failing midway?

@mplsgrant mplsgrant requested a review from willcl-ark May 30, 2024 20:58
@willcl-ark
Copy link
Contributor

Let me know when you're done and I will hit that merge button!

@willcl-ark I updated with your recommendations.

Sweet, LGTM!

What was up with macos failing midway?

Oh, only that I don't have minikube on it, so got to see it "fail successfully"

@willcl-ark willcl-ark merged commit a6f1205 into bitcoin-dev-project:main May 30, 2024
@mplsgrant mplsgrant deleted the 2024-05-ez-startup branch May 30, 2024 21:28
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