Browse Source

setup ipfs api config

pull/1/head
Jeffrey Paul 2 years ago
parent
commit
c7afdf1fa5
No known key found for this signature in database
3 changed files with 25 additions and 2 deletions
  1. +7
    -1
      bin/setup-docker-machine
  2. +16
    -0
      bionic-defaults/setup.sh
  3. +2
    -1
      ubuntu-ipfs-mirror-client/setup.sh

+ 7
- 1
bin/setup-docker-machine 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

+ 16
- 0
bionic-defaults/setup.sh 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

+ 2
- 1
ubuntu-ipfs-mirror-client/setup.sh 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

Loading…
Cancel
Save