diff options
Diffstat (limited to 'netcon/docker-test')
66 files changed, 0 insertions, 2812 deletions
diff --git a/netcon/docker-test/_build_single_image.sh b/netcon/docker-test/_build_single_image.sh deleted file mode 100755 index aa4b77d4..00000000 --- a/netcon/docker-test/_build_single_image.sh +++ /dev/null @@ -1,30 +0,0 @@ -# Builds a test docker image - -test_name=${PWD##*/} -echo 'Building dockerfiles for test: ' "$test_name" -touch "$test_name".name - -# Docker won't allow the inclusion of files outside of the build directory -cp ../../*.conf . -cp ../../zerotier-one zerotier-one -cp ../../zerotier-cli zerotier-cli -cp ../../zerotier-cli zerotier-netcon-service -cp ../../zerotier-intercept zerotier-intercept -cp ../../libzerotierintercept.so libzerotierintercept.so -cp ../../liblwip.so liblwip.so -cp ../../netcon_identity.public netcon_identity.public -cp ../../netcon_identity.secret netcon_identity.secret -cp ../../monitor_identity.public monitor_identity.public -cp ../../monitor_identity.secret monitor_identity.secret - -docker build --tag="$test_name" -f netcon_dockerfile . -docker build --tag="$test_name"_monitor -f monitor_dockerfile . - -rm -f zerotier-cli -rm -f zerotier-netcon-service -rm -f zerotier-intercept -rm -f *.so -rm -f *.public -rm -f *.secret -rm -f *.conf -rm -f *.name
\ No newline at end of file diff --git a/netcon/docker-test/_remove_all.sh b/netcon/docker-test/_remove_all.sh deleted file mode 100755 index c6090a9b..00000000 --- a/netcon/docker-test/_remove_all.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -# Delete all containers -docker rm $(docker ps -a -q) -# Delete all images -docker rmi $(docker images -q) diff --git a/netcon/docker-test/_two_party_test.sh b/netcon/docker-test/_two_party_test.sh deleted file mode 100755 index 8fa3b3eb..00000000 --- a/netcon/docker-test/_two_party_test.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# Runs test image and monitor image as daemons -test_name=${PWD##*/} -echo 'Starting containers for: ' "$test_name" -touch "$test_name".name -test_container=$(docker run -d -it -v $PWD/../../_results:/opt/results --device=/dev/net/tun "$test_name":latest) -monitor_container=$(docker run -d -it -v $PWD/../../_results:/opt/results --device=/dev/net/tun "$test_name"_monitor:latest) - -echo "waiting $netcon_test_wait_time for test to complete." -sleep $netcon_test_wait_time -docker stop $(docker ps -a -q) -docker rm $test_container -docker rm $monitor_container - -rm -f *.name
\ No newline at end of file diff --git a/netcon/docker-test/build.sh b/netcon/docker-test/build.sh deleted file mode 100755 index bb5fd8e7..00000000 --- a/netcon/docker-test/build.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -echo "*** Building Zerotier-One, libraries, and test/monitor images..." - -./build_zt.sh -./build_tests.sh $1 - -echo "*** Done" diff --git a/netcon/docker-test/build_tests.sh b/netcon/docker-test/build_tests.sh deleted file mode 100755 index 65009f18..00000000 --- a/netcon/docker-test/build_tests.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -# Merely BUILDS test images - -# Remove previous test results -rm _results/*.txt - -# How long we shall wait for each test to conclude -export netcon_test_wait_time=60s - -export image_build_script=_build_single_image.sh - -# Iterate over all depth=2 (relatively-speaking) directories and perform each test -find . -mindepth 2 -maxdepth 2 -type d | while read testdir; do - - if [[ $testdir != *$1* ]] - then - continue - fi - - echo "\n\n\n*** Building: '$testdir'..." - rm _results/*.tmp - - # Stage scripts - cp $image_build_script $testdir/$image_build_script - cd $testdir - - # Build test docker images - ./$image_build_script - rm $image_build_script - - cd ../../ -done diff --git a/netcon/docker-test/build_zt.sh b/netcon/docker-test/build_zt.sh deleted file mode 100755 index d36c407f..00000000 --- a/netcon/docker-test/build_zt.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -# Builds Zerotier-One and libraries required for Network Containers, then -# copies the binaries into the test directory. - -cd ../../ -make clean -make one -make netcon -cd netcon/docker-test - -cp ../../zerotier-cli zerotier-cli -cp ../../zerotier-netcon-service zerotier-netcon-service -cp ../../libzerotierintercept.so libzerotierintercept.so - -cp ../liblwip.so liblwip.so -cp ../zerotier-intercept zerotier-intercept - -cp ../../zerotier-one zerotier-one - diff --git a/netcon/docker-test/darkhttpd/darkhttpd-1.11.x86_64/monitor_dockerfile b/netcon/docker-test/darkhttpd/darkhttpd-1.11.x86_64/monitor_dockerfile deleted file mode 100644 index d2d2a0cb..00000000 --- a/netcon/docker-test/darkhttpd/darkhttpd-1.11.x86_64/monitor_dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -# ZT Network Containers Test Monitor -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -EXPOSE 9993/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD monitor_identity.public /var/lib/zerotier-one/identity.public -ADD monitor_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -ADD zerotier-one / -ADD zerotier-cli / - -# Start ZeroTier-One -ADD monitor_entrypoint.sh /monitor_entrypoint.sh -RUN chmod -v +x /monitor_entrypoint.sh -CMD ["./monitor_entrypoint.sh"] diff --git a/netcon/docker-test/darkhttpd/darkhttpd-1.11.x86_64/monitor_entrypoint.sh b/netcon/docker-test/darkhttpd/darkhttpd-1.11.x86_64/monitor_entrypoint.sh deleted file mode 100644 index c8fca5a3..00000000 --- a/netcon/docker-test/darkhttpd/darkhttpd-1.11.x86_64/monitor_entrypoint.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls *.conf) # blank test network config file -nwid="${nwconf%.*}" # test network id -netcon_wait_time=35 # wait for test container to come online -app_timeout_time=25 # app-specific timeout -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -fail=FAIL. # appended to result file in event of failure -ok=OK. # appended to result file in event of success -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) -bigfile_name=bigfile # large, random test transfer file -rx_md5sumfile="$file_path"rx_"$bigfile_name"_md5sum"$tmp_ext" -tx_md5sumfile="$file_path"tx_"$bigfile_name"_md5sum"$tmp_ext" - - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test Monitor' -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-one -d -U -p9993 >>/tmp/zerotier-one.out 2>&1' -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` -done -echo '*** Starting Test...' -echo '*** Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Sleeping for (' "$netcon_wait_time" 's ) while we wait for the Network Container to come online...' -sleep "$netcon_wait_time"s -ncvirtip=$(<$address_file) - - -# --- Test section --- -echo '*** Curling from intercepted server at' $ncvirtip -rm -rf "$file_path"*."$file_base" -touch "$bigfile_name" - -# Perform test -# curl --connect-timeout "$app_timeout_time" -v -o "$file_path$file_base" http://"$ncvirtip"/index.html -# Large transfer test -curl --connect-timeout "$app_timeout_time" -v -o "$bigfile_name" http://"$ncvirtip"/"$bigfile_name" - -# Check md5 -md5sum < "$bigfile_name" > "$rx_md5sumfile" -rx_md5sum=$(<$rx_md5sumfile) -tx_md5sum=$(<$tx_md5sumfile) - -echo '*** Comparing md5: ' "$rx_md5sum" ' and ' "$tx_md5sum" - -if [ "$rx_md5sum" != "$tx_md5sum" ]; -then - echo 'MD5 FAIL' - touch "$file_path$fail$test_name.txt" - printf 'Test: md5 sum did not match!\n' >> "$file_path$fail$test_name.txt" -else - echo 'MD5 OK' - touch "$file_path$ok$test_name.txt" - printf 'Test: md5 sum ok!\n' >> "$file_path$ok$test_name.txt" - cat "$rx_md5sumfile" >> "$file_path$ok$test_name.txt" - cat "$tx_md5sumfile" >> "$file_path$ok$test_name.txt" -fi - - - - - - - - - - - diff --git a/netcon/docker-test/darkhttpd/darkhttpd-1.11.x86_64/netcon_dockerfile b/netcon/docker-test/darkhttpd/darkhttpd-1.11.x86_64/netcon_dockerfile deleted file mode 100644 index 66a39d88..00000000 --- a/netcon/docker-test/darkhttpd/darkhttpd-1.11.x86_64/netcon_dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -# ZT Network Containers Test -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -# Install apps -RUN yum -y update -RUN yum -y install darkhttpd-1.11 -RUN yum clean all - -EXPOSE 9993/udp 80/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD netcon_identity.public /var/lib/zerotier-one/identity.public -ADD netcon_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -# Install syscall intercept library -ADD zerotier-intercept / -ADD libzerotierintercept.so / -RUN cp libzerotierintercept.so lib/libzerotierintercept.so -RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept -RUN /usr/bin/install -c zerotier-intercept /usr/bin - -ADD zerotier-cli / -ADD zerotier-netcon-service / - -# Install test scripts -ADD netcon_entrypoint.sh /netcon_entrypoint.sh -RUN chmod -v +x /netcon_entrypoint.sh - -# Start ZeroTier-One -CMD ["./netcon_entrypoint.sh"] diff --git a/netcon/docker-test/darkhttpd/darkhttpd-1.11.x86_64/netcon_entrypoint.sh b/netcon/docker-test/darkhttpd/darkhttpd-1.11.x86_64/netcon_entrypoint.sh deleted file mode 100644 index 978696a8..00000000 --- a/netcon/docker-test/darkhttpd/darkhttpd-1.11.x86_64/netcon_entrypoint.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls *.conf) # blank test network config file -nwid="${nwconf%.*}" # test network id -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) -bigfile_name=bigfile -bigfile_size=10M # size of file we want to use for the test -tx_md5sumfile="$file_path"tx_"$bigfile_name"_md5sum"$tmp_ext" - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test: ' "$test_name" -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-netcon-service -d -U -p9993 >>/tmp/zerotier-netcon-service.out 2>&1' -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` - dev=`/zerotier-cli listnetworks | grep -F "" | cut -d ' ' -f 8 | cut -d "_" -f 2 | sed "s/^<dev>//" | tr '\n' '\0'` -done -echo '--- Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Writing address to ' "$address_file" -echo $virtip4 > "$address_file" - -# --- Test section --- -# Generate large random file for transfer test, share md5sum for monitor container to check -echo '*** Generating ' "$bigfile_size" ' file' -dd if=/dev/urandom of="$bigfile_name" bs="$bigfile_size" count=1 -md5sum < "$bigfile_name" > "$tx_md5sumfile" -echo '*** Wrote MD5 sum to ' "$tx_md5sumfile" - -echo '*** Starting application...' -sleep 0.5 - -export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_"$dev" -export LD_PRELOAD=./libzerotierintercept.so -darkhttpd / diff --git a/netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/monitor_dockerfile b/netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/monitor_dockerfile deleted file mode 100644 index d2d2a0cb..00000000 --- a/netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/monitor_dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -# ZT Network Containers Test Monitor -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -EXPOSE 9993/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD monitor_identity.public /var/lib/zerotier-one/identity.public -ADD monitor_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -ADD zerotier-one / -ADD zerotier-cli / - -# Start ZeroTier-One -ADD monitor_entrypoint.sh /monitor_entrypoint.sh -RUN chmod -v +x /monitor_entrypoint.sh -CMD ["./monitor_entrypoint.sh"] diff --git a/netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/monitor_entrypoint.sh b/netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/monitor_entrypoint.sh deleted file mode 100644 index c8fca5a3..00000000 --- a/netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/monitor_entrypoint.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls *.conf) # blank test network config file -nwid="${nwconf%.*}" # test network id -netcon_wait_time=35 # wait for test container to come online -app_timeout_time=25 # app-specific timeout -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -fail=FAIL. # appended to result file in event of failure -ok=OK. # appended to result file in event of success -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) -bigfile_name=bigfile # large, random test transfer file -rx_md5sumfile="$file_path"rx_"$bigfile_name"_md5sum"$tmp_ext" -tx_md5sumfile="$file_path"tx_"$bigfile_name"_md5sum"$tmp_ext" - - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test Monitor' -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-one -d -U -p9993 >>/tmp/zerotier-one.out 2>&1' -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` -done -echo '*** Starting Test...' -echo '*** Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Sleeping for (' "$netcon_wait_time" 's ) while we wait for the Network Container to come online...' -sleep "$netcon_wait_time"s -ncvirtip=$(<$address_file) - - -# --- Test section --- -echo '*** Curling from intercepted server at' $ncvirtip -rm -rf "$file_path"*."$file_base" -touch "$bigfile_name" - -# Perform test -# curl --connect-timeout "$app_timeout_time" -v -o "$file_path$file_base" http://"$ncvirtip"/index.html -# Large transfer test -curl --connect-timeout "$app_timeout_time" -v -o "$bigfile_name" http://"$ncvirtip"/"$bigfile_name" - -# Check md5 -md5sum < "$bigfile_name" > "$rx_md5sumfile" -rx_md5sum=$(<$rx_md5sumfile) -tx_md5sum=$(<$tx_md5sumfile) - -echo '*** Comparing md5: ' "$rx_md5sum" ' and ' "$tx_md5sum" - -if [ "$rx_md5sum" != "$tx_md5sum" ]; -then - echo 'MD5 FAIL' - touch "$file_path$fail$test_name.txt" - printf 'Test: md5 sum did not match!\n' >> "$file_path$fail$test_name.txt" -else - echo 'MD5 OK' - touch "$file_path$ok$test_name.txt" - printf 'Test: md5 sum ok!\n' >> "$file_path$ok$test_name.txt" - cat "$rx_md5sumfile" >> "$file_path$ok$test_name.txt" - cat "$tx_md5sumfile" >> "$file_path$ok$test_name.txt" -fi - - - - - - - - - - - diff --git a/netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/netcon_dockerfile b/netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/netcon_dockerfile deleted file mode 100644 index fe668fb7..00000000 --- a/netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/netcon_dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -# ZT Network Containers Test -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -# Install apps -RUN yum -y update -RUN yum -y install httpd-2.4.16-1.fc23.x86_64 -RUN yum clean all - -EXPOSE 9993/udp 80/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD netcon_identity.public /var/lib/zerotier-one/identity.public -ADD netcon_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -# Install syscall intercept library -ADD zerotier-intercept / -ADD libzerotierintercept.so / -RUN cp libzerotierintercept.so lib/libzerotierintercept.so -RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept -RUN /usr/bin/install -c zerotier-intercept /usr/bin - -ADD zerotier-cli / -ADD zerotier-netcon-service / - -# Install test scripts -ADD netcon_entrypoint.sh /netcon_entrypoint.sh -RUN chmod -v +x /netcon_entrypoint.sh - -# Start ZeroTier-One -CMD ["./netcon_entrypoint.sh"] diff --git a/netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/netcon_entrypoint.sh b/netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/netcon_entrypoint.sh deleted file mode 100644 index 688bd63b..00000000 --- a/netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/netcon_entrypoint.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls *.conf) # blank test network config file -nwid="${nwconf%.*}" # test network id -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) -bigfile_name=bigfile -bigfile_size=10M # size of file we want to use for the test -tx_md5sumfile="$file_path"tx_"$bigfile_name"_md5sum"$tmp_ext" - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test: ' "$test_name" -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-netcon-service -d -U -p9993 >>/tmp/zerotier-netcon-service.out 2>&1' -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` - dev=`/zerotier-cli listnetworks | grep -F "" | cut -d ' ' -f 8 | cut -d "_" -f 2 | sed "s/^<dev>//" | tr '\n' '\0'` -done -echo '--- Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Writing address to ' "$address_file" -echo $virtip4 > "$address_file" - -# --- Test section --- -# Generate large random file for transfer test, share md5sum for monitor container to check -echo '*** Generating ' "$bigfile_size" ' file' -dd if=/dev/urandom of=/var/www/html/"$bigfile_name" bs="$bigfile_size" count=1 -md5sum < /var/www/html/"$bigfile_name" > "$tx_md5sumfile" -echo '*** Wrote MD5 sum to ' "$tx_md5sumfile" - -echo '*** Starting application...' -sleep 0.5 -rm -rf /run/httpd/* /tmp/httpd* - -export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_"$dev" -export LD_PRELOAD=./libzerotierintercept.so -/usr/sbin/httpd -X diff --git a/netcon/docker-test/httpd/httpd-2.4.16-1.ub14.x86_64/monitor_dockerfile b/netcon/docker-test/httpd/httpd-2.4.16-1.ub14.x86_64/monitor_dockerfile deleted file mode 100644 index d2d2a0cb..00000000 --- a/netcon/docker-test/httpd/httpd-2.4.16-1.ub14.x86_64/monitor_dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -# ZT Network Containers Test Monitor -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -EXPOSE 9993/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD monitor_identity.public /var/lib/zerotier-one/identity.public -ADD monitor_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -ADD zerotier-one / -ADD zerotier-cli / - -# Start ZeroTier-One -ADD monitor_entrypoint.sh /monitor_entrypoint.sh -RUN chmod -v +x /monitor_entrypoint.sh -CMD ["./monitor_entrypoint.sh"] diff --git a/netcon/docker-test/httpd/httpd-2.4.16-1.ub14.x86_64/monitor_entrypoint.sh b/netcon/docker-test/httpd/httpd-2.4.16-1.ub14.x86_64/monitor_entrypoint.sh deleted file mode 100644 index c8fca5a3..00000000 --- a/netcon/docker-test/httpd/httpd-2.4.16-1.ub14.x86_64/monitor_entrypoint.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls *.conf) # blank test network config file -nwid="${nwconf%.*}" # test network id -netcon_wait_time=35 # wait for test container to come online -app_timeout_time=25 # app-specific timeout -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -fail=FAIL. # appended to result file in event of failure -ok=OK. # appended to result file in event of success -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) -bigfile_name=bigfile # large, random test transfer file -rx_md5sumfile="$file_path"rx_"$bigfile_name"_md5sum"$tmp_ext" -tx_md5sumfile="$file_path"tx_"$bigfile_name"_md5sum"$tmp_ext" - - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test Monitor' -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-one -d -U -p9993 >>/tmp/zerotier-one.out 2>&1' -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` -done -echo '*** Starting Test...' -echo '*** Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Sleeping for (' "$netcon_wait_time" 's ) while we wait for the Network Container to come online...' -sleep "$netcon_wait_time"s -ncvirtip=$(<$address_file) - - -# --- Test section --- -echo '*** Curling from intercepted server at' $ncvirtip -rm -rf "$file_path"*."$file_base" -touch "$bigfile_name" - -# Perform test -# curl --connect-timeout "$app_timeout_time" -v -o "$file_path$file_base" http://"$ncvirtip"/index.html -# Large transfer test -curl --connect-timeout "$app_timeout_time" -v -o "$bigfile_name" http://"$ncvirtip"/"$bigfile_name" - -# Check md5 -md5sum < "$bigfile_name" > "$rx_md5sumfile" -rx_md5sum=$(<$rx_md5sumfile) -tx_md5sum=$(<$tx_md5sumfile) - -echo '*** Comparing md5: ' "$rx_md5sum" ' and ' "$tx_md5sum" - -if [ "$rx_md5sum" != "$tx_md5sum" ]; -then - echo 'MD5 FAIL' - touch "$file_path$fail$test_name.txt" - printf 'Test: md5 sum did not match!\n' >> "$file_path$fail$test_name.txt" -else - echo 'MD5 OK' - touch "$file_path$ok$test_name.txt" - printf 'Test: md5 sum ok!\n' >> "$file_path$ok$test_name.txt" - cat "$rx_md5sumfile" >> "$file_path$ok$test_name.txt" - cat "$tx_md5sumfile" >> "$file_path$ok$test_name.txt" -fi - - - - - - - - - - - diff --git a/netcon/docker-test/httpd/httpd-2.4.16-1.ub14.x86_64/netcon_dockerfile b/netcon/docker-test/httpd/httpd-2.4.16-1.ub14.x86_64/netcon_dockerfile deleted file mode 100644 index 76b7b7dd..00000000 --- a/netcon/docker-test/httpd/httpd-2.4.16-1.ub14.x86_64/netcon_dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -# ZT Network Containers Test -FROM ubuntu:14.04 -MAINTAINER https://www.zerotier.com/ - -RUN \ - sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \ - apt-get update && \ - apt-get -y upgrade && \ - apt-get -y install apache2 - -EXPOSE 9993/udp 80/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD netcon_identity.public /var/lib/zerotier-one/identity.public -ADD netcon_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -# Install syscall intercept library -ADD zerotier-intercept / -ADD libzerotierintercept.so / -RUN cp libzerotierintercept.so lib/libzerotierintercept.so -RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept -RUN /usr/bin/install -c zerotier-intercept /usr/bin - -ADD zerotier-cli / -ADD zerotier-netcon-service / - -# Install test scripts -ADD netcon_entrypoint.sh /netcon_entrypoint.sh -RUN chmod -v +x /netcon_entrypoint.sh - -# Start ZeroTier-One -CMD ["./netcon_entrypoint.sh"] diff --git a/netcon/docker-test/httpd/httpd-2.4.16-1.ub14.x86_64/netcon_entrypoint.sh b/netcon/docker-test/httpd/httpd-2.4.16-1.ub14.x86_64/netcon_entrypoint.sh deleted file mode 100644 index 688bd63b..00000000 --- a/netcon/docker-test/httpd/httpd-2.4.16-1.ub14.x86_64/netcon_entrypoint.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls *.conf) # blank test network config file -nwid="${nwconf%.*}" # test network id -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) -bigfile_name=bigfile -bigfile_size=10M # size of file we want to use for the test -tx_md5sumfile="$file_path"tx_"$bigfile_name"_md5sum"$tmp_ext" - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test: ' "$test_name" -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-netcon-service -d -U -p9993 >>/tmp/zerotier-netcon-service.out 2>&1' -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` - dev=`/zerotier-cli listnetworks | grep -F "" | cut -d ' ' -f 8 | cut -d "_" -f 2 | sed "s/^<dev>//" | tr '\n' '\0'` -done -echo '--- Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Writing address to ' "$address_file" -echo $virtip4 > "$address_file" - -# --- Test section --- -# Generate large random file for transfer test, share md5sum for monitor container to check -echo '*** Generating ' "$bigfile_size" ' file' -dd if=/dev/urandom of=/var/www/html/"$bigfile_name" bs="$bigfile_size" count=1 -md5sum < /var/www/html/"$bigfile_name" > "$tx_md5sumfile" -echo '*** Wrote MD5 sum to ' "$tx_md5sumfile" - -echo '*** Starting application...' -sleep 0.5 -rm -rf /run/httpd/* /tmp/httpd* - -export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_"$dev" -export LD_PRELOAD=./libzerotierintercept.so -/usr/sbin/httpd -X diff --git a/netcon/docker-test/httpd/httpd-2.4.18-1.fc23.x86_64/monitor_dockerfile b/netcon/docker-test/httpd/httpd-2.4.18-1.fc23.x86_64/monitor_dockerfile deleted file mode 100644 index d2d2a0cb..00000000 --- a/netcon/docker-test/httpd/httpd-2.4.18-1.fc23.x86_64/monitor_dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -# ZT Network Containers Test Monitor -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -EXPOSE 9993/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD monitor_identity.public /var/lib/zerotier-one/identity.public -ADD monitor_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -ADD zerotier-one / -ADD zerotier-cli / - -# Start ZeroTier-One -ADD monitor_entrypoint.sh /monitor_entrypoint.sh -RUN chmod -v +x /monitor_entrypoint.sh -CMD ["./monitor_entrypoint.sh"] diff --git a/netcon/docker-test/httpd/httpd-2.4.18-1.fc23.x86_64/monitor_entrypoint.sh b/netcon/docker-test/httpd/httpd-2.4.18-1.fc23.x86_64/monitor_entrypoint.sh deleted file mode 100644 index c8fca5a3..00000000 --- a/netcon/docker-test/httpd/httpd-2.4.18-1.fc23.x86_64/monitor_entrypoint.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls *.conf) # blank test network config file -nwid="${nwconf%.*}" # test network id -netcon_wait_time=35 # wait for test container to come online -app_timeout_time=25 # app-specific timeout -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -fail=FAIL. # appended to result file in event of failure -ok=OK. # appended to result file in event of success -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) -bigfile_name=bigfile # large, random test transfer file -rx_md5sumfile="$file_path"rx_"$bigfile_name"_md5sum"$tmp_ext" -tx_md5sumfile="$file_path"tx_"$bigfile_name"_md5sum"$tmp_ext" - - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test Monitor' -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-one -d -U -p9993 >>/tmp/zerotier-one.out 2>&1' -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` -done -echo '*** Starting Test...' -echo '*** Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Sleeping for (' "$netcon_wait_time" 's ) while we wait for the Network Container to come online...' -sleep "$netcon_wait_time"s -ncvirtip=$(<$address_file) - - -# --- Test section --- -echo '*** Curling from intercepted server at' $ncvirtip -rm -rf "$file_path"*."$file_base" -touch "$bigfile_name" - -# Perform test -# curl --connect-timeout "$app_timeout_time" -v -o "$file_path$file_base" http://"$ncvirtip"/index.html -# Large transfer test -curl --connect-timeout "$app_timeout_time" -v -o "$bigfile_name" http://"$ncvirtip"/"$bigfile_name" - -# Check md5 -md5sum < "$bigfile_name" > "$rx_md5sumfile" -rx_md5sum=$(<$rx_md5sumfile) -tx_md5sum=$(<$tx_md5sumfile) - -echo '*** Comparing md5: ' "$rx_md5sum" ' and ' "$tx_md5sum" - -if [ "$rx_md5sum" != "$tx_md5sum" ]; -then - echo 'MD5 FAIL' - touch "$file_path$fail$test_name.txt" - printf 'Test: md5 sum did not match!\n' >> "$file_path$fail$test_name.txt" -else - echo 'MD5 OK' - touch "$file_path$ok$test_name.txt" - printf 'Test: md5 sum ok!\n' >> "$file_path$ok$test_name.txt" - cat "$rx_md5sumfile" >> "$file_path$ok$test_name.txt" - cat "$tx_md5sumfile" >> "$file_path$ok$test_name.txt" -fi - - - - - - - - - - - diff --git a/netcon/docker-test/httpd/httpd-2.4.18-1.fc23.x86_64/netcon_dockerfile b/netcon/docker-test/httpd/httpd-2.4.18-1.fc23.x86_64/netcon_dockerfile deleted file mode 100644 index 3053a832..00000000 --- a/netcon/docker-test/httpd/httpd-2.4.18-1.fc23.x86_64/netcon_dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -# ZT Network Containers Test -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -# Install apps -RUN yum -y update -RUN yum -y install httpd-2.4.18-1.fc23.x86_64 -RUN yum clean all - -EXPOSE 9993/udp 80/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD netcon_identity.public /var/lib/zerotier-one/identity.public -ADD netcon_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -# Install syscall intercept library -ADD zerotier-intercept / -ADD libzerotierintercept.so / -RUN cp libzerotierintercept.so lib/libzerotierintercept.so -RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept -RUN /usr/bin/install -c zerotier-intercept /usr/bin - -ADD zerotier-cli / -ADD zerotier-netcon-service / - -# Install test scripts -ADD netcon_entrypoint.sh /netcon_entrypoint.sh -RUN chmod -v +x /netcon_entrypoint.sh - -# Start ZeroTier-One -CMD ["./netcon_entrypoint.sh"] diff --git a/netcon/docker-test/httpd/httpd-2.4.18-1.fc23.x86_64/netcon_entrypoint.sh b/netcon/docker-test/httpd/httpd-2.4.18-1.fc23.x86_64/netcon_entrypoint.sh deleted file mode 100644 index d2ab248a..00000000 --- a/netcon/docker-test/httpd/httpd-2.4.18-1.fc23.x86_64/netcon_entrypoint.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls *.conf) # blank test network config file -nwid="${nwconf%.*}" # test network id -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) -bigfile_name=bigfile -bigfile_size=10M # size of file we want to use for the test -tx_md5sumfile="$file_path"tx_"$bigfile_name"_md5sum"$tmp_ext" - - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test: ' "$test_name" -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-netcon-service -d -U -p9993 >>/tmp/zerotier-netcon-service.out 2>&1' -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` - dev=`/zerotier-cli listnetworks | grep -F "" | cut -d ' ' -f 8 | cut -d "_" -f 2 | sed "s/^<dev>//" | tr '\n' '\0'` -done -echo '*** Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Writing address to ' "$address_file" -echo $virtip4 > "$address_file" - -# --- Test section --- -# Generate large random file for transfer test, share md5sum for monitor container to check -echo '*** Generating ' "$bigfile_size" ' file' -dd if=/dev/urandom of=/var/www/html/"$bigfile_name" bs="$bigfile_size" count=1 -#md5sum /var/www/html/"$bigfile_name" >> "$tx_md5sumfile" -md5sum < /var/www/html/"$bigfile_name" > "$tx_md5sumfile" -echo '*** Wrote MD5 sum to ' "$tx_md5sumfile" - -echo '*** Starting application...' -sleep 0.5 -rm -rf /run/httpd/* /tmp/httpd* - -export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_"$dev" -export LD_PRELOAD=./libzerotierintercept.so -/usr/sbin/httpd -X diff --git a/netcon/docker-test/httpd/httpd_demo/htdocs/ZeroTierIcon.png b/netcon/docker-test/httpd/httpd_demo/htdocs/ZeroTierIcon.png Binary files differdeleted file mode 100644 index 4d9641b3..00000000 --- a/netcon/docker-test/httpd/httpd_demo/htdocs/ZeroTierIcon.png +++ /dev/null diff --git a/netcon/docker-test/httpd/httpd_demo/htdocs/index.html b/netcon/docker-test/httpd/httpd_demo/htdocs/index.html deleted file mode 100644 index 017e4493..00000000 --- a/netcon/docker-test/httpd/httpd_demo/htdocs/index.html +++ /dev/null @@ -1,69 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <link rel="stylesheet" href="http://bootswatch.com/cosmo/bootstrap.min.css"> - <title>ZeroTier Network Containers Preview</title> -</head> -<body> - -<br><br> - -<div class="container-fluid"> - <div class="row"> - <div class="col-xs-1 col-xs-offset-1"><img src="ZeroTierIcon.png" style="width: 100%; height: 100%;"></div> - <div class="col-xs-9"> - <h1>ZeroTier Network Containers Preview</h1> - (a.k.a. super bleeding edge pre-alphe pre-release demo) - </div> - </div> -</div> - -<br> -<hr> -<br> - -<div class="container-fluid"><div class="row"><div class="col-xs-10 col-xs-offset-1 lead"> - -<p><b>This page is being served from a Docker container with its own private TCP/IP microservice.</b></p> - -<p> -It's connected to a virtual network, but if you "docker exec" into it and look around you won't find any special devices. No special privileges or configuration changes on the Docker host were needed. Everything is completely "stock" and completely self-contained. -</p> - -<p> -There's nothing special about the web server. It's just Apache. There's nothing special about the Linux image. It's based on a regular Fedora Docker base image. Other than Apache, the only thing this image contains is the ZeroTier network containers microservice and dynamic library. -</p> - -<p> -When Apache is run, our launcher script configures it to load a special dynamic library. This library intercepts calls to the Linux C networking API, redirecting network I/O to our private network stack microservice instead of the standard Linux kernel network path. This microservice takes care of the rest, automatically encapsulating traffic and sending it over the virtual network instead of the physical. -</p> - -<p> -It's a bit like how networking would work on a microkernel: modular, composable, portable, and independent. -</p> - -<p> -Network Containers allows a Docker (or LXC, CoreOS/rkt, runc, OpenVZ, SmartOS/Triton, <a target="_blank" href="https://github.com/p8952/bocker">bocker</a>, or even just bare metal Linux) system to connect to virtual networks without requiring <u>any</u> special permissions or special configuration on the host node. Processes inside the container don't even need to run with root permissions. It's 100% user-space, making it ideal for multi-tenant deployments or any other situation where modifying the configuration of the host node is impossible or just inconvenient. -</p> - -<p> -Once properly tuned and optimized, Network Containers also has the potential to be much faster than tun/tap or pcap based network overlays. It imposes only a single context switch from application/service to virtual network microservice as opposed to at least four for tun/tap and pcap-based solutions, since the latter require two trips through the kernel network stack. We believe it may be possible to approach or even equal the performance of VXLAN/IPSec or other fully kernel-mode configurations, but with the ease and total independence of a fully container-based solution. -</p> - -<p> -We created this container image to show you a preview of one of the projects we've been working on at ZeroTier. We still have a good deal of packaging, testing, and performance optimization work to do before Network Containers will be ready for a real public beta release. Follow the <a href="https://www.zerotier.com/blog">blog</a> or <a href="https://twitter.com/zerotier">@zerotier</a> for updates and announcements. -</p> - -<p> -P.S. If you want to use ZeroTier in Docker today, you can do it with the same ZeroTier One endpoint service you're using to access this network. The only catch is that you have to launch your containers with "--device=/dev/net/tun --cap-add=NET_ADMIN". Network Containers eliminates the need for these special options. -</p> - -</div></div></div> - -<hr> - -</body> -</html> diff --git a/netcon/docker-test/httpd/httpd_demo/monitor_dockerfile b/netcon/docker-test/httpd/httpd_demo/monitor_dockerfile deleted file mode 100644 index 08f08ae1..00000000 --- a/netcon/docker-test/httpd/httpd_demo/monitor_dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -# ZT Network Containers Test Monitor -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -EXPOSE 9993/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD monitor_identity.public /var/lib/zerotier-one/identity.public -ADD monitor_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / -ADD zerotier-one / -ADD zerotier-cli / - -# Install LWIP library used by service -ADD liblwip.so / -RUN mkdir -p ext/bin/lwip -RUN cp liblwip.so ext/bin/lwip/liblwip.so - -# Start ZeroTier-One -ADD monitor_entrypoint.sh /monitor_entrypoint.sh -RUN chmod -v +x /monitor_entrypoint.sh -CMD ["./monitor_entrypoint.sh"] diff --git a/netcon/docker-test/httpd/httpd_demo/monitor_entrypoint.sh b/netcon/docker-test/httpd/httpd_demo/monitor_entrypoint.sh deleted file mode 100644 index 79d4391d..00000000 --- a/netcon/docker-test/httpd/httpd_demo/monitor_entrypoint.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls *.conf) # blank test network config file -nwid="${nwconf%.*}" # test network id -netcon_wait_time=25 # wait for test container to come online -app_timeout_time=15 # app-specific timeout -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -fail=FAIL. # appended to result file in event of failure -ok=OK. # appended to result file in event of success -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) -bigfile_name=bigfile # large, random test transfer file -rx_md5sumfile="$file_path"rx_"$bigfile_name"_md5sum"$tmp_ext" -tx_md5sumfile="$file_path"tx_"$bigfile_name"_md5sum"$tmp_ext" - - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test Monitor' -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-one -d -U -p9993 >>/tmp/zerotier-one.out 2>&1' -echo '*** Waiting for initial identity generation...' -while [ ! -s /var/lib/zerotier-one/identity.secret ]; do - sleep 0.2 -done -echo '*** Waiting for network config...' -virtip4="" -while [ ! -s /var/lib/zerotier-one/networks.d/"$nwconf" ]; do - sleep 0.2 -done -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` -done -echo '*** Starting Test...' -echo '*** Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Sleeping for (' "$netcon_wait_time" 's ) while we wait for the Network Container to come online...' -sleep "$netcon_wait_time"s -ncvirtip=$(<$address_file) - - -# --- Test section --- -echo '*** Curling from intercepted server at' $ncvirtip -rm -rf "$file_path"*."$file_base" -touch "$bigfile_name" - -# Perform test -# curl --connect-timeout "$app_timeout_time" -v -o "$file_path$file_base" http://"$ncvirtip"/index.html -# Large transfer test -curl --connect-timeout "$app_timeout_time" -v -o "$bigfile_name" http://"$ncvirtip"/"$bigfile_name" - -# Check md5 -md5sum < "$bigfile_name" >> "$rx_md5sumfile" -rx_md5sum=$(<$rx_md5sumfile) -tx_md5sum=$(<$tx_md5sumfile) - -echo '*** Comparing md5: ' "$rx_md5sum" ' and ' "$tx_md5sum" - -if [ $rx_md5sum != $tx_md5sum ]; -then - echo 'MD5 FAIL' - touch "$file_path$fail$test_name.txt" - printf 'Test: md5 sum did not match!\n' >> "$file_path$fail$test_name.txt" -else - echo 'MD5 OK' - touch "$file_path$ok$test_name.txt" - printf 'Test: md5 sum ok!\n' >> "$file_path$ok$test_name.txt" -fi - - - - - - - - - - - diff --git a/netcon/docker-test/httpd/httpd_demo/netcon_dockerfile b/netcon/docker-test/httpd/httpd_demo/netcon_dockerfile deleted file mode 100644 index cf50e1d9..00000000 --- a/netcon/docker-test/httpd/httpd_demo/netcon_dockerfile +++ /dev/null @@ -1,45 +0,0 @@ -# ZT Network Containers Test -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -# Install apps -RUN yum -y update -RUN yum -y install httpd-2.4.17-3.fc23.x86_64 -RUN yum clean all - -EXPOSE 9993/udp - -#include Apache -ADD htdocs/index.html / -ADD htdocs/ZeroTierIcon.png / -RUN mv index.html /var/www/html/index.html -RUN mv ZeroTierIcon.png /var/www/html/ZeroTierIcon.png - -# Install syscall intercept library -ADD zerotier-intercept / -ADD libzerotierintercept.so / -RUN cp libzerotierintercept.so lib/libzerotierintercept.so -RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept -RUN /usr/bin/install -c zerotier-intercept /usr/bin - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD netcon_identity.public /var/lib/zerotier-one/identity.public -ADD netcon_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -ADD zerotier-cli / - -# Install test scripts -ADD netcon_entrypoint.sh /netcon_entrypoint.sh -RUN chmod -v +x /netcon_entrypoint.sh - -# Install LWIP library used by service -ADD liblwip.so / -RUN mkdir -p ext/bin/lwip -RUN cp liblwip.so ext/bin/lwip/liblwip.so - -# Start ZeroTier-One -CMD ["./netcon_entrypoint.sh"] diff --git a/netcon/docker-test/httpd/httpd_demo/netcon_entrypoint.sh b/netcon/docker-test/httpd/httpd_demo/netcon_entrypoint.sh deleted file mode 100644 index 5c42b6a6..00000000 --- a/netcon/docker-test/httpd/httpd_demo/netcon_entrypoint.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls *.conf) # blank test network config file -nwid="${nwconf%.*}" # test network id -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) -bigfile_name=bigfile -bigfile_size=10M # size of file we want to use for the test -tx_md5sumfile="$file_path"tx_"$bigfile_name"_md5sum"$tmp_ext" - - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test: ' "$test_name" -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-one -d -U -p9993 >>/tmp/zerotier-one.out 2>&1' -echo '*** Waiting for initial identity generation...' -while [ ! -s /var/lib/zerotier-one/identity.secret ]; do - sleep 0.2 -done -echo '*** Waiting for network config...' -virtip4="" -while [ ! -s /var/lib/zerotier-one/networks.d/"$nwconf" ]; do - sleep 0.2 -done -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` -done -echo '*** Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Writing address to ' "$address_file" -echo $virtip4 > "$address_file" - - -# --- Test section --- -# Generate large random file for transfer test, share md5sum for monitor container to check -echo '*** Generating ' "$bigfile_size" ' file' -dd if=/dev/urandom of=/var/www/html/"$bigfile_name" bs="$bigfile_size" count=1 -#md5sum /var/www/html/"$bigfile_name" >> "$tx_md5sumfile" -md5sum < /var/www/html/"$bigfile_name" >> "$tx_md5sumfile" -echo '*** Wrote MD5 sum to ' "$tx_md5sumfile" - -echo '*** Starting application...' -sleep 0.5 -rm -rf /run/httpd/* /tmp/httpd* -zerotier-intercept /usr/sbin/httpd -X diff --git a/netcon/docker-test/nginx/nginx-1.4.6-1.ub14.x86_64/monitor_dockerfile b/netcon/docker-test/nginx/nginx-1.4.6-1.ub14.x86_64/monitor_dockerfile deleted file mode 100644 index d2d2a0cb..00000000 --- a/netcon/docker-test/nginx/nginx-1.4.6-1.ub14.x86_64/monitor_dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -# ZT Network Containers Test Monitor -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -EXPOSE 9993/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD monitor_identity.public /var/lib/zerotier-one/identity.public -ADD monitor_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -ADD zerotier-one / -ADD zerotier-cli / - -# Start ZeroTier-One -ADD monitor_entrypoint.sh /monitor_entrypoint.sh -RUN chmod -v +x /monitor_entrypoint.sh -CMD ["./monitor_entrypoint.sh"] diff --git a/netcon/docker-test/nginx/nginx-1.4.6-1.ub14.x86_64/monitor_entrypoint.sh b/netcon/docker-test/nginx/nginx-1.4.6-1.ub14.x86_64/monitor_entrypoint.sh deleted file mode 100644 index c8fca5a3..00000000 --- a/netcon/docker-test/nginx/nginx-1.4.6-1.ub14.x86_64/monitor_entrypoint.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls *.conf) # blank test network config file -nwid="${nwconf%.*}" # test network id -netcon_wait_time=35 # wait for test container to come online -app_timeout_time=25 # app-specific timeout -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -fail=FAIL. # appended to result file in event of failure -ok=OK. # appended to result file in event of success -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) -bigfile_name=bigfile # large, random test transfer file -rx_md5sumfile="$file_path"rx_"$bigfile_name"_md5sum"$tmp_ext" -tx_md5sumfile="$file_path"tx_"$bigfile_name"_md5sum"$tmp_ext" - - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test Monitor' -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-one -d -U -p9993 >>/tmp/zerotier-one.out 2>&1' -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` -done -echo '*** Starting Test...' -echo '*** Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Sleeping for (' "$netcon_wait_time" 's ) while we wait for the Network Container to come online...' -sleep "$netcon_wait_time"s -ncvirtip=$(<$address_file) - - -# --- Test section --- -echo '*** Curling from intercepted server at' $ncvirtip -rm -rf "$file_path"*."$file_base" -touch "$bigfile_name" - -# Perform test -# curl --connect-timeout "$app_timeout_time" -v -o "$file_path$file_base" http://"$ncvirtip"/index.html -# Large transfer test -curl --connect-timeout "$app_timeout_time" -v -o "$bigfile_name" http://"$ncvirtip"/"$bigfile_name" - -# Check md5 -md5sum < "$bigfile_name" > "$rx_md5sumfile" -rx_md5sum=$(<$rx_md5sumfile) -tx_md5sum=$(<$tx_md5sumfile) - -echo '*** Comparing md5: ' "$rx_md5sum" ' and ' "$tx_md5sum" - -if [ "$rx_md5sum" != "$tx_md5sum" ]; -then - echo 'MD5 FAIL' - touch "$file_path$fail$test_name.txt" - printf 'Test: md5 sum did not match!\n' >> "$file_path$fail$test_name.txt" -else - echo 'MD5 OK' - touch "$file_path$ok$test_name.txt" - printf 'Test: md5 sum ok!\n' >> "$file_path$ok$test_name.txt" - cat "$rx_md5sumfile" >> "$file_path$ok$test_name.txt" - cat "$tx_md5sumfile" >> "$file_path$ok$test_name.txt" -fi - - - - - - - - - - - diff --git a/netcon/docker-test/nginx/nginx-1.4.6-1.ub14.x86_64/netcon_dockerfile b/netcon/docker-test/nginx/nginx-1.4.6-1.ub14.x86_64/netcon_dockerfile deleted file mode 100644 index cb9c1cc0..00000000 --- a/netcon/docker-test/nginx/nginx-1.4.6-1.ub14.x86_64/netcon_dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -# ZT Network Containers Test -FROM ubuntu:14.04 -MAINTAINER https://www.zerotier.com/ - - -# Install -RUN \ - sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \ - apt-get update && \ - apt-get -y upgrade && \ - apt-get -y install nginx - -EXPOSE 9993/udp 80/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD netcon_identity.public /var/lib/zerotier-one/identity.public -ADD netcon_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -# Install syscall intercept library -ADD zerotier-intercept / -ADD libzerotierintercept.so / -RUN cp libzerotierintercept.so lib/libzerotierintercept.so -RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept -RUN /usr/bin/install -c zerotier-intercept /usr/bin - -ADD zerotier-cli / -ADD zerotier-netcon-service / - -# Install test scripts -ADD netcon_entrypoint.sh /netcon_entrypoint.sh -RUN chmod -v +x /netcon_entrypoint.sh - -ADD nginx.conf_ / - -# Start ZeroTier-One -CMD ["./netcon_entrypoint.sh"] diff --git a/netcon/docker-test/nginx/nginx-1.4.6-1.ub14.x86_64/netcon_entrypoint.sh b/netcon/docker-test/nginx/nginx-1.4.6-1.ub14.x86_64/netcon_entrypoint.sh deleted file mode 100644 index b9b8ef71..00000000 --- a/netcon/docker-test/nginx/nginx-1.4.6-1.ub14.x86_64/netcon_entrypoint.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls {*.conf,}) # blank test network config file -nwid="${nwconf%.*}" # test network id -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) -bigfile_name=bigfile -bigfile_size=10M # size of file we want to use for the test -tx_md5sumfile="$file_path"tx_"$bigfile_name"_md5sum"$tmp_ext" - - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test: ' "$test_name" -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-netcon-service -d -U -p9993 >>/tmp/zerotier-netcon-service.out 2>&1' -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` - dev=`/zerotier-cli listnetworks | grep -F "" | cut -d ' ' -f 8 | cut -d "_" -f 2 | sed "s/^<dev>//" | tr '\n' '\0'` -done -echo '*** Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Writing address to ' "$address_file" -echo $virtip4 > "$address_file" - -# --- Test section --- -cp -f nginx.conf_ /etc/nginx/nginx.conf -nginx_html_path=/usr/share/nginx/html/ -# Generate large random file for transfer test, share md5sum for monitor container to check -echo '*** Generating ' "$bigfile_size" ' file' -dd if=/dev/urandom of="$nginx_html_path$bigfile_name" bs="$bigfile_size" count=1 -#md5sum /var/www/html/"$bigfile_name" >> "$tx_md5sumfile" -md5sum < "$nginx_html_path$bigfile_name" > "$tx_md5sumfile" -echo '*** Wrote MD5 sum to ' "$tx_md5sumfile" - -echo '*** Starting application...' -sleep 0.5 - -export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_"$dev" -export LD_PRELOAD=./libzerotierintercept.so -nginx diff --git a/netcon/docker-test/nginx/nginx-1.4.6-1.ub14.x86_64/nginx.conf_ b/netcon/docker-test/nginx/nginx-1.4.6-1.ub14.x86_64/nginx.conf_ deleted file mode 100644 index 7069ef03..00000000 --- a/netcon/docker-test/nginx/nginx-1.4.6-1.ub14.x86_64/nginx.conf_ +++ /dev/null @@ -1,55 +0,0 @@ -# For more information on configuration, see: -# * Official English Documentation: http://nginx.org/en/docs/ -# * Official Russian Documentation: http://nginx.org/ru/docs/ - -user nginx; -worker_processes auto; -error_log /var/log/nginx/error.log; -pid /run/nginx.pid; - -events { - worker_connections 1024; -} - -http { - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - - access_log /var/log/nginx/access.log main; - - sendfile on; - tcp_nopush on; - tcp_nodelay on; - keepalive_timeout 65; - types_hash_max_size 2048; - - include /etc/nginx/mime.types; - default_type application/octet-stream; - - # Load modular configuration files from the /etc/nginx/conf.d directory. - # See http://nginx.org/en/docs/ngx_core_module.html#include - # for more information. - include /etc/nginx/conf.d/*.conf; - - server { - listen 80 default_server; - #listen [::]:80 default_server; - server_name _; - root /usr/share/nginx/html; - - # Load configuration files for the default server block. - include /etc/nginx/default.d/*.conf; - - location / { - } - - error_page 404 /404.html; - location = /40x.html { - } - - error_page 500 502 503 504 /50x.html; - location = /50x.html { - } - } -} diff --git a/netcon/docker-test/nginx/nginx-1.8.0-13.fc23.x86_64/monitor_dockerfile b/netcon/docker-test/nginx/nginx-1.8.0-13.fc23.x86_64/monitor_dockerfile deleted file mode 100644 index d2d2a0cb..00000000 --- a/netcon/docker-test/nginx/nginx-1.8.0-13.fc23.x86_64/monitor_dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -# ZT Network Containers Test Monitor -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -EXPOSE 9993/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD monitor_identity.public /var/lib/zerotier-one/identity.public -ADD monitor_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -ADD zerotier-one / -ADD zerotier-cli / - -# Start ZeroTier-One -ADD monitor_entrypoint.sh /monitor_entrypoint.sh -RUN chmod -v +x /monitor_entrypoint.sh -CMD ["./monitor_entrypoint.sh"] diff --git a/netcon/docker-test/nginx/nginx-1.8.0-13.fc23.x86_64/monitor_entrypoint.sh b/netcon/docker-test/nginx/nginx-1.8.0-13.fc23.x86_64/monitor_entrypoint.sh deleted file mode 100644 index c8fca5a3..00000000 --- a/netcon/docker-test/nginx/nginx-1.8.0-13.fc23.x86_64/monitor_entrypoint.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls *.conf) # blank test network config file -nwid="${nwconf%.*}" # test network id -netcon_wait_time=35 # wait for test container to come online -app_timeout_time=25 # app-specific timeout -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -fail=FAIL. # appended to result file in event of failure -ok=OK. # appended to result file in event of success -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) -bigfile_name=bigfile # large, random test transfer file -rx_md5sumfile="$file_path"rx_"$bigfile_name"_md5sum"$tmp_ext" -tx_md5sumfile="$file_path"tx_"$bigfile_name"_md5sum"$tmp_ext" - - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test Monitor' -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-one -d -U -p9993 >>/tmp/zerotier-one.out 2>&1' -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` -done -echo '*** Starting Test...' -echo '*** Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Sleeping for (' "$netcon_wait_time" 's ) while we wait for the Network Container to come online...' -sleep "$netcon_wait_time"s -ncvirtip=$(<$address_file) - - -# --- Test section --- -echo '*** Curling from intercepted server at' $ncvirtip -rm -rf "$file_path"*."$file_base" -touch "$bigfile_name" - -# Perform test -# curl --connect-timeout "$app_timeout_time" -v -o "$file_path$file_base" http://"$ncvirtip"/index.html -# Large transfer test -curl --connect-timeout "$app_timeout_time" -v -o "$bigfile_name" http://"$ncvirtip"/"$bigfile_name" - -# Check md5 -md5sum < "$bigfile_name" > "$rx_md5sumfile" -rx_md5sum=$(<$rx_md5sumfile) -tx_md5sum=$(<$tx_md5sumfile) - -echo '*** Comparing md5: ' "$rx_md5sum" ' and ' "$tx_md5sum" - -if [ "$rx_md5sum" != "$tx_md5sum" ]; -then - echo 'MD5 FAIL' - touch "$file_path$fail$test_name.txt" - printf 'Test: md5 sum did not match!\n' >> "$file_path$fail$test_name.txt" -else - echo 'MD5 OK' - touch "$file_path$ok$test_name.txt" - printf 'Test: md5 sum ok!\n' >> "$file_path$ok$test_name.txt" - cat "$rx_md5sumfile" >> "$file_path$ok$test_name.txt" - cat "$tx_md5sumfile" >> "$file_path$ok$test_name.txt" -fi - - - - - - - - - - - diff --git a/netcon/docker-test/nginx/nginx-1.8.0-13.fc23.x86_64/netcon_dockerfile b/netcon/docker-test/nginx/nginx-1.8.0-13.fc23.x86_64/netcon_dockerfile deleted file mode 100644 index 8dcd5bf0..00000000 --- a/netcon/docker-test/nginx/nginx-1.8.0-13.fc23.x86_64/netcon_dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -# ZT Network Containers Test -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -# Install apps -RUN yum -y update -RUN yum -y install nginx-1:1.8.0-13.fc23.x86_64 -RUN yum clean all - -EXPOSE 9993/udp 80/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD netcon_identity.public /var/lib/zerotier-one/identity.public -ADD netcon_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -# Install syscall intercept library -ADD zerotier-intercept / -ADD libzerotierintercept.so / -RUN cp libzerotierintercept.so lib/libzerotierintercept.so -RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept -RUN /usr/bin/install -c zerotier-intercept /usr/bin - -ADD zerotier-cli / -ADD zerotier-netcon-service / - -# Install test scripts -ADD netcon_entrypoint.sh /netcon_entrypoint.sh -RUN chmod -v +x /netcon_entrypoint.sh - -ADD nginx.conf_ / - -# Start ZeroTier-One -CMD ["./netcon_entrypoint.sh"] diff --git a/netcon/docker-test/nginx/nginx-1.8.0-13.fc23.x86_64/netcon_entrypoint.sh b/netcon/docker-test/nginx/nginx-1.8.0-13.fc23.x86_64/netcon_entrypoint.sh deleted file mode 100644 index b9b8ef71..00000000 --- a/netcon/docker-test/nginx/nginx-1.8.0-13.fc23.x86_64/netcon_entrypoint.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls {*.conf,}) # blank test network config file -nwid="${nwconf%.*}" # test network id -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) -bigfile_name=bigfile -bigfile_size=10M # size of file we want to use for the test -tx_md5sumfile="$file_path"tx_"$bigfile_name"_md5sum"$tmp_ext" - - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test: ' "$test_name" -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-netcon-service -d -U -p9993 >>/tmp/zerotier-netcon-service.out 2>&1' -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` - dev=`/zerotier-cli listnetworks | grep -F "" | cut -d ' ' -f 8 | cut -d "_" -f 2 | sed "s/^<dev>//" | tr '\n' '\0'` -done -echo '*** Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Writing address to ' "$address_file" -echo $virtip4 > "$address_file" - -# --- Test section --- -cp -f nginx.conf_ /etc/nginx/nginx.conf -nginx_html_path=/usr/share/nginx/html/ -# Generate large random file for transfer test, share md5sum for monitor container to check -echo '*** Generating ' "$bigfile_size" ' file' -dd if=/dev/urandom of="$nginx_html_path$bigfile_name" bs="$bigfile_size" count=1 -#md5sum /var/www/html/"$bigfile_name" >> "$tx_md5sumfile" -md5sum < "$nginx_html_path$bigfile_name" > "$tx_md5sumfile" -echo '*** Wrote MD5 sum to ' "$tx_md5sumfile" - -echo '*** Starting application...' -sleep 0.5 - -export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_"$dev" -export LD_PRELOAD=./libzerotierintercept.so -nginx diff --git a/netcon/docker-test/nginx/nginx-1.8.0-13.fc23.x86_64/nginx.conf_ b/netcon/docker-test/nginx/nginx-1.8.0-13.fc23.x86_64/nginx.conf_ deleted file mode 100644 index 7069ef03..00000000 --- a/netcon/docker-test/nginx/nginx-1.8.0-13.fc23.x86_64/nginx.conf_ +++ /dev/null @@ -1,55 +0,0 @@ -# For more information on configuration, see: -# * Official English Documentation: http://nginx.org/en/docs/ -# * Official Russian Documentation: http://nginx.org/ru/docs/ - -user nginx; -worker_processes auto; -error_log /var/log/nginx/error.log; -pid /run/nginx.pid; - -events { - worker_connections 1024; -} - -http { - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - - access_log /var/log/nginx/access.log main; - - sendfile on; - tcp_nopush on; - tcp_nodelay on; - keepalive_timeout 65; - types_hash_max_size 2048; - - include /etc/nginx/mime.types; - default_type application/octet-stream; - - # Load modular configuration files from the /etc/nginx/conf.d directory. - # See http://nginx.org/en/docs/ngx_core_module.html#include - # for more information. - include /etc/nginx/conf.d/*.conf; - - server { - listen 80 default_server; - #listen [::]:80 default_server; - server_name _; - root /usr/share/nginx/html; - - # Load configuration files for the default server block. - include /etc/nginx/default.d/*.conf; - - location / { - } - - error_page 404 /404.html; - location = /40x.html { - } - - error_page 500 502 503 504 /50x.html; - location = /50x.html { - } - } -} diff --git a/netcon/docker-test/nginx/nginx-1.8.0-14.fc23.x86_64/monitor_dockerfile b/netcon/docker-test/nginx/nginx-1.8.0-14.fc23.x86_64/monitor_dockerfile deleted file mode 100644 index d2d2a0cb..00000000 --- a/netcon/docker-test/nginx/nginx-1.8.0-14.fc23.x86_64/monitor_dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -# ZT Network Containers Test Monitor -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -EXPOSE 9993/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD monitor_identity.public /var/lib/zerotier-one/identity.public -ADD monitor_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -ADD zerotier-one / -ADD zerotier-cli / - -# Start ZeroTier-One -ADD monitor_entrypoint.sh /monitor_entrypoint.sh -RUN chmod -v +x /monitor_entrypoint.sh -CMD ["./monitor_entrypoint.sh"] diff --git a/netcon/docker-test/nginx/nginx-1.8.0-14.fc23.x86_64/monitor_entrypoint.sh b/netcon/docker-test/nginx/nginx-1.8.0-14.fc23.x86_64/monitor_entrypoint.sh deleted file mode 100644 index c8fca5a3..00000000 --- a/netcon/docker-test/nginx/nginx-1.8.0-14.fc23.x86_64/monitor_entrypoint.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls *.conf) # blank test network config file -nwid="${nwconf%.*}" # test network id -netcon_wait_time=35 # wait for test container to come online -app_timeout_time=25 # app-specific timeout -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -fail=FAIL. # appended to result file in event of failure -ok=OK. # appended to result file in event of success -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) -bigfile_name=bigfile # large, random test transfer file -rx_md5sumfile="$file_path"rx_"$bigfile_name"_md5sum"$tmp_ext" -tx_md5sumfile="$file_path"tx_"$bigfile_name"_md5sum"$tmp_ext" - - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test Monitor' -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-one -d -U -p9993 >>/tmp/zerotier-one.out 2>&1' -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` -done -echo '*** Starting Test...' -echo '*** Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Sleeping for (' "$netcon_wait_time" 's ) while we wait for the Network Container to come online...' -sleep "$netcon_wait_time"s -ncvirtip=$(<$address_file) - - -# --- Test section --- -echo '*** Curling from intercepted server at' $ncvirtip -rm -rf "$file_path"*."$file_base" -touch "$bigfile_name" - -# Perform test -# curl --connect-timeout "$app_timeout_time" -v -o "$file_path$file_base" http://"$ncvirtip"/index.html -# Large transfer test -curl --connect-timeout "$app_timeout_time" -v -o "$bigfile_name" http://"$ncvirtip"/"$bigfile_name" - -# Check md5 -md5sum < "$bigfile_name" > "$rx_md5sumfile" -rx_md5sum=$(<$rx_md5sumfile) -tx_md5sum=$(<$tx_md5sumfile) - -echo '*** Comparing md5: ' "$rx_md5sum" ' and ' "$tx_md5sum" - -if [ "$rx_md5sum" != "$tx_md5sum" ]; -then - echo 'MD5 FAIL' - touch "$file_path$fail$test_name.txt" - printf 'Test: md5 sum did not match!\n' >> "$file_path$fail$test_name.txt" -else - echo 'MD5 OK' - touch "$file_path$ok$test_name.txt" - printf 'Test: md5 sum ok!\n' >> "$file_path$ok$test_name.txt" - cat "$rx_md5sumfile" >> "$file_path$ok$test_name.txt" - cat "$tx_md5sumfile" >> "$file_path$ok$test_name.txt" -fi - - - - - - - - - - - diff --git a/netcon/docker-test/nginx/nginx-1.8.0-14.fc23.x86_64/netcon_dockerfile b/netcon/docker-test/nginx/nginx-1.8.0-14.fc23.x86_64/netcon_dockerfile deleted file mode 100644 index 05cd51fb..00000000 --- a/netcon/docker-test/nginx/nginx-1.8.0-14.fc23.x86_64/netcon_dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -# ZT Network Containers Test -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -# Install apps -RUN yum -y update -RUN yum -y install nginx-1:1.8.0-14.fc23.x86_64 -RUN yum clean all - -EXPOSE 9993/udp 80/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD netcon_identity.public /var/lib/zerotier-one/identity.public -ADD netcon_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -# Install syscall intercept library -ADD zerotier-intercept / -ADD libzerotierintercept.so / -RUN cp libzerotierintercept.so lib/libzerotierintercept.so -RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept -RUN /usr/bin/install -c zerotier-intercept /usr/bin - -ADD zerotier-cli / -ADD zerotier-netcon-service / - -# Install test scripts -ADD netcon_entrypoint.sh /netcon_entrypoint.sh -RUN chmod -v +x /netcon_entrypoint.sh - -ADD nginx.conf_ / - -# Start ZeroTier-One -CMD ["./netcon_entrypoint.sh"] diff --git a/netcon/docker-test/nginx/nginx-1.8.0-14.fc23.x86_64/netcon_entrypoint.sh b/netcon/docker-test/nginx/nginx-1.8.0-14.fc23.x86_64/netcon_entrypoint.sh deleted file mode 100644 index b9b8ef71..00000000 --- a/netcon/docker-test/nginx/nginx-1.8.0-14.fc23.x86_64/netcon_entrypoint.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls {*.conf,}) # blank test network config file -nwid="${nwconf%.*}" # test network id -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) -bigfile_name=bigfile -bigfile_size=10M # size of file we want to use for the test -tx_md5sumfile="$file_path"tx_"$bigfile_name"_md5sum"$tmp_ext" - - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test: ' "$test_name" -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-netcon-service -d -U -p9993 >>/tmp/zerotier-netcon-service.out 2>&1' -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` - dev=`/zerotier-cli listnetworks | grep -F "" | cut -d ' ' -f 8 | cut -d "_" -f 2 | sed "s/^<dev>//" | tr '\n' '\0'` -done -echo '*** Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Writing address to ' "$address_file" -echo $virtip4 > "$address_file" - -# --- Test section --- -cp -f nginx.conf_ /etc/nginx/nginx.conf -nginx_html_path=/usr/share/nginx/html/ -# Generate large random file for transfer test, share md5sum for monitor container to check -echo '*** Generating ' "$bigfile_size" ' file' -dd if=/dev/urandom of="$nginx_html_path$bigfile_name" bs="$bigfile_size" count=1 -#md5sum /var/www/html/"$bigfile_name" >> "$tx_md5sumfile" -md5sum < "$nginx_html_path$bigfile_name" > "$tx_md5sumfile" -echo '*** Wrote MD5 sum to ' "$tx_md5sumfile" - -echo '*** Starting application...' -sleep 0.5 - -export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_"$dev" -export LD_PRELOAD=./libzerotierintercept.so -nginx diff --git a/netcon/docker-test/nginx/nginx-1.8.0-14.fc23.x86_64/nginx.conf_ b/netcon/docker-test/nginx/nginx-1.8.0-14.fc23.x86_64/nginx.conf_ deleted file mode 100644 index 7069ef03..00000000 --- a/netcon/docker-test/nginx/nginx-1.8.0-14.fc23.x86_64/nginx.conf_ +++ /dev/null @@ -1,55 +0,0 @@ -# For more information on configuration, see: -# * Official English Documentation: http://nginx.org/en/docs/ -# * Official Russian Documentation: http://nginx.org/ru/docs/ - -user nginx; -worker_processes auto; -error_log /var/log/nginx/error.log; -pid /run/nginx.pid; - -events { - worker_connections 1024; -} - -http { - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - - access_log /var/log/nginx/access.log main; - - sendfile on; - tcp_nopush on; - tcp_nodelay on; - keepalive_timeout 65; - types_hash_max_size 2048; - - include /etc/nginx/mime.types; - default_type application/octet-stream; - - # Load modular configuration files from the /etc/nginx/conf.d directory. - # See http://nginx.org/en/docs/ngx_core_module.html#include - # for more information. - include /etc/nginx/conf.d/*.conf; - - server { - listen 80 default_server; - #listen [::]:80 default_server; - server_name _; - root /usr/share/nginx/html; - - # Load configuration files for the default server block. - include /etc/nginx/default.d/*.conf; - - location / { - } - - error_page 404 /404.html; - location = /40x.html { - } - - error_page 500 502 503 504 /50x.html; - location = /50x.html { - } - } -} diff --git a/netcon/docker-test/nodejs/nodejs-0.10.36-4.fc23/httpserver.js b/netcon/docker-test/nodejs/nodejs-0.10.36-4.fc23/httpserver.js deleted file mode 100644 index b2401c50..00000000 --- a/netcon/docker-test/nodejs/nodejs-0.10.36-4.fc23/httpserver.js +++ /dev/null @@ -1,7 +0,0 @@ -var http = require('http'); -var server = http.createServer(function (request, response) { - response.writeHead(200, {"Content-Type": "text/plain"}); - response.end("welcome to the machine!\n"); -}); -server.listen(8080); -console.log("Server running!"); diff --git a/netcon/docker-test/nodejs/nodejs-0.10.36-4.fc23/monitor_dockerfile b/netcon/docker-test/nodejs/nodejs-0.10.36-4.fc23/monitor_dockerfile deleted file mode 100644 index d2d2a0cb..00000000 --- a/netcon/docker-test/nodejs/nodejs-0.10.36-4.fc23/monitor_dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -# ZT Network Containers Test Monitor -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -EXPOSE 9993/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD monitor_identity.public /var/lib/zerotier-one/identity.public -ADD monitor_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -ADD zerotier-one / -ADD zerotier-cli / - -# Start ZeroTier-One -ADD monitor_entrypoint.sh /monitor_entrypoint.sh -RUN chmod -v +x /monitor_entrypoint.sh -CMD ["./monitor_entrypoint.sh"] diff --git a/netcon/docker-test/nodejs/nodejs-0.10.36-4.fc23/monitor_entrypoint.sh b/netcon/docker-test/nodejs/nodejs-0.10.36-4.fc23/monitor_entrypoint.sh deleted file mode 100644 index 1701a467..00000000 --- a/netcon/docker-test/nodejs/nodejs-0.10.36-4.fc23/monitor_entrypoint.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls *.conf) # blank test network config file -nwid="${nwconf%.*}" # test network id -netcon_wait_time=25 # wait for test container to come online -app_timeout_time=15 # app-specific timeout -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -fail=FAIL. # appended to result file in event of failure -ok=OK. # appended to result file in event of success -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) - - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test Monitor' -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-one -d -U -p9993 >>/tmp/zerotier-one.out 2>&1' -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` -done -echo '*** Starting Test...' -echo '*** Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Sleeping for (' "$netcon_wait_time" 's ) while we wait for the Network Container to come online...' -sleep "$netcon_wait_time"s -ncvirtip=$(<$address_file) - - -# --- Test section --- -echo '*** Curling from intercepted server at' $ncvirtip -response_string=$(curl --connect-timeout "$app_timeout_time" -v http://"$ncvirtip":8080/) - -if [[ $response_string == *"welcome to the machine!"* ]] -then - echo 'NODEJS RESPONSE OK' - touch "$file_path$ok$test_name.txt" - printf 'Test: nodejs-server responded!\n' >> "$file_path$ok$test_name.txt" -else - echo 'NODEJS RESPONSE FAIL' - touch "$file_path$fail$test_name.txt" - printf 'Test: nodejs server did NOT respond!\n' >> "$file_path$fail$test_name.txt" -fi - - - - - - diff --git a/netcon/docker-test/nodejs/nodejs-0.10.36-4.fc23/netcon_dockerfile b/netcon/docker-test/nodejs/nodejs-0.10.36-4.fc23/netcon_dockerfile deleted file mode 100644 index 55f48a62..00000000 --- a/netcon/docker-test/nodejs/nodejs-0.10.36-4.fc23/netcon_dockerfile +++ /dev/null @@ -1,41 +0,0 @@ -# ZT Network Containers Test -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -# Install apps -RUN yum -y update -RUN yum -y install nodejs -RUN yum clean all - -EXPOSE 9993/udp 8080/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD netcon_identity.public /var/lib/zerotier-one/identity.public -ADD netcon_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -# -ADD httpserver.js / - -# Install syscall intercept library -ADD zerotier-intercept / -ADD libzerotierintercept.so / -RUN cp libzerotierintercept.so lib/libzerotierintercept.so -RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept -RUN /usr/bin/install -c zerotier-intercept /usr/bin - -ADD zerotier-cli / -ADD zerotier-netcon-service / - -# Install test scripts -ADD netcon_entrypoint.sh /netcon_entrypoint.sh -RUN chmod -v +x /netcon_entrypoint.sh - -# Start ZeroTier-One -CMD ["./netcon_entrypoint.sh"] diff --git a/netcon/docker-test/nodejs/nodejs-0.10.36-4.fc23/netcon_entrypoint.sh b/netcon/docker-test/nodejs/nodejs-0.10.36-4.fc23/netcon_entrypoint.sh deleted file mode 100644 index 44e409d0..00000000 --- a/netcon/docker-test/nodejs/nodejs-0.10.36-4.fc23/netcon_entrypoint.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls *.conf) # blank test network config file -nwid="${nwconf%.*}" # test network id -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) - - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test: ' "$test_name" -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-netcon-service -d -U -p9993 >>/tmp/zerotier-netcon-service.out 2>&1' -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` - dev=`/zerotier-cli listnetworks | grep -F "" | cut -d ' ' -f 8 | cut -d "_" -f 2 | sed "s/^<dev>//" | tr '\n' '\0'` -done -echo '*** Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Writing address to ' "$address_file" -echo $virtip4 > "$address_file" - -export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_"$dev" -export LD_PRELOAD=./libzerotierintercept.so - -# --- Test section --- -echo '*** Starting application...' -sleep 0.5 -node httpserver.js
\ No newline at end of file diff --git a/netcon/docker-test/python/python/monitor_dockerfile b/netcon/docker-test/python/python/monitor_dockerfile deleted file mode 100644 index d2d2a0cb..00000000 --- a/netcon/docker-test/python/python/monitor_dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -# ZT Network Containers Test Monitor -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -EXPOSE 9993/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD monitor_identity.public /var/lib/zerotier-one/identity.public -ADD monitor_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -ADD zerotier-one / -ADD zerotier-cli / - -# Start ZeroTier-One -ADD monitor_entrypoint.sh /monitor_entrypoint.sh -RUN chmod -v +x /monitor_entrypoint.sh -CMD ["./monitor_entrypoint.sh"] diff --git a/netcon/docker-test/python/python/monitor_entrypoint.sh b/netcon/docker-test/python/python/monitor_entrypoint.sh deleted file mode 100644 index c8fca5a3..00000000 --- a/netcon/docker-test/python/python/monitor_entrypoint.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls *.conf) # blank test network config file -nwid="${nwconf%.*}" # test network id -netcon_wait_time=35 # wait for test container to come online -app_timeout_time=25 # app-specific timeout -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -fail=FAIL. # appended to result file in event of failure -ok=OK. # appended to result file in event of success -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) -bigfile_name=bigfile # large, random test transfer file -rx_md5sumfile="$file_path"rx_"$bigfile_name"_md5sum"$tmp_ext" -tx_md5sumfile="$file_path"tx_"$bigfile_name"_md5sum"$tmp_ext" - - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test Monitor' -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-one -d -U -p9993 >>/tmp/zerotier-one.out 2>&1' -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` -done -echo '*** Starting Test...' -echo '*** Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Sleeping for (' "$netcon_wait_time" 's ) while we wait for the Network Container to come online...' -sleep "$netcon_wait_time"s -ncvirtip=$(<$address_file) - - -# --- Test section --- -echo '*** Curling from intercepted server at' $ncvirtip -rm -rf "$file_path"*."$file_base" -touch "$bigfile_name" - -# Perform test -# curl --connect-timeout "$app_timeout_time" -v -o "$file_path$file_base" http://"$ncvirtip"/index.html -# Large transfer test -curl --connect-timeout "$app_timeout_time" -v -o "$bigfile_name" http://"$ncvirtip"/"$bigfile_name" - -# Check md5 -md5sum < "$bigfile_name" > "$rx_md5sumfile" -rx_md5sum=$(<$rx_md5sumfile) -tx_md5sum=$(<$tx_md5sumfile) - -echo '*** Comparing md5: ' "$rx_md5sum" ' and ' "$tx_md5sum" - -if [ "$rx_md5sum" != "$tx_md5sum" ]; -then - echo 'MD5 FAIL' - touch "$file_path$fail$test_name.txt" - printf 'Test: md5 sum did not match!\n' >> "$file_path$fail$test_name.txt" -else - echo 'MD5 OK' - touch "$file_path$ok$test_name.txt" - printf 'Test: md5 sum ok!\n' >> "$file_path$ok$test_name.txt" - cat "$rx_md5sumfile" >> "$file_path$ok$test_name.txt" - cat "$tx_md5sumfile" >> "$file_path$ok$test_name.txt" -fi - - - - - - - - - - - diff --git a/netcon/docker-test/python/python/netcon_dockerfile b/netcon/docker-test/python/python/netcon_dockerfile deleted file mode 100644 index 6646f670..00000000 --- a/netcon/docker-test/python/python/netcon_dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -# ZT Network Containers Test -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -# Install apps -RUN yum -y update -RUN yum -y install python -RUN yum clean all - -EXPOSE 9993/udp 80/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD netcon_identity.public /var/lib/zerotier-one/identity.public -ADD netcon_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -# Install syscall intercept library -ADD zerotier-intercept / -ADD libzerotierintercept.so / -RUN cp libzerotierintercept.so lib/libzerotierintercept.so -RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept -RUN /usr/bin/install -c zerotier-intercept /usr/bin - -ADD zerotier-cli / -ADD zerotier-netcon-service / - -# Install test scripts -ADD netcon_entrypoint.sh /netcon_entrypoint.sh -RUN chmod -v +x /netcon_entrypoint.sh - -# Start ZeroTier-One -CMD ["./netcon_entrypoint.sh"] diff --git a/netcon/docker-test/python/python/netcon_entrypoint.sh b/netcon/docker-test/python/python/netcon_entrypoint.sh deleted file mode 100644 index 5e1a19b8..00000000 --- a/netcon/docker-test/python/python/netcon_entrypoint.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls *.conf) # blank test network config file -nwid="${nwconf%.*}" # test network id -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) -bigfile_name=bigfile -bigfile_size=10M # size of file we want to use for the test -tx_md5sumfile="$file_path"tx_"$bigfile_name"_md5sum"$tmp_ext" - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test: ' "$test_name" -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-netcon-service -d -U -p9993 >>/tmp/zerotier-netcon-service.out 2>&1' -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` - dev=`/zerotier-cli listnetworks | grep -F "" | cut -d ' ' -f 8 | cut -d "_" -f 2 | sed "s/^<dev>//" | tr '\n' '\0'` -done -echo '--- Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Writing address to ' "$address_file" -echo $virtip4 > "$address_file" - -# --- Test section --- -# Generate large random file for transfer test, share md5sum for monitor container to check -echo '*** Generating ' "$bigfile_size" ' file' -dd if=/dev/urandom of="$bigfile_name" bs="$bigfile_size" count=1 -md5sum < "$bigfile_name" > "$tx_md5sumfile" -echo '*** Wrote MD5 sum to ' "$tx_md5sumfile" - -echo '*** Starting application...' -sleep 0.5 - -export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_"$dev" -export LD_PRELOAD=./libzerotierintercept.so -python -m SimpleHTTPServer 80 diff --git a/netcon/docker-test/python/python3/monitor_dockerfile b/netcon/docker-test/python/python3/monitor_dockerfile deleted file mode 100644 index d2d2a0cb..00000000 --- a/netcon/docker-test/python/python3/monitor_dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -# ZT Network Containers Test Monitor -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -EXPOSE 9993/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD monitor_identity.public /var/lib/zerotier-one/identity.public -ADD monitor_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -ADD zerotier-one / -ADD zerotier-cli / - -# Start ZeroTier-One -ADD monitor_entrypoint.sh /monitor_entrypoint.sh -RUN chmod -v +x /monitor_entrypoint.sh -CMD ["./monitor_entrypoint.sh"] diff --git a/netcon/docker-test/python/python3/monitor_entrypoint.sh b/netcon/docker-test/python/python3/monitor_entrypoint.sh deleted file mode 100644 index c8fca5a3..00000000 --- a/netcon/docker-test/python/python3/monitor_entrypoint.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls *.conf) # blank test network config file -nwid="${nwconf%.*}" # test network id -netcon_wait_time=35 # wait for test container to come online -app_timeout_time=25 # app-specific timeout -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -fail=FAIL. # appended to result file in event of failure -ok=OK. # appended to result file in event of success -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) -bigfile_name=bigfile # large, random test transfer file -rx_md5sumfile="$file_path"rx_"$bigfile_name"_md5sum"$tmp_ext" -tx_md5sumfile="$file_path"tx_"$bigfile_name"_md5sum"$tmp_ext" - - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test Monitor' -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-one -d -U -p9993 >>/tmp/zerotier-one.out 2>&1' -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` -done -echo '*** Starting Test...' -echo '*** Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Sleeping for (' "$netcon_wait_time" 's ) while we wait for the Network Container to come online...' -sleep "$netcon_wait_time"s -ncvirtip=$(<$address_file) - - -# --- Test section --- -echo '*** Curling from intercepted server at' $ncvirtip -rm -rf "$file_path"*."$file_base" -touch "$bigfile_name" - -# Perform test -# curl --connect-timeout "$app_timeout_time" -v -o "$file_path$file_base" http://"$ncvirtip"/index.html -# Large transfer test -curl --connect-timeout "$app_timeout_time" -v -o "$bigfile_name" http://"$ncvirtip"/"$bigfile_name" - -# Check md5 -md5sum < "$bigfile_name" > "$rx_md5sumfile" -rx_md5sum=$(<$rx_md5sumfile) -tx_md5sum=$(<$tx_md5sumfile) - -echo '*** Comparing md5: ' "$rx_md5sum" ' and ' "$tx_md5sum" - -if [ "$rx_md5sum" != "$tx_md5sum" ]; -then - echo 'MD5 FAIL' - touch "$file_path$fail$test_name.txt" - printf 'Test: md5 sum did not match!\n' >> "$file_path$fail$test_name.txt" -else - echo 'MD5 OK' - touch "$file_path$ok$test_name.txt" - printf 'Test: md5 sum ok!\n' >> "$file_path$ok$test_name.txt" - cat "$rx_md5sumfile" >> "$file_path$ok$test_name.txt" - cat "$tx_md5sumfile" >> "$file_path$ok$test_name.txt" -fi - - - - - - - - - - - diff --git a/netcon/docker-test/python/python3/netcon_dockerfile b/netcon/docker-test/python/python3/netcon_dockerfile deleted file mode 100644 index f960fa30..00000000 --- a/netcon/docker-test/python/python3/netcon_dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# ZT Network Containers Test -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -# Install apps -RUN yum -y update -RUN yum clean all - -EXPOSE 9993/udp 80/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD netcon_identity.public /var/lib/zerotier-one/identity.public -ADD netcon_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -# Install syscall intercept library -ADD zerotier-intercept / -ADD libzerotierintercept.so / -RUN cp libzerotierintercept.so lib/libzerotierintercept.so -RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept -RUN /usr/bin/install -c zerotier-intercept /usr/bin - -ADD zerotier-cli / -ADD zerotier-netcon-service / - -# Install test scripts -ADD netcon_entrypoint.sh /netcon_entrypoint.sh -RUN chmod -v +x /netcon_entrypoint.sh - -# Start ZeroTier-One -CMD ["./netcon_entrypoint.sh"] diff --git a/netcon/docker-test/python/python3/netcon_entrypoint.sh b/netcon/docker-test/python/python3/netcon_entrypoint.sh deleted file mode 100644 index c3c8b281..00000000 --- a/netcon/docker-test/python/python3/netcon_entrypoint.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls *.conf) # blank test network config file -nwid="${nwconf%.*}" # test network id -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) -bigfile_name=bigfile -bigfile_size=10M # size of file we want to use for the test -tx_md5sumfile="$file_path"tx_"$bigfile_name"_md5sum"$tmp_ext" - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test: ' "$test_name" -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-netcon-service -d -U -p9993 >>/tmp/zerotier-netcon-service.out 2>&1' -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` - dev=`/zerotier-cli listnetworks | grep -F "" | cut -d ' ' -f 8 | cut -d "_" -f 2 | sed "s/^<dev>//" | tr '\n' '\0'` -done -echo '--- Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Writing address to ' "$address_file" -echo $virtip4 > "$address_file" - -# --- Test section --- -# Generate large random file for transfer test, share md5sum for monitor container to check -echo '*** Generating ' "$bigfile_size" ' file' -dd if=/dev/urandom of="$bigfile_name" bs="$bigfile_size" count=1 -md5sum < "$bigfile_name" > "$tx_md5sumfile" -echo '*** Wrote MD5 sum to ' "$tx_md5sumfile" - -echo '*** Starting application...' -sleep 0.5 - -export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_"$dev" -export LD_PRELOAD=./libzerotierintercept.so -python3 -m http.server 80 diff --git a/netcon/docker-test/redis/redis-3.0.4-1.fc23.x86_64/hello.lua b/netcon/docker-test/redis/redis-3.0.4-1.fc23.x86_64/hello.lua deleted file mode 100644 index 59a2dea6..00000000 --- a/netcon/docker-test/redis/redis-3.0.4-1.fc23.x86_64/hello.lua +++ /dev/null @@ -1,3 +0,0 @@ -local msg = "welcome to the machine!" -redis.call("SET", "msg", msg) -return redis.call("GET", "msg") diff --git a/netcon/docker-test/redis/redis-3.0.4-1.fc23.x86_64/monitor_dockerfile b/netcon/docker-test/redis/redis-3.0.4-1.fc23.x86_64/monitor_dockerfile deleted file mode 100644 index e6cd65a3..00000000 --- a/netcon/docker-test/redis/redis-3.0.4-1.fc23.x86_64/monitor_dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -# ZT Network Containers Test Monitor -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -RUN yum -y install redis-3.0.4-1.fc23.x86_64 - -EXPOSE 9993/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD monitor_identity.public /var/lib/zerotier-one/identity.public -ADD monitor_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -ADD hello.lua / - -ADD zerotier-one / -ADD zerotier-cli / - -# Start ZeroTier-One -ADD monitor_entrypoint.sh /monitor_entrypoint.sh -RUN chmod -v +x /monitor_entrypoint.sh -CMD ["./monitor_entrypoint.sh"] diff --git a/netcon/docker-test/redis/redis-3.0.4-1.fc23.x86_64/monitor_entrypoint.sh b/netcon/docker-test/redis/redis-3.0.4-1.fc23.x86_64/monitor_entrypoint.sh deleted file mode 100644 index 087f50bb..00000000 --- a/netcon/docker-test/redis/redis-3.0.4-1.fc23.x86_64/monitor_entrypoint.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls *.conf) # blank test network config file -nwid="${nwconf%.*}" # test network id -netcon_wait_time=25 # wait for test container to come online -app_timeout_time=15 # app-specific timeout -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -fail=FAIL. # appended to result file in event of failure -ok=OK. # appended to result file in event of success -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) - - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test Monitor' -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-one -d -U -p9993 >>/tmp/zerotier-one.out 2>&1' -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` -done -echo '*** Starting Test...' -echo '*** Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Sleeping for (' "$netcon_wait_time" 's ) while we wait for the Network Container to come online...' -sleep "$netcon_wait_time"s -ncvirtip=$(<$address_file) - - -# --- Test section --- -echo '*** Running lua script against redis host at' $ncvirtip -redis-cli -h $ncvirtip EVAL "$(cat hello.lua)" 0 > redis_response.txt -response_string=$(<redis_response.txt) - -if [[ $response_string == *"welcome to the machine!"* ]] -then - echo 'REDIS RESPONSE OK' - touch "$file_path$ok$test_name.txt" - printf 'Test: redis-server responded!\n' >> "$file_path$ok$test_name.txt" -else - echo 'REDIS RESPONSE FAIL' - touch "$file_path$fail$test_name.txt" - printf 'Test: redis server did NOT respond!\n' >> "$file_path$fail$test_name.txt" -fi - - - - diff --git a/netcon/docker-test/redis/redis-3.0.4-1.fc23.x86_64/netcon_dockerfile b/netcon/docker-test/redis/redis-3.0.4-1.fc23.x86_64/netcon_dockerfile deleted file mode 100644 index c5b0773b..00000000 --- a/netcon/docker-test/redis/redis-3.0.4-1.fc23.x86_64/netcon_dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -# ZT Network Containers Test -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -# Install apps -RUN yum -y update -RUN yum -y install redis-3.0.4-1.fc23.x86_64 -RUN yum clean all - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD netcon_identity.public /var/lib/zerotier-one/identity.public -ADD netcon_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -EXPOSE 9993/udp 6379/udp - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -# Install syscall intercept library -ADD zerotier-intercept / -ADD libzerotierintercept.so / -RUN cp libzerotierintercept.so lib/libzerotierintercept.so -RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept -RUN /usr/bin/install -c zerotier-intercept /usr/bin - -ADD zerotier-cli / -Add zerotier-netcon-service / - -# Install test scripts -ADD netcon_entrypoint.sh /netcon_entrypoint.sh -RUN chmod -v +x /netcon_entrypoint.sh - -# Start ZeroTier-One -CMD ["./netcon_entrypoint.sh"] diff --git a/netcon/docker-test/redis/redis-3.0.4-1.fc23.x86_64/netcon_entrypoint.sh b/netcon/docker-test/redis/redis-3.0.4-1.fc23.x86_64/netcon_entrypoint.sh deleted file mode 100644 index b422d174..00000000 --- a/netcon/docker-test/redis/redis-3.0.4-1.fc23.x86_64/netcon_entrypoint.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls *.conf) # blank test network config file -nwid="${nwconf%.*}" # test network id -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) - - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test: ' "$test_name" -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-netcon-service -d -U -p9993 >>/tmp/zerotier-netcon-service.out 2>&1' -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` - dev=`/zerotier-cli listnetworks | grep -F "" | cut -d ' ' -f 8 | cut -d "_" -f 2 | sed "s/^<dev>//" | tr '\n' '\0'` -done -echo '*** Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Writing address to ' "$address_file" -echo $virtip4 > "$address_file" - -# --- Test section --- -echo '*** Starting application...' -sleep 0.5 - -export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_"$dev" -export LD_PRELOAD=./libzerotierintercept.so -/usr/bin/redis-server --port 6379 diff --git a/netcon/docker-test/sshd/openssh-server-7.1p1-3.fc23.x86_64/monitor_dockerfile b/netcon/docker-test/sshd/openssh-server-7.1p1-3.fc23.x86_64/monitor_dockerfile deleted file mode 100644 index d2d2a0cb..00000000 --- a/netcon/docker-test/sshd/openssh-server-7.1p1-3.fc23.x86_64/monitor_dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -# ZT Network Containers Test Monitor -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -EXPOSE 9993/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD monitor_identity.public /var/lib/zerotier-one/identity.public -ADD monitor_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -ADD zerotier-one / -ADD zerotier-cli / - -# Start ZeroTier-One -ADD monitor_entrypoint.sh /monitor_entrypoint.sh -RUN chmod -v +x /monitor_entrypoint.sh -CMD ["./monitor_entrypoint.sh"] diff --git a/netcon/docker-test/sshd/openssh-server-7.1p1-3.fc23.x86_64/monitor_entrypoint.sh b/netcon/docker-test/sshd/openssh-server-7.1p1-3.fc23.x86_64/monitor_entrypoint.sh deleted file mode 100644 index 0756bc6a..00000000 --- a/netcon/docker-test/sshd/openssh-server-7.1p1-3.fc23.x86_64/monitor_entrypoint.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls *.conf) # blank test network config file -nwid="${nwconf%.*}" # test network id -netcon_wait_time=25 # wait for test container to come online -app_timeout_time=15 # app-specific timeout -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -fail=FAIL. # appended to result file in event of failure -ok=OK. # appended to result file in event of success -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) -bigfile_name=bigfile # large, random test transfer file -rx_md5sumfile="$file_path"rx_"$bigfile_name"_md5sum"$tmp_ext" -tx_md5sumfile="$file_path"tx_"$bigfile_name"_md5sum"$tmp_ext" - - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test Monitor' -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -su daemon -s /bin/bash -c '/zerotier-one -d -U -p9993 >>/tmp/zerotier-one.out 2>&1' -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` -done -echo '*** Starting Test...' -echo '*** Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Sleeping for (' "$netcon_wait_time" 's ) while we wait for the Network Container to come online...' -sleep "$netcon_wait_time"s -ncvirtip=$(<$address_file) - - -# --- Test section --- -echo '*** Copying file to intercepted server at' $ncvirtip -touch "$bigfile_name" - -# Check md5 -md5sum < "$bigfile_name" > "$rx_md5sumfile" -tx_md5sum=$(<$tx_md5sumfile) - -# ... - - - - - - - - diff --git a/netcon/docker-test/sshd/openssh-server-7.1p1-3.fc23.x86_64/netcon_dockerfile b/netcon/docker-test/sshd/openssh-server-7.1p1-3.fc23.x86_64/netcon_dockerfile deleted file mode 100644 index 39e00a81..00000000 --- a/netcon/docker-test/sshd/openssh-server-7.1p1-3.fc23.x86_64/netcon_dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# ZT Network Containers Test -FROM fedora:23 -MAINTAINER https://www.zerotier.com/ - -# Install apps -RUN yum -y update -RUN yum -y install openssh-server -RUN yum clean all - -EXPOSE 9993/udp - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -ADD netcon_identity.public /var/lib/zerotier-one/identity.public -ADD netcon_identity.secret /var/lib/zerotier-one/identity.secret -ADD *.conf /var/lib/zerotier-one/networks.d/ -ADD *.conf / -ADD *.name / - -# Install LWIP library used by service -ADD liblwip.so /var/lib/zerotier-one/liblwip.so - -# Install syscall intercept library -ADD zerotier-intercept / -ADD libzerotierintercept.so / -RUN cp libzerotierintercept.so lib/libzerotierintercept.so -RUN ln -sf /lib/libzerotierintercept.so /lib/libzerotierintercept -RUN /usr/bin/install -c zerotier-intercept /usr/bin - -ADD zerotier-cli / - -# Install test scripts -ADD netcon_entrypoint.sh /netcon_entrypoint.sh -RUN chmod -v +x /netcon_entrypoint.sh - -# Start ZeroTier-One -CMD ["./netcon_entrypoint.sh"] diff --git a/netcon/docker-test/sshd/openssh-server-7.1p1-3.fc23.x86_64/netcon_entrypoint.sh b/netcon/docker-test/sshd/openssh-server-7.1p1-3.fc23.x86_64/netcon_entrypoint.sh deleted file mode 100644 index b52b9f69..00000000 --- a/netcon/docker-test/sshd/openssh-server-7.1p1-3.fc23.x86_64/netcon_entrypoint.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - - -# --- Test Parameters --- -test_namefile=$(ls *.name) -test_name="${test_namefile%.*}" # test network id -nwconf=$(ls *.conf) # blank test network config file -nwid="${nwconf%.*}" # test network id -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -tmp_ext=.tmp # temporary filetype used for sharing test data between containers -address_file="$file_path$test_name"_addr"$tmp_ext" # file shared between host and containers for sharing address (optional) -bigfile_name=bigfile -bigfile_size=10M # size of file we want to use for the test -tx_md5sumfile="$file_path"tx_"$bigfile_name"_md5sum"$tmp_ext" - - -# --- Network Config --- -echo '*** ZeroTier Network Containers Test: ' "$test_name" -chown -R daemon /var/lib/zerotier-one -chgrp -R daemon /var/lib/zerotier-one -./zerotier-one -d -U -p9993 -virtip4="" -while [ -z "$virtip4" ]; do - sleep 0.2 - virtip4=`/zerotier-cli listnetworks | grep -F $nwid | cut -d ' ' -f 9 | sed 's/,/\n/g' | grep -F '.' | cut -d / -f 1` - dev=`/zerotier-cli listnetworks | grep -F "" | cut -d ' ' -f 8 | cut -d "_" -f 2 | sed "s/^<dev>//" | tr '\n' '\0'` -done -echo '*** Up and running at' $virtip4 ' on network: ' $nwid -echo '*** Writing address to ' "$address_file" -echo $virtip4 > "$address_file" - -export ZT_NC_NWID=$dev - -# --- Test section --- -# Generate large random file for transfer test, share md5sum for monitor container to check -echo '*** Generating ' "$bigfile_size" ' file' -dd if=/dev/urandom of=/var/www/html/"$bigfile_name" bs="$bigfile_size" count=1 -md5sum < /var/www/html/"$bigfile_name" > "$tx_md5sumfile" -echo '*** Wrote MD5 sum to ' "$tx_md5sumfile" - -echo '*** Starting application...' -sleep 0.5 - -# wait for rsa public key from monitor -#while [ ! -s "$file_path$rsa_public_key_file" ]; do -# sleep 0.2 -#done - -zerotier-intercept /usr/sbin/sshd diff --git a/netcon/docker-test/test.sh b/netcon/docker-test/test.sh deleted file mode 100755 index 03e86011..00000000 --- a/netcon/docker-test/test.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -# Runs test images - -echo "*** Running unit tests..." - -# Remove previous test results -rm _results/*.txt - -# How long we shall wait for each test to conclude -export netcon_test_wait_time=60s - -# Test structure, in later releases more complex multi-party scripts will be included -export test_script=_two_party_test.sh - -# Iterate over all depth=2 (relatively-speaking) directories and perform each test -find . -mindepth 2 -maxdepth 2 -type d | while read testdir; do - - if [[ $testdir != *$1* ]] - then - continue - fi - - echo "*** Testing: '$testdir'..." - rm _results/*.tmp - - # Stage scripts - cp $test_script $testdir/$test_script - cd $testdir - - # Run test - ./$test_script - rm $test_script - - cd ../../ -done - -echo "*** Done" |