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
Installer script for IPFS? #5998
Comments
I wonder if it would be sensible to generate and provide a "latest" URL in https://github.com/ipfs/distributions. |
I think that would be a huge improvement. The other thing that would make this easire would be using info in the links that is automatically detectable. For example
would give us packages ending in names like |
Once you have,
Of course, it rarely picks a good location to install ipfs. One solution (if someone has time) would be to do what
IIRC, the only reason we don't do that is a lack of symlink support in the gateway. In the past, this has been blocked on security concerns but I think we've thought that through pretty well and could just implement it now. |
Yes @Stebalien , you can always download the latest version of both ipfs and ipfs-update from dist.ipfs.io as linked in the opening comment, but that cannot be used from a script, as the links to actually get the files are always different. Maybe, if IPFS can't do symlinks, then you could put the symlinks outside of IPFS (old-fashioned HTTP server :-) or if you wanted to be able to fetch the file entirely in IPNS and the gateway supports IPNS then would something like this work?
(Edited - last url was wrong) |
Do you really need the latest version of |
That's actually a good question - I was worried about fixing the version of Any thoughts on that http -> ipns -> ipfs pathway above. (I just edited it, last line was wrong). |
So... unfortunately, those are the architecture names as returned by
With respect to "use a plain-old web server": Given our tooling (use ipfs for everything), supporting a special-purpose webserver for dist.ipfs.io is probably going to be significanlty more work than just adding symlink support to the gateway. For context, the dist.ipfs.io actually uses the go-ipfs gateway using DNSLink. (cloudflare has better documentation on this than we do: https://developers.cloudflare.com/distributed-web/ipfs-gateway/connecting-website/).
Are those HTTP redirects? Note: You can also:
That's what |
That's unfortunate that go invented its own way of describing the processor :-(, removing a dependency on go (for ipfs_ipdate_ would be good on small machines (like Raspberry Pi's). That means that I think whatever happens we need something in a bash script that maps portable ways to detect processor type etc ( Yes -I'd assumed dist.ipfs.io was doing something like that ... sorry, my abbreviated suggestion was cryptic. I can think of several ways to do this, but am not current on the state of IPNS. For example .... I think there could be an IPNS mapping from Then either an http server could do a redirect from Reading the last line of "versions" is also a reasonable way to do it in a script, I didn't know that was possible. I can work that into [https://github.com/internetarchive/dweb-mirror/blob/master/install_ipfs.sh] next time I do a revision (which will be for the next platform I try and install it on). |
I just updated that script at https://github.com/internetarchive/dweb-mirror/blob/master/install_ipfs.sh to handle the Raspberry Pi's I've got my hands on correctly. As far as I know there is still no shell script in the distro that can be used. It seems to work in a number of cases as long as the dist.ipfs.io site is up (and that site is currently down about half the times I try it) |
I seem to always run into trouble with ipfs-update. I use it every other month or so and every time my install script fails when I use ipfs-update to install ipfs. I've seen this error before as well: could not find good install location. My workaround last time was to copy ipfs from where the tests were run to where I want it to live. This time I'm using latest golang version (1.13) on arm61 arch (Raspberry Pi 3 / Raspbian 9.1), with ipfs-update version 1.5.2. ipfs-update successfully downloads and reports: success! tests all passed., followed by install failed, reverting changes..., then could not find good install location. What's wrong with $HOME/go/bin? I see above Of course, it rarely picks a good location to install ipfs., so at least the problem is recognized. When will the anticipated fix for this be available, any ETA? Any other workarounds besides the manual copy I described? |
Did you try my script linked above - if so, and it fails then would appreciate an update. One thing I'd change if I reworked it (and we aren't using IPFS on RPI's any more for various reasons) would be to replace In our dockerfile installs on the larger platforms we try 10x with a 5 min delay in between so that we wait out the single-point-of-failure. |
Not sure if this will help you or not but I wrote a bash script to install IPFS on Raspberry Pi3s (or most any Debian Linux OS, tho only tested on Raspian Stretch and a dedicated cloud host running Debian 9.9) You can find it in my git repo at: https://github.com/ThomasFreedman/ipfs Good luck. |
Great - looks pretty comprehensive were there any cases that my script handles that you didn't ? |
I believe so. For one thing my script has only been tested with Debian Linux variants and yours works with other systems. Mine has more cmd line options, such as waiting between each step, setting maximum storage size and a few other things. I've been using / tweaking mine for several months, and I find it doesn't always work for reasons typical of fast paced dev efforts like blockchain and ipfs. It's difficult to write a stable installer when the product is in flux. Last bug I found (still not fully understood or resolved) had nothing to do with ipfs but is a bug related to cmd line arg processing. I hadn't used getopt(s) in a bash script before, but I tested all variations of each option when I created the script. The bug is that the descriptor for the -g option should allow for an optional parameter, however when no version arg is provided it doesn't detect that condition. Thus if you want to use go you must specify -g because -g without it fails. |
Version information: All
Type:Feature
Description:
I'd like to see an install script for IPFS, something that a package that wanted to build on IPFS (like dweb-mirror could use to install IPFS as part of another installation process
The current methods dont really lend themselves to automation, at least on the platforms we are interested in.
ipfs-update
works well in some circumstances, but it depends on installing golang > 1.9 and then builds from source. The problem with this is that on for example ARM theapt-get
current install is 1.7 soipfs-update
fails with the maths/bits problem documented in sahib/brig#13[https://dist.ipfs.io/#ipfs-update] does a pretty good job for manual installation, but the links to packages are version specific e.g. [https://dist.ipfs.io/go-ipfs/v0.4.18/go-ipfs_v0.4.18_linux-arm.tar.gz]
so any installation script that tries to grab them is going to be fixed (immutable :-) at a particular version of IPFS.
I'm sure I'm not the only one banging my head on how to install IFPS automatically in a variety of circumstances, so it would be great if there was a supported way of doing this rather than a hack.
On the topic of which ... in the absence of a supported version, I'll stick a hack into dweb-mirror based on whatever I can get to work on my three current platforms (OSX, Rachel3+, RPi3) PR's for other platforms will be welcome.
The text was updated successfully, but these errors were encountered: