setup ipfs api config

This commit is contained in:
Jeffrey Paul 2018-10-02 14:16:32 -07:00
parent 4a079a5602
commit c7afdf1fa5
Signed by: sneak
GPG Key ID: 052443F4DF2A55C2
3 changed files with 25 additions and 2 deletions

View File

@ -1,4 +1,10 @@
#!/bin/bash
docker-machine rm -f default
docker-machine create default --virtualbox-memory 32768 --virtualbox-cpu-count "-1" --virtualbox-no-share
# 100GiB disk, 32GiB ram, all cpus
docker-machine create default \
--virtualbox-disk-size 100000 \
--virtualbox-memory 32768 \
--virtualbox-cpu-count "-1" \
--virtualbox-no-share

View File

@ -43,3 +43,19 @@ apt update
apt -y install $PKGS
rm -rf /var/lib/apt/lists/*
# install ipget v0.3.0 amd64:
# sneak@nostromo-2:~$ ipfs name resolve /ipns/dist.ipfs.io/ipget/v0.3.0/ipget_v0.3.0_linux-amd64.tar.gz
# /ipfs/QmUDECZXueqXdcBEu3SLf8J19QfubhksdrDZeh1exCVMDz/ipget/v0.3.0/ipget_v0.3.0_linux-amd64.tar.gz
# sneak@nostromo-2:~$ ipfs resolve /ipfs/QmUDECZXueqXdcBEu3SLf8J19QfubhksdrDZeh1exCVMDz/ipget/v0.3.0/ipget_v0.3.0_linux-amd64.tar.gz
# /ipfs/QmQcKL42JqZtWKjbcCys27iaAKybRcchSFWaD9sF8LEUKL
HASH="QmQcKL42JqZtWKjbcCys27iaAKybRcchSFWaD9sF8LEUKL"
if [[ "$(arch)" = "x86_64" ]]; then
if [[ ! -x /usr/local/bin/ipget ]]; then
curl -f https://cloudflare-ipfs.com/ipfs/$HASH > /tmp/ipget_v0.3.0_linux.amd64.tar.gz && \
cd /tmp && \
tar zxvf ./ipget_v0.3.0_linux.amd64.tar.gz && \
mv ipget/ipget /usr/local/bin/ipget && \
chmod +x /usr/local/bin/ipget
fi
fi

View File

@ -53,9 +53,10 @@ sleep 5
if [[ ! -d $HOME/.ipfs ]]; then
mkdir -p $HOME/.ipfs
echo -n '/ip4/127.0.0.1/tcp/5001' > $HOME/.ipfs/api
fi
echo -n '/ip4/127.0.0.1/tcp/5001' > $HOME/.ipfs/api
dpkg --remove-architecture i386
rm -rf /var/lib/apt/lists/*
apt update