Adding Mellanox manifests for mellanox plugin
1. iSER configuration on cinder node. 2. Installing and configuring Mellanox plugin on compute node. partially implements: blueprint mellanox-features-support Change-Id: I207f7d884eeb2f063e90deb99459f546c116607c Signed-off-by: gilmeir <gilmeir@mellanox.com>
This commit is contained in:
parent
992b1d3639
commit
93a12959c4
|
@ -0,0 +1,201 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
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.
|
|
@ -0,0 +1,27 @@
|
|||
# mellanox_openstack
|
||||
|
||||
## Overview
|
||||
|
||||
The mellanox_openstack module is designated for configuring the Mellanox plugin
|
||||
for openstack installed using Fuel.
|
||||
|
||||
|
||||
## Module Description
|
||||
|
||||
This module was written for integrating Mellanox into Fuel (https://launchpad.net/fuel).
|
||||
It configures the ml2 to work with Mellanox plugin, and installs and configures the environment.
|
||||
|
||||
|
||||
### Setup Requirements
|
||||
|
||||
The module is designed to be used by Fuel (an openstack installer by Mirantis).
|
||||
|
||||
|
||||
## Release Notes/Contributors/Etc
|
||||
|
||||
Contributors:
|
||||
Gil Meir, gilmeir@mellanox.com
|
||||
Aviram Bar-Haim, aviramb@mellanox.com
|
||||
|
||||
Support:
|
||||
Mellanox support - support@mellanox.com
|
|
@ -0,0 +1,18 @@
|
|||
require 'rubygems'
|
||||
require 'puppetlabs_spec_helper/rake_tasks'
|
||||
require 'puppet-lint/tasks/puppet-lint'
|
||||
PuppetLint.configuration.send('disable_80chars')
|
||||
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
|
||||
|
||||
desc "Validate manifests, templates, and ruby files"
|
||||
task :validate do
|
||||
Dir['manifests/**/*.pp'].each do |manifest|
|
||||
sh "puppet parser validate --noop #{manifest}"
|
||||
end
|
||||
Dir['spec/**/*.rb','lib/**/*.rb'].each do |ruby_file|
|
||||
sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/
|
||||
end
|
||||
Dir['templates/**/*.erb'].each do |template|
|
||||
sh "erb -P -x -T '-' #{template} | ruby -c"
|
||||
end
|
||||
end
|
|
@ -0,0 +1,94 @@
|
|||
# nova-rootwrap command filters for network nodes
|
||||
# This file should be owned by (and only-writeable by) the root user
|
||||
|
||||
[Filters]
|
||||
# nova/virt/libvirt/vif.py: 'ip', 'tuntap', 'add', dev, 'mode', 'tap'
|
||||
# nova/virt/libvirt/vif.py: 'ip', 'link', 'set', dev, 'up'
|
||||
# nova/virt/libvirt/vif.py: 'ip', 'link', 'delete', dev
|
||||
# nova/network/linux_net.py: 'ip', 'addr', 'add', str(floating_ip)+'/32'i..
|
||||
# nova/network/linux_net.py: 'ip', 'addr', 'del', str(floating_ip)+'/32'..
|
||||
# nova/network/linux_net.py: 'ip', 'addr', 'add', '169.254.169.254/32',..
|
||||
# nova/network/linux_net.py: 'ip', 'addr', 'show', 'dev', dev, 'scope',..
|
||||
# nova/network/linux_net.py: 'ip', 'addr', 'del/add', ip_params, dev)
|
||||
# nova/network/linux_net.py: 'ip', 'addr', 'del', params, fields[-1]
|
||||
# nova/network/linux_net.py: 'ip', 'addr', 'add', params, bridge
|
||||
# nova/network/linux_net.py: 'ip', '-f', 'inet6', 'addr', 'change', ..
|
||||
# nova/network/linux_net.py: 'ip', 'link', 'set', 'dev', dev, 'promisc',..
|
||||
# nova/network/linux_net.py: 'ip', 'link', 'add', 'link', bridge_if ...
|
||||
# nova/network/linux_net.py: 'ip', 'link', 'set', interface, address,..
|
||||
# nova/network/linux_net.py: 'ip', 'link', 'set', interface, 'up'
|
||||
# nova/network/linux_net.py: 'ip', 'link', 'set', bridge, 'up'
|
||||
# nova/network/linux_net.py: 'ip', 'addr', 'show', 'dev', interface, ..
|
||||
# nova/network/linux_net.py: 'ip', 'link', 'set', dev, address, ..
|
||||
# nova/network/linux_net.py: 'ip', 'link', 'set', dev, 'up'
|
||||
# nova/network/linux_net.py: 'ip', 'route', 'add', ..
|
||||
# nova/network/linux_net.py: 'ip', 'route', 'del', .
|
||||
# nova/network/linux_net.py: 'ip', 'route', 'show', 'dev', dev
|
||||
ip: CommandFilter, ip, root
|
||||
|
||||
# nova/virt/libvirt/vif.py: 'ovs-vsctl', ...
|
||||
# nova/virt/libvirt/vif.py: 'ovs-vsctl', 'del-port', ...
|
||||
# nova/network/linux_net.py: 'ovs-vsctl', ....
|
||||
ovs-vsctl: CommandFilter, ovs-vsctl, root
|
||||
|
||||
# nova/network/linux_net.py: 'ovs-ofctl', ....
|
||||
ovs-ofctl: CommandFilter, ovs-ofctl, root
|
||||
|
||||
# nova/virt/libvirt/vif.py: 'ivs-ctl', ...
|
||||
# nova/virt/libvirt/vif.py: 'ivs-ctl', 'del-port', ...
|
||||
# nova/network/linux_net.py: 'ivs-ctl', ....
|
||||
ivs-ctl: CommandFilter, ivs-ctl, root
|
||||
|
||||
# nova/virt/libvirt/vif.py: 'ifc_ctl', ...
|
||||
ifc_ctl: CommandFilter, /opt/pg/bin/ifc_ctl, root
|
||||
|
||||
# nova/virt/libvirt/vif.py: 'ebrctl', ...
|
||||
ebrctl: CommandFilter, ebrctl, root
|
||||
|
||||
# nova/virt/libvirt/vif.py: 'mm-ctl', ...
|
||||
mm-ctl: CommandFilter, mm-ctl, root
|
||||
|
||||
# nova/network/linux_net.py: 'ebtables', '-D' ...
|
||||
# nova/network/linux_net.py: 'ebtables', '-I' ...
|
||||
ebtables: CommandFilter, ebtables, root
|
||||
ebtables_usr: CommandFilter, ebtables, root
|
||||
|
||||
# nova/network/linux_net.py: 'ip[6]tables-save' % (cmd, '-t', ...
|
||||
iptables-save: CommandFilter, iptables-save, root
|
||||
ip6tables-save: CommandFilter, ip6tables-save, root
|
||||
|
||||
# nova/network/linux_net.py: 'ip[6]tables-restore' % (cmd,)
|
||||
iptables-restore: CommandFilter, iptables-restore, root
|
||||
ip6tables-restore: CommandFilter, ip6tables-restore, root
|
||||
|
||||
# nova/network/linux_net.py: 'arping', '-U', floating_ip, '-A', '-I', ...
|
||||
# nova/network/linux_net.py: 'arping', '-U', network_ref['dhcp_server'],..
|
||||
arping: CommandFilter, arping, root
|
||||
|
||||
# nova/network/linux_net.py: 'dhcp_release', dev, address, mac_address
|
||||
dhcp_release: CommandFilter, dhcp_release, root
|
||||
|
||||
# nova/network/linux_net.py: 'kill', '-9', pid
|
||||
# nova/network/linux_net.py: 'kill', '-HUP', pid
|
||||
kill_dnsmasq: KillFilter, root, /usr/sbin/dnsmasq, -9, -HUP
|
||||
|
||||
# nova/network/linux_net.py: 'kill', pid
|
||||
kill_radvd: KillFilter, root, /usr/sbin/radvd
|
||||
|
||||
# nova/network/linux_net.py: dnsmasq call
|
||||
dnsmasq: EnvFilter, env, root, CONFIG_FILE=, NETWORK_ID=, dnsmasq
|
||||
|
||||
# nova/network/linux_net.py: 'radvd', '-C', '%s' % _ra_file(dev, 'conf'..
|
||||
radvd: CommandFilter, radvd, root
|
||||
|
||||
# nova/network/linux_net.py: 'brctl', 'addbr', bridge
|
||||
# nova/network/linux_net.py: 'brctl', 'setfd', bridge, 0
|
||||
# nova/network/linux_net.py: 'brctl', 'stp', bridge, 'off'
|
||||
# nova/network/linux_net.py: 'brctl', 'addif', bridge, interface
|
||||
brctl: CommandFilter, brctl, root
|
||||
|
||||
# nova/network/linux_net.py: 'sysctl', ....
|
||||
sysctl: CommandFilter, sysctl, root
|
||||
|
||||
# nova/network/linux_net.py: 'conntrack'
|
||||
conntrack: CommandFilter, conntrack, root
|
|
@ -0,0 +1,22 @@
|
|||
Puppet::Type.type(:mellanox_agent_config).provide(
|
||||
:ini_setting,
|
||||
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
|
||||
) do
|
||||
|
||||
def section
|
||||
resource[:name].split('/', 2).first
|
||||
end
|
||||
|
||||
def setting
|
||||
resource[:name].split('/', 2).last
|
||||
end
|
||||
|
||||
def separator
|
||||
'='
|
||||
end
|
||||
|
||||
def file_path
|
||||
'/etc/neutron/plugins/mlnx/mlnx_conf.ini'
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,22 @@
|
|||
Puppet::Type.type(:mellanox_eswitchd_config).provide(
|
||||
:ini_setting,
|
||||
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
|
||||
) do
|
||||
|
||||
def section
|
||||
resource[:name].split('/', 2).first
|
||||
end
|
||||
|
||||
def setting
|
||||
resource[:name].split('/', 2).last
|
||||
end
|
||||
|
||||
def separator
|
||||
'='
|
||||
end
|
||||
|
||||
def file_path
|
||||
'/etc/eswitchd/eswitchd.conf'
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,19 @@
|
|||
Puppet::Type.newtype(:mellanox_agent_config) do
|
||||
|
||||
ensurable
|
||||
|
||||
newparam(:name, :namevar => true) do
|
||||
desc 'Section/setting name to manage from /etc/neutron/plugins/mlnx/mlnx_conf.ini'
|
||||
newvalues(/\S+\/\S+/)
|
||||
end
|
||||
|
||||
newproperty(:value) do
|
||||
desc 'The value of the setting to be defined.'
|
||||
munge do |value|
|
||||
value = value.to_s.strip
|
||||
value.capitalize! if value =~ /^(true|false)$/i
|
||||
value
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,19 @@
|
|||
Puppet::Type.newtype(:mellanox_eswitchd_config) do
|
||||
|
||||
ensurable
|
||||
|
||||
newparam(:name, :namevar => true) do
|
||||
desc 'Section/setting name to manage from /etc/eswitchd/eswitchd.conf'
|
||||
newvalues(/\S+\/\S+/)
|
||||
end
|
||||
|
||||
newproperty(:value) do
|
||||
desc 'The value of the setting to be defined.'
|
||||
munge do |value|
|
||||
value = value.to_s.strip
|
||||
value.capitalize! if value =~ /^(true|false)$/i
|
||||
value
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,57 @@
|
|||
class mellanox_openstack::agent (
|
||||
$physnet,
|
||||
$physifc,
|
||||
) {
|
||||
include mellanox_openstack::params
|
||||
|
||||
$package = $::mellanox_openstack::params::neutron_mlnx_packages
|
||||
$agent = $::mellanox_openstack::params::agent_service
|
||||
$filters_dir = $::mellanox_openstack::params::filters_dir
|
||||
$filters_file = $::mellanox_openstack::params::filters_file
|
||||
$compute_service_name = $::mellanox_openstack::params::compute_service_name
|
||||
|
||||
# Only relevant for Debian since no package provides network.filters file
|
||||
if $::osfamily == 'Debian' {
|
||||
File {
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
}
|
||||
|
||||
file { $filters_dir :
|
||||
ensure => directory,
|
||||
mode => '0755',
|
||||
}
|
||||
|
||||
file { $filters_file :
|
||||
ensure => present,
|
||||
mode => '0644',
|
||||
source => 'puppet:///modules/mellanox_openstack/network.filters',
|
||||
}
|
||||
|
||||
File <| title == '/etc/nova/nova.conf' |> ->
|
||||
File[$filters_dir] ->
|
||||
File[$filters_file] ~>
|
||||
Service[$compute_service_name]
|
||||
}
|
||||
|
||||
mellanox_agent_config {
|
||||
'agent/rpc_support_old_agents' : value => true;
|
||||
'eswitch/physical_interface_mappings' : value => "${physnet}:${physifc}";
|
||||
}
|
||||
|
||||
package { $package :
|
||||
ensure => installed,
|
||||
}
|
||||
|
||||
service { $agent :
|
||||
ensure => running,
|
||||
enable => true,
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
}
|
||||
|
||||
Package[$package] ->
|
||||
Mellanox_agent_config <||> ~>
|
||||
Service[$agent]
|
||||
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
class mellanox_openstack::cinder (
|
||||
$iser = false,
|
||||
) {
|
||||
if $iser {
|
||||
Cinder_config <| title == 'DEFAULT/volume_driver' |> {
|
||||
value => 'cinder.volume.drivers.lvm.LVMISERDriver'
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
class mellanox_openstack::compute (
|
||||
$physifc,
|
||||
$physnet = 'physnet2',
|
||||
) {
|
||||
|
||||
class { 'mellanox_openstack::eswitchd' :
|
||||
physnet => $physnet,
|
||||
physifc => $physifc,
|
||||
}
|
||||
|
||||
class { 'mellanox_openstack::agent' :
|
||||
physnet => $physnet,
|
||||
physifc => $physifc,
|
||||
}
|
||||
|
||||
class { 'mellanox_openstack::mlnxvif' :}
|
||||
|
||||
Class['mellanox_openstack::mlnxvif'] ->
|
||||
Class['mellanox_openstack::eswitchd'] ->
|
||||
Class['mellanox_openstack::agent']
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
class mellanox_openstack::controller (
|
||||
$eswitch_vnic_type = 'hostdev',
|
||||
$eswitch_apply_profile_patch = 'True',
|
||||
) {
|
||||
|
||||
neutron_plugin_ml2 {
|
||||
'eswitch/vnic_type': value => $eswitch_vnic_type;
|
||||
'eswitch/apply_profile_patch': value => $eswitch_apply_profile_patch;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
class mellanox_openstack::eswitchd (
|
||||
$physnet,
|
||||
$physifc,
|
||||
) {
|
||||
include mellanox_openstack::params
|
||||
|
||||
$package = $::mellanox_openstack::params::eswitchd_package
|
||||
|
||||
mellanox_eswitchd_config {
|
||||
'DAEMON/fabrics': value => "${physnet}:${physifc}";
|
||||
}
|
||||
|
||||
package { $package :
|
||||
ensure => installed,
|
||||
}
|
||||
|
||||
service { 'eswitchd' :
|
||||
ensure => running,
|
||||
enable => true,
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
}
|
||||
|
||||
Package[$package] ->
|
||||
Mellanox_eswitchd_config <||> ~>
|
||||
Service['eswitchd']
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
class mellanox_openstack::mlnxvif {
|
||||
include mellanox_openstack::params
|
||||
|
||||
$package = $::mellanox_openstack::params::mlnxvif_package
|
||||
|
||||
package { $package :
|
||||
ensure => installed,
|
||||
}
|
||||
|
||||
Package[$package] ->
|
||||
Service <| title == 'nova-compute' |>
|
||||
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
class mellanox_openstack::params {
|
||||
|
||||
$eswitchd_package = 'eswitchd'
|
||||
$filters_dir = '/etc/nova/rootwrap.d'
|
||||
$filters_file = "${filters_dir}/network.filters"
|
||||
|
||||
case $::osfamily {
|
||||
'RedHat': {
|
||||
$neutron_mlnx_packages = ['openstack-neutron-mellanox']
|
||||
$mlnxvif_package = 'mlnxvif'
|
||||
$agent_service = 'neutron-mlnx-agent'
|
||||
$compute_service_name = 'openstack-nova-compute'
|
||||
}
|
||||
'Debian': {
|
||||
$neutron_mlnx_packages = ['neutron-plugin-mlnx','neutron-plugin-mlnx-agent']
|
||||
$mlnxvif_package = 'python-mlnxvif'
|
||||
$agent_service = 'neutron-plugin-mlnx-agent'
|
||||
$compute_service_name = 'nova-compute'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name": "mellanox-mellanox_openstack",
|
||||
"version": "5.1.0",
|
||||
"author": "mellanox",
|
||||
"summary": "Mellanox module for supporting Mellanox hardware on Mirantis Fuel openstack deployment",
|
||||
"license": "Apache 2.0",
|
||||
"source": "",
|
||||
"issues_url": null,
|
||||
"project_page": null,
|
||||
"dependencies": [
|
||||
{
|
||||
"version_range": ">= 1.0.0",
|
||||
"name": "puppetlabs-stdlib"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -15,6 +15,7 @@ class openstack::cinder(
|
|||
$volume_group = 'cinder-volumes',
|
||||
$physical_volume = undef,
|
||||
$manage_volumes = false,
|
||||
$iser = false,
|
||||
$enabled = true,
|
||||
$purge_cinder_config = true,
|
||||
$auth_host = '127.0.0.1',
|
||||
|
@ -143,6 +144,9 @@ class openstack::cinder(
|
|||
class { 'cinder::volume::iscsi':
|
||||
iscsi_ip_address => $iscsi_bind_host,
|
||||
volume_group => $volume_group,
|
||||
} ->
|
||||
class { 'mellanox_openstack::cinder':
|
||||
iser => $iser
|
||||
}
|
||||
}
|
||||
'vmdk': {
|
||||
|
|
|
@ -125,6 +125,7 @@ class openstack::compute (
|
|||
$state_path = '/var/lib/nova',
|
||||
$ceilometer = false,
|
||||
$ceilometer_metering_secret = 'ceilometer',
|
||||
$libvirt_vif_driver = 'nova.virt.libvirt.vif.LibvirtGenericVIFDriver',
|
||||
) {
|
||||
|
||||
#
|
||||
|
@ -534,7 +535,9 @@ on packages update": }
|
|||
source => 'puppet:///modules/nova/libvirt_qemu.conf',
|
||||
}
|
||||
|
||||
class { 'nova::compute::neutron': }
|
||||
class { 'nova::compute::neutron':
|
||||
libvirt_vif_driver => $libvirt_vif_driver,
|
||||
}
|
||||
|
||||
class { 'nova::network::neutron':
|
||||
neutron_auth_strategy => 'keystone',
|
||||
|
|
|
@ -81,6 +81,12 @@ if $::fuel_settings['nodes'] {
|
|||
}
|
||||
}
|
||||
|
||||
if ($::fuel_settings['neutron_mellanox']) and ($::fuel_settings['neutron_mellanox']['plugin'] == 'ethernet') {
|
||||
$use_mellanox_plugin = true
|
||||
} else {
|
||||
$use_mellanox_plugin = false
|
||||
}
|
||||
|
||||
# This parameter specifies the verbosity level of log messages
|
||||
# in openstack components config.
|
||||
# Debug would have set DEBUG level and ignore verbose settings, if any.
|
||||
|
|
|
@ -70,8 +70,14 @@ class osnailyfacter::cluster_ha {
|
|||
}
|
||||
|
||||
if $primary_controller {
|
||||
package { 'cirros-testvm':
|
||||
ensure => "present"
|
||||
if $::use_mellanox_plugin {
|
||||
$test_vm_pkg = 'cirros-testvm-mellanox'
|
||||
} else {
|
||||
$test_vm_pkg = 'cirros-testvm'
|
||||
}
|
||||
package { 'cirros-testvm' :
|
||||
ensure => 'installed',
|
||||
name => $test_vm_pkg,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -601,6 +607,14 @@ class osnailyfacter::cluster_ha {
|
|||
}
|
||||
}
|
||||
|
||||
if $::use_mellanox_plugin {
|
||||
$ml2_eswitch = $::fuel_settings['neutron_mellanox']['ml2_eswitch']
|
||||
class { 'mellanox_openstack::controller':
|
||||
eswitch_vnic_type => $ml2_eswitch['vnic_type'],
|
||||
eswitch_apply_profile_patch => $ml2_eswitch['apply_profile_patch'],
|
||||
}
|
||||
}
|
||||
|
||||
#ADDONS END
|
||||
|
||||
} #CONTROLLER ENDS
|
||||
|
@ -608,6 +622,17 @@ class osnailyfacter::cluster_ha {
|
|||
"compute" : {
|
||||
include osnailyfacter::test_compute
|
||||
|
||||
if $::use_mellanox_plugin {
|
||||
$net04_physnet = $quantum_config['predefined_networks']['net04']['L2']['physnet']
|
||||
class { 'mellanox_openstack::compute':
|
||||
physnet => $net04_physnet,
|
||||
physifc => $::fuel_settings['neutron_mellanox']['physical_port'],
|
||||
}
|
||||
$libvirt_vif_driver = 'mlnxvif.vif.MlxEthVIFDriver'
|
||||
} else {
|
||||
$libvirt_vif_driver = 'nova.virt.libvirt.vif.LibvirtGenericVIFDriver'
|
||||
}
|
||||
|
||||
class { 'openstack::compute':
|
||||
public_interface => $::public_int,
|
||||
private_interface => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_interface'] },
|
||||
|
@ -652,6 +677,7 @@ class osnailyfacter::cluster_ha {
|
|||
nova_report_interval => $::nova_report_interval,
|
||||
nova_service_down_time => $::nova_service_down_time,
|
||||
state_path => $nova_hash[state_path],
|
||||
libvirt_vif_driver => $libvirt_vif_driver,
|
||||
}
|
||||
|
||||
if ($::use_ceph){
|
||||
|
|
|
@ -64,12 +64,17 @@ class osnailyfacter::cluster_simple {
|
|||
}
|
||||
|
||||
if $::fuel_settings['role'] == 'controller' {
|
||||
package { 'cirros-testvm':
|
||||
ensure => "present"
|
||||
if $::use_mellanox_plugin {
|
||||
$test_vm_pkg = 'cirros-testvm-mellanox'
|
||||
} else {
|
||||
$test_vm_pkg = 'cirros-testvm'
|
||||
}
|
||||
package { 'cirros-testvm' :
|
||||
ensure => 'installed',
|
||||
name => $test_vm_pkg,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$storage_hash = $::fuel_settings['storage']
|
||||
$nova_hash = $::fuel_settings['nova']
|
||||
$mysql_hash = $::fuel_settings['mysql']
|
||||
|
@ -400,6 +405,14 @@ class osnailyfacter::cluster_simple {
|
|||
use_quantum => $::use_quantum,
|
||||
}
|
||||
}
|
||||
|
||||
if $::use_mellanox_plugin {
|
||||
$ml2_eswitch = $::fuel_settings['neutron_mellanox']['ml2_eswitch']
|
||||
class { 'mellanox_openstack::controller':
|
||||
eswitch_vnic_type => $ml2_eswitch['vnic_type'],
|
||||
eswitch_apply_profile_patch => $ml2_eswitch['apply_profile_patch'],
|
||||
}
|
||||
}
|
||||
#ADDONS END
|
||||
|
||||
}
|
||||
|
@ -407,6 +420,17 @@ class osnailyfacter::cluster_simple {
|
|||
"compute" : {
|
||||
include osnailyfacter::test_compute
|
||||
|
||||
if $::use_mellanox_plugin {
|
||||
$net04_physnet = $quantum_config['predefined_networks']['net04']['L2']['physnet']
|
||||
class { 'mellanox_openstack::compute':
|
||||
physnet => $net04_physnet,
|
||||
physifc => $::fuel_settings['neutron_mellanox']['physical_port'],
|
||||
}
|
||||
$libvirt_vif_driver = 'mlnxvif.vif.MlxEthVIFDriver'
|
||||
} else {
|
||||
$libvirt_vif_driver = 'nova.virt.libvirt.vif.LibvirtGenericVIFDriver'
|
||||
}
|
||||
|
||||
class { 'openstack::compute':
|
||||
public_interface => $::public_int,
|
||||
private_interface => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_interface'] },
|
||||
|
@ -452,7 +476,8 @@ class osnailyfacter::cluster_simple {
|
|||
nova_rate_limits => $::nova_rate_limits,
|
||||
nova_report_interval => $::nova_report_interval,
|
||||
nova_service_down_time => $::nova_service_down_time,
|
||||
cinder_rate_limits => $::cinder_rate_limits
|
||||
cinder_rate_limits => $::cinder_rate_limits,
|
||||
libvirt_vif_driver => $libvirt_vif_driver,
|
||||
}
|
||||
nova_config { 'DEFAULT/start_guests_on_host_boot': value => $::fuel_settings['start_guests_on_host_boot'] }
|
||||
nova_config { 'DEFAULT/use_cow_images': value => $::fuel_settings['use_cow_images'] }
|
||||
|
@ -519,6 +544,7 @@ class osnailyfacter::cluster_simple {
|
|||
bind_host => $bind_host,
|
||||
volume_group => 'cinder',
|
||||
manage_volumes => $manage_volumes,
|
||||
iser => $storage_hash['iser'],
|
||||
enabled => true,
|
||||
auth_host => $controller_node_address,
|
||||
iscsi_bind_host => $cinder_iscsi_bind_addr,
|
||||
|
|
Loading…
Reference in New Issue