| 1 | # must be connected to bootstrap node |
| 2 | ipfs bootstrap add /ip4/$BOOTSTRAP_PORT_4011_TCP_ADDR/tcp/$BOOTSTRAP_PORT_4011_TCP_PORT/p2p/QmNXuBh8HFsWq68Fid8dMbGNQTh7eG6hV9rr1fQyfmfomE |
| 3 | ipfs bootstrap # list bootstrap nodes for debugging |
| 4 | |
| 5 | # wait for daemon to start/bootstrap |
| 6 | # alternatively use ipfs swarm connect |
| 7 | echo "3nodetest> starting server daemon" |
| 8 | |
| 9 | # run daemon in debug mode to collect profiling data |
| 10 | ipfs daemon --debug & |
| 11 | sleep 3 |
| 12 | # TODO instead of bootstrapping: ipfs swarm connect /ip4/$BOOTSTRAP_PORT_4011_TCP_ADDR/tcp/$BOOTSTRAP_PORT_4011_TCP_PORT/p2p/QmNXuBh8HFsWq68Fid8dMbGNQTh7eG6hV9rr1fQyfmfomE |
| 13 | |
| 14 | # change dir before running add commands so ipfs client profiling data doesn't |
| 15 | # overwrite the daemon profiling data |
| 16 | cd /tmp |
| 17 | |
| 18 | # must mount this volume from data container |
| 19 | ipfs add -q /data/filetiny > tmptiny |
| 20 | mv tmptiny /data/idtiny |
| 21 | echo "3nodetest> added tiny file. hash is" $(cat /data/idtiny) |
| 22 | |
| 23 | ipfs add -q /data/filerand > tmprand |
| 24 | mv tmprand /data/idrand |
| 25 | echo "3nodetest> added rand file. hash is" $(cat /data/idrand) |
| 26 | |
| 27 | # allow ample time for the client to pull the data |
| 28 | sleep 10000000 |