evn
Install Docker and Docker Compose
Download ipfs-cluster-ctl
ipfs-cluster-ctl is the command line client for the IPFS cluster daemon, which we will use to inspect the cluster, add and pin content.
ipfs-cluster-ctl
Download the latest version for your platform from dist.ipfs.io and extract it to a folder of your choice.
Download the docker-compose.yml file
Download docker-compose.yml and place it in the same directory as ipfs-cluster-ctl.
Start the cluster
docker-compose up
Wait until all containers are running. You might see some errors because cluster peers start up too quickly before IPF is ready, but they
are harmless.
Play with the cluster
You should now be running a three-node IPFS cluster! Use ipfs-cluster-ctl different terminal (in the same folder) to interact with it:
./ipfs-cluster-ctl peers ls # show information about the peers in the cluster
./ipfs-cluster-ctl add somefile # add a file to the cluster
./ipfs-cluster-ctl pin add /ipns/cluster.ipfs.io # pin the cluster website
./ipfs-cluster-ctl status <cid> # use the CID shown above to see the status in every peer
./ipfs-cluster-ctl pin ls <cid> # inspect the pin information
./ipfs-cluster-ctl health graph # 查看集群节点关系图
Shut down the cluster
docker-compose kill