contrib/docker: resperf - use SIGTERM to shut off kresd

parent 204fb9fd
Pipeline #43087 passed with stage
in 1 minute and 18 seconds
FROM ubuntu:latest
MAINTAINER Knot Resolver <knot-resolver@labs.nic.cz>
CMD ["tail", "-f", "/dev/null"]
RUN apt-get update
RUN apt-get install -y -qqq git wget build-essential bind9utils libbind-dev libssl-dev libkrb5-dev libcap-dev libxml2-dev libjson-c-dev libgeoip-dev
......@@ -11,4 +9,6 @@ RUN cd /var/opt; git clone https://github.com/akamai/dnsperf.git
WORKDIR /var/opt/dnsperf
RUN ./configure && make && make install
RUN wget -q https://gitlab.labs.nic.cz/knot/respdiff/uploads/9b95b53c04091849023b12b992edad0e/shortlist -O shortlist
RUN wget -q https://gitlab.labs.nic.cz/knot/respdiff/uploads/45c21d26fb1c1c06cb00f0aeb34742c7/shortlist3 -O shortlist
ENTRYPOINT ["resperf"]
......@@ -52,9 +52,3 @@ services:
{%- endif -%}
{%- endfor -%}
{%- if resperf %}
resperf:
network_mode: host
image: registry.labs.nic.cz/knot/respdiff/resperf:latest
{%- endif -%}
......@@ -5,6 +5,7 @@ JOBNAME=j$1.$2
exit_handler() {
exitcode=$?
docker-compose --no-ansi logs &>>${JOBNAME}_kresd.docker.txt || :
docker-compose --no-ansi rm -fsv || :
echo "$exitcode" > ${JOBNAME}_exitcode
}
......@@ -77,8 +78,7 @@ for i in $(seq 3); do
# Execute resperf
docker-compose --no-ansi up -d
docker-compose --no-ansi exec -T resperf resperf -q 500000 -m 10000 -C 200 -c 30 -d shortlist -t 15 -r 0 -s 127.0.0.1 -p {{ resperf['port'] }} &>>${JOBNAME}_resperf.txt
docker-compose --no-ansi logs &>>${JOBNAME}_kresd.docker.txt
docker-compose --no-ansi ps | (! grep Exit)
docker-compose --no-ansi kill
docker run registry.labs.nic.cz/knot/respdiff/resperf:shortlist3 -q 500000 -m 10000 -C 200 -c 30 -d shortlist -t 15 -r 0 -s 127.0.0.1 -p {{ resperf['port'] }} &>>${JOBNAME}_resperf.txt
docker-compose --no-ansi stop
docker-compose --no-ansi ps | (! grep 'Exit [1-9]')
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment