Add recording for WODA.backup docker
This commit is contained in:
parent
8ea8616a0b
commit
3bf29b1866
1038
src/casts/WODA.backup-docker.cast
Normal file
1038
src/casts/WODA.backup-docker.cast
Normal file
File diff suppressed because it is too large
Load Diff
1023
src/casts/WODA.backup-docker.cast.old
Normal file
1023
src/casts/WODA.backup-docker.cast.old
Normal file
File diff suppressed because it is too large
Load Diff
20
src/scripts/WODA.backup-docker_rec.sh
Executable file
20
src/scripts/WODA.backup-docker_rec.sh
Executable 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
|
59
src/scripts/WODA.backup-docker_script.sh
Normal file
59
src/scripts/WODA.backup-docker_script.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user