summaryrefslogtreecommitdiff
path: root/netcon/docker-test/httpd
diff options
context:
space:
mode:
authorJoseph Henry <josephjah@gmail.com>2015-12-03 07:11:33 -0800
committerJoseph Henry <josephjah@gmail.com>2015-12-03 07:11:33 -0800
commit5c5943a00c38f2540c6d30616e1b48222d1fa6c2 (patch)
treee74a2e560da873bb1f1d3f3c54b274a9d83054b3 /netcon/docker-test/httpd
parent201109a7a0025cf893a22cd62fd5244932391ef4 (diff)
downloadinfinitytier-5c5943a00c38f2540c6d30616e1b48222d1fa6c2.tar.gz
infinitytier-5c5943a00c38f2540c6d30616e1b48222d1fa6c2.zip
(fixed) test script liblwip.so placement, also streamlined test logic
Diffstat (limited to 'netcon/docker-test/httpd')
-rw-r--r--netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/monitor_dockerfile8
-rw-r--r--netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/monitor_entrypoint.sh12
-rw-r--r--netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/netcon_dockerfile10
-rw-r--r--netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/netcon_entrypoint.sh8
-rwxr-xr-xnetcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/test.sh40
-rw-r--r--netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/monitor_dockerfile8
-rw-r--r--netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/monitor_entrypoint.sh12
-rw-r--r--netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/netcon_dockerfile10
-rw-r--r--netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/netcon_entrypoint.sh8
-rwxr-xr-xnetcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/test.sh40
-rwxr-xr-xnetcon/docker-test/httpd/httpd_demo/test.sh40
11 files changed, 20 insertions, 176 deletions
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
index 08f08ae1..e8f803cd 100644
--- 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
@@ -4,6 +4,9 @@ MAINTAINER https://www.zerotier.com/
EXPOSE 9993/udp
+# Install LWIP library used by service
+ADD liblwip.so /var/lib/zerotier-one/liblwip.so
+
# Add ZT files
RUN mkdir -p /var/lib/zerotier-one/networks.d
ADD monitor_identity.public /var/lib/zerotier-one/identity.public
@@ -14,11 +17,6 @@ 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
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
index 79d4391d..9e8f7253 100644
--- 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
@@ -26,15 +26,7 @@ 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`
@@ -63,7 +55,7 @@ tx_md5sum=$(<$tx_md5sumfile)
echo '*** Comparing md5: ' "$rx_md5sum" ' and ' "$tx_md5sum"
-if [ $rx_md5sum != $tx_md5sum ];
+if [ "$rx_md5sum" != "$tx_md5sum" ];
then
echo 'MD5 FAIL'
touch "$file_path$fail$test_name.txt"
@@ -72,6 +64,8 @@ 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
index bc7aeb29..3de8ed3f 100644
--- 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
@@ -7,7 +7,10 @@ RUN yum -y update
RUN yum -y install httpd-2.4.16-1.fc23.x86_64
RUN yum clean all
-EXPOSE 9993/udp
+EXPOSE 9993/udp 80/udp
+
+# Install LWIP library used by service
+ADD liblwip.so /var/lib/zerotier-one/liblwip.so
# Install syscall intercept library
ADD zerotier-intercept /
@@ -32,10 +35,5 @@ ADD zerotier-cli /
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-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
index fd47cf38..37277d53 100644
--- 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
@@ -22,15 +22,7 @@ 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`
diff --git a/netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/test.sh b/netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/test.sh
deleted file mode 100755
index fa8daddd..00000000
--- a/netcon/docker-test/httpd/httpd-2.4.16-1.fc23.x86_64/test.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-
-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-intercept zerotier-intercept
-cp ../../libzerotierintercept.so.1.0 libzerotierintercept.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="$test_name" -f netcon_dockerfile .
-docker build --tag="$test_name"_monitor -f monitor_dockerfile .
-
-rm -f zerotier-one
-rm -f zerotier-cli
-rm -f zerotier-intercept
-rm -f libzerotierintercept.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
-rm -f *.name
-
-# Start netcon container to be tested
-docker run -d -it -v $PWD/../../_results:/opt/results --device=/dev/net/tun "$test_name":latest
-docker run -d -it -v $PWD/../../_results:/opt/results --device=/dev/net/tun "$test_name"_monitor:latest
-
-sleep 45s
-docker kill $(docker ps -a -q)
-
-rm -rf ../../_results/*.tmp \ No newline at end of file
diff --git a/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/monitor_dockerfile b/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/monitor_dockerfile
index 08f08ae1..e8f803cd 100644
--- a/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/monitor_dockerfile
+++ b/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/monitor_dockerfile
@@ -4,6 +4,9 @@ MAINTAINER https://www.zerotier.com/
EXPOSE 9993/udp
+# Install LWIP library used by service
+ADD liblwip.so /var/lib/zerotier-one/liblwip.so
+
# Add ZT files
RUN mkdir -p /var/lib/zerotier-one/networks.d
ADD monitor_identity.public /var/lib/zerotier-one/identity.public
@@ -14,11 +17,6 @@ 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
diff --git a/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/monitor_entrypoint.sh b/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/monitor_entrypoint.sh
index 79d4391d..9e8f7253 100644
--- a/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/monitor_entrypoint.sh
+++ b/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/monitor_entrypoint.sh
@@ -26,15 +26,7 @@ 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`
@@ -63,7 +55,7 @@ tx_md5sum=$(<$tx_md5sumfile)
echo '*** Comparing md5: ' "$rx_md5sum" ' and ' "$tx_md5sum"
-if [ $rx_md5sum != $tx_md5sum ];
+if [ "$rx_md5sum" != "$tx_md5sum" ];
then
echo 'MD5 FAIL'
touch "$file_path$fail$test_name.txt"
@@ -72,6 +64,8 @@ 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.17-3.fc23.x86_64/netcon_dockerfile b/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/netcon_dockerfile
index cce18b81..3a17acdd 100644
--- a/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/netcon_dockerfile
+++ b/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/netcon_dockerfile
@@ -7,7 +7,10 @@ RUN yum -y update
RUN yum -y install httpd-2.4.17-3.fc23.x86_64
RUN yum clean all
-EXPOSE 9993/udp
+EXPOSE 9993/udp 80/udp
+
+# Install LWIP library used by service
+ADD liblwip.so /var/lib/zerotier-one/liblwip.so
# Install syscall intercept library
ADD zerotier-intercept /
@@ -32,10 +35,5 @@ ADD zerotier-cli /
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-2.4.17-3.fc23.x86_64/netcon_entrypoint.sh b/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/netcon_entrypoint.sh
index fd47cf38..37277d53 100644
--- a/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/netcon_entrypoint.sh
+++ b/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/netcon_entrypoint.sh
@@ -22,15 +22,7 @@ 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`
diff --git a/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/test.sh b/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/test.sh
deleted file mode 100755
index fa8daddd..00000000
--- a/netcon/docker-test/httpd/httpd-2.4.17-3.fc23.x86_64/test.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-
-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-intercept zerotier-intercept
-cp ../../libzerotierintercept.so.1.0 libzerotierintercept.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="$test_name" -f netcon_dockerfile .
-docker build --tag="$test_name"_monitor -f monitor_dockerfile .
-
-rm -f zerotier-one
-rm -f zerotier-cli
-rm -f zerotier-intercept
-rm -f libzerotierintercept.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
-rm -f *.name
-
-# Start netcon container to be tested
-docker run -d -it -v $PWD/../../_results:/opt/results --device=/dev/net/tun "$test_name":latest
-docker run -d -it -v $PWD/../../_results:/opt/results --device=/dev/net/tun "$test_name"_monitor:latest
-
-sleep 45s
-docker kill $(docker ps -a -q)
-
-rm -rf ../../_results/*.tmp \ No newline at end of file
diff --git a/netcon/docker-test/httpd/httpd_demo/test.sh b/netcon/docker-test/httpd/httpd_demo/test.sh
deleted file mode 100755
index fa8daddd..00000000
--- a/netcon/docker-test/httpd/httpd_demo/test.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-
-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-intercept zerotier-intercept
-cp ../../libzerotierintercept.so.1.0 libzerotierintercept.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="$test_name" -f netcon_dockerfile .
-docker build --tag="$test_name"_monitor -f monitor_dockerfile .
-
-rm -f zerotier-one
-rm -f zerotier-cli
-rm -f zerotier-intercept
-rm -f libzerotierintercept.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
-rm -f *.name
-
-# Start netcon container to be tested
-docker run -d -it -v $PWD/../../_results:/opt/results --device=/dev/net/tun "$test_name":latest
-docker run -d -it -v $PWD/../../_results:/opt/results --device=/dev/net/tun "$test_name"_monitor:latest
-
-sleep 45s
-docker kill $(docker ps -a -q)
-
-rm -rf ../../_results/*.tmp \ No newline at end of file