setup ipfs api config

pull/1/head
Jeffrey Paul 4 years ago
parent 4a079a5602
commit c7afdf1fa5
Signed by: sneak
GPG Key ID: 052443F4DF2A55C2
  1. 8
      bin/setup-docker-machine
  2. 16
      bionic-defaults/setup.sh
  3. 3
      ubuntu-ipfs-mirror-client/setup.sh

@ -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

@ -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

@ -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

Loading…
Cancel
Save