forked from beekhof/osp-ha-deploy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
heat.scenario
97 lines (78 loc) · 4.73 KB
/
heat.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# 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_deployment
PHD_VAR_network_hosts_memcache
PHD_VAR_network_hosts_rabbitmq
######################
# Deployment Scripts #
######################
= SCRIPTS =
target=all
....
yum install -y openstack-heat-engine openstack-heat-api openstack-heat-api-cfn openstack-heat-api-cloudwatch python-heatclient openstack-utils python-glanceclient
openstack-config --set /etc/heat/heat.conf database connection mysql://heat:heattest@vip-db/heat
openstack-config --set /etc/heat/heat.conf database database max_retries -1
openstack-config --set /etc/heat/heat.conf keystone_authtoken admin_tenant_name services
openstack-config --set /etc/heat/heat.conf keystone_authtoken admin_user heat
openstack-config --set /etc/heat/heat.conf keystone_authtoken admin_password heattest
openstack-config --set /etc/heat/heat.conf keystone_authtoken service_host vip-keystone
openstack-config --set /etc/heat/heat.conf keystone_authtoken auth_host vip-keystone
openstack-config --set /etc/heat/heat.conf keystone_authtoken auth_uri http://vip-keystone:35357/v2.0
openstack-config --set /etc/heat/heat.conf keystone_authtoken keystone_ec2_uri http://vip-keystone:35357/v2.0
openstack-config --set /etc/heat/heat.conf ec2authtoken auth_uri http://vip-keystone:5000/v2.0
openstack-config --set /etc/heat/heat.conf DEFAULT memcache_servers ${PHD_VAR_network_hosts_memcache}
openstack-config --set /etc/heat/heat.conf oslo_messaging_rabbit rabbit_hosts ${PHD_VAR_network_hosts_rabbitmq}
openstack-config --set /etc/heat/heat.conf oslo_messaging_rabbit rabbit_ha_queues true
openstack-config --set /etc/heat/heat.conf oslo_messaging_rabbit heartbeat_timeout_threshold 60
openstack-config --set /etc/heat/heat.conf heat_api bind_host $(ip addr show dev eth1 scope global | grep dynamic| sed -e 's#.*inet ##g' -e 's#/.*##g')
openstack-config --set /etc/heat/heat.conf heat_api_cfn bind_host $(ip addr show dev eth1 scope global | grep dynamic| sed -e 's#.*inet ##g' -e 's#/.*##g')
openstack-config --set /etc/heat/heat.conf heat_api_cloudwatch bind_host $(ip addr show dev eth1 scope global | grep dynamic| sed -e 's#.*inet ##g' -e 's#/.*##g')
openstack-config --set /etc/heat/heat.conf DEFAULT heat_metadata_server_url vip-heat:8000
openstack-config --set /etc/heat/heat.conf DEFAULT heat_waitcondition_server_url vip-heat:8000/v1/waitcondition
openstack-config --set /etc/heat/heat.conf DEFAULT heat_watch_server_url vip-heat:8003
openstack-config --set /etc/heat/heat.conf DEFAULT rpc_backend heat.openstack.common.rpc.impl_kombu
openstack-config --set /etc/heat/heat.conf DEFAULT notification_driver heat.openstack.common.notifier.rpc_notifier
# disable CWLiteAlarm that is incompatible with A/A
openstack-config --set /etc/heat/heat.conf DEFAULT enable_cloud_watch_lite false
....
target=$PHD_ENV_nodes1
....
su heat -s /bin/sh -c "heat-manage db_sync"
pcs resource create openstack-heat-api systemd:openstack-heat-api --clone interleave=true
pcs resource create openstack-heat-api-cfn systemd:openstack-heat-api-cfn --clone interleave=true
pcs resource create openstack-heat-api-cloudwatch systemd:openstack-heat-api-cloudwatch --clone interleave=true
pcs resource create openstack-heat-engine systemd:openstack-heat-engine --clone interleave=true
pcs constraint order start openstack-heat-api-clone then openstack-heat-api-cfn-clone
pcs constraint colocation add openstack-heat-api-cfn-clone with openstack-heat-api-clone
pcs constraint order start openstack-heat-api-cfn-clone then openstack-heat-api-cloudwatch-clone
pcs constraint colocation add openstack-heat-api-cloudwatch-clone with openstack-heat-api-cfn-clone
pcs constraint order start openstack-heat-api-cloudwatch-clone then openstack-heat-engine-clone
pcs constraint colocation add openstack-heat-engine-clone with openstack-heat-api-cloudwatch-clone
if [ $PHD_VAR_deployment = collapsed ]; then
pcs constraint order start openstack-ceilometer-notification-clone then openstack-heat-api-clone
fi
....