Advertisement
DekayEU

Untitled

Apr 10th, 2018
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 5.29 KB | None | 0 0
  1. heat_template_version: queens
  2.  
  3. parameters:
  4.   ControlPlaneIp:
  5.     default: ''
  6.     description: IP address/subnet on the ctlplane network
  7.     type: string
  8.   ExternalIpSubnet:
  9.     default: ''
  10.     description: IP address/subnet on the external network
  11.     type: string
  12.   InternalApiIpSubnet:
  13.     default: ''
  14.     description: IP address/subnet on the internal_api network
  15.     type: string
  16.   StorageIpSubnet:
  17.     default: ''
  18.     description: IP address/subnet on the storage network
  19.     type: string
  20.   StorageMgmtIpSubnet:
  21.     default: ''
  22.     description: IP address/subnet on the storage_mgmt network
  23.     type: string
  24.   TenantIpSubnet:
  25.     default: ''
  26.     description: IP address/subnet on the tenant network
  27.     type: string
  28.   ManagementIpSubnet: # Only populated when including environments/network-management.yaml
  29.     default: ''
  30.     description: IP address/subnet on the management 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: 500
  39.     description: Vlan ID for the external network traffic.
  40.     type: number
  41.   InternalApiNetworkVlanID:
  42.     default: 510
  43.     description: Vlan ID for the internal_api network traffic.
  44.     type: number
  45.   StorageNetworkVlanID:
  46.     default: 530
  47.     description: Vlan ID for the storage network traffic.
  48.     type: number
  49.   StorageMgmtNetworkVlanID:
  50.     default: 540
  51.     description: Vlan ID for the storage_mgmt network traffic.
  52.     type: number
  53.   TenantNetworkVlanID:
  54.     default: 520
  55.     description: Vlan ID for the tenant network traffic.
  56.     type: number
  57.   ManagementNetworkVlanID:
  58.     default:
  59.     description: Vlan ID for the management network traffic.
  60.     type: number
  61.   ExternalInterfaceDefaultRoute:
  62.     default: '10.11.12.1'
  63.     description: default route for the external network
  64.     type: string
  65.   ControlPlaneSubnetCidr: # Override this via parameter_defaults
  66.     default: '24'
  67.     description: The subnet CIDR of the control plane network.
  68.     type: string
  69.   ControlPlaneDefaultRoute: # Override this via parameter_defaults
  70.     description: The default route of the control plane network.
  71.     type: string
  72.   DnsServers: # Override this via parameter_defaults
  73.     default: []
  74.     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
  75.     type: comma_delimited_list
  76.   EC2MetadataIp: # Override this via parameter_defaults
  77.     description: The IP address of the EC2 metadata server.
  78.     type: string
  79.  
  80. resources:
  81.   OsNetConfigImpl:
  82.     type: OS::Heat::SoftwareConfig
  83.     properties:
  84.       group: script
  85.       config:
  86.         str_replace:
  87.           template:
  88.             get_file: /home/stack/scripts/run-os-net-config.sh
  89.             params:
  90.               $network_config:
  91.               network_config:
  92.               - type: interface
  93.                 name: nic1
  94.                 use_dhcp: false
  95.                 addresses:
  96.                 - ip_netmask:
  97.                     list_join:
  98.                    - /
  99.                     - - {get_param: ControlPlaneIp}
  100.                       - {get_param: ControlPlaneSubnetCidr}
  101.                 routes:
  102.                 - ip_netmask: 169.254.169.254/32
  103.                   next_hop: {get_param: EC2MetadataIp}
  104.                 - default: true
  105.                   next_hop: {get_param: ControlPlaneDefaultRoute}
  106.             # NIC2 CONF
  107.               - type: ovs_bridge
  108.                 name: {get_input: bridge_name}
  109.                 dns_servers: {get_param: DnsServers}
  110.                 use_dhcp: false
  111.                 members:
  112.                 - type: interface
  113.                   name: nic2
  114.                   use_dhcp: false
  115.                 - type: vlan
  116.                   device: nic2
  117.                   use_dhcp: false
  118.                   vlan_id: {get_param: ExternalNetworkVlanID}
  119.                   addresses:
  120.                   - ip_netmask: {get_param: ExternalIpSubnet}
  121.                   routes:
  122.                   - ip_netmask: 0.0.0.0/0
  123.                     next_hop: {get_param: ExternalInterfaceDefaultRoute}
  124.                 - type: vlan
  125.                   device: nic2
  126.                   use_dhcp: false
  127.                   vlan_id: {get_param: InternalApiNetworkVlanID}
  128.                   addresses:
  129.                   - ip_netmask:{get_param: InternalApiIpSubnet}
  130.                 - type: vlan
  131.                   device: nic2
  132.                   use_dhcp: false
  133.                   vlan_id: {get_param: StorageNetworkVlanID}
  134.                   addresses:
  135.                   - ip_netmask: {get_param: StorageIpSubnet}
  136.                 - type: vlan
  137.                   device: nic2
  138.                   use_dhcp: false
  139.                   vlan_id: {get_param: StorageMgmtNetworkVlanID}
  140.                   addresses:
  141.                   - ip_netmask: {get_param: StorageMgmtIpSubnet}
  142.                 - type: vlan
  143.                   device: nic2
  144.                   use_dhcp: false
  145.                   vlan_id: {get_param: TenantNetworkVlanID}
  146.                   addresses:
  147.                   - ip_netmask: {get_param: TenantIpSubnet}
  148.  
  149. outputs:
  150.   OS::stack_id:
  151.     description: The OsNetConfigImpl resource.
  152.     value: {get_resource: OsNetConfigImpl}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement