diff options
Diffstat (limited to 'manifests/profile/base/neutron')
-rw-r--r-- | manifests/profile/base/neutron/agents/ovn.pp | 38 | ||||
-rw-r--r-- | manifests/profile/base/neutron/midonet.pp | 4 | ||||
-rw-r--r-- | manifests/profile/base/neutron/opencontrail/vrouter.pp | 40 | ||||
-rw-r--r-- | manifests/profile/base/neutron/opendaylight.pp | 46 | ||||
-rw-r--r-- | manifests/profile/base/neutron/plugins/ml2.pp | 8 | ||||
-rw-r--r-- | manifests/profile/base/neutron/plugins/ml2/opendaylight.pp | 54 | ||||
-rw-r--r-- | manifests/profile/base/neutron/plugins/ml2/ovn.pp | 46 | ||||
-rw-r--r-- | manifests/profile/base/neutron/plugins/ovs/opendaylight.pp | 73 | ||||
-rw-r--r-- | manifests/profile/base/neutron/plumgrid.pp | 45 | ||||
-rw-r--r-- | manifests/profile/base/neutron/sriov.pp | 43 |
10 files changed, 395 insertions, 2 deletions
diff --git a/manifests/profile/base/neutron/agents/ovn.pp b/manifests/profile/base/neutron/agents/ovn.pp new file mode 100644 index 0000000..443b164 --- /dev/null +++ b/manifests/profile/base/neutron/agents/ovn.pp @@ -0,0 +1,38 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::base::neutron::agents::ovn +# +# OVN Neutron agent profile for tripleo +# +# [*ovn_db_host*] +# The IP-Address/Hostname where OVN DBs are deployed +# +# [*step*] +# (Optional) The current step in deployment. See tripleo-heat-templates +# for more details. +# Defaults to hiera('step') +# +class tripleo::profile::base::neutron::agents::ovn ( + $ovn_db_host, + $step = hiera('step') +) { + if $step >= 4 { + $ovn_sbdb_port = hiera('ovn::southbound::port') + class { '::ovn::controller': + ovn_remote => "tcp:${ovn_db_host}:${ovn_sbdb_port}", + ovn_encap_type => hiera('ovn::southboud::encap_type') + } + } +} diff --git a/manifests/profile/base/neutron/midonet.pp b/manifests/profile/base/neutron/midonet.pp index 9104cc3..3ba9dd9 100644 --- a/manifests/profile/base/neutron/midonet.pp +++ b/manifests/profile/base/neutron/midonet.pp @@ -67,8 +67,8 @@ class tripleo::profile::base::neutron::midonet ( $bind_address = hiera('neutron::bind_host', ''), $keystone_admin_token = hiera('keystone::admin_token', ''), $neutron_api_node_ips = hiera('neutron_api_node_ips', ''), - $neutron_auth_password = hiera('neutron::server::password', ''), - $neutron_auth_tenant = hiera('neutron::server::project_name', ''), + $neutron_auth_password = hiera('neutron::keystone::authtoken::password', ''), + $neutron_auth_tenant = hiera('neutron::keystone::authtoken::project_name', ''), $step = hiera('step'), $vip = hiera('public_virtual_ip'), $zk_on_controller = hiera('enable_zookeeper_on_controller', ''), diff --git a/manifests/profile/base/neutron/opencontrail/vrouter.pp b/manifests/profile/base/neutron/opencontrail/vrouter.pp new file mode 100644 index 0000000..90ab71c --- /dev/null +++ b/manifests/profile/base/neutron/opencontrail/vrouter.pp @@ -0,0 +1,40 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::base::neutron::opencontrail::vrouter +# +# Opencontrail profile to run the contrail vrouter +# +# === Parameters +# +# [*step*] +# (Optional) The current step of the deployment +# Defaults to hiera('step') +# +class tripleo::profile::base::neutron::opencontrail::vrouter ( + $step = hiera('step'), +) { + + if $step >= 4 { + + include ::contrail::vrouter + # NOTE: it's not possible to use this class without a functional + # contrail controller up and running + #class {'::contrail::vrouter::provision_vrouter': + # require => Class['contrail::vrouter'], + #} + + } + +} diff --git a/manifests/profile/base/neutron/opendaylight.pp b/manifests/profile/base/neutron/opendaylight.pp new file mode 100644 index 0000000..ffe28ce --- /dev/null +++ b/manifests/profile/base/neutron/opendaylight.pp @@ -0,0 +1,46 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::base::neutron::opendaylight +# +# OpenDaylight Neutron profile for TripleO +# +# === Parameters +# +# [*step*] +# (Optional) The current step of the deployment +# Defaults to hiera('step') +# +# [*primary_controller*] +# (Optional) The hostname of the first controller +# Defaults to hiera('bootstrap_nodeid', undef) +# +class tripleo::profile::base::neutron::opendaylight ( + $step = hiera('step'), + $primary_controller = hiera('bootstrap_nodeid', undef), +) { + + include ::tripleo::profile::base::neutron + + if ! str2bool(hiera('opendaylight::enable_l3')) { + include ::tripleo::profile::base::neutron::l3 + } + + if $step >= 1 { + # Configure ODL only on first controller + if hiera('odl_on_controller') and $primary_controller == downcase($::hostname) { + include ::opendaylight + } + } +} diff --git a/manifests/profile/base/neutron/plugins/ml2.pp b/manifests/profile/base/neutron/plugins/ml2.pp index c89bc02..4f4de0b 100644 --- a/manifests/profile/base/neutron/plugins/ml2.pp +++ b/manifests/profile/base/neutron/plugins/ml2.pp @@ -63,5 +63,13 @@ class tripleo::profile::base::neutron::plugins::ml2 ( if 'bsn_ml2' in $mechanism_drivers { include ::neutron::plugins::ml2::bigswitch::restproxy } + + if 'opendaylight' in $mechanism_drivers { + include ::tripleo::profile::base::neutron::plugins::ml2::opendaylight + } + + if 'ovn' in $mechanism_drivers { + include ::tripleo::profile::base::neutron::plugins::ml2::ovn + } } } diff --git a/manifests/profile/base/neutron/plugins/ml2/opendaylight.pp b/manifests/profile/base/neutron/plugins/ml2/opendaylight.pp new file mode 100644 index 0000000..f25aea6 --- /dev/null +++ b/manifests/profile/base/neutron/plugins/ml2/opendaylight.pp @@ -0,0 +1,54 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::base::neutron::plugins::ml2::opendaylight +# +# OpenDaylight ML2 Neutron profile for TripleO +# +# === Parameters +# +# [*odl_port*] +# (Optional) Port to use for OpenDaylight +# Defaults to hiera('opendaylight::odl_rest_port') +# +# [*conn_proto*] +# (Optional) Protocol to use to for ODL REST access +# Defaults to hiera('opendaylight::nb_connection_protocol') +# +# [*step*] +# (Optional) The current step in deployment. See tripleo-heat-templates +# for more details. +# Defaults to hiera('step') +# +class tripleo::profile::base::neutron::plugins::ml2::opendaylight ( + $odl_port = hiera('opendaylight::odl_rest_port'), + $conn_proto = hiera('opendaylight::nb_connection_protocol'), + $step = hiera('step'), +) { + + if $step >= 4 { + # Figure out ODL IP + if hiera('odl_on_controller') { + $odl_url_ip = hiera('opendaylight_api_vip') + } else { + $odl_url_ip = hiera('opendaylight::odl_bind_ip') + } + + if ! $odl_url_ip { fail('OpenDaylight Controller IP/VIP is Empty') } + + class { '::neutron::plugins::ml2::opendaylight': + odl_url => "${conn_proto}://${odl_url_ip}:${odl_port}/controller/nb/v2/neutron"; + } + } +} diff --git a/manifests/profile/base/neutron/plugins/ml2/ovn.pp b/manifests/profile/base/neutron/plugins/ml2/ovn.pp new file mode 100644 index 0000000..46477a7 --- /dev/null +++ b/manifests/profile/base/neutron/plugins/ml2/ovn.pp @@ -0,0 +1,46 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::base::neutron::plugins::ml2::ovn +# +# OVN Neutron ML2 profile for tripleo +# +# [*ovn_db_host*] +# The IP-Address/Hostname where OVN DBs are deployed +# +# [*step*] +# (Optional) The current step in deployment. See tripleo-heat-templates +# for more details. +# Defaults to hiera('step') +# +class tripleo::profile::base::neutron::plugins::ml2::ovn ( + $ovn_db_host, + $step = hiera('step') +) { + if $step >= 4 { + if $::hostname == $ovn_db_host { + # NOTE: we might split northd from plugin later, in the case of + # micro-services, where neutron-server & northd are not in the same + # containers + include ::ovn::northd + } + $ovn_nb_port = hiera('ovn::northbound::port') + $ovn_sb_port = hiera('ovn::southbound::port') + class { '::neutron::plugins::ml2::ovn': + ovn_nb_connection => "tcp:${ovn_db_host}:${ovn_nb_port}", + ovn_sb_connection => "tcp:${ovn_db_host}:${ovn_sb_port}", + } + } +} + diff --git a/manifests/profile/base/neutron/plugins/ovs/opendaylight.pp b/manifests/profile/base/neutron/plugins/ovs/opendaylight.pp new file mode 100644 index 0000000..7548046 --- /dev/null +++ b/manifests/profile/base/neutron/plugins/ovs/opendaylight.pp @@ -0,0 +1,73 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::base::neutron::plugins::ovs::opendaylight +# +# OpenDaylight Neutron OVS profile for TripleO +# +# === Parameters +# +# [*odl_port*] +# (Optional) Port to use for OpenDaylight +# Defaults to hiera('opendaylight::odl_rest_port') +# +# [*odl_check_url*] +# (Optional) URL path used to check if ODL is up +# Defaults to hiera('opendaylight_check_url') +# +# [*odl_api_ips*] +# (Optional) List of OpenStack Controller IPs for ODL API +# Defaults to hiera('opendaylight_api_node_ips') +# +# [*conn_proto*] +# (Optional) Protocol to use to for ODL REST access +# Defaults to hiera('opendaylight::nb_connection_protocol') +# +# [*step*] +# (Optional) The current step in deployment. See tripleo-heat-templates +# for more details. +# Defaults to hiera('step') +# +class tripleo::profile::base::neutron::plugins::ovs::opendaylight ( + $odl_port = hiera('opendaylight::odl_rest_port'), + $odl_check_url = hiera('opendaylight_check_url'), + $odl_api_ips = hiera('opendaylight_api_node_ips'), + $conn_proto = hiera('opendaylight::nb_connection_protocol'), + $step = hiera('step'), +) { + + if $step >= 4 { + # Figure out ODL IP (and VIP if on controller) + if hiera('odl_on_controller') { + $opendaylight_controller_ip = $odl_api_ips[0] + $odl_url_ip = hiera('opendaylight_api_vip') + } else { + $opendaylight_controller_ip = hiera('opendaylight::odl_bind_ip') + $odl_url_ip = $opendaylight_controller_ip + } + + if ! $opendaylight_controller_ip { fail('OpenDaylight Controller IP is Empty') } + + if ! $odl_url_ip { fail('OpenDaylight API VIP is Empty') } + + # Build URL to check if ODL is up before connecting OVS + $opendaylight_url = "${conn_proto}://${odl_url_ip}:${odl_port}/${odl_check_url}" + + class { '::neutron::plugins::ovs::opendaylight': + tunnel_ip => hiera('neutron::agents::ml2::ovs::local_ip'), + odl_check_url => $opendaylight_url, + odl_ovsdb_iface => "tcp:${opendaylight_controller_ip}:6640", + } + } +} diff --git a/manifests/profile/base/neutron/plumgrid.pp b/manifests/profile/base/neutron/plumgrid.pp new file mode 100644 index 0000000..03dc101 --- /dev/null +++ b/manifests/profile/base/neutron/plumgrid.pp @@ -0,0 +1,45 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::base::neutron::plumgrid +# +# Plumgrid Neutron helper profile (extra settings for compute, etc. roles) +# +# === Parameters +# [*step*] +# (Optional) The current step of the deployment +# Defaults to hiera('step') +# +class tripleo::profile::base::neutron::plumgrid ( + $step = hiera('step'), +) { + + if $step >= 4 { + + # forward all ipv4 traffic + # this is required for the vms to pass through the gateways public interface + sysctl::value { 'net.ipv4.ip_forward': value => '1' } + + # ifc_ctl_pp needs to be invoked by root as part of the vif.py when a VM is powered on + file { '/etc/sudoers.d/ifc_ctl_sudoers': + ensure => file, + owner => root, + group => root, + mode => '0440', + content => "nova ALL=(root) NOPASSWD: /opt/pg/bin/ifc_ctl_pp *\n", + } + + } + +} diff --git a/manifests/profile/base/neutron/sriov.pp b/manifests/profile/base/neutron/sriov.pp new file mode 100644 index 0000000..00ecc21 --- /dev/null +++ b/manifests/profile/base/neutron/sriov.pp @@ -0,0 +1,43 @@ +# Copyright 2016 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: tripleo::profile::base::neutron::sriov +# +# Neutron SR-IOV nic Agent profile for tripleo +# +# === Parameters +# +# [*step*] +# (Optional) The current step in deployment. See tripleo-heat-templates +# for more details. +# Defaults to hiera('step') +# +# [*mechanism_drivers*] +# (Optional) The mechanism drivers to use with the Ml2 plugin +# Defaults to hiera('neutron::plugins::ml2::mechanism_drivers') +# + +class tripleo::profile::base::neutron::sriov( + $step = hiera('step'), + $mechanism_drivers = hiera('neutron::plugins::ml2::mechanism_drivers'), +) { + + if $step >= 4 { + if 'sriovnicswitch' in $mechanism_drivers { + include ::neutron::agents::ml2::sriov + include ::tripleo::host::sriov + } + } + +} |