From baaad6f6e5fb15f131858ac0f49e02ec336118bc Mon Sep 17 00:00:00 2001 From: Feng Pan Date: Wed, 19 Jul 2017 12:40:59 -0400 Subject: Add VPP and Honeycomb services (#104) - Add VPP and honeycomb service - Add NeutronOverlayIPVersion setting for IPv6 vxlan tunnel endpoint Change-Id: If11092e6581445a70e63c8f6c48518698b3cc8fc Signed-off-by: Feng Pan --- environments/neutron-ml2-vpp.yaml | 23 +++++++ environments/neutron-opendaylight-honeycomb.yaml | 26 ++++++++ environments/neutron-opendaylight-netvirt-vpp.yaml | 26 ++++++++ environments/services/vpp.yaml | 9 +++ network/service_net_map.j2.yaml | 3 + overcloud-resource-registry-puppet.j2.yaml | 4 ++ puppet/compute-role.yaml | 3 +- puppet/controller-role.yaml | 1 + puppet/services/etcd.yaml | 2 +- puppet/services/neutron-odl-honeycomb-agent.yaml | 74 ++++++++++++++++++++++ puppet/services/neutron-plugin-ml2.yaml | 7 ++ puppet/services/neutron-vpp-agent.yaml | 48 ++++++++++++++ puppet/services/opendaylight-api.yaml | 9 ++- puppet/services/vpp.yaml | 45 +++++++++++++ roles_data.yaml | 8 +++ 15 files changed, 285 insertions(+), 3 deletions(-) create mode 100644 environments/neutron-ml2-vpp.yaml create mode 100644 environments/neutron-opendaylight-honeycomb.yaml create mode 100644 environments/neutron-opendaylight-netvirt-vpp.yaml create mode 100644 environments/services/vpp.yaml create mode 100644 puppet/services/neutron-odl-honeycomb-agent.yaml create mode 100644 puppet/services/neutron-vpp-agent.yaml create mode 100644 puppet/services/vpp.yaml diff --git a/environments/neutron-ml2-vpp.yaml b/environments/neutron-ml2-vpp.yaml new file mode 100644 index 00000000..704f1e7f --- /dev/null +++ b/environments/neutron-ml2-vpp.yaml @@ -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 :. + #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 index 00000000..6837fbe1 --- /dev/null +++ b/environments/neutron-opendaylight-honeycomb.yaml @@ -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 index 00000000..94e56795 --- /dev/null +++ b/environments/neutron-opendaylight-netvirt-vpp.yaml @@ -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 index 00000000..9bad70f8 --- /dev/null +++ b/environments/services/vpp.yaml @@ -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'] diff --git a/network/service_net_map.j2.yaml b/network/service_net_map.j2.yaml index 57da9a19..1aa868ef 100644 --- a/network/service_net_map.j2.yaml +++ b/network/service_net_map.j2.yaml @@ -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 diff --git a/overcloud-resource-registry-puppet.j2.yaml b/overcloud-resource-registry-puppet.j2.yaml index b6e0eab6..9388f04b 100644 --- a/overcloud-resource-registry-puppet.j2.yaml +++ b/overcloud-resource-registry-puppet.j2.yaml @@ -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 diff --git a/puppet/compute-role.yaml b/puppet/compute-role.yaml index 45794c12..fff5c01c 100644 --- a/puppet/compute-role.yaml +++ b/puppet/compute-role.yaml @@ -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} diff --git a/puppet/controller-role.yaml b/puppet/controller-role.yaml index 5593d15e..badab487 100644 --- a/puppet/controller-role.yaml +++ b/puppet/controller-role.yaml @@ -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: diff --git a/puppet/services/etcd.yaml b/puppet/services/etcd.yaml index d2a0e302..bc9e0f5e 100644 --- a/puppet/services/etcd.yaml +++ b/puppet/services/etcd.yaml @@ -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 index 00000000..38308da7 --- /dev/null +++ b/puppet/services/neutron-odl-honeycomb-agent.yaml @@ -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 diff --git a/puppet/services/neutron-plugin-ml2.yaml b/puppet/services/neutron-plugin-ml2.yaml index 3abd04f3..0046f698 100644 --- a/puppet/services/neutron-plugin-ml2.yaml +++ b/puppet/services/neutron-plugin-ml2.yaml @@ -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 index 00000000..3c51c90f --- /dev/null +++ b/puppet/services/neutron-vpp-agent.yaml @@ -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 : + 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 diff --git a/puppet/services/opendaylight-api.yaml b/puppet/services/opendaylight-api.yaml index 6882aeff..6bd6b57a 100644 --- a/puppet/services/opendaylight-api.yaml +++ b/puppet/services/opendaylight-api.yaml @@ -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 index 00000000..37cb0a81 --- /dev/null +++ b/puppet/services/vpp.yaml @@ -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 diff --git a/roles_data.yaml b/roles_data.yaml index edbf8b4e..a265b461 100644 --- a/roles_data.yaml +++ b/roles_data.yaml @@ -130,6 +130,10 @@ - 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 @@ -159,6 +163,10 @@ - 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: -- cgit 1.2.3-korg