Advertisement
Guest User

Untitled

a guest
Aug 14th, 2019
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 6.85 KB | None | 0 0
  1. heat_template_version: queens
  2. description: >
  3.  Software Config to drive os-net-config to configure multiple interfaces for the Controller role.
  4. parameters:
  5.   StorageNFSIpSubnet:
  6.     default: ''
  7.     description: IP address/subnet on the storage_nfs network
  8.     type: string
  9.   StorageNFSVlanID:
  10.     default: 103
  11.     description: Vlan ID for the tenant network traffic.
  12.     type: number
  13.   StorageNFSRoutes:
  14.     default: []
  15.     description: >
  16.      Routes for the storage_nfs network traffic.
  17.       JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1' }]
  18.       Unless the default is changed, the parameter is automatically resolved from the subnet host_routes attribute.
  19.     type: json
  20.   ControlPlaneIp:
  21.     default: ''
  22.     description: IP address/subnet on the ctlplane network
  23.     type: string
  24.   StorageIpSubnet:
  25.     default: ''
  26.     description: IP address/subnet on the storage network
  27.     type: string
  28.   StorageMgmtIpSubnet:
  29.     default: ''
  30.     description: IP address/subnet on the storage_mgmt network
  31.     type: string
  32.   InternalApiIpSubnet:
  33.     default: ''
  34.     description: IP address/subnet on the internal_api network
  35.     type: string
  36.   TenantIpSubnet:
  37.     default: ''
  38.     description: IP address/subnet on the tenant network
  39.     type: string
  40.   ExternalIpSubnet:
  41.     default: ''
  42.     description: IP address/subnet on the external network
  43.     type: string
  44.   ManagementIpSubnet:
  45.     default: ''
  46.     description: IP address/subnet on the management network
  47.     type: string
  48.   StorageNetworkVlanID:
  49.     default: 82
  50.     description: Vlan ID for the storage network traffic.
  51.     type: number
  52.   StorageMgmtNetworkVlanID:
  53.     default: 83
  54.     description: Vlan ID for the storage_mgmt network traffic.
  55.     type: number
  56.   InternalApiNetworkVlanID:
  57.     default: 80
  58.     description: Vlan ID for the internal_api network traffic.
  59.     type: number
  60.   TenantNetworkVlanID:
  61.     default: 100
  62.     description: Vlan ID for the tenant network traffic.
  63.     type: number
  64.   ExternalNetworkVlanID:
  65.     default: 101
  66.     description: Vlan ID for the external network traffic.
  67.     type: number
  68.   ManagementNetworkVlanID:
  69.     default: 72
  70.     description: Vlan ID for the management network traffic.
  71.     type: number
  72.   ControlPlaneSubnetCidr: # Override this via parameter_defaults
  73.     default: '24'
  74.     description: The subnet CIDR of the control plane network.
  75.     type: string
  76.   ControlPlaneDefaultRoute: # Override this via parameter_defaults
  77.     description: The default route of the control plane network.
  78.     type: string
  79.   ExternalInterfaceDefaultRoute:
  80.     default: '192.168.101.1'
  81.     description: default route for the external network
  82.     type: string
  83.   DnsServers: # Override this via parameter_defaults
  84.     default: []
  85.     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
  86.     type: comma_delimited_list
  87.   EC2MetadataIp: # Override this via parameter_defaults
  88.     description: The IP address of the EC2 metadata server.
  89.     type: string
  90. resources:
  91.   OsNetConfigImpl:
  92.     type: OS::Heat::SoftwareConfig
  93.     properties:
  94.       group: script
  95.       config:
  96.         str_replace:
  97.           template:
  98.             get_file: /usr/share/openstack-tripleo-heat-templates/network/scripts/run-os-net-config.sh
  99.           params:
  100.             $network_config:
  101.               network_config:
  102.               - type: ovs_bridge
  103.                 name: bridge_name
  104.                 mtu: 9000
  105.                 use_dhcp: false
  106.                 dns_servers:
  107.                   get_param: DnsServers
  108.                 addresses:
  109.                 - ip_netmask:
  110.                     list_join:
  111.                    - /
  112.                     - - get_param: ControlPlaneIp
  113.                       - get_param: ControlPlaneSubnetCidr
  114.                 routes:
  115.                 - ip_netmask: 169.254.169.254/32
  116.                   next_hop:
  117.                     get_param: EC2MetadataIp
  118.                 members:
  119.                 - type: interface
  120.                   name: enp175s0f0
  121.                   mtu: 9000
  122.                   use_dhcp: false
  123.                   primary: true
  124.                 - type: vlan
  125.                   dns_servers: {get_param: DnsServers}
  126.                   use_dhcp: false
  127.                   vlan_id: {get_param: ExternalNetworkVlanID}
  128.                   mtu: 9000
  129.                   addresses:
  130.                     - ip_netmask: {get_param: ExternalIpSubnet}
  131.                   routes:
  132.                     - default: true
  133.                       next_hop: {get_param: ExternalInterfaceDefaultRoute}
  134.                 - type: vlan
  135.                   mtu: 9000
  136.                   vlan_id: {get_param: InternalApiNetworkVlanID}
  137.                   use_dhcp: false
  138.                   defroute: false
  139.                   addresses:
  140.                     - ip_netmask: {get_param: InternalApiIpSubnet}
  141.                 - type: vlan
  142.                   vlan_id: {get_param: TenantNetworkVlanID}
  143.                   mtu: 9000
  144.                   use_dhcp: false
  145.                   defroute: false
  146.                   addresses:
  147.                     - ip_netmask: {get_param: TenantIpSubnet}
  148.                 - type: vlan
  149.                   vlan_id: {get_param: StorageNFSVlanID}
  150.                   mtu: 9000
  151.                   use_dhcp: false
  152.                   defroute: false
  153.                   addresses:
  154.                     - ip_netmask: {get_param: StorageNFSIpSubnet}
  155.               - type: ovs_bridge
  156.                 name: br-storage
  157.                 mtu: 9000
  158.                 use_dhcp: false
  159.                 members:
  160.                 - type: interface
  161.                   name: enp175s0f1
  162.                   mtu: 9000
  163.                   use_dhcp: false
  164.                   primary: true
  165.                 - type: vlan
  166.                   use_dhcp: false
  167.                   mtu: 9000
  168.                   defroute: false
  169.                   vlan_id: {get_param: StorageMgmtNetworkVlanID}
  170.                   addresses:
  171.                     - ip_netmask: {get_param: StorageMgmtIpSubnet}
  172.                 - type: vlan
  173.                   use_dhcp: false
  174.                   mtu: 9000
  175.                   defroute: false
  176.                   vlan_id: {get_param: StorageNetworkVlanID}
  177.                   addresses:
  178.                     - ip_netmask: {get_param: StorageIpSubnet}
  179.               - type: interface
  180.                 name: eno1
  181.                 use_dhcp: false
  182.                 mtu: 9000
  183.               - type: interface
  184.                 name: eno2
  185.                 use_dhcp: false
  186.                 mtu: 9000
  187.               - type: interface
  188.                 name: eno3
  189.                 use_dhcp: false
  190.                 mtu: 9000
  191.               - type: interface
  192.                 name: eno4
  193.                 use_dhcp: false
  194.                 mtu: 9000
  195.  
  196. outputs:
  197.   OS::stack_id:
  198.     description: The OsNetConfigImpl resource.
  199.     value:
  200.       get_resource: OsNetConfigImpl
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement