ethereum / go-ethereum

Go implementation of the Ethereum protocol
https://geth.ethereum.org
GNU Lesser General Public License v3.0
47.54k stars 20.13k forks source link

Single Line install for Geth #3 #1382

Closed alexvandesande closed 9 years ago

alexvandesande commented 9 years ago

We need a single line (or the closest possible) for the latest stable geth binary on Linux and Mac.

Currently, the best we have is:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/cubedro/frontier.ethereum.org/master/bin/install.rb)"

Which is bad because it uses ruby, which isn't default in most systems and the main url could be made much better (github cubedro??).

A great reference point is meteor's pretty installer for Mac and Linux (windows has a separate downloadable):

curl https://install.meteor.com/ | sh

Also posted on frontier guide: https://github.com/ethereum/frontier-guide/issues/3

obscuren commented 9 years ago

Ping @cubedro, @caktux. Would any of you be able to cook something or up?

cubedro commented 9 years ago

we've got those: https://github.com/ethereum/frontier-release/tree/master/bin ruby one-liner and shell one-liner. I'm adding now the finishing touches on the shell installer to be able to run it remotely.

cubedro commented 9 years ago

so we've got this for the shell one-liner in order to have confirm dialogs working:

bash <(curl https://raw.githubusercontent.com/ethereum/frontier-release/master/bin/install.sh)
caktux commented 9 years ago

I still think one-line install scripts are a bad idea. This is Frontier and not for the faint of heart. Well formatted installation instructions for each platform and getting started docs would be much better than telling everyone "here, just run this shell script, we promise it will work and not do anything bad to your system".

alexvandesande commented 9 years ago

@cubedro I can talk to Konstantin and setup a subdomain forwarding from geth.ethereum.org to the raw github link, so the one liner would be something like

bash <(curl https://geth.ethereum.org)

What do you think?

@caktux I think you have a point, but I don't think that bad user experience is a good filter to weed out smart people.

cubedro commented 9 years ago

@alexvandesande sure, we can do that. It could also be https://frontier.ethdev.com/install when we have the site published. I used the github link for transparency mainly...

caktux commented 9 years ago

@alexvandesande That's simply not what I meant nor implied... I think there's two ways to provide good user experience in terms of installation: have one-click GUI installers/apps (not an option for Frontier) or clear package-based installation steps. Not one-line-cross-your-fingers-it-doesn't-break-halfway scripts.

Sorry @cubedro, your script looks great, please don't take this against you, I just think the only time a one-line install script is appropriate is for a package manager like brew, nothing else (looking at you meteor...) As a side note, the install command with brew is just brew install ethereum --devel, not ethereum/ethereum/ethereum, and there's no --successful flag for go-ethereum, just cpp.

What's wrong with having better documentation for installation and potential issues and steps like:

Ubuntu

sudo add-apt-repository ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install ethereum

OS X

brew tap ethereum/ethereum
brew install ethereum

Windows

choco install geth-stable
caktux commented 9 years ago

My point is, document the pitfalls instead of trying to do it all for the user inside a bash script...

cubedro commented 9 years ago

@caktux no offence taken, I understand your point of view. Installing geth is fairly simple and I think anyone can do it if we have it documented (and it is). On the other hand for some users it could feel scary if they never did stuff like this before... but like you said frontier is not for the faint of heart :)

I fixed the install/reinstall commands. I used ethereum/ethereum/ethereum cause in my brew I also had caktux/ethereum/ethereum or something like that.

caktux commented 9 years ago

Since the repo was transferred it just shows like that but redirects to the right one. You could do brew untap caktux/ethereum && brew tap ethereum/ethereum to clean it up.

I also understand what you're saying, but install instructions with package managers should at least be provided as an option, or linked to more prominently (install page on the wiki, not just the Building Ethereum one), along with better troubleshooting.

karalabe commented 9 years ago

Another pitfall that will occur imho, is that a lot of Linux people don't use Ubuntu (e.g. me). The installer is based on apt-get, which is available in maybe 1/3 of the Linux distributions. Others will die a painful death. So we should either try and support other systems as well (opensuse/zypper, arch/pacman, etc), or try to detect if it's not Ubuntu and fail gracefully.

bobsummerwill commented 9 years ago

With the current setup, what is the DEVELOPER process for updating the brew content for Mac?

See https://www.reddit.com/r/ethereum/comments/3cowc8/frontier_rc2_0938/ct05qkc.

It looks like the content is out of date for Mac right now. Anything I can do to help bring that content up to RC2? I can obviously build from source, but that doesn't help other Ethereum users with Macs.

caktux commented 9 years ago

brew update my friend...

bobsummerwill commented 9 years ago

Aha ... I had insufficient brew-foo to know about the two-step dance.

brew update brew upgrade ethereum

Has done the trick. Thanks, @caktux.

bobsummerwill commented 9 years ago

With regard to the desire for a one-liner install, did you guys read this?

https://news.ycombinator.com/item?id=9419188

These magic one-liners aren't necessarily the best pattern. People installing command-line applications for pre-mass-market releases of disruptive technologies probably don't need or want details hiding from them.

I think we're better off sticking with documented install steps per OS, as @caktux suggests above. These steps are in no way onerous IMHO.