Browse Source

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
changes/01/307101/6
Hua Wang 6 years ago
parent
commit
e232c7f1a2
  1. 0
      magnum/templates/swarm/fragments/write-heat-params-master.yaml
  2. 26
      magnum/templates/swarm/fragments/write-heat-params-node.yaml
  3. 2
      magnum/templates/swarm/swarmmaster.yaml
  4. 2
      magnum/templates/swarm/swarmnode.yaml

0
magnum/templates/swarm/fragments/write-heat-params.yaml → magnum/templates/swarm/fragments/write-heat-params-master.yaml

26
magnum/templates/swarm/fragments/write-heat-params-node.yaml

@ -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"

2
magnum/templates/swarm/swarmmaster.yaml

@ -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}

2
magnum/templates/swarm/swarmnode.yaml

@ -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}

Loading…
Cancel
Save