neo-node icon indicating copy to clipboard operation
neo-node copied to clipboard

❤ 🚀 New Release - a Docker image, plz

Open PureKrome opened this issue 4 years ago • 13 comments

It's 2021. Lets not ask people to download code to install the CLI or even download an exe and then install an extra db, etc.

Lets make this really simple for developers and offer a docker image with everything in it.

please.

thank you kindly! 🍰

PureKrome avatar Sep 24 '21 14:09 PureKrome

Agreed.

vncoelho avatar Sep 24 '21 14:09 vncoelho

Except for the docker image, i also think we need some scripts for different environment setup or tests.

Jim8y avatar Sep 24 '21 14:09 Jim8y

Except for the docker image, i also think we need some scripts for different environment setup or tests.

And what would these scripts be doing? As in ... as a developer, i don't want scripts because this means i have to do stuff to setup my environment to experiment with Neo3. Too much of a barrier to entry. All i should do is

=> docker run -it neo3

or whatever. and off i go.

PureKrome avatar Sep 24 '21 14:09 PureKrome

And what would these scripts be doing? As in ... as a developer, i don't want scripts because this means i have to do stuff to setup my environment to experiment with Neo3. Too much of a barrier to entry. All i should do is

script to run in testnet, script to run in mainnet, script to run in private net, script to install everything needed in a new syste

Jim8y avatar Sep 24 '21 14:09 Jim8y

ah yes. misunderstood! yep, some simple CLI commands would definitely simplify things

PureKrome avatar Sep 24 '21 14:09 PureKrome

For those who just want to spin up a node, I really like a docker image so I can docker run ....

However, I do notice the modular design for N3 nodes. Like the plugin system, if you're on the testnet, when you download a plugin, it's likely your node is running on testnet, but your plugin is configured for mainnet (because of the default value). So I'm expecting some code refactor first, like allowing plugins to fetch network id (and other common settings) from an internal API, or something else (I'm not writing any C#, so I'm sorry if I was wrong).

Then we can have a better experience with the docker image.

Or we can have some shell script to build docker image locally, based on what you need. For example, I need the plugin A, B, and C, and a node for testnet. Then the script will clone the node's code, compile it, download the desired plugins, make the config, then pack them into a docker image.

Or just offers different levels of docker images. Like light for bare nodes, medium for every plugin except consensus, and full for consensus nodes.

hurui200320 avatar Apr 06 '22 16:04 hurui200320

Is this what you are looking for neo-project/neo-node#863 neo-project/neo#853 ?

Jim8y avatar Apr 06 '22 16:04 Jim8y

Not exactly is. If you dig into the plugin's config, you will notice some plugins have their own network id in their config, if that value doesn't match with the node's config, the plugin won't work, and there is no warning or error. I think that can be achieved if the plugin can fetch config from the node, aka I only set the network id in the node's config, and there won't be the same config for plugins.

And I want a docker image because I like docker and use docker a lot in my Java development. With neow3j (N3's Java SDK), you can use test container to spin up some neo-express containers. But when I want to spin up a testnet or mainnet node on my own server, it's glad to use docker since I have already had containers running on it.

However, I think you can/should solve the plugin config issue if you want to switch back and forth from different configs. Otherwise the plugins' config would be a nightmare.

hurui200320 avatar Apr 06 '22 16:04 hurui200320

I've confirmed with other developers, the reason that we dont fetch network id from the node is because plugin could and might work in different networks with the node~~~~but i think it wont be a problem if we just add one more command to synchronize network settings here neo-project/neo#853. How do you think?

Jim8y avatar Apr 06 '22 16:04 Jim8y

plugin could and might work in different network with the node

Hmmm, I can't figure out a situation where I need that feature.

But that reminds me of a feature in Java's springboot. I also see something like config.mainnet.json, config.testnet.json. In springboot, we have different "profiles". that refers to different configs. The config files are named application.<profile_name>.yml, and you can specify different profiles to active different configs.

So I'm wondering if you can implement that for the neo node. Maybe we can have something like that for both nodes and plugins. When someone wants mainnet, just run neo-cli --mainnet, and can be switched to testnet by running neo-cli --testnet. This should sync the node and plugins into a consistent config.

Or to give max flexibility, someone can have neo-cli --node mainnet --token-tracker testnet to run the whole node on mainnet, but token-tracker plugin on testnet.

hurui200320 avatar Apr 06 '22 16:04 hurui200320

Lmao, bro, that is basically what neo-project/neo#853 is doing. I added exactly the same command as you mentioned in neo2.x at https://github.com/neo-project/neo-node/pull/415, but for some unknown reason they are removed in N3.

Jim8y avatar Apr 06 '22 16:04 Jim8y

Oh. I saw there are config files has that naming, so I'm infering (because I have never tried it) the node has that profile switch feature.

Anyway, I think with that pr, it would be much easier to pack docker image. Huge thanks to your work :)

hurui200320 avatar Apr 06 '22 17:04 hurui200320

plugin could and might work in different network with the node

Hmmm, I can't figure out a situation where I need that feature.

NeoFS. C# implementation of it is structured as a plugin (or a set of plugins, neo-project/neo-modules#681, neo-project/neo-modules#630) and there is a sidechain there that is an independent network.

roman-khimov avatar Apr 06 '22 18:04 roman-khimov

Hello folks 👋

I haven't seen this issue...

But, here it goes: https://github.com/AxLabs/neo3-privatenet-docker

gsmachado avatar Oct 26 '22 12:10 gsmachado

Duplicated with https://github.com/neo-project/neo/issues/3016

shargon avatar Dec 05 '23 13:12 shargon