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.
 
 
 
 

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