test blue/green etc.
706
-- ver: |...Default.Backend............| 0.1
-- ver: |...404.Not.Found.-.Error.Page.| 0.2
-- ver: |1.1|...|...||blue.|.....|.....|
-- ver: |...|1.2|...||blue.|.....|.....|
-- ver: |...|...|1.3||blue.|.....|.....|
-- ver: |2.1|...|...||.....|green|.....|
-- ver: |...|2.2|...||.....|green|.....|
-- ver: |...|...|2.3||.....|green|.....|
-- ver: |3.1|...|...||.....|.....|red..|
-- ver: |...|3.2|...||.....|.....|red..|
-- ver: |...|...|3.3||.....|.....|red..|
docker run -d --rm -p 8080:80 therafk/httpd:1.1
while true; do curl -s localhost:8081 | grep "ver:" ; sleep 1; done
while true; do sleep 1; curl -s http://<URL>/ | grep "ver:" | xargs -I {} date "+%F %T {}"; done
cat <<'EOF' > curl_loop.sh
#!/bin/sh
SITE="bing.com"
TIME_DELAY=3
while :
do
response_time=$(curl -Ls -w "%{time_total}" "$SITE" -o /dev/null)
title_tag=$(curl -Ls "$SITE" | grep -o -P "<title>.*?</title>")
# title_tag=$(curl -Ls "$SITE" | sed -n 's/.*<title>\(.*\)<\/title>.*/<title>\1<\/title>/p') # BusyBox version
echo "Total Time: ${response_time}s ${title_tag}"
sleep "$TIME_DELAY"
done
EOF
chmod 744 curl_loop.sh
Content type
Image
Digest
sha256:cbf37f577…
Size
21 MB
Last updated
almost 2 years ago
docker pull therafk/httpd:2.2