diff --git a/docker-test/._.DS_Store b/docker-test/._.DS_Store deleted file mode 100644 index b769b1a1e..000000000 Binary files a/docker-test/._.DS_Store and /dev/null differ diff --git a/docker-test/README.md b/docker-test/README.md deleted file mode 100644 index f3708e4d9..000000000 --- a/docker-test/README.md +++ /dev/null @@ -1,28 +0,0 @@ -To run unit tests: - -1) Place a blank network config file in this directory (e.g. "e5cd7a9e1c5311ab.conf") - - This will be used to inform test-specific scripts what network to use for testing (create your own, or use the given at your own risk) - -2) run build.sh - - Builds ZeroTier with Network Containers enabled - - Builds LWIP library - - Builds library harness - - Copies all aformentioned files into unit test directory to be used for building docker files - -3) run test.sh - - Will (for now, one at a time), execute each unit test's (test.sh) - - - -A) Each unit test's test.sh will: - - temporarily copy all built files into local directory - - build test container - - build monitor container - - remove temporary files - - run each container and perform test - -B) Results will be written to the 'zerotierone/docker-test/_result' directory - - Results will be a combination of raw and formatted dumps to files whose names reflect the test performed - - In the event of failure, 'FAIL.' will be appended to the result file's name - - (e.g. FAIL.my_application_1.0.2.x86_64) - - In the event of success, 'OK.' will be appended diff --git a/docker-test/_results/._.DS_Store b/docker-test/_results/._.DS_Store deleted file mode 100644 index 433b5ca14..000000000 Binary files a/docker-test/_results/._.DS_Store and /dev/null differ diff --git a/docker-test/_results/httpd_bigfile_addr.txt b/docker-test/_results/httpd_bigfile_addr.txt deleted file mode 100644 index c87fdd9e5..000000000 --- a/docker-test/_results/httpd_bigfile_addr.txt +++ /dev/null @@ -1 +0,0 @@ -172.30.238.230 diff --git a/docker-test/build.sh b/docker-test/build.sh deleted file mode 100755 index d9310a5d1..000000000 --- a/docker-test/build.sh +++ /dev/null @@ -1,19 +0,0 @@ -cd ../ - -make clean -make -cd netcon -make -f make-intercept.mk lib -rm *.o -rm liblwip.so -make -f make-liblwip.mk - -cd ../docker-test/ - -cp ../zerotier-one zerotier-one -cp ../zerotier-cli zerotier-cli - -cp ../netcon/liblwip.so liblwip.so -cp ../netcon/libintercept.so.1.0 libintercept.so.1.0 -cp ../netcon/intercept intercept - diff --git a/docker-test/e5cd7a9e1c5311ab.conf b/docker-test/e5cd7a9e1c5311ab.conf deleted file mode 100644 index e69de29bb..000000000 diff --git a/docker-test/httpd/._.DS_Store b/docker-test/httpd/._.DS_Store deleted file mode 100644 index 199b64484..000000000 Binary files a/docker-test/httpd/._.DS_Store and /dev/null differ diff --git a/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/README.md b/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/README.md deleted file mode 100644 index 008fcac8f..000000000 --- a/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/README.md +++ /dev/null @@ -1,8 +0,0 @@ -Network Containers Test Sequence for: httpd_demo - -1) Creates a Netcon docker container with an intercepted instance of httpd -2) Creates a test monitor container - -3) Test monitor container waits for X seconds for the Netcon container to come online -4) Test monitor attempts to curl an index.html file - - If file is of sufficient size, it will append "OK." to the result file for this test, otherwise "FAIL." is appended diff --git a/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/monitor_dockerfile b/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/monitor_dockerfile deleted file mode 100644 index 208b0ad63..000000000 --- a/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 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/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/monitor_entrypoint.sh b/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/monitor_entrypoint.sh deleted file mode 100644 index 792be8b27..000000000 --- a/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/monitor_entrypoint.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - -# Parameters for test -test_name=httpd_bigfile -nwid=$(ls *.conf) # test network (assume *.conf file in root directory is where we want to test) -netcon_wait_time=45 # wait for test container to come online -app_timeout_time=10 # 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 -address_file="$file_path$test_name"_addr.txt # file shared between host and containers for sharing address (optional) -tmp=/test/ # for storage of large transfer test files, things that shouldn't be shared with host -bigfile=bigfile # large, random test transfer file - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - -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/"$nwid".conf ]; 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 30s while we wait for the Network Container to come online...' -sleep "$netcon_wait_time"s -ncvirtip=$(<$address_file) -echo '*** Curling from intercepted server at' $ncvirtip -rm -rf "$file_path"*."$file_base" -touch "$tmp$bigfile" - -# Perform test -# curl --connect-timeout "$app_timeout_time" -v -o "$file_path$file_base" http://"$ncvirtip"/index.html - -# Large transfer test -mkdir -p "$tmp" -curl --connect-timeout "$app_timeout_time" -v -o "$tmp$bigfile" http://"$ncvirtip"/"$bigfile" - -# Test outcome logic -minimumsize=39550 -actualsize=$(wc -c <"$tmp$bigfile") -if [ $actualsize -ge $minimumsize ]; then - echo 'OK' - touch "$file_path$ok$file_base" - #mv "$file_path$file_base" "$file_path$ok$file_base" -else - echo 'FAIL' - touch "$file_path$fail$file_base" - #mv "$file_path$file_base" "$file_path$fail$file_base" -fi \ No newline at end of file diff --git a/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/netcon_dockerfile b/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/netcon_dockerfile deleted file mode 100644 index 8aee457a9..000000000 --- a/docker-test/httpd/httpd-2.4.16-1.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 httpd-2.4.16-1.fc23.x86_64 -RUN yum clean all - -EXPOSE 9993/udp - -# Install syscall intercept library -ADD intercept / -ADD libintercept.so.1.0 / -RUN cp libintercept.so.1.0 lib/libintercept.so.1.0 -RUN cp libintercept.so.1.0 /lib/libintercept.so.1.0 -RUN ln -sf /lib/libintercept.so.1.0 /lib/libintercept -RUN /usr/bin/install -c 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 zerotier-one / -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/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/netcon_entrypoint.sh b/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/netcon_entrypoint.sh deleted file mode 100644 index c2158b7cf..000000000 --- a/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/netcon_entrypoint.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -# Parameters for test -test_name=httpd_bigfile -nwid=$(ls *.conf) # test network -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -address_file="$file_path$test_name"_addr.txt # file shared between host and containers for sharing address (optional) -bigfile_size=10M - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - -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/"$nwid".conf ]; 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 $virtip4 > "$address_file" - -# Generate large random file for transfer test -echo '*** Generating ' "$bigfile_size" ' file' -dd if=/dev/urandom of=/var/www/html/bigfile bs="$bigfile_size" count=1 - -echo '*** Starting Apache...' -sleep 0.5 -rm -rf /run/httpd/* /tmp/httpd* -intercept /usr/sbin/httpd -D FOREGROUND >>/tmp/apache.out 2>&1 diff --git a/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/test.sh b/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/test.sh deleted file mode 100755 index f80c97a80..000000000 --- a/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/test.sh +++ /dev/null @@ -1,40 +0,0 @@ - -testname=${PWD##*/} -echo 'Building dockerfiles for test: ' "$testname" - -# 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 ../../intercept intercept -cp ../../libintercept.so.1.0 libintercept.so.1.0 -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="$testname" -f netcon_dockerfile . -docker build --tag="$testname"_monitor -f monitor_dockerfile . - -rm -f zerotier-one -rm -f zerotier-cli -rm -f intercept -rm -f libintercept.so.1.0 -rm -f liblwip.so -rm -f netcon_identity.public -rm -f netcon_identity.secret -rm -f monitor_identity.public -rm -f monitor_identity.secret -rm -f *.conf - -# Start netcon container to be tested -docker run -d -it -v $PWD/../../_results:/opt/results --device=/dev/net/tun "$testname":latest -docker run -d -it -v $PWD/../../_results:/opt/results --device=/dev/net/tun "$testname"_monitor:latest - -sleep 45s -docker kill $(docker ps -a -q) - -#docker ps -a -q --filter="name=httpd_demo" -#docker ps -a -q --filter="name=httpd_demo_monitor" -#rm -rf ../../_tmp/*.txt \ No newline at end of file diff --git a/docker-test/httpd/httpd_demo/._.DS_Store b/docker-test/httpd/httpd_demo/._.DS_Store deleted file mode 100644 index 9047cbae9..000000000 Binary files a/docker-test/httpd/httpd_demo/._.DS_Store and /dev/null differ diff --git a/docker-test/httpd/httpd_demo/README.md b/docker-test/httpd/httpd_demo/README.md deleted file mode 100644 index 008fcac8f..000000000 --- a/docker-test/httpd/httpd_demo/README.md +++ /dev/null @@ -1,8 +0,0 @@ -Network Containers Test Sequence for: httpd_demo - -1) Creates a Netcon docker container with an intercepted instance of httpd -2) Creates a test monitor container - -3) Test monitor container waits for X seconds for the Netcon container to come online -4) Test monitor attempts to curl an index.html file - - If file is of sufficient size, it will append "OK." to the result file for this test, otherwise "FAIL." is appended diff --git a/docker-test/httpd/httpd_demo/htdocs/ZeroTierIcon.png b/docker-test/httpd/httpd_demo/htdocs/ZeroTierIcon.png deleted file mode 100644 index 4d9641b34..000000000 Binary files a/docker-test/httpd/httpd_demo/htdocs/ZeroTierIcon.png and /dev/null differ diff --git a/docker-test/httpd/httpd_demo/htdocs/index.html b/docker-test/httpd/httpd_demo/htdocs/index.html deleted file mode 100644 index 017e44933..000000000 --- a/docker-test/httpd/httpd_demo/htdocs/index.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - ZeroTier Network Containers Preview - - - -

- -
-
-
-
-

ZeroTier Network Containers Preview

- (a.k.a. super bleeding edge pre-alphe pre-release demo) -
-
-
- -
-
-
- -
- -

This page is being served from a Docker container with its own private TCP/IP microservice.

- -

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

- -

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

- -

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

- -

-It's a bit like how networking would work on a microkernel: modular, composable, portable, and independent. -

- -

-Network Containers allows a Docker (or LXC, CoreOS/rkt, runc, OpenVZ, SmartOS/Triton, bocker, or even just bare metal Linux) system to connect to virtual networks without requiring any 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. -

- -

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

- -

-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 blog or @zerotier for updates and announcements. -

- -

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

- -
- -
- - - diff --git a/docker-test/httpd/httpd_demo/monitor_dockerfile b/docker-test/httpd/httpd_demo/monitor_dockerfile deleted file mode 100644 index 0543ccdc0..000000000 --- a/docker-test/httpd/httpd_demo/monitor_dockerfile +++ /dev/null @@ -1,23 +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 -RUN touch /var/lib/zerotier-one/networks.d/e5cd7a9e1c5311ab.conf -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/docker-test/httpd/httpd_demo/monitor_entrypoint.sh b/docker-test/httpd/httpd_demo/monitor_entrypoint.sh deleted file mode 100644 index 50aedae60..000000000 --- a/docker-test/httpd/httpd_demo/monitor_entrypoint.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash - -# Parameters for test -test_name=httpd_demo -nwid=e5cd7a9e1c5311ab # test network -netcon_wait_time=45 # wait for test container to come online -app_timeout_time=10 # 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 -address_file="$file_path$test_name"_addr.txt # file shared between host and containers for sharing address (optional) - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - -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/"$nwid".conf ]; 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 -echo '*** Sleeping for 30s while we wait for the Network Container to come online...' -sleep "$netcon_wait_time"s -ncvirtip=$(<$address_file) -echo '*** Curling from intercepted server at' $ncvirtip -rm -rf "$file_path"*."$file_base" -touch "$file_path$file_base" - -# Perform test -curl --connect-timeout "$app_timeout_time" -v -o "$file_path$file_base" http://"$ncvirtip"/index.html - -# Test outcome logic -minimumsize=3955 -actualsize=$(wc -c <"$file_path$file_base") -if [ $actualsize -ge $minimumsize ]; then - echo 'OK' - mv "$file_path$file_base" "$file_path$ok$file_base" -else - echo 'FAIL' - mv "$file_path$file_base" "$file_path$fail$file_base" -fi \ No newline at end of file diff --git a/docker-test/httpd/httpd_demo/netcon_dockerfile b/docker-test/httpd/httpd_demo/netcon_dockerfile deleted file mode 100644 index bcc029c2b..000000000 --- a/docker-test/httpd/httpd_demo/netcon_dockerfile +++ /dev/null @@ -1,44 +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 -RUN yum clean all - -#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 - -EXPOSE 9993/udp - -# Install syscall intercept library -ADD intercept / -ADD libintercept.so.1.0 / -RUN cp libintercept.so.1.0 lib/libintercept.so.1.0 -RUN cp libintercept.so.1.0 /lib/libintercept.so.1.0 -RUN ln -sf /lib/libintercept.so.1.0 /lib/libintercept -RUN /usr/bin/install -c 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 -RUN touch /var/lib/zerotier-one/networks.d/e5cd7a9e1c5311ab.conf -ADD zerotier-one / -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/docker-test/httpd/httpd_demo/netcon_entrypoint.sh b/docker-test/httpd/httpd_demo/netcon_entrypoint.sh deleted file mode 100644 index ee6c13519..000000000 --- a/docker-test/httpd/httpd_demo/netcon_entrypoint.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -# Parameters for test -test_name=httpd_demo -nwid=e5cd7a9e1c5311ab # test network -file_path=/opt/results/ # test result output file path (fs shared between host and containers) -file_base="$test_name".txt # test result output file -address_file="$file_path$test_name"_addr.txt # file shared between host and containers for sharing address (optional) - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - -echo '*** ZeroTier Network Containers Test: httpd_demo' -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/"$nwid".conf ]; 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 Apache...' -echo '*** Up and running at' $virtip4 -echo $virtip4 > "$address_file" - -sleep 0.5 -rm -rf /run/httpd/* /tmp/httpd* -intercept /usr/sbin/httpd -D FOREGROUND >>/tmp/apache.out 2>&1 diff --git a/docker-test/httpd/httpd_demo/test.sh b/docker-test/httpd/httpd_demo/test.sh deleted file mode 100755 index 38904dcd5..000000000 --- a/docker-test/httpd/httpd_demo/test.sh +++ /dev/null @@ -1,37 +0,0 @@ - -# Docker won't allow the inclusion of files outside of the build directory -cp ../../zerotier-one zerotier-one -cp ../../zerotier-cli zerotier-cli -cp ../../intercept intercept -cp ../../libintercept.so.1.0 libintercept.so.1.0 -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="httpd_demo" -f netcon_dockerfile . -docker build --tag="httpd_demo_monitor" -f monitor_dockerfile . - -rm -f zerotier-one -rm -f zerotier-cli -rm -f intercept -rm -f libintercept.so.1.0 -rm -f liblwip.so -rm -f netcon_identity.public -rm -f netcon_identity.secret -rm -f monitor_identity.public -rm -f monitor_identity.secret - -# Start netcon container to be tested -docker run -d -it -v $PWD/../../_results:/opt/results --device=/dev/net/tun httpd_demo:latest -#./start_monitor.sh -docker run -d -it -v $PWD/../../_results:/opt/results --device=/dev/net/tun httpd_demo_monitor:latest - -sleep 45s -docker kill $(docker ps -a -q) -#docker ps -a -q --filter="name=httpd_demo" -#docker ps -a -q --filter="name=httpd_demo_monitor" - -#rm -rf ../../_tmp/*.txt \ No newline at end of file diff --git a/docker-test/intercept b/docker-test/intercept deleted file mode 100755 index 3eb27ff7b..000000000 --- a/docker-test/intercept +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh -# usage: -# /usr/bin/intercept program - -if [ $# = 0 ] ; then - echo "$0: insufficient arguments" - exit -fi - -case "$1" in - on) - if [ -z "$LD_PRELOAD" ] - then - export LD_PRELOAD="/lib/libintercept.so.1.0" - else - echo $LD_PRELOAD | grep -q "/lib/libintercept\.so.1.0" || \ - export LD_PRELOAD="/lib/libintercept.so $LD_PRELOAD" - fi - ;; - off) - export LD_PRELOAD=`echo -n $LD_PRELOAD | sed 's/\/lib\/libintercept.so.1.0 \?//'` - if [ -z "$LD_PRELOAD" ] - then - unset LD_PRELOAD - fi - ;; - show|sh) - echo "LD_PRELOAD=\"$LD_PRELOAD\"" - ;; - -h|-?) - echo "" - ;; - *) - if [ -z "$LD_PRELOAD" ] - then - export LD_PRELOAD="/lib/libintercept.so.1.0" - else - echo $LD_PRELOAD | grep -q "/lib/libintercept\.so.1.0" || \ - export LD_PRELOAD="/lib/libintercept.so.1.0 $LD_PRELOAD" - fi - - if [ $# = 0 ] - then - ${SHELL:-/bin/sh} - fi - - if [ $# -gt 0 ] - then - exec "$@" - fi - ;; -esac - -#EOF diff --git a/docker-test/libintercept.so.1.0 b/docker-test/libintercept.so.1.0 deleted file mode 100755 index 163b1ac2e..000000000 Binary files a/docker-test/libintercept.so.1.0 and /dev/null differ diff --git a/docker-test/liblwip.so b/docker-test/liblwip.so deleted file mode 100755 index 158169f1b..000000000 Binary files a/docker-test/liblwip.so and /dev/null differ diff --git a/docker-test/monitor_identity.public b/docker-test/monitor_identity.public deleted file mode 100644 index 36b8ec695..000000000 --- a/docker-test/monitor_identity.public +++ /dev/null @@ -1 +0,0 @@ -ba2488cd53:0:a8bd3d0febd1da023b11382f45df6d246be9407ac62dc32c0c60aa2b96d3df15aa303a0eb28297916f7bcdbcd73a960f404a202f336cd35103d837bce1fb896f \ No newline at end of file diff --git a/docker-test/monitor_identity.secret b/docker-test/monitor_identity.secret deleted file mode 100644 index 6f06053e9..000000000 --- a/docker-test/monitor_identity.secret +++ /dev/null @@ -1 +0,0 @@ -ba2488cd53:0:a8bd3d0febd1da023b11382f45df6d246be9407ac62dc32c0c60aa2b96d3df15aa303a0eb28297916f7bcdbcd73a960f404a202f336cd35103d837bce1fb896f:07d0caef50f3c94897035a954cdc73dc391f77a267caa54d52d4841edbec24388d601d27522d415a943764f9c91b7870754c08b4e04780b29c7c69edade2f638 \ No newline at end of file diff --git a/docker-test/netcon_identity.public b/docker-test/netcon_identity.public deleted file mode 100644 index 7ee337563..000000000 --- a/docker-test/netcon_identity.public +++ /dev/null @@ -1 +0,0 @@ -e5b0e7dc2a:0:f257ee08ad335ef87caf30598a5a17a758f193da58085b7b471c9cc48413585cba5e7830c23508907a2f991308a7ddc01912023cc454a7de80cdad68edebcc63 \ No newline at end of file diff --git a/docker-test/netcon_identity.secret b/docker-test/netcon_identity.secret deleted file mode 100644 index 05c101329..000000000 --- a/docker-test/netcon_identity.secret +++ /dev/null @@ -1 +0,0 @@ -e5b0e7dc2a:0:f257ee08ad335ef87caf30598a5a17a758f193da58085b7b471c9cc48413585cba5e7830c23508907a2f991308a7ddc01912023cc454a7de80cdad68edebcc63:21e5f68984b729acdaedd6c4c057d0a5447cefa66ec5de8d10982f77efc148e65ce954ee17604716398a91ab74563b0b25263f84b45cecd97fa1bc35d1ef2bd7 \ No newline at end of file diff --git a/docker-test/redis/._.DS_Store b/docker-test/redis/._.DS_Store deleted file mode 100644 index 85f5a655a..000000000 Binary files a/docker-test/redis/._.DS_Store and /dev/null differ diff --git a/docker-test/redis/redis-3.0.4-1.fc23.x86_64/Dockerfile b/docker-test/redis/redis-3.0.4-1.fc23.x86_64/Dockerfile deleted file mode 100644 index 77a1a26a0..000000000 --- a/docker-test/redis/redis-3.0.4-1.fc23.x86_64/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -# ZT Netcon Throughput 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 -RUN yum -y install nano -RUN yum -y install strace -RUN yum clean all - -EXPOSE 9993/udp 9992/udp 9991/udp 9990/udp - -# Install sys-call intercept library -ADD intercept / -ADD libintercept.so.1.0 / -RUN cp libintercept.so.1.0 lib/libintercept.so.1.0 -RUN cp libintercept.so.1.0 /lib/libintercept.so.1.0 -RUN ln -sf /lib/libintercept.so.1.0 /lib/libintercept -RUN /usr/bin/install -c intercept /usr/bin - -# Add ZT files -RUN mkdir -p /var/lib/zerotier-one/networks.d -RUN touch /var/lib/zerotier-one/networks.d/e5cd7a9e1c5311ab.conf -ADD zerotier-one / -ADD zerotier-cli / - -# Install test-setup scripts -ADD generate_file.sh /generate_file.sh -RUN chmod -v +x /generate_file.sh -ADD entrypoint.sh /entrypoint.sh -RUN chmod -v +x /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 ["./entrypoint.sh"] diff --git a/docker-test/redis/redis-3.0.4-1.fc23.x86_64/entrypoint.sh b/docker-test/redis/redis-3.0.4-1.fc23.x86_64/entrypoint.sh deleted file mode 100644 index 00fdd2be6..000000000 --- a/docker-test/redis/redis-3.0.4-1.fc23.x86_64/entrypoint.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/ - -echo '***' -echo '*** ZeroTier Network Containers Test Image' -echo '*** https://www.zerotier.com/' -echo '***' - -./zerotier-one & -./zerotier-cli join e5cd7a9e1c5311ab -./zerotier-cli listnetworks - - diff --git a/docker-test/redis/redis-3.0.4-1.fc23.x86_64/generate_file.sh b/docker-test/redis/redis-3.0.4-1.fc23.x86_64/generate_file.sh deleted file mode 100644 index ac5b24338..000000000 --- a/docker-test/redis/redis-3.0.4-1.fc23.x86_64/generate_file.sh +++ /dev/null @@ -1 +0,0 @@ -dd if=/dev/urandom of=/var/www/html/big bs=100M count=1 diff --git a/docker-test/test.sh b/docker-test/test.sh deleted file mode 100755 index c183815ee..000000000 --- a/docker-test/test.sh +++ /dev/null @@ -1,3 +0,0 @@ -/httpd/httpd_demo/test.sh -/httpd/httpd-2.4.16-1.fc23.x86_64/test.sh - diff --git a/docker-test/zerotier-cli b/docker-test/zerotier-cli deleted file mode 100755 index ff17df847..000000000 Binary files a/docker-test/zerotier-cli and /dev/null differ diff --git a/docker-test/zerotier-one b/docker-test/zerotier-one deleted file mode 100755 index ff17df847..000000000 Binary files a/docker-test/zerotier-one and /dev/null differ