X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=puppet%2Fcompute-role.yaml;h=af45793e3cacb4219367187e154b32a0dfa279be;hb=e41139aab0f10062a26c4acc591d32288729df20;hp=5a662e86c68db6681790fefb680b7bf34b2987ee;hpb=443967ef855fd933b51155aa5cd1122b7655355d;p=apex-tripleo-heat-templates.git diff --git a/puppet/compute-role.yaml b/puppet/compute-role.yaml index 5a662e86..af45793e 100644 --- a/puppet/compute-role.yaml +++ b/puppet/compute-role.yaml @@ -159,7 +159,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: | @@ -417,6 +418,7 @@ resources: server: {get_resource: NovaCompute} RoleParameters: {get_param: RoleParameters} ServiceNames: {get_param: ServiceNames} + deployment_actions: {get_attr: [DeploymentActions, value]} NetworkConfig: type: OS::TripleO::Compute::Net::SoftwareConfig @@ -543,6 +545,9 @@ resources: ComputeExtraConfigPre: depends_on: NovaComputeDeployment type: OS::TripleO::ComputeExtraConfigPre + # 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: NovaCompute} @@ -551,6 +556,9 @@ resources: NodeExtraConfig: depends_on: [ComputeExtraConfigPre, 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: NovaCompute} @@ -573,11 +581,21 @@ resources: update_identifier: get_param: UpdateIdentifier + DeploymentActions: + type: OS::Heat::Value + properties: + value: + if: + - server_not_blacklisted + - ['CREATE', 'UPDATE'] + - [] + SshHostPubKey: type: OS::TripleO::Ssh::HostPubKey depends_on: NovaComputeDeployment properties: server: {get_resource: NovaCompute} + deployment_actions: {get_attr: [DeploymentActions, value]} outputs: ip_address: @@ -601,6 +619,45 @@ outputs: 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: [NovaCompute, 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: [NovaCompute, os_collect_config, request, metadata_url]} + - 5 + object: + str_split: + - '?' + - str_split: + - '/' + - {get_attr: [NovaCompute, os_collect_config, request, metadata_url]} + - 6 + - 0 + - keys: {hostname: {get_param: Hostname}} hostname: description: Hostname of the server value: {get_attr: [NovaCompute, name]}