forked from openstack/grenade
-
Notifications
You must be signed in to change notification settings - Fork 0
/
upgrade-tempest
executable file
·89 lines (67 loc) · 2.58 KB
/
upgrade-tempest
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/usr/bin/env bash
# ``upgrade-tempest``
echo "*********************************************************************"
echo "Begin $0"
echo "*********************************************************************"
cleanup() {
set +o errexit
echo "*********************************************************************"
echo "ERROR: Abort $0"
echo "*********************************************************************"
# Kill ourselves to signal any calling process
trap 2; kill -2 $$
}
trap cleanup SIGHUP SIGINT SIGTERM
# This script exits on an error so that errors don't compound and you see
# only the first error that occurred.
set -o errexit
# Keep track of the grenade directory
# GRENADE_DIR=$(cd $(dirname "$0") && pwd)
# Source params
source $GRENADE_DIR/grenaderc
# Source params
source $GRENADE_DIR/functions
# Determine what system we are running on. This provides ``os_VENDOR``,
# ``os_RELEASE``, ``os_UPDATE``, ``os_PACKAGE``, ``os_CODENAME``
# and ``DISTRO``
GetDistro
# Set for DevStack compatibility
TOP_DIR=$TARGET_DEVSTACK_DIR
cd $TARGET_DEVSTACK_DIR
# note; openrc sources functions & stackrc
source $TARGET_DEVSTACK_DIR/openrc
FILES=$TARGET_DEVSTACK_DIR/files
# Get functions from current DevStack
# Ensure all services libraries are sourced early to correctly populate
# TEMPEST_SERVICES.
source $TARGET_DEVSTACK_DIR/lib/cinder
source $TARGET_DEVSTACK_DIR/lib/glance
source $TARGET_DEVSTACK_DIR/lib/horizon
source $TARGET_DEVSTACK_DIR/lib/ironic
source $TARGET_DEVSTACK_DIR/lib/keystone
source $TARGET_DEVSTACK_DIR/lib/neutron-legacy
source $TARGET_DEVSTACK_DIR/lib/nova
source $TARGET_DEVSTACK_DIR/lib/swift
# The following devstack libraries may have dependencies on service-specific
# environment variables, they must be loaded after.
source $TARGET_DEVSTACK_DIR/lib/rpc_backend
source $TARGET_DEVSTACK_DIR/lib/apache
source $TARGET_DEVSTACK_DIR/lib/tls
source $TARGET_DEVSTACK_DIR/lib/tempest
# Print the commands being run so that we can see the command that triggers
# an error. It is also useful for following allowing as the install occurs.
set -o xtrace
# install_tempest()
install_tempest
# calls upgrade-tempest for specific release
upgrade_project tempest $GRENADE_DIR $BASE_DEVSTACK_BRANCH $TARGET_DEVSTACK_BRANCH
OS_USERNAME=admin
if $(source $BASE_DEVSTACK_DIR/stackrc; is_service_enabled neutron); then
Q_L3_ENABLED="True"
fi
configure_tempest
DEST=$DEST_BACKUP
set +o xtrace
echo "*********************************************************************"
echo "SUCCESS: End $0"
echo "*********************************************************************"