-
Notifications
You must be signed in to change notification settings - Fork 0
/
beaker.scenario
70 lines (64 loc) · 2.25 KB
/
beaker.scenario
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
# This file can be used directly by 'phd', see 'build-all.sh' in this
# directory for how it can be invoked. The only requirement is a list
# of nodes you'd like it to modify.
#
# The scope of each command-block is controlled by the preceeding
# 'target' line.
#
# - target=all
# The commands are executed on evey node provided
#
# - target=local
# The commands are executed from the node hosting phd. When not
# using phd, they should be run from some other independant host
# (such as the puppet master)
#
# - target=$PHD_ENV_nodes{N}
# The commands are executed on the Nth node provided.
# For example, to run on only the first node would be target=$PHD_ENV_nodes1
#
# We start with 3 (or more, up to 16) nodes running a minimal CentOS 6
#
# Tasks to be performed include:
# - setting up the required repositories from which to download Openstack and the HA-Addon
# - disabling firewalls and SElinux. This is a necessary evil until the proper policies can be written.
# - creating network bridges for use by VMs hosting OpenStack services
# - normalizing network interface names
# - fixing multicast
# - removing /home and making the root partition as large as possible to maximumize the amount of space available to openstack
#################################
# Scenario Requirements Section #
#################################
= VARIABLES =
PHD_VAR_network_domain
PHD_VAR_beaker_disttree
#################################
# Scenario Requirements Section #
#################################
= REQUIREMENTS =
nodes: 7
######################
# Deployment Scripts #
######################
= SCRIPTS =
target=local
....
# Reboot each node and wait for it to return
# REQUIRES kinit and we don't check for completition yet
for node in $(echo $PHD_ENV_nodes); do
loop=0
bkr system-provision --distro-tree ${PHD_VAR_beaker_disttree} $node
while [ "$(ping $node -c 3 -q | grep 'packets transmitted' | sed -e 's#.*transmitted, ##g' -e 's# received.*##g')" != 0 ] && \
[ "$loop" -lt 180 ]; do
loop=$((loop + 1))
echo "Waiting for beaker to kick in ($loop)"
sleep 1
done
done
# disable set -e when calling phd_cmd_* because
# phd doesn't manage all return codes properly
set +e
for node in $(echo $PHD_ENV_nodes); do
phd_wait_connection 2400 $node || exit 1
done
....