-
Notifications
You must be signed in to change notification settings - Fork 5
/
run.sh
executable file
·62 lines (55 loc) · 1.98 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# Specify image names, JumpHost ideally has sfw2-snat
# Options for the images: my openSUSE 15.2 (linux), Ubuntu 20.04 (ubuntu),
# openSUSE Leap 15.2 (opensuse), CentOS 8 (centos)
# You can freely mix ...
#export JHIMG="Ubuntu 22.04"
#export JHIMG="openSUSE 15.6"
export JHIMG="Debian 12"
#export ADDJHVOLSIZE=2
#export IMG="Ubuntu 22.04"
#export IMG="openSUSE 15.6"
export IMG="Debian 12"
#export DEFLTUSER=ubuntu
#export JHDEFLTUSER=ubuntu
# You can use a filter when listing images (because your catalog is huge)
#export JHIMGFILT="--property-filter os_version=openSUSE-15.0"
#export IMGFILT="--property-filter os_version=openSUSE-15.0"
# ECP flavors
#if test $OS_REGION_NAME == Kna1; then
#export JHFLAVOR=1C-1GB
#export FLAVOR=1C-1GB
#else
#export JHFLAVOR=1C-1GB-10GB
#export FLAVOR=1C-1GB-10GB
#fi
# EMail notifications sender address
#export [email protected]
# Only use one AZ
#export AZS="nova"
# Assume OS_ parameters have already been sourced from some .openrc file
# or just set OS_CLOUD (using clouds.yaml/secure.yaml)
#export OS_CLOUD=cloudname
export EMAIL_PARAM=${EMAIL_PARAM:-"[email protected]"}
# Terminate early on auth error
openstack server list >/dev/null
# Cleanup previous interrupted runs
SERVERS=$(openstack server list | grep -o "APIMonitor_[0-9]*_" | sort -u)
VOLUMES=$(openstack volume list | grep -o "APIMonitor_[0-9]*_" | sort -u)
NETWORK=$(openstack network list | grep -o "APIMonitor_[0-9]*_" | sort -u)
ROUTERS=$(openstack router list | grep -o "APIMonitor_[0-9]*_" | sort -u)
SECGRPS=$(openstack security group list | grep -o "APIMonitor_[0-9]*_" | sort -u)
TOCLEAN=$(echo "$SERVERS
$VOLUMES
$NETWORK
$ROUTERS
$SECGRPS
" | sort -u)
for ENV in $TOCLEAN; do
echo "******************************"
echo "CLEAN $ENV"
bash ./api_monitor.sh -q -o -c CLEANUP $ENV
echo "******************************"
done
#bash ./api_monitor.sh -c -x -d -n 8 -l last.log -e $EMAIL_PARAM -S -i 9
exec ./api_monitor.sh -O -C -D -N 2 -n 8 -s -LL -b -B -T -e [email protected] "$@"