paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.network/
1.76k stars 631 forks source link

[README] Quick Start Section #4650

Closed ggwpez closed 1 month ago

ggwpez commented 3 months ago

Our readme does not have a quickstart section or similar. Ideally when opening a repo, there is a one-liner to copy&paste that sets up a minimal demo and development env.

Not sure how to best do this, but i am pretty bullish on pop-cli. So maybe we can setup some script that installs it and runs a local parachain example.

For the development setup we could try things like devbox (more friendly version than nix flake) or similar. I think we used nix in the past and it got removed after not being maintained, so maybe that is lower prio.

kianenigma commented 2 months ago

I've updated the README in the meantime to point to your_first_pallet for now, but we need something better.

We should point to more external sources.

https://github.com/paritytech/eng-automation/issues/10 will also help with this.

kianenigma commented 2 months ago

Maybe we can transform mod templates in sdk-docs to be mod getting_started, one of tarter ways being templates, and then let all community members add their corresponding tools and getting started notes in there?

https://github.com/paritytech/polkadot-sdk/pull/4735/files#diff-e6af0e6ffed57caecb3809a6d6192e670849e6b62eeb077ee041366804ec676f

kianenigma commented 2 months ago

For the development setup we could try things like devbox (more friendly version than nix flake) or similar. I think we used nix in the past and it got removed after not being maintained, so maybe that is lower prio.

I am not familiar enough yet with the tools here but @rzadp can look into it as a part of https://github.com/paritytech/eng-automation/issues/10 and specificailly as a part of new install_polkadot_sdk.sh script that gets you up and running.

rzadp commented 2 months ago

As for the development setup: which linux distros do we want to support for development?

I didn't see it written down anywhere, but looking at CI, seems like we support only Ubuntu/Debian at the moment. Do we want to support more?

I tried to configure a fresh Alpine docker container and compile a minimal template as an experiment, but failed and gave up after a while :(

Not sure if devbox/nix is a magical solution there - installing devbox went completely different for me in a Debian vs Alpine container - with Alpine I've similarly run into issues.

I think a distro can be called supported if it's used on CI. So we would be trading a script to install polkadot-sdk prerequisites on different distros, for a script that installs devbox prerequisites on different distros. 😅


Also, I'm not sure if devbox/nix is that valuable for this project, to justify that trade. It's nice to separate node/python/etc between projects, but polkadot-sdk needs:

So I'm not sure it's good to impose an isolated development solution like devbox/nix onto the user without a real need - or do you see it differently?

ggwpez commented 2 months ago

So I'm not sure it's good to impose an isolated development solution like devbox/nix onto the user without a real need - or do you see it differently?

If its easy enough to install the dependencies without devbox then we dont need it. It was just an idea, but having a script would also work.

For support: we do support Debian (Ubuntu) and MacOS. I think we had a bash script in the past.
Ideally it would be a one-liner that can be copy&pasted that will install all deps.

kianenigma commented 2 months ago

I would love to see this bash script to be fancy, use ascii art, be interactive and fun to use :)

apopiak commented 2 months ago

If we want a pretty one-liner, we might want to have a nice url like polkadot-sdk.io/getting-started.sh or sh.polkadot.network so we can do: curl --proto '=https' --tlsv1.2 -sSf https://get-started.polkadot.sdk| sh

peterwht commented 2 months ago

Happy to see some bullishness on Pop CLI :)

We have a new command pop install that was inspired by the get-substrate script. We have done some testing with docker containers and this command has been particularly useful to get started very quick.

We intend to continue improving on it to make it more "interactive and fun to use" :) We are very open to feedback and suggestions.

One thing to note, with Pop CLI it will take two steps:

  1. Install the latest Pop CLI binary
  2. Run pop install

But after that, generating a new parachain and launching it locally requires no additional installations.

kianenigma commented 2 months ago

Happy to see some bullishness on Pop CLI :)

We have a new command pop install that was inspired by the get-substrate script. We have done some testing with docker containers and this command has been particularly useful to get started very quick.

We intend to continue improving on it to make it more "interactive and fun to use" :) We are very open to feedback and suggestions.

One thing to note, with Pop CLI it will take two steps:

  1. Install the latest Pop CLI binary
  2. Run pop install

But after that, generating a new parachain and launching it locally requires no additional installations.

@peterwht what do you think of https://github.com/paritytech/polkadot-sdk/pull/4879? Does it overlap a lot with what pop install does?

In any case, we'd be happy to link to pop install as an alternative as well.

peterwht commented 2 months ago

Hey @kianenigma, thanks for the response. #4879 does have overlap with pop install. However, having multiple options is valuable IMO. For Pop CLI, pop install is one piece, and more focus is put on what comes after having your environment setup.

kianenigma commented 1 month ago

Can be closed now? we merged our in-house script.