Add recording for WODA.backup docker

This commit is contained in:
Chris Daßler 2024-10-25 02:01:29 +02:00
parent 8ea8616a0b
commit 3bf29b1866
4 changed files with 2140 additions and 0 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,20 @@
#!/bin/bash
# Check if in $PWD/scripts directory
if [ "$(basename $PWD)" != "scripts" ]; then
echo "You are not in the ./scripts directory. Change directory and run script again."
exit 1
fi
# Variables
INPUT_FILE=WODA.backup-docker_script.sh
OUTPUT_FILE=../casts/WODA.backup-docker.cast
TIMEOUT=300
# Check if $OUTPUT_FILE exists
if [ -f $OUTPUT_FILE ]; then
echo "File $OUTPUT_FILE already exists. Exiting."
exit 1
fi
uv run asciinema-automation -dt 75 -sd 30 -t $TIMEOUT --asciinema-arguments " -i $TIMEOUT --cols=238 --rows=56 " $INPUT_FILE $OUTPUT_FILE

View File

@ -0,0 +1,59 @@
#$ delay 50
#$ expect \$
#$ sendcharacter # ssh: Connecting to backup.sfsre.com
#$ sendcontrol m
#$ expect \$
#$ wait 500
ssh backup.sfsre.com
# default ubuntu prompt expands to # for root and $ for all other users
#$ expect Welcome to Web 4.0
#$ sendcharacter # testing: Container dev-metatrom_once.sh_container
#$ sendcontrol m
#$ expect >
#$ wait 500
docker inspect $(docker ps | grep dev-metatrom_once.sh_container | cut -d " " -f 1) | grep -w '"IPAddress":' | grep -E '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}' | sed -e 's/^[[:space:]]*//'
# default Web4x prompt expands to >
#$ expect >
iptables -nL -t nat --line-numbers | grep 192.168.192.3
#$ expect >
curl -ksL -o /dev/null -w "%{http_code}" http://192.168.192.3:8980/EAMD.ucp
#$ expect >
curl -ksL -o /dev/null -w "%{http_code}" http://0.0.0.0:8980/EAMD.ucp
#$ expect >
curl -ksL -o /dev/null -w "%{http_code}" http://127.0.0.1:8980/EAMD.ucp
#$ expect >
#$ sendcharacter # testing: dev-neom_once.sh_container
#$ sendcontrol m
#$ expect >
#$ wait 500
docker inspect $(docker ps | grep dev-neom_once.sh_container | cut -d " " -f 1) | grep -w '"IPAddress":' | grep -E '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}' | sed -e 's/^[[:space:]]*//'
#$ expect >
iptables -nL -t nat --line-numbers | grep 192.168.224.2
#$ expect >
curl -ksL -o /dev/null -w "%{http_code}" http://192.168.224.2:9380/EAMD.ucp
#$ expect >
curl -ksL -o /dev/null -w "%{http_code}" http://0.0.0.0:9380/EAMD.ucp
#$ expect >
curl -ksL -o /dev/null -w "%{http_code}" http://127.0.0.1:9380/EAMD.ucp
#$ expect >
# exit ssh session
exit
#$ expect \$
# exit asciinema recording
exit