-
Notifications
You must be signed in to change notification settings - Fork 0
/
compute-cluster.scenario
70 lines (57 loc) · 2.06 KB
/
compute-cluster.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
#
# Tasks to be performed at this step include:
#################################
# Scenario Requirements Section #
#################################
= REQUIREMENTS =
nodes: 1
= VARIABLES =
PHD_VAR_env_password
######################
# Deployment Scripts #
######################
= SCRIPTS =
target=all
....
# make sure we are not running on a controller node
pcs resource show swift-fs > /dev/null 2>&1
if [ $? != 0 ]; then
pcs resource show computenode > /dev/null 2>&1
if [ $? = 0 ]; then
exit 0
fi
# We must be either the first node to run, or configuring
# single-node clusters for a segregated deployment
pcs cluster auth $(hostname -s) -u hacluster -p ${PHD_VAR_env_password} --force
pcs cluster setup --name $(hostname -s)-compute $(hostname -s)
pcs cluster enable --all
pcs cluster start --all
sleep 30
# hack!! IPMI does not work from localhost to localhost on those test nodes!. Use
# proper fencing settings!
# TODO: Add SBD support
pcs property set stonith-enabled=false
pcs resource create neutron-openvswitch-agent systemd:neutron-openvswitch-agent --group computenode
pcs resource create libvirtd systemd:libvirtd --group computenode
pcs resource create ceilometer-compute systemd:openstack-ceilometer-compute --group computenode
pcs resource create nova-compute systemd:openstack-nova-compute --group computenode
fi
....