|
@ -1,21 +1,26 @@ |
|
|
#! /bin/bash |
|
|
#! /bin/bash |
|
|
set -eux |
|
|
set -eux |
|
|
|
|
|
|
|
|
|
|
|
# Take IP version as parameter |
|
|
|
|
|
IPV="${1:-4}" |
|
|
|
|
|
|
|
|
# Get the directory of where this script is. |
|
|
# Get the directory of where this script is. |
|
|
SOURCE="${BASH_SOURCE[0]}" |
|
|
SOURCE="${BASH_SOURCE[0]}" |
|
|
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done |
|
|
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done |
|
|
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" |
|
|
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" |
|
|
|
|
|
|
|
|
# Enable IPv6 support in Docker daemon |
|
|
# Enable IPv6 support in Docker daemon |
|
|
echo |
|
|
|
|
|
echo "* [$(date +"%T")] enabling IPv6 stack in Docker daemon" |
|
|
|
|
|
cat <<'EOF' | sudo tee /etc/docker/daemon.json |
|
|
|
|
|
|
|
|
if [[ "$IPV" == "6" ]]; then |
|
|
|
|
|
echo |
|
|
|
|
|
echo "* [$(date +"%T")] enabling IPv6 stack in Docker daemon" |
|
|
|
|
|
cat <<'EOF' | sudo tee /etc/docker/daemon.json |
|
|
{ |
|
|
{ |
|
|
"ipv6": true, |
|
|
|
|
|
"fixed-cidr-v6": "2001:db8:1::/64" |
|
|
|
|
|
|
|
|
"ipv6": true, |
|
|
|
|
|
"fixed-cidr-v6": "2001:db8:1::/64" |
|
|
} |
|
|
} |
|
|
EOF |
|
|
EOF |
|
|
sudo service docker restart |
|
|
|
|
|
|
|
|
sudo service docker restart |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
LOGS_DIR="$DIR/logs" |
|
|
LOGS_DIR="$DIR/logs" |
|
|
echo |
|
|
echo |
|
@ -42,12 +47,8 @@ if [[ "$SKIP_BUILD" == "" ]]; then |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
echo |
|
|
echo |
|
|
echo "* [$(date +"%T")] running p2p tests on a local docker network" |
|
|
|
|
|
bash "$DIR/../p2p/test.sh" tester |
|
|
|
|
|
|
|
|
|
|
|
echo |
|
|
|
|
|
echo "* [$(date +"%T")] running IPv6 p2p tests on a local docker network" |
|
|
|
|
|
bash "$DIR/../p2p/test.sh" tester 6 |
|
|
|
|
|
|
|
|
echo "* [$(date +"%T")] running IPv$IPV p2p tests on a local docker network" |
|
|
|
|
|
bash "$DIR/../p2p/test.sh" tester $IPV |
|
|
|
|
|
|
|
|
echo |
|
|
echo |
|
|
echo "* [$(date +"%T")] copying log files out of docker container into $LOGS_DIR" |
|
|
echo "* [$(date +"%T")] copying log files out of docker container into $LOGS_DIR" |
|
|