~cnx/ipwhl-docs

ref: 54f3f14b82075ef6e3f50b38b3361124100e5776 ipwhl-docs/guides/user.md -rw-r--r-- 2.3 KiB
54f3f14bNguyễn Gia Phong Add a guide for users and mirror owners a month ago

#title: User and mirror owner guide

Because of IPFS caching mechanism, IPWHL users technically mirror the wheels they have downloaded. However, there are certain distinctions must be made between the workflow of a regular user and a mirror owner.

#Setting up IPFS

We recommend using the reference implementation go-ipfs, whose installation procedure is well documented. It is worth noting that several GNU/Linux distributions and BSD-based OSes may have already included it in their repositories. Afterwards, please follow the IPFS quick-start guide. Some downstream go-ipfs packages may also contains a init-system service to automatically manage the IPFS daemon. By default, the daemon opens a local IPFS gateway at port 8080.

#Keeping updated

Users and mirror owners should subscribe to the announce mailing list, where new versions are announced along with the repository content ID (CID). These releases are backed by cryptographically signed tags in the metadata Git repository.

#Using floating cheeses

Floating cheeses are drop-in replacements for the cheese shop. In order to use an IPWHL repository of CID QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn (an empty repository used for demonstration) with a PEP 503 client, simply replace the Python package index URL with a pointer to the repository through an IPFS gateway. For pip, this can be done by specifying the CLI option --index-url to

http://localhost:8080/ipfs/QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn

or setting the equivalent environment variable or configuration key. While it is possible to use public IPFS gateways, they face similar security issues to that of the centralized cheese shop.

#Mirroring

Mirroring a repository release is as simple as pinning its CID, e.g.

ipfs pin add QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn

Thanks to IPFS deduplication, pinning an additional release only requires storage for the wheels not in the pinned releases.