aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitreview5
-rw-r--r--lib/puppet/parser/functions/vpp_physnet_mapping.rb25
-rw-r--r--manifests/certmonger/haproxy_dirs.pp4
-rw-r--r--manifests/profile/base/barometer.pp33
-rw-r--r--manifests/profile/base/neutron/agents/vpp.pp31
-rw-r--r--manifests/profile/base/neutron/plugins/ml2/vpp.pp6
6 files changed, 94 insertions, 10 deletions
diff --git a/.gitreview b/.gitreview
index 2b3425c..10b8f02 100644
--- a/.gitreview
+++ b/.gitreview
@@ -1,5 +1,4 @@
[gerrit]
-host=review.openstack.org
+host=gerrit.opnfv.org
port=29418
-project=openstack/puppet-tripleo.git
-defaultbranch=stable/pike
+project=apex-puppet-tripleo.git
diff --git a/lib/puppet/parser/functions/vpp_physnet_mapping.rb b/lib/puppet/parser/functions/vpp_physnet_mapping.rb
new file mode 100644
index 0000000..cd05f56
--- /dev/null
+++ b/lib/puppet/parser/functions/vpp_physnet_mapping.rb
@@ -0,0 +1,25 @@
+module Puppet::Parser::Functions
+ newfunction(:vpp_physnet_mapping, :type => :rvalue, :doc => "Convert VPP ML2 physnet mapping from kernel nic name (eth1) to VPP name (GigabitEthernet0/7/0).") do |arg|
+ mapping_list = arg[0]
+ mapping_list.map! do |item|
+ mapping = item.split(':')
+ unless mapping.length == 2
+ raise Puppet::ParseError, "Invalid physnet mapping format: #{item}. Expecting 'physnet:interface_name'"
+ end
+ if mapping[1].start_with?("tap")
+ vpp_int = mapping[1]
+ else
+ if defined? call_function
+ vpp_int = call_function('hiera', [mapping[1]])
+ else
+ vpp_int = function_hiera([mapping[1]])
+ end
+ end
+ if vpp_int.to_s.strip.empty?
+ raise Puppet::ParseError, "VPP interface mapped to #{mapping[1]} is not found."
+ end
+ mapping[0]+':'+vpp_int
+ end
+ return mapping_list.join(',')
+ end
+end
diff --git a/manifests/certmonger/haproxy_dirs.pp b/manifests/certmonger/haproxy_dirs.pp
index 86058c3..c85769f 100644
--- a/manifests/certmonger/haproxy_dirs.pp
+++ b/manifests/certmonger/haproxy_dirs.pp
@@ -1,10 +1,10 @@
# Copyright 2017 Red Hat, Inc.
#
-# Licensed under the haproxy License, Version 2.0 (the "License"); you may
+# 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.haproxy.org/licenses/LICENSE-2.0
+# 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
diff --git a/manifests/profile/base/barometer.pp b/manifests/profile/base/barometer.pp
new file mode 100644
index 0000000..3cda955
--- /dev/null
+++ b/manifests/profile/base/barometer.pp
@@ -0,0 +1,33 @@
+# Copyright 2017-2018 Intel Corporation.
+#
+# 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: tripeo::profile::base::barometer
+#
+# Barometer service profile for tripleo
+# == Parameters
+#
+# [*step]
+# The current step of the deployment
+#
+
+class tripleo::profile::base::barometer (
+ $step = hiera('step'),
+) {
+ if $step >= 5 {
+ include ::barometer::rdt
+ include ::barometer::collectd
+ }
+}
+
diff --git a/manifests/profile/base/neutron/agents/vpp.pp b/manifests/profile/base/neutron/agents/vpp.pp
index 6c55b86..0b06b57 100644
--- a/manifests/profile/base/neutron/agents/vpp.pp
+++ b/manifests/profile/base/neutron/agents/vpp.pp
@@ -31,19 +31,40 @@
# (Optional) etcd server listening port.
# Defaults to 2379
#
+# [*physnet_mapping*]
+# (Optional) physnet mapping, example: 'datacentre:eth1'. Note that the
+# interface specified here is a kernel interface name that is bound to
+# VPP.
+# Defaults to []
+#
+# [*type_drivers*]
+# (optional) List of network type driver entrypoints to be loaded
+# Could be an array that can contain flat, vlan or vxlan
+# Defaults to hiera('neutron::plugins::ml2::type_drivers', undef)
+#
class tripleo::profile::base::neutron::agents::vpp(
- $step = Integer(hiera('step')),
- $etcd_host = hiera('etcd_vip'),
- $etcd_port = 2379,
+ $step = Integer(hiera('step')),
+ $etcd_host = hiera('etcd_vip'),
+ $etcd_port = 2379,
+ $physnet_mapping = [],
+ $type_drivers = hiera('neutron::plugins::ml2::type_drivers', undef),
) {
if empty($etcd_host) {
fail('etcd_vip not set in hieradata')
}
if $step >= 4 {
+ if $::hostname in hiera('controller_node_names') {
+ $service_plugins = hiera('neutron::service_plugins')
+ } else {
+ $service_plugins = undef
+ }
class { '::neutron::agents::ml2::vpp':
- etcd_host => $etcd_host,
- etcd_port => $etcd_port,
+ etcd_host => $etcd_host,
+ etcd_port => $etcd_port,
+ physnets => vpp_physnet_mapping($physnet_mapping),
+ type_drivers => $type_drivers,
+ service_plugins => $service_plugins,
}
}
}
diff --git a/manifests/profile/base/neutron/plugins/ml2/vpp.pp b/manifests/profile/base/neutron/plugins/ml2/vpp.pp
index 7d59239..f90841a 100644
--- a/manifests/profile/base/neutron/plugins/ml2/vpp.pp
+++ b/manifests/profile/base/neutron/plugins/ml2/vpp.pp
@@ -41,9 +41,15 @@ class tripleo::profile::base::neutron::plugins::ml2::vpp (
}
if $step >= 4 {
+ if $::hostname in hiera('controller_node_names') {
+ $l3_hosts = "${hiera('controller_node_names').split(',')[0]}.${::domain}"
+ } else {
+ $l3_hosts = undef
+ }
class { '::neutron::plugins::ml2::vpp':
etcd_host => $etcd_host,
etcd_port => $etcd_port,
+ l3_hosts => $l3_hosts,
}
}
}