X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=puppet%2Fblockstorage-role.yaml;h=de7b6b4914207626070399ca09b0a29c2f8f250c;hb=e41139aab0f10062a26c4acc591d32288729df20;hp=612a4a0117243b0debe7fe009d263b453443179c;hpb=a759deedf0fb599d4fba89fc8741623f68a16322;p=apex-tripleo-heat-templates.git diff --git a/puppet/blockstorage-role.yaml b/puppet/blockstorage-role.yaml index 612a4a01..de7b6b49 100644 --- a/puppet/blockstorage-role.yaml +++ b/puppet/blockstorage-role.yaml @@ -141,7 +141,8 @@ parameters: parameter is generated from the parent template. RoleParameters: type: json - description: Role Specific Parameters + description: Parameters specific to the role + default: {} DeploymentSwiftDataMap: type: json description: | @@ -408,6 +409,7 @@ resources: server: {get_resource: BlockStorage} RoleParameters: {get_param: RoleParameters} ServiceNames: {get_param: ServiceNames} + deployment_actions: {get_attr: [DeploymentActions, value]} NetworkDeployment: type: OS::TripleO::SoftwareDeployment @@ -516,6 +518,9 @@ resources: NodeExtraConfig: depends_on: NodeTLSCAData type: OS::TripleO::NodeExtraConfig + # We have to use conditions here so that we don't break backwards + # compatibility with templates everywhere + condition: server_not_blacklisted properties: server: {get_resource: BlockStorage} @@ -538,11 +543,21 @@ resources: - ['CREATE', 'UPDATE'] - [] + DeploymentActions: + type: OS::Heat::Value + properties: + value: + if: + - server_not_blacklisted + - ['CREATE', 'UPDATE'] + - [] + SshHostPubKey: type: OS::TripleO::Ssh::HostPubKey depends_on: BlockStorageDeployment properties: server: {get_resource: BlockStorage} + deployment_actions: {get_attr: [DeploymentActions, value]} outputs: ip_address: @@ -645,6 +660,45 @@ CTLPLANEIP,CTLPLANEHOST.DOMAIN,CTLPLANEHOST HOSTSSHPUBKEY" management_ip_address: description: IP address of the server in the management network value: {get_attr: [ManagementPort, ip_address]} + deployed_server_port_map: + description: | + Map of Heat created hostname of the server to ip address. This is the + hostname before it has been mapped with the HostnameMap parameter, and + the IP address from the ctlplane network. This map can be used to construct + the DeployedServerPortMap parameter when using split-stack. + value: + map_replace: + - hostname: + fixed_ips: + - ip_address: {get_attr: [BlockStorage, networks, ctlplane, 0]} + - keys: + hostname: + list_join: + - '-' + - - {get_param: Hostname} + - ctlplane + deployed_server_deployment_swift_data_map: + description: + Map of Heat created hostname of the server to the Swift container and object + used to created the temporary url for metadata polling with + os-collect-config. + value: + map_replace: + - hostname: + container: + str_split: + - '/' + - {get_attr: [BlockStorage, os_collect_config, request, metadata_url]} + - 5 + object: + str_split: + - '?' + - str_split: + - '/' + - {get_attr: [BlockStorage, os_collect_config, request, metadata_url]} + - 6 + - 0 + - keys: {hostname: {get_param: Hostname}} os_collect_config: description: The os-collect-config configuration associated with this server resource value: {get_attr: [BlockStorage, os_collect_config]}