Notes: Next-gen `ipfs update` (IPFS Version Manager)

Created on 7 Aug 2019  路  1Comment  路  Source: ipfs/notes

Idea: rustup but for IPFS!

This tool would:

  1. Manage multiple IPFS installs (multiple implementations and multiple versions).
  2. Provide a virtual ipfs command that launches the correct IPFS version (downloading it if necessary).

Requirements

V1:

  • Fetch IPFS over IPFS, when possible.
  • Fallback on fetching IPFS over HTTPs.
  • Support rolling back to a previous release.

V2:

  • Support both js-ipfs and go-ipfs.

V3:

  • Support auto update.

User Story

The user must be able to:

  1. Run ipfs $ARBITRARY_COMMAND and have that command run on the correct version of IPFS.
  2. Run an ipfs update [latest] command to update to the latest stable version of their chosen IPFS implementation (go or js).
  3. Run ipfs update vX.Y.Z to update to a specific version of their chosen IPFS dist.
  4. Run ipfs update $lang-vX.Y.Z to switch to update to a specific version of $lang.
  5. Run ipfs update $lang-latest to switch to the latest IPFS version in $lang.
  6. Pass --transport={ipfs,https,auto} to ipfs update to force a specific transport.

V1 Design

Like rustup, this project should provide a virtual ipfs command that downloads the correct IPFS version/distribution and runs it. Unlike rustup, it should support downloading IPFS over IPFS if a working version of IPFS is already installed.

  • When the ipfs command is run:

    • If ipfs is installed:

    • Run it.

    • Otherwise:

    • Download IPFS over https from dist.ipfs.io.

  • When the ipfs update command is run:

    • If ipfs is installed:

    • Use it to check for an update by checking ipfs cat /ipns/dist.ipfs.io/go-ipfs/latest.

    • If there's an update available, fetch the correct build with IPFS.

    • Otherwise:

    • Check https://dist.ipfs.io/go-ipfs/latest for a new release.

    • If an update is available, fetch the correct build over HTTPS.

    • Save the IPFS binary to a $IPFS_PATH/releases/$VERSION/$ARCHITECTURE.

    • Write the current IPFS version to the config file as Update.Version.

  • When the ipfs update $VERSION command is run, do the same thing but use the specified version.

Most helpful comment

>All comments

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mitar picture mitar  路  3Comments

jbenet picture jbenet  路  4Comments

klueq picture klueq  路  5Comments

jbenet picture jbenet  路  4Comments

nicola picture nicola  路  5Comments