Add VPP and Honeycomb services (#104) 95/37795/5
authorFeng Pan <fpan@redhat.com>
Wed, 19 Jul 2017 16:40:59 +0000 (12:40 -0400)
committerFeng Pan <fpan@redhat.com>
Sun, 30 Jul 2017 17:26:48 +0000 (13:26 -0400)
- Add VPP and honeycomb service
- Add NeutronOverlayIPVersion setting for IPv6 vxlan tunnel endpoint

Change-Id: If11092e6581445a70e63c8f6c48518698b3cc8fc
Signed-off-by: Feng Pan <fpan@redhat.com>
15 files changed:
environments/neutron-ml2-vpp.yaml [new file with mode: 0644]
environments/neutron-opendaylight-honeycomb.yaml [new file with mode: 0644]
environments/neutron-opendaylight-netvirt-vpp.yaml [new file with mode: 0644]
environments/services/vpp.yaml [new file with mode: 0644]
network/service_net_map.j2.yaml
overcloud-resource-registry-puppet.j2.yaml
puppet/compute-role.yaml
puppet/controller-role.yaml
puppet/services/etcd.yaml
puppet/services/neutron-odl-honeycomb-agent.yaml [new file with mode: 0644]
puppet/services/neutron-plugin-ml2.yaml
puppet/services/neutron-vpp-agent.yaml [new file with mode: 0644]
puppet/services/opendaylight-api.yaml
puppet/services/vpp.yaml [new file with mode: 0644]
roles_data.yaml

diff --git a/environments/neutron-ml2-vpp.yaml b/environments/neutron-ml2-vpp.yaml
new file mode 100644 (file)
index 0000000..704f1e7
--- /dev/null
@@ -0,0 +1,23 @@
+# Environment file used to enable networking-vpp ML2 mechanism driver
+
+resource_registry:
+  OS::TripleO::Services::NeutronOvsAgent: OS::Heat::None
+  OS::TripleO::Services::ComputeNeutronOvsAgent: OS::Heat::None
+  OS::TripleO::Services::NeutronVppAgent: ../puppet/services/neutron-vpp-agent.yaml
+  OS::TripleO::Services::Etcd: ../puppet/services/etcd.yaml
+  OS::TripleO::Services::Vpp: ../puppet/services/vpp.yaml
+
+parameter_defaults:
+  #Comma delimited list of <physical_network>:<VPP Interface>.
+  #Example: "datacentre:GigabitEthernet2/2/0"
+  #NeutronVPPAgentPhysnets: ""
+
+  NeutronMechanismDrivers: vpp
+  NeutronNetworkType: vlan
+  NeutronServicePlugins: router
+  NeutronL3HA: false
+  NeutronTypeDrivers: vlan,flat
+  ExtraConfig:
+    # Use Linux Bridge driver for DHCP and L3 agent.
+    neutron::agents::dhcp::interface_driver: "neutron.agent.linux.interface.BridgeInterfaceDriver"
+    neutron::agents::l3::interface_driver: "neutron.agent.linux.interface.BridgeInterfaceDriver"
diff --git a/environments/neutron-opendaylight-honeycomb.yaml b/environments/neutron-opendaylight-honeycomb.yaml
new file mode 100644 (file)
index 0000000..6837fbe
--- /dev/null
@@ -0,0 +1,26 @@
+# A Heat environment that can be used to deploy OpenDaylight with Honeycomb Agent
+resource_registry:
+  OS::TripleO::Services::NeutronOvsAgent: OS::Heat::None
+  OS::TripleO::Services::ComputeNeutronOvsAgent: OS::Heat::None
+  OS::TripleO::Services::ComputeNeutronCorePlugin: OS::Heat::None
+  OS::TripleO::Services::NeutronCorePlugin: ../puppet/services/neutron-plugin-ml2-odl.yaml
+  OS::TripleO::Services::OpenDaylightApi: ../puppet/services/opendaylight-api.yaml
+  OS::TripleO::Services::NeutronHoneycombAgent: ../puppet/services/neutron-odl-honeycomb-agent.yaml
+  OS::TripleO::Services::Vpp: ../puppet/services/vpp.yaml
+  OS::TripleO::Services::NeutronL3Agent: OS::Heat::None
+
+parameter_defaults:
+  NeutronNetworkType: 'vxlan'
+  NeutronL3HA: false
+  #NUMATopologyFilter is required for vhostuser interfaces
+  #NovaSchedulerDefaultFilters: "RamFilter,ComputeFilter,AvailabilityZoneFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,NUMATopologyFilter"
+  OpenDaylightFeatures: "odl-netconf-all,odl-vbd,odl-groupbasedpolicy-neutron-vpp-mapper,odl-restconf"
+  NeutronEnableForceMetadata: true
+  NeutronMechanismDrivers: 'opendaylight_v2'
+  NeutronServicePlugins: 'odl-router_v2'
+  #Opendaylight Port binding controller
+  OpenDaylightPortBindingController: 'pseudo-agentdb-binding'
+  #URI for neutron hostconfig in Opendaylight
+  OpenDaylightHostconfURI: 'restconf/operational/neutron:neutron/hostconfigs'
+  ExtraConfig:
+    neutron::agents::dhcp::interface_driver: "neutron.agent.linux.interface.NSDriver"
diff --git a/environments/neutron-opendaylight-netvirt-vpp.yaml b/environments/neutron-opendaylight-netvirt-vpp.yaml
new file mode 100644 (file)
index 0000000..94e5679
--- /dev/null
@@ -0,0 +1,26 @@
+# A Heat environment that can be used to deploy OpenDaylight with Honeycomb Agent
+resource_registry:
+  OS::TripleO::Services::NeutronOvsAgent: OS::Heat::None
+  OS::TripleO::Services::ComputeNeutronOvsAgent: OS::Heat::None
+  OS::TripleO::Services::ComputeNeutronCorePlugin: OS::Heat::None
+  OS::TripleO::Services::OpenDaylightApi: ../puppet/services/opendaylight-api.yaml
+  OS::TripleO::Services::NeutronHoneycombAgent: ../puppet/services/neutron-odl-honeycomb-agent.yaml
+  OS::TripleO::Services::Vpp: ../puppet/services/vpp.yaml
+  OS::TripleO::Services::NeutronL3Agent: OS::Heat::None
+
+parameter_defaults:
+  NeutronNetworkType: 'vxlan'
+  NeutronL3HA: false
+  #NUMATopologyFilter is required for vhostuser interfaces
+  #NovaSchedulerDefaultFilters: "RamFilter,ComputeFilter,AvailabilityZoneFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,NUMATopologyFilter"
+  OpenDaylightFeatures: "odl-neutron-hostconfig-vpp,odl-netvirt-openstack"
+  NeutronEnableForceMetadata: true
+  NeutronMechanismDrivers: 'opendaylight_v2'
+  NeutronServicePlugins: 'odl-router_v2'
+  OpenDaylightEnableL3: "'yes'"
+  #Opendaylight Port binding controller
+  OpenDaylightPortBindingController: 'pseudo-agentdb-binding'
+  #URI for neutron hostconfig in Opendaylight
+  OpenDaylightHostconfURI: 'restconf/operational/neutron:neutron/hostconfigs'
+  ExtraConfig:
+    neutron::agents::dhcp::interface_driver: "neutron.agent.linux.interface.NSDriver"
diff --git a/environments/services/vpp.yaml b/environments/services/vpp.yaml
new file mode 100644 (file)
index 0000000..9bad70f
--- /dev/null
@@ -0,0 +1,9 @@
+resource_registry:
+  OS::TripleO::Services::Vpp: ../../puppet/services/vpp.yaml
+
+#parameter_defaults:
+  #VPP main thread core pinning
+  #VppCpuMainCore: '1'
+
+  #List of cores for VPP worker thread pinning
+  #VppCpuCorelistWorkers: ['3','4']
index 57da9a1..1aa868e 100644 (file)
@@ -79,6 +79,9 @@ parameters:
       MistralApiNetwork: internal_api
       ZaqarApiNetwork: internal_api
       PacemakerRemoteNetwork: internal_api
+      EtcdNetwork: internal_api
+      GluonNetwork: internal_api
+      HoneycombNetwork: internal_api
       # We special-case the default ResolveNetwork for the CephStorage role
       # for backwards compatibility, all other roles default to internal_api
       CephStorageHostnameResolveNetwork: storage
index b6e0eab..9388f04 100644 (file)
@@ -247,6 +247,10 @@ resource_registry:
   OS::TripleO::Services::OctaviaHousekeeping: OS::Heat::None
   OS::TripleO::Services::OctaviaWorker: OS::Heat::None
   OS::TripleO::Services::MySQLClient: puppet/services/database/mysql-client.yaml
+  OS::TripleO::Services::Gluon: OS::Heat::None
+  OS::TripleO::Services::Vpp: OS::Heat::None
+  OS::TripleO::Services::NeutronHoneycombAgent: OS::Heat::None
+  OS::TripleO::Services::NeutronVppAgent: OS::Heat::None
 
 parameter_defaults:
   EnablePackageInstall: false
index 45794c1..fff5c01 100644 (file)
@@ -426,6 +426,7 @@ resources:
           - midonet_data # Optionally provided by AllNodesExtraConfig
           - neutron_opencontrail_data  # Optionally provided by ComputeExtraConfigPre
           - cisco_aci_data # Optionally provided by ComputeExtraConfigPre
+          - common # provided by os-net-config
         merge_behavior: deeper
         datafiles:
           service_names:
@@ -600,4 +601,4 @@ CTLPLANEIP,CTLPLANEHOST.DOMAIN,CTLPLANEHOST HOSTSSHPUBKEY"
   nova_server_resource:
     description: Heat resource handle for the Nova compute server
     value:
-      {get_resource: NovaCompute}
\ No newline at end of file
+      {get_resource: NovaCompute}
index 5593d15..badab48 100644 (file)
@@ -472,6 +472,7 @@ resources:
           - cisco_n1kv_data # Optionally provided by ControllerExtraConfigPre
           - midonet_data #Optionally provided by AllNodesExtraConfig
           - cisco_aci_data # Optionally provided by ControllerExtraConfigPre
+          - common # provided by os-net-config
         merge_behavior: deeper
         datafiles:
           service_names:
index d2a0e30..bc9e0f5 100644 (file)
@@ -36,7 +36,7 @@ outputs:
         etcd::etcd_name:
           str_replace:
             template:
-              '"%{::fqdn_$NETWORK}"'
+              '%{::fqdn_$NETWORK}'
             params:
               $NETWORK: {get_param: [ServiceNetMap, EtcdNetwork]}
         # NOTE: bind IP is found in Heat replacing the network name with the local node IP
diff --git a/puppet/services/neutron-odl-honeycomb-agent.yaml b/puppet/services/neutron-odl-honeycomb-agent.yaml
new file mode 100644 (file)
index 0000000..38308da
--- /dev/null
@@ -0,0 +1,74 @@
+heat_template_version: newton
+
+description: >
+  OpenStack Neutron Honeycomb agent configured with Puppet
+
+parameters:
+  ServiceNetMap:
+    default: {}
+    description: >
+      Mapping of service_name -> network name. Typically set via
+      parameter_defaults in the resource registry. This mapping overrides those
+      in ServiceNetMapDefaults.
+    type: json
+  DefaultPasswords:
+    default: {}
+    type: json
+  EndpointMap:
+    default: {}
+    description: Mapping of service endpoint -> protocol. Typically set
+                 via parameter_defaults in the resource registry.
+    type: json
+  HoneycombUser:
+    description: Username for Honeycomb agent
+    type: string
+    default: 'admin'
+  HoneycombPassword:
+    description: Password for Honeycomb agent
+    type: string
+    hidden: true
+    default: 'admin'
+  HoneycombRestPort:
+    description: Port for Honeycomb REST interface to listen on.
+    type: number
+    default: 8183
+  HoneycombNetconfSSHPort:
+    description: Honeycomb Netconf SSH binding port.
+    type: number
+    default: 2831
+  OpenDaylightUsername:
+    default: 'admin'
+    description: The username for the opendaylight server.
+    type: string
+  OpenDaylightPassword:
+    default: 'admin'
+    type: string
+    description: The password for the opendaylight server.
+    hidden: true
+  OpenDaylightPort:
+    default: 8081
+    description: OpenDaylight service port
+    type: number
+
+outputs:
+  role_data:
+    description: Role data for Honeycomb agent service.
+    value:
+      service_name: neutron_honeycomb_agent
+      config_settings:
+        fdio::honeycomb::user: {get_param: HoneycombUser}
+        fdio::honeycomb::password: {get_param: HoneycombPassword}
+        fdio::honeycomb::rest_port: {get_param: HoneycombRestPort}
+        fdio::honeycomb::opendaylight_ip: "%{hiera('opendaylight_api_vip')}"
+        fdio::honeycomb::opendaylight_port: {get_param: OpenDaylightPort}
+        fdio::honeycomb::opendaylight_username: {get_param: OpenDaylightUsername}
+        fdio::honeycomb::opendaylight_password: {get_param: OpenDaylightPassword}
+        fdio::honeycomb::bind_ip: {get_param: [ServiceNetMap, HoneycombNetwork]}
+        fdio::honeycomb::node_id: '%{::fqdn}'
+        tripleo.neutron_honeycomb_agent.firewall_rules:
+          '142 neutron honeycomb agent':
+            dport:
+              - {get_param: HoneycombRestPort}
+              - {get_param: HoneycombNetconfSSHPort}
+      step_config: |
+        include ::tripleo::profile::base::neutron::agents::honeycomb
index 3abd04f..0046f69 100644 (file)
@@ -60,6 +60,12 @@ parameters:
     default: 'vxlan'
     description: The tenant network type for Neutron.
     type: comma_delimited_list
+  NeutronOverlayIPVersion:
+    default: "4"
+    description: IP version used for all overlay network endpoints.
+    type: string
+    constraints:
+    - allowed_values: ["4","6"]
 resources:
 
   NeutronBase:
@@ -85,6 +91,7 @@ outputs:
             neutron::plugins::ml2::tunnel_id_ranges: {get_param: NeutronTunnelIdRanges}
             neutron::plugins::ml2::vni_ranges: {get_param: NeutronVniRanges}
             neutron::plugins::ml2::tenant_network_types: {get_param: NeutronNetworkType}
+            neutron::plugins::ml2::overlay_ip_version: {get_param: NeutronOverlayIPVersion}
 
       step_config: |
         include ::tripleo::profile::base::neutron::plugins::ml2
diff --git a/puppet/services/neutron-vpp-agent.yaml b/puppet/services/neutron-vpp-agent.yaml
new file mode 100644 (file)
index 0000000..3c51c90
--- /dev/null
@@ -0,0 +1,48 @@
+heat_template_version: newton
+
+description: >
+  OpenStack Neutron ML2/VPP agent configured with Puppet
+
+parameters:
+  ServiceNetMap:
+    default: {}
+    description: >
+      Mapping of service_name -> network name. Typically set via
+      parameter_defaults in the resource registry. This mapping overrides those
+      in ServiceNetMapDefaults.
+    type: json
+  DefaultPasswords:
+    default: {}
+    type: json
+  EndpointMap:
+    default: {}
+    description: Mapping of service endpoint -> protocol. Typically set
+                 via parameter_defaults in the resource registry.
+    type: json
+  NeutronVPPAgentPhysnets:
+    description: >
+      List of <physical_network>:<VPP Interface>
+      Example: "physnet1:GigabitEthernet2/2/0,physnet2:GigabitEthernet2/3/0"
+    type: comma_delimited_list
+    default: ""
+
+resources:
+
+  NeutronBase:
+    type: ./neutron-base.yaml
+    properties:
+      ServiceNetMap: {get_param: ServiceNetMap}
+      DefaultPasswords: {get_param: DefaultPasswords}
+      EndpointMap: {get_param: EndpointMap}
+
+outputs:
+  role_data:
+    description: Role data for the Neutron ML2/VPP agent service.
+    value:
+      service_name: neutron_vpp_agent
+      config_settings:
+        map_merge:
+          - get_attr: [NeutronBase, role_data, config_settings]
+          - tripleo::profile::base::neutron::agents::vpp::physnet_mapping: {get_param: NeutronVPPAgentPhysnets}
+      step_config: |
+        include ::tripleo::profile::base::neutron::agents::vpp
index 6882aef..6bd6b57 100644 (file)
@@ -32,6 +32,10 @@ parameters:
   OpenDaylightApiVirtualIP:
     type: string
     default: ''
+  OpenDaylightHostconfURI:
+    description: URI for neutron hostconfig in OpenDaylight.
+    type: string
+    default: ''
   EndpointMap:
     default: {}
     description: Mapping of service endpoint -> protocol. Typically set
@@ -60,13 +64,16 @@ outputs:
         opendaylight::enable_dhcp: {get_param: OpenDaylightEnableDHCP}
         opendaylight::odl_bind_ip: {get_param: [ServiceNetMap, OpendaylightApiNetwork]}
         opendaylight::nb_connection_protocol: {get_param: OpenDaylightConnectionProtocol}
+        neutron::plugins::ml2::opendaylight::odl_hostconf_uri: {get_param: OpenDaylightHostconfURI}
         tripleo.opendaylight_api.firewall_rules:
               '137 opendaylight api':
                 dport:
                   - {get_param: OpenDaylightPort}
+                  - 2550
+                  - 6633
                   - 6640
                   - 6653
-                  - 2550
+                  - 8101
       step_config: |
         include tripleo::profile::base::neutron::opendaylight
       upgrade_tasks:
diff --git a/puppet/services/vpp.yaml b/puppet/services/vpp.yaml
new file mode 100644 (file)
index 0000000..37cb0a8
--- /dev/null
@@ -0,0 +1,45 @@
+heat_template_version: newton
+
+description: >
+  Vpp service configured with Puppet
+
+parameters:
+  ServiceNetMap:
+    default: {}
+    description: Mapping of service_name -> network name. Typically set
+                 via parameter_defaults in the resource registry.  This
+                 mapping overrides those in ServiceNetMapDefaults.
+    type: json
+  DefaultPasswords:
+    default: {}
+    type: json
+  EndpointMap:
+    default: {}
+    description: Mapping of service endpoint -> protocol. Typically set
+                 via parameter_defaults in the resource registry.
+    type: json
+  VppCpuMainCore:
+    default: ''
+    description: VPP main thread core pinning.
+    type: string
+  VppCpuCorelistWorkers:
+    default: ''
+    description: List of cores for VPP worker thread pinning
+    type: string
+  MonitoringSubscriptionVpp:
+    default: 'overcloud-vpp'
+    type: string
+
+outputs:
+  role_data:
+    description: Role data for the Vpp role.
+    value:
+      service_name: vpp
+      monitoring_subscription: {get_param: MonitoringSubscriptionVpp}
+      config_settings:
+        # Core pinning is being set in controller_extraconfig and compute_extraconfig to allow
+        # role specifc settings
+        #fdio::vpp_cpu_main_core: {get_param: VppCpuMainCore}
+        #fdio::vpp_cpu_corelist_workers: {get_param: VppCpuCorelistWorkers}
+      step_config: |
+        include ::tripleo::profile::base::vpp
index edbf8b4..a265b46 100644 (file)
     - OS::TripleO::Services::OctaviaHealthManager
     - OS::TripleO::Services::OctaviaHousekeeping
     - OS::TripleO::Services::OctaviaWorker
+    - OS::TripleO::Services::Gluon
+    - OS::TripleO::Services::Vpp
+    - OS::TripleO::Services::NeutronHoneycombAgent
+    - OS::TripleO::Services::NeutronVppAgent
 
 - name: Compute
   CountDefault: 1
     - OS::TripleO::Services::FluentdClient
     - OS::TripleO::Services::AuditD
     - OS::TripleO::Services::Collectd
+    - OS::TripleO::Services::VipHosts
+    - OS::TripleO::Services::Vpp
+    - OS::TripleO::Services::NeutronHoneycombAgent
+    - OS::TripleO::Services::NeutronVppAgent
 
 - name: BlockStorage
   ServicesDefault: