Advertisement
Guest User

Untitled

a guest
Apr 6th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.55 KB | None | 0 0
  1. heat_template_version: queens
  2.  
  3. description: >
  4. Software Config to drive os-net-config with 2 bonded nics on a bridge
  5. with a VLANs attached for the controller role.
  6.  
  7. parameters:
  8. ControlPlaneIp:
  9. default: ''
  10. description: IP address/subnet on the ctlplane network
  11. type: string
  12. ExternalIpSubnet:
  13. default: ''
  14. description: IP address/subnet on the external network
  15. type: string
  16. InternalApiIpSubnet:
  17. default: ''
  18. description: IP address/subnet on the internal API network
  19. type: string
  20. StorageIpSubnet:
  21. default: ''
  22. description: IP address/subnet on the storage network
  23. type: string
  24. StorageMgmtIpSubnet:
  25. default: ''
  26. description: IP address/subnet on the storage mgmt network
  27. type: string
  28. TenantIpSubnet:
  29. default: ''
  30. description: IP address/subnet on the tenant network
  31. type: string
  32. BondInterfaceOvsOptions:
  33. default: ''
  34. description: The ovs_options string for the bond interface. Set things like
  35. lacp=active and/or bond_mode=balance-slb using this option.
  36. type: string
  37. ExternalNetworkVlanID:
  38. default: 10
  39. description: Vlan ID for the external network traffic.
  40. type: number
  41. InternalApiNetworkVlanID:
  42. default: 20
  43. description: Vlan ID for the internal_api network traffic.
  44. type: number
  45. StorageNetworkVlanID:
  46. default: 30
  47. description: Vlan ID for the storage network traffic.
  48. type: number
  49. StorageMgmtNetworkVlanID:
  50. default: 40
  51. description: Vlan ID for the storage mgmt network traffic.
  52. type: number
  53. TenantNetworkVlanID:
  54. default: 50
  55. description: Vlan ID for the tenant network traffic.
  56. type: number
  57. ExternalInterfaceDefaultRoute:
  58. default: '10.11.12.1'
  59. description: Default route for the external network.
  60. type: string
  61. ControlPlaneSubnetCidr: # Override this via parameter_defaults
  62. default: '24'
  63. description: The subnet CIDR of the control plane network.
  64. type: string
  65. DnsServers: # Override this via parameter_defaults
  66. default: []
  67. description: A list of DNS servers (2 max) to add to resolv.conf.
  68. type: json
  69. EC2MetadataIp: # Override this via parameter_defaults
  70. description: The IP address of the EC2 metadata server.
  71. type: string
  72.  
  73. resources:
  74. OsNetConfigImpl:
  75. type: OS::Heat::StructuredConfig
  76. properties:
  77. group: os-apply-config
  78. config:
  79. os_net_config:
  80. network_config:
  81. -
  82. type: interface
  83. name: nic1
  84. use_dhcp: false
  85. addresses:
  86. -
  87. ip_netmask:
  88. list_join:
  89. - '/'
  90. - - {get_param: ControlPlaneIp}
  91. - {get_param: ControlPlaneSubnetCidr}
  92. routes:
  93. -
  94. ip_netmask: 169.254.169.254/32
  95. next_hop: {get_param: EC2MetadataIp}
  96. # NIC2 CONF
  97. -
  98. type: ovs_bridge
  99. name: {get_input: bridge_name}
  100. dns_servers: {get_param: DnsServers}
  101. use_dhcp: false
  102. members:
  103. - type: interface
  104. name: nic2
  105. - type: vlan
  106. device: nic2
  107. vlan_id: {get_param: ExternalNetworkVlanID}
  108. addresses:
  109. - ip_netmask: {get_param: ExternalIpSubnet}
  110. routes:
  111. - default: true
  112. next_hop: {get_param: ExternalInterfaceDefaultRoute}
  113. - type: vlan
  114. device: nic2
  115. vlan_id: {get_param: InternalApiNetworkVlanID}
  116. addresses:
  117. - ip_netmask:{get_param: InternalApiIpSubnet}
  118. - type: vlan
  119. device: nic2
  120. vlan_id: {get_param: StorageNetworkVlanID}
  121. addresses:
  122. - ip_netmask: {get_param: StorageIpSubnet}
  123. - type: vlan
  124. device: nic2
  125. vlan_id: {get_param: StorageMgmtNetworkVlanID}
  126. addresses:
  127. - ip_netmask: {get_param: StorageMgmtIpSubnet}
  128. - type: vlan
  129. device: nic2
  130. vlan_id: {get_param: TenantNetworkVlanID}
  131. addresses:
  132. - ip_netmask: {get_param: TenantIpSubnet}
  133.  
  134. outputs:
  135. OS::stack_id:
  136. description: The OsNetConfigImpl resource.
  137. value:
  138. get_resource: OsNetConfigImpl
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement