Heat params are different in swarm master and swarm node

Heat parameters are different in swarm master and swarm node.
So we should use different scripts to write the heat parameters.

Change-Id: I81625613913773e627d96f54374ae57af6fe64d3
Closes-Bug: #1571582
This commit is contained in:
Hua Wang 2016-04-18 19:00:45 +08:00
parent 309095c6e3
commit e232c7f1a2
4 changed files with 28 additions and 2 deletions

View File

@ -0,0 +1,26 @@
#cloud-config
merge_how: dict(recurse_array)+list(append)
write_files:
- path: /etc/sysconfig/heat-params
owner: "root:root"
permissions: "0644"
content: |
WAIT_HANDLE="$WAIT_HANDLE"
DOCKER_VOLUME="$DOCKER_VOLUME"
HTTP_PROXY="$HTTP_PROXY"
HTTPS_PROXY="$HTTPS_PROXY"
NO_PROXY="$NO_PROXY"
SWARM_API_IP="$SWARM_API_IP"
SWARM_NODE_IP="$SWARM_NODE_IP"
BAY_UUID="$BAY_UUID"
MAGNUM_URL="$MAGNUM_URL"
TLS_DISABLED="$TLS_DISABLED"
NETWORK_DRIVER="$NETWORK_DRIVER"
ETCD_SERVER_IP="$ETCD_SERVER_IP"
API_IP_ADDRESS="$API_IP_ADDRESS"
SWARM_VERSION="$SWARM_VERSION"
AGENT_WAIT_HANDLE="$AGENT_WAIT_HANDLE"
TRUSTEE_USER_ID="$TRUSTEE_USER_ID"
TRUSTEE_PASSWORD="$TRUSTEE_PASSWORD"
TRUST_ID="$TRUST_ID"
AUTH_URL="$AUTH_URL"

View File

@ -171,7 +171,7 @@ resources:
group: ungrouped
config:
str_replace:
template: {get_file: fragments/write-heat-params.yaml}
template: {get_file: fragments/write-heat-params-master.yaml}
params:
"$WAIT_HANDLE": {get_resource: cloud_init_wait_handle}
"$DOCKER_VOLUME": {get_resource: docker_volume}

View File

@ -147,7 +147,7 @@ resources:
group: ungrouped
config:
str_replace:
template: {get_file: fragments/write-heat-params.yaml}
template: {get_file: fragments/write-heat-params-node.yaml}
params:
"$WAIT_HANDLE": {get_resource: node_cloud_init_wait_handle}
"$DOCKER_VOLUME": {get_resource: docker_volume}