IPFS on Cloud Foundry
A very basic example of ipfs daemon
running on Cloud Foundry
Overview
The up.sh
script will stand up 1 app called ipfs
running ipfs daemon --init
. All the data is written to /home/vcap/app/.ipfs/
.
You can access the node with cf ssh
and use the ipfs
binary at app/ipfs
but may need to export HOME=/home/vcap/app
.
Testing
The test.sh
script will:
cf ssh
into the node- On the node, run
ipfs add
adding a message likeI <3 IPFS -vcap on Sun Jul 23 03:12:01 UTC 2017
- On the node, run
curl "http://127.0.0.1:8080/ipfs/$hash"
- Disconnect from the node
- On your local machine, run
curl "https://ipfs.io/ipfs/$hash"
- The output from the above commands should be identical
Prerequisites
- Cloud Foundry CLI
- Account on Cloud Foundry environment
- Recommended: Pivotal Web Services
- Supported on Pivotal Cloud Foundry 1.10 and higher
Usage
-
Log in to Cloud Foundry and target an org and space
cf login -a https://api.your-cf.com -u [email protected] -o your-org -s your-space
-
Run
up.sh
and wait for it to finish -
Run
tests.sh
. Read the prompts and compare it to the output to confirm the cluster is working