Heat templates for deploying OpenStack
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

114 lines
3.7 KiB

  1. heat_template_version: rocky
  2. description: >
  3. Creates a port on the {{network.name}} network, using a map of IPs per role.
  4. Each role has a map of IPs in <Role>IPs parameters, with a list of IPs by
  5. network (lower_name or lower case). For example:
  6. ControllerIPs:
  7. external:
  8. - 1.2.3.4 # First controller
  9. - 1.2.3.5 # Second controller
  10. parameters:
  11. {{network.name}}NetName:
  12. description: The name of the {{network.name_lower}} network.
  13. default: {{network.name_lower}}
  14. type: string
  15. PortName:
  16. description: Name of the port
  17. default: ''
  18. type: string
  19. DnsName:
  20. description: DNS name of the port
  21. default: ''
  22. type: string
  23. FixedIPs:
  24. description: >
  25. Control the IP allocation for the VIP port. E.g.
  26. [{'ip_address':'1.2.3.4'}]
  27. default: []
  28. type: json
  29. ControlPlaneIP: # Here for compatibility with noop.yaml
  30. description: IP address on the control plane
  31. default: ''
  32. type: string
  33. ControlPlaneSubnetCidr: # Here for compatibility with noop.yaml
  34. description: >
  35. The subnet CIDR of the control plane network. (The parameter is
  36. automatically resolved from the ctlplane subnet's cidr attribute.)
  37. type: string
  38. default: ''
  39. ControlPlaneNetwork: # Here for compatibility with ctlplane_vip.yaml
  40. description: The name of the undercloud Neutron control plane
  41. default: ctlplane
  42. type: string
  43. ControlPlaneSubnet: # Here for compatibility with ctlplane_vip.yaml
  44. description: The name of the undercloud Neutron control plane subnet
  45. default: ctlplane-subnet
  46. type: string
  47. IPPool: # Set in <Role>IPs map, see environments/ips-from-pool-all.yaml
  48. default: {}
  49. type: json
  50. NodeIndex: # First node in the role will get first IP, and so on...
  51. default: 0
  52. type: number
  53. {{network.name}}NetCidr:
  54. {%- if network.ipv6 or ipv6_override %}
  55. default: "{{network.ipv6_subnet|default(network.ip_subnet|default(""))}}"
  56. {%- else %}
  57. default: "{{network.ip_subnet|default("")}}"
  58. {%- endif %}
  59. description: Cidr for the {{network.name_lower}} network.
  60. type: string
  61. {{network.name}}InterfaceDefaultRoute:
  62. default: ''
  63. description: default route for the {{network.name_lower}} network
  64. type: string
  65. conditions:
  66. {{network.name_lower}}_interface_default_route_set:
  67. not:
  68. equals:
  69. - {get_param: {{network.name}}InterfaceDefaultRoute}
  70. - ''
  71. outputs:
  72. ip_address:
  73. description: {{network.name}} network IP
  74. value: {get_param: [IPPool, {get_param: {{network.name}}NetName}, {get_param: NodeIndex}]}
  75. ip_address_uri:
  76. description: {{network.name}} network IP (with brackets for IPv6 URLs)
  77. value:
  78. str_replace:
  79. template:
  80. make_url:
  81. host: {get_param: [IPPool, {get_param: {{network.name}}NetName}, {get_param: NodeIndex}]}
  82. params:
  83. //: ''
  84. ip_subnet:
  85. description: IP/Subnet CIDR for the {{network.name}} network IP
  86. value:
  87. list_join:
  88. - ''
  89. - - {get_param: [IPPool, {get_param: {{network.name}}NetName}, {get_param: NodeIndex}]}
  90. - '/'
  91. - {str_split: ['/', {get_param: {{network.name}}NetCidr}, 1]}
  92. host_routes:
  93. description: Host routes of the ports subnet
  94. value: {{network.routes|default([])}}
  95. mtu:
  96. description: The maximum transmission unit (MTU)
  97. value: {{network.mtu|default('1500')}}
  98. gateway_ip:
  99. description: Gateway IP of the ports subnet
  100. value:
  101. if:
  102. - {{network.name_lower}}_interface_default_route_set
  103. - {get_param: {{network.name}}InterfaceDefaultRoute}
  104. -
  105. {%- if network.ipv6|default(false) and network.gateway_ipv6|default(false) %}
  106. {{network.gateway_ipv6|default('')}}
  107. {%- else %}
  108. {{network.gateway_ip|default('')}}
  109. {%- endif %}