mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-20 05:13:58 -07:00
Moved/Renamed Docker test dirs
This commit is contained in:
parent
134ad8ac21
commit
19f09e46fa
18 changed files with 3 additions and 3 deletions
39
docker-test/throughput/Dockerfile
Normal file
39
docker-test/throughput/Dockerfile
Normal file
|
@ -0,0 +1,39 @@
|
|||
# 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.16-1.fc23
|
||||
RUN yum -y install nano
|
||||
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"]
|
16
docker-test/throughput/build.sh
Executable file
16
docker-test/throughput/build.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
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/throughput-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
|
||||
|
14
docker-test/throughput/entrypoint.sh
Normal file
14
docker-test/throughput/entrypoint.sh
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/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
|
||||
|
||||
|
1
docker-test/throughput/generate_file.sh
Normal file
1
docker-test/throughput/generate_file.sh
Normal file
|
@ -0,0 +1 @@
|
|||
dd if=/dev/urandom of=/var/www/html/bigfile bs=100M count=1
|
54
docker-test/throughput/intercept
Executable file
54
docker-test/throughput/intercept
Executable file
|
@ -0,0 +1,54 @@
|
|||
#!/bin/sh
|
||||
# usage:
|
||||
# /usr/bin/intercept program <args>
|
||||
|
||||
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
|
BIN
docker-test/throughput/libintercept.so.1.0
Executable file
BIN
docker-test/throughput/libintercept.so.1.0
Executable file
Binary file not shown.
BIN
docker-test/throughput/liblwip.so
Executable file
BIN
docker-test/throughput/liblwip.so
Executable file
Binary file not shown.
BIN
docker-test/throughput/zerotier-cli
Executable file
BIN
docker-test/throughput/zerotier-cli
Executable file
Binary file not shown.
BIN
docker-test/throughput/zerotier-one
Executable file
BIN
docker-test/throughput/zerotier-one
Executable file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue