aboutsummaryrefslogtreecommitdiffstats
path: root/network/external.yaml
blob: 21260d3f3573755b3f66e0062e2920e053466c9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
heat_template_version: ocata

description: >
  External network. Public traffic, Neutron l3router for floating IPs/SNAT, etc.

parameters:
  # the defaults here work for static IP assignment (IPAM) only
  ExternalNetCidr:
    default: '10.0.0.0/24'
    description: Cidr for the external network.
    type: string
  ExternalNetValueSpecs:
    default: {'provider:physical_network': 'external', 'provider:network_type': 'flat'}
    description: Value specs for the external network.
    type: json
  ExternalNetAdminStateUp:
    default: false
    description: This admin state of the network.
    type: boolean
  ExternalNetEnableDHCP:
    default: false
    description: Whether to enable DHCP on the associated subnet.
    type: boolean
  ExternalNetShared:
    default: false
    description: Whether this network is shared across all tenants.
    type: boolean
  ExternalNetName:
    default: external
    description: The name of the external network.
    type: string
  ExternalSubnetName:
    default: external_subnet
    description: The name of the external subnet in Neutron.
    type: string
  ExternalAllocationPools:
    default: [{'start': '10.0.0.4', 'end': '10.0.0.250'}]
    description: Ip allocation pool range for the external network.
    type: json
  ExternalInterfaceDefaultRoute:
    default: '10.0.0.1'
    description: default route for the external network
    type: string

resources:
  ExternalNetwork:
    type: OS::Neutron::Net
    properties:
      admin_state_up: {get_param: ExternalNetAdminStateUp}
      name: {get_param: ExternalNetName}
      shared: {get_param: ExternalNetShared}
      value_specs: {get_param: ExternalNetValueSpecs}

  ExternalSubnet:
    type: OS::Neutron::Subnet
    properties:
      cidr: {get_param: ExternalNetCidr}
      enable_dhcp: {get_param: ExternalNetEnableDHCP}
      name: {get_param: ExternalSubnetName}
      network: {get_resource: ExternalNetwork}
      allocation_pools: {get_param: ExternalAllocationPools}
      gateway_ip: {get_param: ExternalInterfaceDefaultRoute}

outputs:
  OS::stack_id:
    description: Neutron external network
    value: {get_resource: ExternalNetwork}
sired number of PMD threads can all play a role in configuring this setting. These cores should be on the same socket where OvsDpdkSocketMemory is assigned. If using hyperthreading then specify both logical cores that would equal the physical core. Also, specifying more than one core will trigger multiple PMD threads to be spawned which may improve dataplane performance. constraints: - allowed_pattern: "[0-9,-]*" type: string default: "" # DEPRECATED: the following options are deprecated and are currently maintained # for backwards compatibility. They will be removed in the Queens cycle. HostCpusList: description: List of cores to be used for host process type: string constraints: - allowed_pattern: "[0-9,-]*" default: '' NeutronDpdkCoreList: description: List of cores to be used for DPDK Poll Mode Driver type: string constraints: - allowed_pattern: "[0-9,-]*" default: '' NeutronDpdkMemoryChannels: description: Number of memory channels to be used for DPDK type: string constraints: - allowed_pattern: "[0-9]*" default: '' NeutronDpdkSocketMemory: default: '' description: Memory allocated for each socket type: string NeutronDpdkDriverType: default: "vfio-pci" description: DPDK Driver type type: string parameter_groups: - label: deprecated description: Do not use deprecated params, they will be removed. parameters: - HostCpusList - NeutronDpdkCoreList - NeutronDpdkMemoryChannels - NeutronDpdkSocketMemory - NeutronDpdkDriverType conditions: l_cores_empty: {equals: [{get_param: OvsDpdkCoreList}, '']} pmd_cores_empty: {equals: [{get_param: OvsPmdCoreList}, '']} mem_channels_empty: {equals: [{get_param: OvsDpdkMemoryChannels}, '']} socket_mem_empty: {equals: [{get_param: OvsDpdkSocketMemory}, '']} driver_not_set: {equals: [{get_param: OvsDpdkDriverType}, 'vfio-pci']} outputs: role_data: description: Role data for the Open vSwitch service. value: service_name: openvswitch config_settings: map_replace: - map_replace: - vswitch::dpdk::driver_type: OvsDpdkDriverType vswitch::dpdk::host_core_list: OvsDpdkCoreList vswitch::dpdk::pmd_core_list: OvsPmdCoreList vswitch::dpdk::memory_channels: OvsDpdkMemoryChannels vswitch::dpdk::socket_mem: OvsDpdkSocketMemory - values: {get_param: [RoleParameters]} - values: OvsDpdkCoreList: {if: [l_cores_empty, {get_param: HostCpusList}, {get_param: OvsDpdkCoreList}]} OvsDpdkMemoryChannels: {if: [mem_channels_empty, {get_param: NeutronDpdkMemoryChannels}, {get_param: OvsDpdkMemoryChannels}]} OvsDpdkSocketMemory: {if: [socket_mem_empty, {get_param: NeutronDpdkSocketMemory}, {get_param: OvsDpdkSocketMemory}]} OvsDpdkDriverType: {if: [driver_not_set, {get_param: NeutronDpdkDriverType}, {get_param: OvsDpdkDriverType}]} OvsPmdCoreList: {if: [pmd_cores_empty, {get_param: NeutronDpdkCoreList}, {get_param: OvsPmdCoreList}]} upgrade_tasks: - name: Check openvswitch version. tags: step2 register: ovs_version ignore_errors: true shell: rpm -qa | awk -F- '/^openvswitch-2/{print $2 "-" $3}' - name: Check openvswitch packaging. tags: step2 shell: rpm -q --scripts openvswitch | awk '/postuninstall/,/*/' | grep -q "systemctl.*try-restart" register: ovs_packaging_issue ignore_errors: true - block: - name: "Ensure empty directory: emptying." file: state: absent path: /root/OVS_UPGRADE - name: "Ensure empty directory: creating." file: state: directory path: /root/OVS_UPGRADE owner: root group: root mode: 0750 - name: Download OVS packages. command: yumdownloader --destdir /root/OVS_UPGRADE --resolve openvswitch - name: Get rpm list for manual upgrade of OVS. shell: ls -1 /root/OVS_UPGRADE/*.rpm register: ovs_list_of_rpms - name: Manual upgrade of OVS shell: | rpm -U --test {{item}} 2>&1 | grep "already installed" || \ rpm -U --replacepkgs --notriggerun --nopostun {{item}}; args: chdir: /root/OVS_UPGRADE with_items: - "{{ovs_list_of_rpms.stdout_lines}}" tags: step2 when: "'2.5.0-14' in '{{ovs_version.stdout}}' or ovs_packaging_issue|succeeded"