Retire repository

Fuel repositories are all retired in openstack namespace, retire
remaining fuel repos in x namespace since they are unused now.

This change removes all content from the repository and adds the usual
README file to point out that the repository is retired following the
process from
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project

See also
http://lists.openstack.org/pipermail/openstack-discuss/2019-December/011675.html

A related change is: https://review.opendev.org/699752 .

Change-Id: Ife7bca62c3fbd60ac0dd7c93fbc2534c8cb621d6
This commit is contained in:
Andreas Jaeger 2019-12-18 19:31:20 +01:00
parent d83ffa73c6
commit 1886d8cebb
70 changed files with 10 additions and 4801 deletions

12
.gitignore vendored
View File

@ -1,12 +0,0 @@
*.rpm
*.log
*.mo
*.sw?
*~
/.*
!/.coveragerc
!/.gitignore
!/.gitreview
!/.mailmap
!/.pylintrc
!/.testr.conf

202
LICENSE
View File

@ -1,202 +0,0 @@
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.

View File

@ -1,17 +0,0 @@
fuel-plugin-bigswitch
====================
Fuel BigSwitch plugin enables OpenStack deployment with BigSwitch Big Cloud Fabric SDN
networking fabric
See doc/ directory for documentation.
To build HTML variant of documentation you need to install sphinx document generator, easiest way to do this is to use doc/requirements.txt.
$ pip install -r doc/requirements.txt
$ cd doc/user
$ make html
After that you can start exploring documentation in doc/user/source/_build/html/ directory.

10
README.rst Normal file
View File

@ -0,0 +1,10 @@
This project is no longer maintained.
The contents of this repository are still available in the Git
source code management system. To see the contents of this
repository before it reached its end of life, please check out the
previous commit with "git checkout HEAD^1".
For any further questions, please email
openstack-discuss@lists.openstack.org or join #openstack-dev on
Freenode.

View File

@ -1,26 +0,0 @@
#
# Copyright 2015 BigSwitch Networks, 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.
#
notice('MODULAR: bigswitch common-repo.pp')
package { 'python-pip':
ensure => 'installed',
}
exec { 'bsnstacklib':
command => 'pip install "bsnstacklib<2015.2"',
path => '/usr/local/bin/:/usr/bin/:/bin',
require => Package['python-pip']
}

View File

@ -1,23 +0,0 @@
#
# Copyright 2015 BigSwitch Networks
#
# 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.
#
notice('MODULAR: bigswitch compute-config')
include bcf::params
if $bcf::params::openstack::bcf_mode == 'P-Only' {
include bcf::p_only::compute
}
else {
include bcf::p_v::compute
}

View File

@ -1,20 +0,0 @@
#
# Copyright 2015 BigSwitch Networks
#
# 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.
#
notice('MODULAR: bigswitch compute-network-config')
include bcf::params
if $bcf::params::openstack::bcf_mode == 'P-Only' {
include bcf::p_only::compute_network_config
}

View File

@ -1,57 +0,0 @@
#
# Copyright 2015 BigSwitch Networks, 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.
#
notice('MODULAR: bigswitch general-network-config')
include bcf
include bcf::params
$binpath = '/usr/local/bin/:/bin/:/usr/bin:/usr/sbin:/usr/local/sbin:/sbin'
$sys_desc_lacp = '5c:16:c7:00:00:04'
# lldp
$a = file('/etc/fuel/plugins/fuel-plugin-bigswitch-1.0/python_scripts/send_lldp', '/dev/null')
if($a != '') {
file { '/bin/send_lldp':
ensure => file,
content => $a,
mode => '0777',
}
}
file { '/etc/init/send_lldp.conf':
ensure => file,
content => "
description \"BCF LLDP\"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
script
exec /bin/send_lldp --system-desc ${sys_desc_lacp} --system-name $(uname -n) -i 10 --network_interface ${bcf::itfs}
end script
",
}
service { 'send_lldp':
ensure => running,
enable => true,
require => [File['/bin/send_lldp'], File['/etc/init/send_lldp.conf']],
}
# load bonding module
file_line {'load bonding on boot':
path => '/etc/modules',
line => 'bonding',
match => '^bonding$',
}

View File

@ -1,31 +0,0 @@
#
# Copyright 2015 BigSwitch Networks, 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.
#
notice('MODULAR: bigswitch openstack-cleanup')
file { '/etc/bigswitch':
ensure => 'directory',
}
file { '/etc/bigswitch/purge_all.sh':
ensure => file,
source => 'puppet:///modules/bcf/purge_all.sh',
}
exec { 'purge openstack neutron objects':
command => 'bash /etc/bigswitch/purge_all.sh',
path => '/usr/local/bin/:/usr/bin/:/bin',
require => File['/etc/bigswitch/purge_all.sh']
}

View File

@ -1,32 +0,0 @@
#
# Copyright 2015 BigSwitch Networks, 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.
#
notice('MODULAR: bigswitch reconfigure-keystone')
# configure /etc/keystone/keystone.conf
ini_setting { 'keystone.conf notification driver':
ensure => present,
path => '/etc/keystone/keystone.conf',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'notification_driver',
value => 'messaging',
notify => Service['keystone'],
}
service { 'keystone':
ensure => running,
enable => true,
}

View File

@ -1,23 +0,0 @@
#
# Copyright 2015 BigSwitch Networks
#
# 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.
#
notice('MODULAR: bigswitch reconfigure-neutron')
include bcf::params
if $bcf::params::openstack::bcf_mode == 'P-Only' {
include bcf::p_only::reconfigure_neutron
}
else {
include bcf::p_v::reconfigure_neutron
}

View File

@ -1,23 +0,0 @@
#
# Copyright 2015 BigSwitch Networks
#
# 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.
#
notice('MODULAR: bigswitch restart-cluster-services')
include bcf::params
if $bcf::params::openstack::bcf_mode == 'P-Only' {
include bcf::p_only::restart_cluster_services
}
else {
include bcf::p_v::restart_cluster_services
}

View File

@ -1 +0,0 @@
Kanzhe Jiang <kanzhe.jiang@bigswitch.com>

View File

@ -1,328 +0,0 @@
import argparse
import functools
import httplib
import json
import traceback
import sys
import yaml
HASH_HEADER = 'BCF-SETUP'
BCF_CONTROLLER_PORT = 8443
ANY = 'any'
ELEMENT_EXISTS = "List element already exists"
LOG_FILE = '/var/log/bsn.log'
def debug_func(*dargs, **dkwargs):
def wrapper(func):
@functools.wraps(func)
def inner(*args, **kwargs):
with open(LOG_FILE, "a") as log_file:
log_file.write(
"Function %s called with args [%s], kwargs %s\n" % (
func.func_name, ','.join(
["%s=%s" % (x, y) # this code gets the names of args
for (x, y) in zip(func.func_code.co_varnames, args)]
), kwargs
)
)
ret = func(*args, **kwargs)
if dkwargs.get('log_return'):
with open(LOG_FILE, "a") as log_file:
log_file.write("Function %s returning with value %s\n"
% (func.func_name, ret))
return ret
return inner
# this first case handles when the decorator is called without args
# (e.g. @debug_func) and the second is for when an arg is passed
# (e.g. @debug_func(log_return=True)
if dargs and callable(dargs[0]):
return wrapper(dargs[0])
return wrapper
class NodeConfig(object):
def __init__(self, yaml_file='/etc/astute.yaml'):
self.bridge_vlan_map = {}
with open(yaml_file, 'r') as myfile:
yaml_cfg = myfile.read()
try:
node_config = yaml.load(yaml_cfg)
except Exception as e:
with open(LOG_FILE, "a") as log_file:
log_file.write("Error parsing node yaml file:\n%(e)s\n"
% {'e': e})
return None
trans = node_config['network_scheme']['transformations']
# get the bridge where bond is connected
for tran in trans:
if (tran['action'] != 'add-patch'):
continue
if ('br-prv' not in tran['bridges']):
continue
bridges = list(tran['bridges'])
bridges.remove('br-prv')
bond_bridge = bridges[0]
break
# Get bond name
for tran in trans:
if (tran['action'] != 'add-bond'):
continue
if (bond_bridge != tran.get('bridge')):
continue
bond_name = tran['name']
break
for tran in trans:
if (tran['action'] == 'add-port' and
bond_name in tran['name'] and
'.' in tran['name']):
self.bridge_vlan_map[tran['bridge']] = (
int(tran['name'].split('.')[1]))
@debug_func(log_return=True)
def get_bridge_vlan_str(self):
return ["%s:%d" % (bridge.split('-')[1],vlan)
for bridge, vlan in self.bridge_vlan_map.items()]
class RestLib(object):
@staticmethod
def request(url, prefix="/api/v1/data/controller/", method='GET',
data='', hashPath=None, host="127.0.0.1:8443", cookie=None):
headers = {'Content-type': 'application/json'}
if cookie:
headers['Cookie'] = 'session_cookie=%s' % cookie
if hashPath:
headers[HASH_HEADER] = hashPath
connection = httplib.HTTPSConnection(host)
try:
connection.request(method, prefix + url, data, headers)
response = connection.getresponse()
ret = (response.status, response.reason, response.read(),
response.getheader(HASH_HEADER))
with open(LOG_FILE, "a") as log_file:
log_file.write('Controller REQUEST: %s %s:body=%r\n' %
(method, host + prefix + url, data))
log_file.write('Controller RESPONSE: status=%d reason=%r,'
'data=%r, hash=%r\n' % ret)
return ret
except Exception as e:
raise Exception("Controller REQUEST exception: %s" % e)
@staticmethod
def get(cookie, url, server, port, hashPath=None):
host = "%s:%d" % (server, port)
return RestLib.request(url, hashPath=hashPath, host=host,
cookie=cookie)
@staticmethod
def post(cookie, url, server, port, data, hashPath=None):
host = "%s:%d" % (server, port)
return RestLib.request(url, method='POST', hashPath=hashPath,
host=host, data=data, cookie=cookie)
@staticmethod
def patch(cookie, url, server, port, data, hashPath=None):
host = "%s:%d" % (server, port)
return RestLib.request(url, method='PATCH', hashPath=hashPath,
host=host, data=data, cookie=cookie)
@staticmethod
def put(cookie, url, server, port, data, hashPath=None):
host = "%s:%d" % (server, port)
return RestLib.request(url, method='PUT', hashPath=hashPath,
host=host, data=data, cookie=cookie)
@staticmethod
def delete(cookie, url, server, port, hashPath=None):
host = "%s:%d" % (server, port)
return RestLib.request(url, method='DELETE', hashPath=hashPath,
host=host, cookie=cookie)
@staticmethod
def auth_bcf(server, username, password, port=BCF_CONTROLLER_PORT):
login = {"user": username, "password": password}
host = "%s:%d" % (server, port)
ret = RestLib.request("/api/v1/auth/login", prefix='',
method='POST', data=json.dumps(login),
host=host)
session = json.loads(ret[2])
if ret[0] != 200:
raise Exception(ret)
if ("session_cookie" not in session):
raise Exception("Failed to authenticate: session cookie not set")
return session["session_cookie"]
@staticmethod
@debug_func
def logout_bcf(cookie, server, port=BCF_CONTROLLER_PORT):
url = "core/aaa/session[auth-token=\"%s\"]" % cookie
ret = RestLib.delete(cookie, url, server, port)
return ret
@staticmethod
@debug_func(log_return=True)
def get_active_bcf_controller(servers, username, password,
port=BCF_CONTROLLER_PORT):
for server in servers:
try:
cookie = RestLib.auth_bcf(server, username, password, port)
url = 'core/controller/role'
res = RestLib.get(cookie, url, server, port)[2]
if 'active' in res:
return server, cookie
except Exception:
continue
return None, None
@staticmethod
@debug_func(log_return=True)
def get_os_mgmt_segments(server, cookie, tenant,
port=BCF_CONTROLLER_PORT):
url = (r'''applications/bcf/info/endpoint-manager/segment'''
'''[tenant="%(tenant)s"]''' %
{'tenant': tenant})
ret = RestLib.get(cookie, url, server, port)
if ret[0] != 200:
raise Exception(ret)
res = json.loads(ret[2])
segments = []
for segment in res:
# 'management' or 'Management' segment does not matter
segments.append(segment['name'].lower())
return segments
@staticmethod
@debug_func(log_return=True)
def program_segment_and_membership_rule(
server, cookie, tenant, segment, internal_port, vlan,
bcf_version, port=BCF_CONTROLLER_PORT):
existing_segments = RestLib.get_os_mgmt_segments(
server, cookie, tenant, port)
if segment not in existing_segments:
with open(LOG_FILE, "a") as log_file:
msg = (r'''Warning: BCF controller does not have tenant '''
'''%(tenant)s segment %(segment)s\n''' %
{'tenant': tenant, 'segment': segment})
log_file.write(msg)
segment_url = (
r'''applications/bcf/tenant[name="%(tenant)s"]/segment''' %
{'tenant': tenant})
segment_data = {"name": segment}
try:
ret = RestLib.post(cookie, segment_url, server, port,
json.dumps(segment_data))
except Exception:
ret = RestLib.patch(cookie, segment_url, server, port,
json.dumps(segment_data))
if ret[0] != 204:
if (ret[0] != 409 or
ELEMENT_EXISTS not in ret[2]):
raise Exception(ret)
intf_rule_url = (r'''applications/bcf/tenant[name="%(tenant)s"]/'''
'''segment[name="%(segment)s"]/'''
'''switch-port-membership-rule''' %
{'tenant': tenant,
'segment': segment})
rule_data = {"interface": ANY, "switch": ANY, "vlan": vlan}
try:
ret = RestLib.post(cookie, intf_rule_url, server, port,
json.dumps(rule_data))
except Exception:
ret = RestLib.patch(cookie, intf_rule_url, server, port,
json.dumps(rule_data))
if ret[0] != 204:
if (ret[0] != 409 or
ELEMENT_EXISTS not in ret[2]):
raise Exception(ret)
pg_rule_url = (r'''applications/bcf/tenant[name="%(tenant)s"]/'''
'''segment[name="%(segment)s"]/'''
'''port-group-membership-rule''' %
{'tenant': tenant,
'segment': segment})
rule_data = {"port-group": ANY, "vlan": vlan}
if "3.6" in bcf_version:
pg_rule_url = (r'''applications/bcf/tenant[name="%(tenant)s"]/'''
'''segment[name="%(segment)s"]/'''
'''interface-group-membership-rule''' %
{'tenant': tenant,
'segment': segment})
rule_data = {"interface-group": ANY, "vlan": vlan}
try:
ret = RestLib.post(cookie, pg_rule_url, server, port,
json.dumps(rule_data))
except Exception:
ret = RestLib.patch(cookie, pg_rule_url, server, port,
json.dumps(rule_data))
if ret[0] != 204:
if (ret[0] != 409 or
ELEMENT_EXISTS not in ret[2]):
raise Exception(ret)
specific_rule_url = (r'''applications/bcf/tenant[name="%(tenant)s"]/'''
'''segment[name="%(segment)s"]/'''
'''switch-port-membership-rule''' %
{'tenant': tenant,
'segment': segment})
rule_data = {"interface": internal_port, "switch": ANY, "vlan": -1}
try:
ret = RestLib.post(cookie, specific_rule_url, server, port,
json.dumps(rule_data))
except Exception:
ret = RestLib.patch(cookie, specific_rule_url, server, port,
json.dumps(rule_data))
if ret[0] != 204:
if (ret[0] != 409 or
ELEMENT_EXISTS not in ret[2]):
raise Exception(ret)
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("-u", "--username", required=True,
help="username for bcf controller")
parser.add_argument("-p", "--password", required=True,
help="password for bcf controller")
parser.add_argument("-c", "--controllers", required=True,
help="ip addresses of controller cluster "
"separated by ,")
parser.add_argument("-m", "--management-tenant", required=True,
help="Openstack management tenant.")
parser.add_argument("-f", "--fuel-cluster-id", required=True,
help="The custer id of the fuel environment")
parser.add_argument("-b", "--bcf-version", required=True,
help="The BCF version")
args = parser.parse_args()
ctrls = args.controllers.split(',')
try:
nodeCfg = NodeConfig()
segments = nodeCfg.get_bridge_vlan_str()
active_server, cookie = RestLib.get_active_bcf_controller(
ctrls, args.username, args.password,
port=BCF_CONTROLLER_PORT)
for segment in segments:
segment_name, vlan = segment.split(':')
internal_port = "%s%s" % (segment_name[:3], args.fuel_cluster_id)
seg_vlan = int(vlan)
RestLib.program_segment_and_membership_rule(
active_server, cookie, args.management_tenant,
segment_name, internal_port, seg_vlan, args.bcf_version)
sys.exit(0)
except Exception as e:
err = traceback.format_exc()
with open(LOG_FILE, "a") as log_file:
log_file.write('bcf_rest_client exception: %s\n' % err)
sys.exit(-1)

View File

@ -1,104 +0,0 @@
#!/bin/iash
IFS=,
declare -a bridges=($1)
bond_name=$2
# stop ovs agent, otherwise, ovs bridges cannot be removed
pkill neutron-openvswitch-agent
service neutron-plugin-openvswitch-agent stop
rm -f /etc/init/neutron-plugin-openvswitch-agent.conf
rm -f /usr/bin/neutron-openvswitch-agent
# remove ovs and linux bridge, example ("br-storage" "br-prv" "br-ex")
len=${#bridges[@]}
for (( i=0; i<$len; i++ )); do
ovs-vsctl del-br ${bridges[$i]}
brctl delbr ${bridges[$i]}
ip link del dev ${bridges[$i]}
done
# delete ovs br-int
while true; do
service neutron-plugin-openvswitch-agent stop
rm -f /etc/init/neutron-plugin-openvswitch-agent.conf
ovs-vsctl del-br br-int
ip link del dev br-int
sleep 1
ovs-vsctl show | grep br-int
if [[ $? != 0 ]]; then
break
fi
done
#bring down all bonds
if [[ $bond_name != "none" ]]; then
ip link del dev ${bond_name}
fi
exit 0
# /etc/network/interfaces
echo '' > /etc/network/interfaces
declare -a interfaces=("s0", "m0", "e0")
len=${#interfaces[@]}
for (( i=0; i<$len; i++ )); do
echo -e 'auto' ${interfaces[$i]} >>/etc/network/interfaces
echo -e 'iface' ${interfaces[$i]} 'inet manual' >>/etc/network/interfaces
echo ${interfaces[$i]} | grep '\.'
if [[ $? == 0 ]]; then
intf=$(echo ${interfaces[$i]} | cut -d \. -f 1)
echo -e 'vlan-raw-device ' $intf >> /etc/network/interfaces
fi
echo -e '\n' >> /etc/network/interfaces
done
echo -e 'auto br_fw_admin' >>/etc/network/interfaces
echo -e 'iface br_fw_admin inet static' >>/etc/network/interfaces
echo -e 'bridge_ports eth0' >>/etc/network/interfaces
echo -e 'address' >>/etc/network/interfaces
#reset uplinks to move them out of bond
uplinks=(%(uplinks)s)
len=${#uplinks[@]}
for (( i=0; i<$len; i++ )); do
ip link set ${uplinks[$i]} down
done
sleep 2
for (( i=0; i<$len; i++ )); do
ip link set ${uplinks[$i]} up
done
# assign ip to ivs internal ports
bash /etc/rc.local
echo 'Restart openstack-nova-compute and neutron-bsn-agent'
service nova-compute restart
service neutron-bsn-agent restart
set +e
# Make sure only root can run this script
if [[ "$(id -u)" != "0" ]]; then
echo -e "Please run as root"
exit 1
fi
apt-get install ubuntu-cloud-keyring
apt-get update -y
apt-get install -y linux-headers-$(uname -r) build-essential
apt-get install -y python-dev python-setuptools
apt-get install -y puppet dpkg
apt-get install -y vlan ethtool
apt-get install -y libssl-dev libffi6 libffi-dev
apt-get install -y libnl-genl-3-200
apt-get -f install -y
apt-get install -o Dpkg::Options::="--force-confold" --force-yes -y neutron-common
easy_install pip
puppet module install --force puppetlabs-inifile
puppet module install --force puppetlabs-stdlib
set -e
exit 0

View File

@ -1,28 +0,0 @@
#!/bin/bash
set -x
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <bcf_version>" >&2
exit 1
fi
bcf_version=$1
# install ivs
apt-get install -y libnl-genl-3-200
apt-get -f install -y
dpkg --force-all -i "/etc/fuel/plugins/fuel-plugin-bigswitch-1.0/ivs_packages/ubuntu/ivs_${bcf_version}_amd64.deb"
dpkg --force-all -i "/etc/fuel/plugins/fuel-plugin-bigswitch-1.0/ivs_packages/ubuntu/ivs-dbg_${bcf_version}_amd64.deb"
apt-get install -y apport
# full installation
if [[ -f /etc/init/neutron-plugin-openvswitch-agent.override ]]; then
cp /etc/init/neutron-plugin-openvswitch-agent.override /etc/init/neutron-bsn-agent.override
fi
if [[ "$(id -u)" != "0" ]]; then
echo -e "Please run as root"
exit 1
fi
exit 0

View File

@ -1,125 +0,0 @@
#!/bin/bash
set -x
if [ "$#" -ne 6 ]; then
echo "Usage: $0 <management interface> <management ip> <uplinks> <all used interfaces> <bridges' ip> <fuel_deployment_id>" >&2
exit 1
fi
mgmt_itf=$1
IFS='/'
declare -a mgmt_ip_attr=($2)
mgmt_ip=${mgmt_ip_attr[0]}
IFS=','
declare -a uplinks=($3)
declare -a interfaces=($4)
IFS='{}'
read -ra array1 <<< $5
deployment_id=$6
cdr2mask ()
{
# Number of args to shift, 255..255, first non-255 byte, zeroes
set -- $(( 5 - ($1 / 8) )) 255 255 255 255 $(( (255 << (8 - ($1 % 8))) & 255 )) 0 0 0
[ $1 -gt 1 ] && shift $1 || shift
echo ${1-0}.${2-0}.${3-0}.${4-0}
}
echo '' > /etc/network/interfaces
# Process input arguments
IFS=','
declare -a array2=(${array1[0]})
#IFS='=>'
len=${#array2[@]}
for (( i=0; i<$len; i++ )); do
# entry = "br-storage"=>["192.168.1.3/24"]
entry=${array2[$i]}
IFS='=>'
declare -a bridge_ip=(${entry})
key=$(echo "${bridge_ip[0]}" | sed -e 's/"//' -e 's/"//')
netmask=""
if [[ "$key" =~ "br-storage" ]] || [[ "$key" =~ "br-mgmt" ]]; then
itf_ip=$(echo "${bridge_ip[2]}" | sed -e 's/\[//' -e 's/"//' -e 's/"//' -e 's/]//')
IFS='/'
declare -a ip_address=(${itf_ip})
netmask=$( cdr2mask ${ip_address[1]} )
fi
internal_interface=""
if [[ "$key" =~ "br-storage" ]]; then
internal_interface="sto${deployment_id}"
elif [[ "$key" =~ "br-mgmt" ]]; then
internal_interface="mgm${deployment_id}"
elif [[ "$key" =~ "br-ex" ]]; then
internal_interface="ex${deployment_id}"
else
continue
fi
if [[ "$internal_interface" =~ "$deployment_id" ]]; then
echo -e 'auto' ${internal_interface} >> /etc/network/interfaces
echo -e 'iface' ${internal_interface} 'inet manual' >> /etc/network/interfaces
if [[ ! -z ${netmask} ]]; then
echo -e ' address' ${ip_address[0]} >> /etc/network/interfaces
echo -e ' netmask' ${netmask} >> /etc/network/interfaces
ifconfig $internal_interface up
ip link set $internal_interface up
ifconfig $internal_interface ${ip_address[0]}
ifconfig $internal_interface netmask ${netmask}
fi
echo -e '\n' >> /etc/network/interfaces
fi
done
# /etc/network/interfaces
len=${#interfaces[@]}
for (( i=0; i<$len; i++ )); do
echo -e 'auto' ${interfaces[$i]} >> /etc/network/interfaces
echo -e 'iface' ${interfaces[$i]} 'inet manual' >> /etc/network/interfaces
echo -e '\n' >> /etc/network/interfaces
done
echo -e 'auto br_fw_admin' >> /etc/network/interfaces
echo -e 'iface br_fw_admin inet static' >> /etc/network/interfaces
echo -e ' bridge_ports' ${mgmt_itf} >> /etc/network/interfaces
echo -e ' address' ${mgmt_ip} >> /etc/network/interfaces
echo -e '\n' >> /etc/network/interfaces
#reset uplinks to move them out of bond
len=${#uplinks[@]}
for (( i=0; i<$len; i++ )); do
ip link set ${uplinks[$i]} down
done
sleep 2
for (( i=0; i<$len; i++ )); do
ip link set ${uplinks[$i]} up
done
# assign ip to ivs internal ports
#bash /etc/rc.local
echo 'Restart openstack-nova-compute and neutron-bsn-agent'
service nova-compute restart
service neutron-bsn-agent restart
# Make sure only root can run this script
if [[ "$(id -u)" != "0" ]]; then
echo -e "Please run as root"
exit 1
fi
apt-get install ubuntu-cloud-keyring
apt-get update -y
apt-get install -y linux-headers-$(uname -r) build-essential
apt-get install -y python-dev python-setuptools
apt-get install -y puppet dpkg
apt-get install -y vlan ethtool
apt-get install -y libssl-dev libffi6 libffi-dev
apt-get install -y libnl-genl-3-200
apt-get -f install -y
apt-get install -o Dpkg::Options::="--force-confold" --force-yes -y neutron-common
easy_install pip
puppet module install --force puppetlabs-inifile
puppet module install --force puppetlabs-stdlib
exit 0

View File

@ -1,205 +0,0 @@
#!/bin/bash
compute() {
if [[ $deploy_dhcp_agent == true ]]; then
dpkg -l neutron-dhcp-agent
if [[ $? != 0 ]]; then
apt-get install -o Dpkg::Options::="--force-confold" -y neutron-metadata-agent
apt-get install -o Dpkg::Options::="--force-confold" -y neutron-dhcp-agent
service neutron-metadata-agent stop
service neutron-dhcp-agent stop
fi
# patch linux/dhcp.py to make sure static host route is pushed to instances
dhcp_py=$(find /usr -name dhcp.py | grep linux)
dhcp_dir=$(dirname "${dhcp_py}")
sed -i 's/if (isolated_subnets\[subnet.id\] and/if (True and/g' $dhcp_py
find $dhcp_dir -name "*.pyc" | xargs rm
find $dhcp_dir -name "*.pyo" | xargs rm
fi
# install ivs
if [[ $install_ivs == true ]]; then
# check ivs version compatability
pass=true
ivs --version
if [[ $? == 0 ]]; then
old_version=$(ivs --version | awk '{print $2}')
old_version_numbers=(${old_version//./ })
new_version_numbers=(${ivs_version//./ })
if [[ "$old_version" != "${old_version%%$ivs_version*}" ]]; then
pass=true
elif [[ $old_version > $ivs_version ]]; then
pass=false
elif [[ $((${new_version_numbers[0]}-1)) -gt ${old_version_numbers[0]} ]]; then
pass=false
fi
fi
if [[ $pass == true ]]; then
dpkg --force-all -i %(dst_dir)s/%(ivs_pkg)s
if [[ -f %(dst_dir)s/%(ivs_debug_pkg)s ]]; then
modinfo openvswitch | grep "^version"
if [[ $? == 0 ]]; then
apt-get remove -y openvswitch-datapath-dkms && rmmod openvswitch && modprobe openvswitch
fi
apt-get install -y libnl-genl-3-200
apt-get -f install -y
dpkg --force-all -i %(dst_dir)s/%(ivs_debug_pkg)s
apt-get install -y apport
fi
elif [[ $skip_ivs_version_check == true ]]; then
dpkg --force-all -i %(dst_dir)s/%(ivs_pkg)s
if [[ -f %(dst_dir)s/%(ivs_debug_pkg)s ]]; then
modinfo openvswitch | grep "^version"
if [[ $? == 0 ]]; then
apt-get remove -y openvswitch-datapath-dkms && rmmod openvswitch && modprobe openvswitch
fi
apt-get install -y libnl-genl-3-200
apt-get -f install -y
dpkg --force-all -i %(dst_dir)s/%(ivs_debug_pkg)s
apt-get install -y apport
fi
else
echo "ivs upgrade fails version validation"
fi
fi
# full installation
if [[ $install_all == true ]]; then
if [[ -f /etc/init/neutron-plugin-openvswitch-agent.override ]]; then
cp /etc/init/neutron-plugin-openvswitch-agent.override /etc/init/neutron-bsn-agent.override
fi
# stop ovs agent, otherwise, ovs bridges cannot be removed
pkill neutron-openvswitch-agent
service neutron-plugin-openvswitch-agent stop
rm -f /etc/init/neutron-bsn-agent.conf
rm -f /etc/init/neutron-plugin-openvswitch-agent.conf
rm -f /usr/bin/neutron-openvswitch-agent
# remove ovs and linux bridge, example ("br-storage" "br-prv" "br-ex")
declare -a ovs_br=(%(ovs_br)s)
len=${#ovs_br[@]}
for (( i=0; i<$len; i++ )); do
ovs-vsctl del-br ${ovs_br[$i]}
brctl delbr ${ovs_br[$i]}
ip link del dev ${ovs_br[$i]}
done
# delete ovs br-int
while true; do
service neutron-plugin-openvswitch-agent stop
rm -f /etc/init/neutron-plugin-openvswitch-agent.conf
ovs-vsctl del-br %(br-int)s
ip link del dev %(br-int)s
sleep 1
ovs-vsctl show | grep %(br-int)s
if [[ $? != 0 ]]; then
break
fi
done
#bring down all bonds
declare -a bonds=(%(bonds)s)
len=${#bonds[@]}
for (( i=0; i<$len; i++ )); do
ip link del dev ${bonds[$i]}
done
# deploy bcf
puppet apply --modulepath /etc/puppet/modules %(dst_dir)s/%(hostname)s.pp
# /etc/network/interfaces
if [[ ${fuel_cluster_id} != 'None' ]]; then
echo '' > /etc/network/interfaces
declare -a interfaces=(%(interfaces)s)
len=${#interfaces[@]}
for (( i=0; i<$len; i++ )); do
echo -e 'auto' ${interfaces[$i]} >>/etc/network/interfaces
echo -e 'iface' ${interfaces[$i]} 'inet manual' >>/etc/network/interfaces
echo ${interfaces[$i]} | grep '\.'
if [[ $? == 0 ]]; then
intf=$(echo ${interfaces[$i]} | cut -d \. -f 1)
echo -e 'vlan-raw-device ' $intf >> /etc/network/interfaces
fi
echo -e '\n' >> /etc/network/interfaces
done
echo -e 'auto' %(br_fw_admin)s >>/etc/network/interfaces
echo -e 'iface' %(br_fw_admin)s 'inet static' >>/etc/network/interfaces
echo -e 'bridge_ports' %(pxe_interface)s >>/etc/network/interfaces
echo -e 'address' %(br_fw_admin_address)s >>/etc/network/interfaces
fi
#reset uplinks to move them out of bond
declare -a uplinks=(%(uplinks)s)
len=${#uplinks[@]}
for (( i=0; i<$len; i++ )); do
ip link set ${uplinks[$i]} down
done
sleep 2
for (( i=0; i<$len; i++ )); do
ip link set ${uplinks[$i]} up
done
# assign ip to ivs internal ports
bash /etc/rc.local
fi
if [[ $deploy_dhcp_agent == true ]]; then
echo 'Restart neutron-metadata-agent and neutron-dhcp-agent'
service neutron-metadata-agent restart
service neutron-dhcp-agent restart
fi
echo 'Restart openstack-nova-compute and neutron-bsn-agent'
service nova-compute restart
service neutron-bsn-agent restart
set +e
# Make sure only root can run this script
if [[ "$(id -u)" != "0" ]]; then
echo -e "Please run as root"
exit 1
fi
# prepare dependencies
cat /etc/apt/sources.list | grep "http://archive.ubuntu.com/ubuntu"
if [[ $? != 0 ]]; then
release=$(lsb_release -sc)
echo -e "\ndeb http://archive.ubuntu.com/ubuntu $release main\n" >> /etc/apt/sources.list
fi
apt-get install ubuntu-cloud-keyring
apt-get update -y
apt-get install -y linux-headers-$(uname -r) build-essential
apt-get install -y python-dev python-setuptools
apt-get install -y puppet dpkg
apt-get install -y vlan ethtool
apt-get install -y libssl-dev libffi6 libffi-dev
apt-get install -y libnl-genl-3-200
apt-get -f install -y
apt-get install -o Dpkg::Options::="--force-confold" --force-yes -y neutron-common
easy_install pip
puppet module install --force puppetlabs-inifile
puppet module install --force puppetlabs-stdlib
# install bsnstacklib
if [[ $install_bsnstacklib == true ]]; then
sleep 2
pip uninstall -y bsnstacklib
sleep 2
if [[ $pip_proxy == false ]]; then
pip install --upgrade "bsnstacklib>%(bsnstacklib_version_lower)s,<%(bsnstacklib_version_upper)s"
pip install --upgrade horizon-bsn
else
pip --proxy $pip_proxy install --upgrade "bsnstacklib>%(bsnstacklib_version_lower)s,<%(bsnstacklib_version_upper)s"
pip --proxy $pip_proxy install --upgrade horizon-bsn
fi
fi
set -e
exit 0

View File

@ -1,47 +0,0 @@
#!/bin/bash
# This template deletes all network related resources for fresh installation.
# We are not using it anywhere for now, but keep it hear for future uses.
source ~/openrc
keystone tenant-list
if [[ $? != 0 ]]; then
echo 'Unable to establish connection for ospurge'
exit 1
fi
# delete all routers
routers=$(neutron router-list | awk '$2 != "id" {print $2}' | awk 'NF && $1!~/^#/')
for router in $routers; do
# delete all subnets that have interface on router
subnets=$(neutron router-port-list $router | awk '$0 ~ /.*subnet_id.*/ {print $0}' | awk '{print $(NF - 3)}' | tr -d ,| tr -d \")
for subnet in $subnets; do
neutron router-interface-delete $router $subnet
done
neutron router-gateway-clear $router
neutron router-delete $router
done
# delete floating ips
floatingips=$(neutron floatingip-list | awk '$2 != "id" {print $2}' | awk 'NF && $1!~/^#/')
for floatingip in $floatingips; do
neutron floatingip-delete $floatingip
done
# delete nova instances
instances=$(nova list --all-tenants | awk '$2 != "ID" {print $2}' | awk 'NF && $1!~/^#/')
for instance in $instances; do
nova delete $instance
done
# delete all subnets
subnets=$(neutron subnet-list | awk '$2 != "id" {print $2}' | awk 'NF && $1!~/^#/')
for subnet in $subnets; do
neutron subnet-delete $subnet
done
# delete all networks
nets=$(neutron net-list | awk '$2 != "id" {print $2}' | awk 'NF && $1!~/^#/')
for net in $nets; do
neutron net-delete $net
done

View File

@ -1,13 +0,0 @@
# nova-rootwrap command filters for api-metadata nodes
# This is needed on nova-api hosts running with "metadata" in enabled_apis
# or when running nova-api-metadata
# This file should be owned by (and only-writeable by) the root user
[Filters]
# 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

View File

@ -1,9 +0,0 @@
# nova-rootwrap command filters for compute nodes
# This file should be owned by (and only-writeable by) the root user
[Filters]
# nova/virt/baremetal/ipmi.py: 'ipmitool', ..
ipmitool: CommandFilter, ipmitool, root
# nova/virt/baremetal/ipmi.py: 'kill', '-TERM', str(console_pid)
kill_shellinaboxd: KillFilter, root, /usr/local/bin/shellinaboxd, -15, -TERM

View File

@ -1,11 +0,0 @@
# nova-rootwrap command filters for nova-baremetal-deploy-helper
# This file should be owned by (and only-writeable by) the root user
[Filters]
# nova-baremetal-deploy-helper
iscsiadm: CommandFilter, iscsiadm, root
sfdisk: CommandFilter, sfdisk, root
dd: CommandFilter, dd, root
mkswap: CommandFilter, mkswap, root
blkid: CommandFilter, blkid, root
mkfs: CommandFilter, mkfs, root

View File

@ -1,228 +0,0 @@
# nova-rootwrap command filters for compute nodes
# This file should be owned by (and only-writeable by) the root user
[Filters]
# nova/virt/disk/mount/api.py: 'kpartx', '-a', device
# nova/virt/disk/mount/api.py: 'kpartx', '-d', device
kpartx: CommandFilter, kpartx, root
# nova/virt/xenapi/vm_utils.py: tune2fs, -O ^has_journal, part_path
# nova/virt/xenapi/vm_utils.py: tune2fs, -j, partition_path
tune2fs: CommandFilter, tune2fs, root
# nova/virt/disk/mount/api.py: 'mount', mapped_device
# nova/virt/disk/api.py: 'mount', '-o', 'bind', src, target
# nova/virt/xenapi/vm_utils.py: 'mount', '-t', 'ext2,ext3,ext4,reiserfs'..
# nova/virt/configdrive.py: 'mount', device, mountdir
# nova/virt/libvirt/volume.py: 'mount', '-t', 'sofs' ...
mount: CommandFilter, mount, root
# nova/virt/disk/mount/api.py: 'umount', mapped_device
# nova/virt/disk/api.py: 'umount' target
# nova/virt/xenapi/vm_utils.py: 'umount', dev_path
# nova/virt/configdrive.py: 'umount', mountdir
umount: CommandFilter, umount, root
# nova/virt/disk/mount/nbd.py: 'qemu-nbd', '-c', device, image
# nova/virt/disk/mount/nbd.py: 'qemu-nbd', '-d', device
qemu-nbd: CommandFilter, qemu-nbd, root
# nova/virt/disk/mount/loop.py: 'losetup', '--find', '--show', image
# nova/virt/disk/mount/loop.py: 'losetup', '--detach', device
losetup: CommandFilter, losetup, root
# nova/virt/libvirt/utils.py: 'blockdev', '--getsize64', path
# nova/virt/disk/mount/nbd.py: 'blockdev', '--flushbufs', device
blockdev: RegExpFilter, blockdev, root, blockdev, (--getsize64|--flushbufs), /dev/.*
# nova/virt/disk/vfs/localfs.py: 'tee', canonpath
tee: CommandFilter, tee, root
# nova/virt/disk/vfs/localfs.py: 'mkdir', canonpath
mkdir: CommandFilter, mkdir, root
# nova/virt/disk/vfs/localfs.py: 'chown'
# nova/virt/libvirt/connection.py: 'chown', os.getuid( console_log
# nova/virt/libvirt/connection.py: 'chown', os.getuid( console_log
# nova/virt/libvirt/connection.py: 'chown', 'root', basepath('disk')
chown: CommandFilter, chown, root
# nova/virt/disk/vfs/localfs.py: 'chmod'
chmod: CommandFilter, chmod, root
# 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: 'tunctl', '-b', '-t', dev
# nova/network/linux_net.py: 'tunctl', '-b', '-t', dev
tunctl: CommandFilter, tunctl, 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/connection.py: 'dd', if=%s % virsh_output, ...
dd: CommandFilter, dd, root
# nova/virt/xenapi/volume_utils.py: 'iscsiadm', '-m', ...
iscsiadm: CommandFilter, iscsiadm, root
# nova/virt/libvirt/volume.py: 'aoe-revalidate', aoedev
# nova/virt/libvirt/volume.py: 'aoe-discover'
aoe-revalidate: CommandFilter, aoe-revalidate, root
aoe-discover: CommandFilter, aoe-discover, root
# nova/virt/xenapi/vm_utils.py: parted, --script, ...
# nova/virt/xenapi/vm_utils.py: 'parted', '--script', dev_path, ..*.
parted: CommandFilter, parted, root
# nova/virt/xenapi/vm_utils.py: 'pygrub', '-qn', dev_path
pygrub: CommandFilter, pygrub, root
# nova/virt/xenapi/vm_utils.py: fdisk %(dev_path)s
fdisk: CommandFilter, fdisk, root
# nova/virt/xenapi/vm_utils.py: e2fsck, -f, -p, partition_path
# nova/virt/disk/api.py: e2fsck, -f, -p, image
e2fsck: CommandFilter, e2fsck, root
# nova/virt/xenapi/vm_utils.py: resize2fs, partition_path
# nova/virt/disk/api.py: resize2fs, image
resize2fs: CommandFilter, resize2fs, 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/virt/libvirt/utils.py: 'mkswap'
# nova/virt/xenapi/vm_utils.py: 'mkswap'
mkswap: CommandFilter, mkswap, root
# nova/virt/xenapi/vm_utils.py: 'mkfs'
# nova/utils.py: 'mkfs', fs, path, label
mkfs: CommandFilter, mkfs, root
# nova/virt/libvirt/utils.py: 'qemu-img'
qemu-img: CommandFilter, qemu-img, root
# nova/virt/disk/vfs/localfs.py: 'readlink', '-e'
readlink: CommandFilter, readlink, root
# nova/virt/disk/api.py: 'touch', target
touch: CommandFilter, touch, root
# nova/virt/disk/api.py:
mkfs.ext3: CommandFilter, mkfs.ext3, root
mkfs.ntfs: CommandFilter, mkfs.ntfs, root
# nova/virt/libvirt/connection.py:
read_initiator: ReadFileFilter, /etc/iscsi/initiatorname.iscsi
# nova/virt/libvirt/connection.py:
lvremove: CommandFilter, lvremove, root
# nova/virt/libvirt/utils.py:
lvcreate: CommandFilter, lvcreate, root
# nova/virt/libvirt/utils.py:
lvs: CommandFilter, lvs, root
# nova/virt/libvirt/utils.py:
vgs: CommandFilter, vgs, root
# nova/virt/baremetal/volume_driver.py: 'tgtadm', '--lld', 'iscsi', ...
tgtadm: CommandFilter, tgtadm, root
# nova/utils.py:read_file_as_root: 'cat', file_path
# (called from nova/virt/disk/vfs/localfs.py:VFSLocalFS.read_file)
read_passwd: RegExpFilter, cat, root, cat, (/var|/usr)?/tmp/openstack-vfs-localfs[^/]+/etc/passwd
read_shadow: RegExpFilter, cat, root, cat, (/var|/usr)?/tmp/openstack-vfs-localfs[^/]+/etc/shadow
# nova/virt/libvirt/volume.py: 'multipath' '-R'
multipath: CommandFilter, multipath, root
# nova/virt/libvirt/utils.py:
systool: CommandFilter, systool, root
# nova/virt/libvirt/volume.py:
sginfo: CommandFilter, sginfo, root
sg_scan: CommandFilter, sg_scan, root
ln: RegExpFilter, ln, root, ln, --symbolic, --force, /dev/mapper/ip-.*-iscsi-iqn.*, /dev/disk/by-path/ip-.*-iscsi-iqn.*
# nova/volume/encryptors.py:
# nova/virt/libvirt/dmcrypt.py:
cryptsetup: CommandFilter, cryptsetup, root
# nova/virt/xenapi/vm_utils.py:
xenstore-read: CommandFilter, xenstore-read, root
# nova/virt/baremetal/tilera.py: 'rpc.mountd'
rpc.mountd: CommandFilter, rpc.mountd, root
# nova/virt/libvirt/utils.py:
rbd: CommandFilter, rbd, root
# nova/virt/libvirt/utils.py: 'shred', '-n3', '-s%d' % volume_size, path
shred: CommandFilter, shred, root
# nova/virt/libvirt/volume.py: 'cp', '/dev/stdin', delete_control..
cp: CommandFilter, cp, root
# nova/virt/xenapi/vm_utils.py:
sync: CommandFilter, sync, root

View File

@ -1,94 +0,0 @@
# 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

View File

@ -1,46 +0,0 @@
#
# Copyright 2015 Mirantis, 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 bcf {
$bond_lacp = 'bond-mode 4'
$sys_desc_lacp = '5c:16:c7:00:00:04'
$sys_desc_xor = '5c:16:c7:00:00:00'
$deployment_id = hiera('deployment_id')
# Network configuration
$network_scheme = hiera_hash('network_scheme', {})
$existing_bridges = $network_scheme['endpoints']
prepare_network_config($network_scheme)
$gw = get_default_gateways()
$phy_devs = get_network_role_property('neutron/private', 'phys_dev')
$mgmt_itf = get_network_role_property('admin/pxe', 'phys_dev')
$if_str = "${phy_devs}"
if $if_str =~ /^bond.*/ {
$ifaces = join($phy_devs, ',')
$bond = true
$bond_name = "${phy_devs[0]}"
$s = "${phy_devs[0]},"
$r = split("abc${ifaces}", $s)
$itfs = $r[1]
}
else {
$bond = false
$bond_name = 'none'
$itfs = $phy_devs
}
$network_metadata = hiera_hash('network_metadata', {})
$public_vip = $network_metadata['vips']['public']['ipaddr']
}

View File

@ -1,210 +0,0 @@
#
# Copyright 2015 BigSwitch Networks, 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 bcf::p_only::compute {
include bcf
include bcf::params
# edit rc.local for cron job and default gw
file { '/etc/rc.local':
ensure => file,
mode => '0777',
}->
file_line { 'remove clear default gw':
ensure => absent,
path => '/etc/rc.local',
line => 'ip route del default',
}->
file_line { 'remove ip route add default':
ensure => absent,
path => '/etc/rc.local',
line => "ip route add default via ${bcf::gw}",
}->
file_line { 'clear default gw':
path => '/etc/rc.local',
line => 'ip route del default',
}->
file_line { 'add default gw':
path => '/etc/rc.local',
line => "ip route add default via ${bcf::gw}",
}->
file_line { 'add exit 0':
path => '/etc/rc.local',
line => 'exit 0',
}
exec { 'set default gw':
command => "ip route del default; ip route add default via ${bcf::gw}",
path => '/usr/local/bin/:/usr/bin/:/bin:/sbin',
}
# config /etc/neutron/neutron.conf
ini_setting { 'neutron.conf report_interval':
ensure => present,
path => '/etc/neutron/neutron.conf',
section => 'agent',
key_val_separator => '=',
setting => 'report_interval',
value => '60',
notify => Service['neutron-plugin-openvswitch-agent'],
}
ini_setting { 'neutron.conf agent_down_time':
ensure => present,
path => '/etc/neutron/neutron.conf',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'agent_down_time',
value => '150',
notify => Service['neutron-plugin-openvswitch-agent'],
}
ini_setting { 'neutron.conf service_plugins':
ensure => present,
path => '/etc/neutron/neutron.conf',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'service_plugins',
value => 'router',
notify => Service['neutron-plugin-openvswitch-agent'],
}
ini_setting { 'neutron.conf dhcp_agents_per_network':
ensure => present,
path => '/etc/neutron/neutron.conf',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'dhcp_agents_per_network',
value => '1',
notify => Service['neutron-plugin-openvswitch-agent'],
}
ini_setting { 'neutron.conf notification driver':
ensure => present,
path => '/etc/neutron/neutron.conf',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'notification_driver',
value => 'messaging',
notify => Service['neutron-plugin-openvswitch-agent'],
}
# set the correct properties in ml2_conf.ini on compute as well
# config /etc/neutron/plugins/ml2/ml2_conf.ini
ini_setting { 'ml2 type dirvers':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'ml2',
key_val_separator => '=',
setting => 'type_drivers',
value => 'vlan',
notify => Service['neutron-plugin-openvswitch-agent'],
}
ini_setting { 'ml2 tenant network types':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'ml2',
key_val_separator => '=',
setting => 'tenant_network_types',
value => 'vlan',
notify => Service['neutron-plugin-openvswitch-agent'],
}
# change ml2 ownership
file { '/etc/neutron/plugins/ml2':
owner => neutron,
group => neutron,
recurse => true,
notify => Service['neutron-plugin-openvswitch-agent'],
}
# ensure neutron-plugin-openvswitch-agent is running
file { '/etc/init/neutron-plugin-openvswitch-agent.conf':
ensure => file,
mode => '0644',
}
service { 'neutron-plugin-openvswitch-agent':
ensure => 'running',
enable => true,
provider => 'upstart',
hasrestart => true,
hasstatus => true,
subscribe => [File['/etc/init/neutron-plugin-openvswitch-agent.conf']],
}
file { '/etc/neutron/dnsmasq-neutron.conf':
ensure => file,
content => 'dhcp-option-force=26,1400',
}
service { 'nova-compute':
ensure => running,
enable => true,
}
$public_ssl = hiera('public_ssl')
$horizon_ssl = $public_ssl['horizon']
if $horizon_ssl {
$novnc_protocol = 'https'
}
else {
$novnc_protocol = 'http'
}
# update nova.conf for novncproxy_base_url
ini_setting { 'nova novncproxy_base_url':
ensure => present,
path => '/etc/nova/nova.conf',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'novncproxy_base_url',
value => "${novnc_protocol}://${bcf::public_vip}:6080/vnc_auto.html",
notify => Service['nova-compute']
}
if $bcf::params::openstack::neutron_dvr {
notice('MODULAR: bigswitch bcf::p_only::compute, dvr')
service { 'neutron-l3-agent':
ensure => running,
enable => true,
}
# config /etc/neutron/l3-agent.ini
ini_setting { 'l3 agent disable metadata proxy':
ensure => present,
path => '/etc/neutron/l3_agent.ini',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'enable_metadata_proxy',
value => 'False',
notify => Service['neutron-l3-agent'],
}
ini_setting { 'l3 agent external network bridge':
ensure => present,
path => '/etc/neutron/l3_agent.ini',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'external_network_bridge',
value => '',
notify => Service['neutron-l3-agent'],
}
ini_setting { 'l3 agent handle_internal_only_routers':
ensure => present,
path => '/etc/neutron/l3_agent.ini',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'handle_internal_only_routers',
value => 'True',
notify => Service['neutron-l3-agent'],
}
}
}

View File

@ -1,58 +0,0 @@
#
# Copyright 2015 BigSwitch Networks, 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 bcf::p_only::compute_network_config {
include bcf
include bcf::params
$binpath = '/usr/local/bin/:/bin/:/usr/bin:/usr/sbin:/usr/local/sbin:/sbin'
$sys_desc_lacp = '5c:16:c7:00:00:04'
# lldp
$a = file('/etc/fuel/plugins/fuel-plugin-bigswitch-1.0/python_scripts/send_lldp', '/dev/null')
if($a != '') {
file { '/bin/send_lldp':
ensure => file,
content => $a,
mode => '0777',
}
}
file { '/etc/init/send_lldp.conf':
ensure => file,
content => "
description \"BCF LLDP\"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
script
exec /bin/send_lldp --system-desc ${sys_desc_lacp} --system-name $(uname -n) -i 10 --network_interface ${bcf::itfs}
end script
",
}
service { 'send_lldp':
ensure => running,
enable => true,
require => [File['/bin/send_lldp'], File['/etc/init/send_lldp.conf']],
}
# load bonding module
file_line {'load bonding on boot':
path => '/etc/modules',
line => 'bonding',
match => '^bonding$',
}
}

View File

@ -1,293 +0,0 @@
#
# Copyright 2015 BigSwitch Networks, 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 bcf::p_only::reconfigure_neutron {
include bcf
include bcf::params
include bcf::params::openstack
$binpath = '/usr/local/bin/:/bin/:/usr/bin:/usr/sbin:/usr/local/sbin:/sbin'
package { 'python-pip':
ensure => 'installed',
}
exec { 'bsnstacklib':
command => 'pip install "bsnstacklib<2015.2"',
path => '/usr/local/bin/:/usr/bin/:/bin',
require => Package['python-pip']
}
# purge bcf controller public key
exec { 'purge bcf key':
command => 'rm -rf /etc/neutron/plugins/ml2/host_certs/*',
path => $binpath,
notify => Service['neutron-server'],
}
# config /etc/neutron/neutron.conf
ini_setting { 'neutron.conf report_interval':
ensure => present,
path => '/etc/neutron/neutron.conf',
section => 'agent',
key_val_separator => '=',
setting => 'report_interval',
value => '60',
notify => Service['neutron-server'],
}
ini_setting { 'neutron.conf agent_down_time':
ensure => present,
path => '/etc/neutron/neutron.conf',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'agent_down_time',
value => '150',
notify => Service['neutron-server'],
}
ini_setting { 'neutron.conf service_plugins':
ensure => present,
path => '/etc/neutron/neutron.conf',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'service_plugins',
value => 'router',
notify => Service['neutron-server'],
}
ini_setting { 'neutron.conf dhcp_agents_per_network':
ensure => present,
path => '/etc/neutron/neutron.conf',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'dhcp_agents_per_network',
value => '1',
notify => Service['neutron-server'],
}
ini_setting { 'neutron.conf network_scheduler_driver':
ensure => present,
path => '/etc/neutron/neutron.conf',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'network_scheduler_driver',
value => 'neutron.scheduler.dhcp_agent_scheduler.WeightScheduler',
notify => Service['neutron-server'],
}
ini_setting { 'neutron.conf notification driver':
ensure => present,
path => '/etc/neutron/neutron.conf',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'notification_driver',
value => 'messaging',
notify => Service['neutron-server'],
}
# config /etc/neutron/plugin.ini
ini_setting { 'neutron plugin.ini firewall_driver':
ensure => present,
path => '/etc/neutron/plugin.ini',
section => 'securitygroup',
key_val_separator => '=',
setting => 'firewall_driver',
value => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver',
notify => Service['neutron-server'],
}
ini_setting { 'neutron plugin.ini enable_security_group':
ensure => present,
path => '/etc/neutron/plugin.ini',
section => 'securitygroup',
key_val_separator => '=',
setting => 'enable_security_group',
value => 'True',
notify => Service['neutron-server'],
}
file { '/etc/neutron/dnsmasq-neutron.conf':
ensure => file,
content => 'dhcp-option-force=26,1400',
}
# config /etc/neutron/l3-agent.ini
ini_setting { 'l3 agent disable metadata proxy':
ensure => present,
path => '/etc/neutron/l3_agent.ini',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'enable_metadata_proxy',
value => 'False',
}
ini_setting { 'l3 agent external network bridge':
ensure => present,
path => '/etc/neutron/l3_agent.ini',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'external_network_bridge',
value => '',
}
ini_setting { 'l3 agent handle_internal_only_routers':
ensure => present,
path => '/etc/neutron/l3_agent.ini',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'handle_internal_only_routers',
value => 'True',
}
# config /etc/neutron/plugins/ml2/ml2_conf.ini
ini_setting { 'ml2 type dirvers':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'ml2',
key_val_separator => '=',
setting => 'type_drivers',
value => 'vlan',
notify => Service['neutron-server'],
}
ini_setting { 'ml2 tenant network types':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'ml2',
key_val_separator => '=',
setting => 'tenant_network_types',
value => 'vlan',
notify => Service['neutron-server'],
}
ini_setting { 'ml2 mechanism drivers':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'ml2',
key_val_separator => '=',
setting => 'mechanism_drivers',
value => 'openvswitch,bsn_ml2',
notify => Service['neutron-server'],
}
ini_setting { 'ml2 restproxy ssl cert directory':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'restproxy',
key_val_separator => '=',
setting => 'ssl_cert_directory',
value => '/etc/neutron/plugins/ml2',
notify => Service['neutron-server'],
}
if $bcf::params::openstack::bcf_controller_2 == '' {
$server = "${bcf::params::openstack::bcf_controller_1}:8000"
}
else {
$server = "${bcf::params::openstack::bcf_controller_1}:8000,${bcf::params::openstack::bcf_controller_2}:8000"
}
ini_setting { 'ml2 restproxy servers':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'restproxy',
key_val_separator => '=',
setting => 'servers',
value => $server,
notify => Service['neutron-server'],
}
ini_setting { 'ml2 restproxy server auth':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'restproxy',
key_val_separator => '=',
setting => 'server_auth',
value => "${bcf::params::openstack::bcf_username}:${bcf::params::openstack::bcf_password}",
notify => Service['neutron-server'],
}
ini_setting { 'ml2 restproxy server ssl':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'restproxy',
key_val_separator => '=',
setting => 'server_ssl',
value => 'True',
notify => Service['neutron-server'],
}
ini_setting { 'ml2 restproxy auto sync on failure':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'restproxy',
key_val_separator => '=',
setting => 'auto_sync_on_failure',
value => 'True',
notify => Service['neutron-server'],
}
ini_setting { 'ml2 restproxy consistency interval':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'restproxy',
key_val_separator => '=',
setting => 'consistency_interval',
value => 60,
notify => Service['neutron-server'],
}
ini_setting { 'ml2 restproxy neutron_id':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'restproxy',
key_val_separator => '=',
setting => 'neutron_id',
value => "${bcf::params::openstack::bcf_instance_id}",
notify => Service['neutron-server'],
}
ini_setting { 'ml2 restproxy auth_url':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'restproxy',
key_val_separator => '=',
setting => 'auth_url',
value => "http://${bcf::params::openstack::keystone_vip}:35357",
notify => Service['neutron-server'],
}
ini_setting { 'ml2 restproxy auth_user':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'restproxy',
key_val_separator => '=',
setting => 'auth_user',
value => "${bcf::params::openstack::auth_user}",
notify => Service['neutron-server'],
}
ini_setting { 'ml2 restproxy auth_password':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'restproxy',
key_val_separator => '=',
setting => 'auth_password',
value => "${bcf::params::openstack::auth_password}",
notify => Service['neutron-server'],
}
ini_setting { 'ml2 restproxy auth_tenant_name':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'restproxy',
key_val_separator => '=',
setting => 'auth_tenant',
value => "${bcf::params::openstack::auth_tenant_name}",
notify => Service['neutron-server'],
}
# change ml2 ownership
file { '/etc/neutron/plugins/ml2':
owner => neutron,
group => neutron,
recurse => true,
notify => Service['neutron-server'],
}
# neutron-server, keystone
service { 'neutron-server':
ensure => running,
enable => true,
}
}

View File

@ -1,43 +0,0 @@
#
# Copyright 2015 BigSwitch Networks, 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 bcf::p_only::restart_cluster_services {
include bcf
include bcf::params
$binpath = '/usr/local/bin/:/bin/:/usr/bin:/usr/sbin:/usr/local/sbin:/sbin'
$nodes_hash = hiera('nodes', {})
$roles = node_roles($nodes_hash, hiera('uid'))
if member($roles, 'primary-controller') {
exec { 'restart neutron-dhcp-agent':
command => 'crm resource restart p_neutron-dhcp-agent',
path => '/usr/local/bin/:/bin/:/usr/sbin',
} ->
exec { 'restart neutron-metadata-agent':
command => 'crm resource restart p_neutron-metadata-agent',
path => '/usr/local/bin/:/bin/:/usr/sbin',
} ->
exec { 'restart neutron-l3-agent':
command => 'crm resource restart p_neutron-l3-agent',
path => '/usr/local/bin/:/bin/:/usr/sbin',
} ->
exec { 'restart neutron-plugin-openvswitch-agent':
command => 'crm resource restart p_neutron-plugin-openvswitch-agent',
path => '/usr/local/bin/:/bin/:/usr/sbin',
}
}
}

View File

@ -1,322 +0,0 @@
#
# Copyright 2015 BigSwitch Networks, 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.
#
notice('MODULAR: bigswitch p_v compute')
class bcf::p_v::compute {
include bcf
include bcf::params
include bcf::params::openstack
$interfaces_dict = $bcf::network_scheme['interfaces']
notice("bigswitch interfaces_dict ${interfaces_dict}")
$bridge_ips = {}
$bridge_ips['br-aux'] = 'none'
$ivs_internal_ports = {}
$mgmt_ip = $bcf::existing_bridges['br-fw-admin']['IP']
if has_key($bcf::existing_bridges, 'br-storage') {
$bridge_ips['br-storage'] = $bcf::existing_bridges['br-storage']['IP']
$ivs_internal_ports['br-storage'] = "sto${bcf::deployment_id}"
}
if has_key($bcf::existing_bridges, 'br-prv') {
$bridge_ips['br-prv'] = $bcf::existing_bridges['br-prv']['IP']
}
if has_key($bcf::existing_bridges, 'br-mgmt') {
$bridge_ips['br-mgmt'] = $bcf::existing_bridges['br-mgmt']['IP']
$ivs_internal_ports['br-mgmt'] = "mgm${bcf::deployment_id}"
}
if has_key($bcf::existing_bridges, 'br-ex') {
$bridge_ips['br-ex'] = $bcf::existing_bridges['br-ex']['IP']
$ivs_internal_ports['br-ex'] = "ex${bcf::deployment_id}"
}
$bridge_list = split(inline_template("<%= @bridge_ips.keys.join(',') %>", ','))
$interfaces = split(inline_template("<%= @interfaces_dict.keys.join(',') %>", ','))
$internal_port_str = inline_template("<%= @ivs_internal_ports.values.join(' --internal-port=') %>")
$ivs_uplink_str = regsubst($bcf::itfs, ',', ' -u ', 'G')
notice("bigswitch bond_name ${bcf::bond_name}")
notice("bigswitch interfaces ${interfaces}")
# Install rootwrap filter
file { '/etc/neutron/rootwrap.d/network.filters':
ensure => 'file',
source => 'puppet:///modules/bcf/rootwrap/network.filters',
}
file { '/etc/neutron/rootwrap.d/api-metadata.filters':
ensure => 'file',
source => 'puppet:///modules/bcf/rootwrap/api-metadata.filters',
}
file { '/etc/neutron/rootwrap.d/baremetal-deploy-helper.filters':
ensure => 'file',
source => 'puppet:///modules/bcf/rootwrap/baremetal-deploy-helper.filters',
}
file { '/etc/neutron/rootwrap.d/baremetal-compute-ipmi.filters':
ensure => 'file',
source => 'puppet:///modules/bcf/rootwrap/baremetal-compute-ipmi.filters',
}
file { '/etc/neutron/rootwrap.d/compute.filters':
ensure => 'file',
source => 'puppet:///modules/bcf/rootwrap/compute.filters',
}
package { 'python-pip':
ensure => 'installed',
require => File['/etc/neutron/rootwrap.d/network.filters']
}
exec { 'bsnstacklib':
command => 'pip install "bsnstacklib<2015.2"',
path => '/usr/local/bin/:/usr/bin/:/bin',
require => Package['python-pip']
}
# Install the cleanup script
file { '/etc/bigswitch':
ensure => 'directory',
require => Exec['bsnstacklib']
}
file { '/etc/bigswitch/bridge-cleanup.sh':
ensure => 'file',
source => 'puppet:///modules/bcf/p_v/bridge-cleanup.sh',
require => File['/etc/bigswitch']
}
exec { 'clean up ovs bridges':
command => "bash /etc/bigswitch/bridge-cleanup.sh ${bridge_list} ${bcf::bond_name}",
path => '/sbin:/usr/sbin/:/usr/local/bin/:/usr/bin/:/bin',
logoutput => true,
require => File['/etc/bigswitch/bridge-cleanup.sh']
}
file { '/etc/bigswitch/ivs-install.sh':
ensure => 'file',
source => 'puppet:///modules/bcf/p_v/ivs-install.sh',
require => EXEC['clean up ovs bridges']
}
exec { 'install ivs package':
command => "bash /etc/bigswitch/ivs-install.sh ${bcf::params::openstack::bcf_version}",
path => '/sbin:/usr/sbin/:/usr/local/bin/:/usr/bin/:/bin',
logoutput => true,
require => File['/etc/bigswitch/ivs-install.sh']
}
file { '/etc/default/ivs':
ensure => file,
mode => '0644',
content => "DAEMON_ARGS=\"--hitless --inband-vlan 4092 -u ${ivs_uplink_str} --internal-port=${internal_port_str}\"",
require => Exec['install ivs package'],
notify => Service['ivs'],
}
service { 'ivs':
ensure => running,
enable => true,
}
file { '/etc/bigswitch/ivs-setup.sh':
ensure => 'file',
source => 'puppet:///modules/bcf/p_v/ivs-setup.sh',
require => Service['ivs']
}
exec { 'set up ivs':
command => "bash /etc/bigswitch/ivs-setup.sh ${bcf::mgmt_itf} ${mgmt_ip} ${bcf::itfs} ${interfaces} \'${bridge_ips}\' ${bcf::deployment_id}",
path => '/sbin:/usr/sbin/:/usr/local/bin/:/usr/bin/:/bin',
logoutput => true,
require => File['/etc/bigswitch/ivs-setup.sh']
}
# edit rc.local for cron job and default gw
file { '/etc/rc.local':
ensure => file,
mode => '0777',
}->
file_line { 'remove clear default gw':
ensure => absent,
path => '/etc/rc.local',
line => 'ip route del default',
}->
file_line { 'remove ip route add default':
ensure => absent,
path => '/etc/rc.local',
line => "ip route add default via ${bcf::gw}",
}->
file_line { 'clear default gw':
path => '/etc/rc.local',
line => 'ip route del default',
}->
file_line { 'add default gw':
path => '/etc/rc.local',
line => "ip route add default via ${bcf::gw}",
}->
file_line { 'add exit 0':
path => '/etc/rc.local',
line => 'exit 0',
}
exec { 'set default gw':
command => "ip route del default; ip route add default via ${bcf::gw}",
path => '/usr/local/bin/:/usr/bin/:/bin:/sbin',
}
# config /etc/neutron/neutron.conf
ini_setting { 'neutron.conf report_interval':
ensure => present,
path => '/etc/neutron/neutron.conf',
section => 'agent',
key_val_separator => '=',
setting => 'report_interval',
value => '60',
notify => Service['neutron-bsn-agent'],
}
ini_setting { 'neutron.conf agent_down_time':
ensure => present,
path => '/etc/neutron/neutron.conf',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'agent_down_time',
value => '150',
notify => Service['neutron-bsn-agent'],
}
ini_setting { 'neutron.conf service_plugins':
ensure => present,
path => '/etc/neutron/neutron.conf',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'service_plugins',
value => 'router',
notify => Service['neutron-bsn-agent'],
}
ini_setting { 'neutron.conf dhcp_agents_per_network':
ensure => present,
path => '/etc/neutron/neutron.conf',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'dhcp_agents_per_network',
value => '1',
notify => Service['neutron-bsn-agent'],
}
ini_setting { 'neutron.conf notification driver':
ensure => present,
path => '/etc/neutron/neutron.conf',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'notification_driver',
value => 'messaging',
notify => Service['neutron-bsn-agent'],
}
# set the correct properties in ml2_conf.ini on compute as well
# config /etc/neutron/plugins/ml2/ml2_conf.ini
ini_setting { 'ml2 type dirvers':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'ml2',
key_val_separator => '=',
setting => 'type_drivers',
value => 'vlan',
notify => Service['neutron-bsn-agent'],
}
ini_setting { 'ml2 tenant network types':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'ml2',
key_val_separator => '=',
setting => 'tenant_network_types',
value => 'vlan',
notify => Service['neutron-bsn-agent'],
}
# change ml2 ownership
file { '/etc/neutron/plugins/ml2':
owner => neutron,
group => neutron,
recurse => true,
notify => Service['neutron-bsn-agent'],
}
# config neutron-bsn-agent conf
file { '/etc/init/neutron-bsn-agent.conf':
ensure => present,
content => "
description \"Neutron BSN Agent\"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
script
exec /usr/local/bin/neutron-bsn-agent --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/plugin.ini --log-file=/var/log/neutron/neutron-bsn-agent.log
end script
",
}
file { '/etc/init.d/neutron-bsn-agent':
ensure => link,
target => '/lib/init/upstart-job',
notify => Service['neutron-bsn-agent'],
}
service {'neutron-bsn-agent':
ensure => 'running',
provider => 'upstart',
hasrestart => true,
hasstatus => true,
subscribe => [File['/etc/init/neutron-bsn-agent.conf'], File['/etc/init.d/neutron-bsn-agent']],
}
# stop and disable neutron-plugin-openvswitch-agent
service { 'neutron-plugin-openvswitch-agent':
ensure => 'stopped',
enable => false,
provider => 'upstart',
}
# disable l3 agent
ini_setting { 'l3 agent disable metadata proxy':
ensure => present,
path => '/etc/neutron/l3_agent.ini',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'enable_metadata_proxy',
value => 'False',
}
file { '/etc/neutron/dnsmasq-neutron.conf':
ensure => file,
content => 'dhcp-option-force=26,1400',
}
service { 'nova-compute':
ensure => running,
enable => true,
}
$public_ssl = hiera('public_ssl')
$horizon_ssl = $public_ssl['horizon']
if $horizon_ssl {
$novnc_protocol = 'https'
}
else {
$novnc_protocol = 'http'
}
# update nova.conf for novncproxy_base_url
ini_setting { 'nova novncproxy_base_url':
ensure => present,
path => '/etc/nova/nova.conf',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'novncproxy_base_url',
value => "${novnc_protocol}://${bcf::public_vip}:6080/vnc_auto.html",
notify => Service['nova-compute']
}
}

View File

@ -1,294 +0,0 @@
#
# Copyright 2015 BigSwitch Networks, 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 bcf::p_v::reconfigure_neutron {
include bcf
include bcf::params
include bcf::params::openstack
$binpath = '/usr/local/bin/:/bin/:/usr/bin:/usr/sbin:/usr/local/sbin:/sbin'
package { 'python-pip':
ensure => 'installed',
}
exec { 'bsnstacklib':
command => 'pip install "bsnstacklib<2015.2"',
path => '/usr/local/bin/:/usr/bin/:/bin',
require => Package['python-pip']
}
# purge bcf controller public key
exec { 'purge bcf key':
command => 'rm -rf /etc/neutron/plugins/ml2/host_certs/*',
path => $binpath,
notify => Service['neutron-server'],
}
# config /etc/neutron/neutron.conf
ini_setting { 'neutron.conf report_interval':
ensure => present,
path => '/etc/neutron/neutron.conf',
section => 'agent',
key_val_separator => '=',
setting => 'report_interval',
value => '60',
notify => Service['neutron-server'],
}
ini_setting { 'neutron.conf agent_down_time':
ensure => present,
path => '/etc/neutron/neutron.conf',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'agent_down_time',
value => '150',
notify => Service['neutron-server'],
}
ini_setting { 'neutron.conf service_plugins':
ensure => present,
path => '/etc/neutron/neutron.conf',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'service_plugins',
value => 'bsn_l3',
notify => Service['neutron-server'],
}
ini_setting { 'neutron.conf dhcp_agents_per_network':
ensure => present,
path => '/etc/neutron/neutron.conf',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'dhcp_agents_per_network',
value => '1',
notify => Service['neutron-server'],
}
ini_setting { 'neutron.conf network_scheduler_driver':
ensure => present,
path => '/etc/neutron/neutron.conf',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'network_scheduler_driver',
value => 'neutron.scheduler.dhcp_agent_scheduler.WeightScheduler',
notify => Service['neutron-server'],
}
ini_setting { 'neutron.conf notification driver':
ensure => present,
path => '/etc/neutron/neutron.conf',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'notification_driver',
value => 'messaging',
notify => Service['neutron-server'],
}
# config /etc/neutron/plugin.ini
ini_setting { 'neutron plugin.ini firewall_driver':
ensure => present,
path => '/etc/neutron/plugin.ini',
section => 'securitygroup',
key_val_separator => '=',
setting => 'firewall_driver',
value => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver',
notify => Service['neutron-server'],
}
ini_setting { 'neutron plugin.ini enable_security_group':
ensure => present,
path => '/etc/neutron/plugin.ini',
section => 'securitygroup',
key_val_separator => '=',
setting => 'enable_security_group',
value => 'True',
notify => Service['neutron-server'],
}
file { '/etc/neutron/dnsmasq-neutron.conf':
ensure => file,
content => 'dhcp-option-force=26,1400',
}
# config /etc/neutron/l3-agent.ini
ini_setting { 'l3 agent disable metadata proxy':
ensure => present,
path => '/etc/neutron/l3_agent.ini',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'enable_metadata_proxy',
value => 'False',
}
# config /etc/neutron/plugins/ml2/ml2_conf.ini
ini_setting { 'ml2 type dirvers':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'ml2',
key_val_separator => '=',
setting => 'type_drivers',
value => 'vlan',
notify => Service['neutron-server'],
}
ini_setting { 'ml2 tenant network types':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'ml2',
key_val_separator => '=',
setting => 'tenant_network_types',
value => 'vlan',
notify => Service['neutron-server'],
}
ini_setting { 'ml2 mechanism drivers':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'ml2',
key_val_separator => '=',
setting => 'mechanism_drivers',
value => 'bsn_ml2',
notify => Service['neutron-server'],
}
ini_setting { 'ml2 restproxy ssl cert directory':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'restproxy',
key_val_separator => '=',
setting => 'ssl_cert_directory',
value => '/etc/neutron/plugins/ml2',
notify => Service['neutron-server'],
}
if $bcf::params::openstack::bcf_controller_2 == '' {
$server = "${bcf::params::openstack::bcf_controller_1}:8000"
$rest_server = "${bcf::params::openstack::bcf_controller_1}"
}
else {
$server = "${bcf::params::openstack::bcf_controller_1}:8000,${bcf::params::openstack::bcf_controller_2}:8000"
$rest_server = "${bcf::params::openstack::bcf_controller_1},${bcf::params::openstack::bcf_controller_2}"
}
ini_setting { 'ml2 restproxy servers':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'restproxy',
key_val_separator => '=',
setting => 'servers',
value => $server,
notify => Service['neutron-server'],
}
ini_setting { 'ml2 restproxy server auth':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'restproxy',
key_val_separator => '=',
setting => 'server_auth',
value => "${bcf::params::openstack::bcf_username}:${bcf::params::openstack::bcf_password}",
notify => Service['neutron-server'],
}
ini_setting { 'ml2 restproxy server ssl':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'restproxy',
key_val_separator => '=',
setting => 'server_ssl',
value => 'True',
notify => Service['neutron-server'],
}
ini_setting { 'ml2 restproxy auto sync on failure':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'restproxy',
key_val_separator => '=',
setting => 'auto_sync_on_failure',
value => 'True',
notify => Service['neutron-server'],
}
ini_setting { 'ml2 restproxy consistency interval':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'restproxy',
key_val_separator => '=',
setting => 'consistency_interval',
value => 60,
notify => Service['neutron-server'],
}
ini_setting { 'ml2 restproxy neutron_id':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'restproxy',
key_val_separator => '=',
setting => 'neutron_id',
value => "${bcf::params::openstack::bcf_instance_id}",
notify => Service['neutron-server'],
}
ini_setting { 'ml2 restproxy auth_url':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'restproxy',
key_val_separator => '=',
setting => 'auth_url',
value => "http://${bcf::params::openstack::keystone_vip}:35357",
notify => Service['neutron-server'],
}
ini_setting { 'ml2 restproxy auth_user':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'restproxy',
key_val_separator => '=',
setting => 'auth_user',
value => "${bcf::params::openstack::auth_user}",
notify => Service['neutron-server'],
}
ini_setting { 'ml2 restproxy auth_password':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'restproxy',
key_val_separator => '=',
setting => 'auth_password',
value => "${bcf::params::openstack::auth_password}",
notify => Service['neutron-server'],
}
ini_setting { 'ml2 restproxy auth_tenant_name':
ensure => present,
path => '/etc/neutron/plugins/ml2/ml2_conf.ini',
section => 'restproxy',
key_val_separator => '=',
setting => 'auth_tenant',
value => "${bcf::params::openstack::auth_tenant_name}",
notify => Service['neutron-server'],
}
# change ml2 ownership
file { '/etc/neutron/plugins/ml2':
owner => neutron,
group => neutron,
recurse => true,
notify => Service['neutron-server'],
}
# neutron-server, keystone
service { 'neutron-server':
ensure => running,
enable => true,
}
file { '/etc/bigswitch':
ensure => 'directory',
require => Exec['bsnstacklib'],
}
file { '/etc/bigswitch/bcf_rest_client.py':
ensure => 'file',
source => 'puppet:///modules/bcf/p_v/bcf_rest_client.py',
require => File['/etc/bigswitch'],
}
exec { 'Openstack segment membership':
command => "python /etc/bigswitch/bcf_rest_client.py -u ${bcf::params::openstack::bcf_username} -p ${bcf::params::openstack::bcf_password} -c ${rest_server} -m ${bcf::params::openstack::bcf_os_mgmt_tenant} -f ${bcf::deployment_id} -b ${bcf::params::openstack::bcf_version}",
path => '/usr/local/bin/:/usr/bin/:/bin',
require => FILE['/etc/bigswitch/bcf_rest_client.py']
}
}

View File

@ -1,51 +0,0 @@
#
# Copyright 2015 BigSwitch Networks, 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 bcf::p_v::restart_cluster_services {
include bcf
include bcf::params
$binpath = '/usr/local/bin/:/bin/:/usr/bin:/usr/sbin:/usr/local/sbin:/sbin'
$nodes_hash = hiera('nodes', {})
$roles = node_roles($nodes_hash, hiera('uid'))
if member($roles, 'primary-controller') {
exec { 'restart neutron-dhcp-agent':
command => 'crm resource restart p_neutron-dhcp-agent',
path => '/usr/local/bin/:/bin/:/usr/sbin',
} ->
exec { 'restart neutron-metadata-agent':
command => 'crm resource restart p_neutron-metadata-agent',
path => '/usr/local/bin/:/bin/:/usr/sbin',
} ->
exec { 'stop neutron-l3-agent':
command => 'crm resource stop p_neutron-l3-agent',
path => '/usr/local/bin/:/bin/:/usr/sbin',
} ->
exec { 'clean up neutron-l3-agent':
command => 'crm resource cleanup p_neutron-l3-agent',
path => '/usr/local/bin/:/bin/:/usr/sbin',
} ->
exec { 'disable neutron-l3-agent':
command => 'crm configure delete p_neutron-l3-agent',
path => '/usr/local/bin/:/bin/:/usr/sbin',
} ->
exec { 'restart neutron-plugin-openvswitch-agent':
command => 'crm resource restart p_neutron-plugin-openvswitch-agent',
path => '/usr/local/bin/:/bin/:/usr/sbin',
}
}
}

View File

@ -1,49 +0,0 @@
#
# Copyright 2015 BigSwitch Networks
#
# 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 bcf::params::openstack {
$virtual_cluster_name = 'OpenStackCluster'
$ceph_virtual_cluster_name = 'CephCluster'
$quantum_settings = hiera('quantum_settings')
$keystone_vip = hiera('management_vip')
$auth_user = 'neutron'
$auth_password = $quantum_settings['keystone']['admin_password']
$auth_tenant_name = 'services'
$neutron_adv_conf = hiera('neutron_advanced_configuration')
$neutron_dvr = $neutron_adv_conf['neutron_dvr']
$network_scheme = hiera('network_scheme')
$fuel_master = hiera('master_ip')
$bcf_hash = hiera('fuel-plugin-bigswitch')
$access_hash = hiera('access')
$keystone_hash = hiera('keystone')
$nova_hash = hiera('nova')
$neutron_hash = hiera('neutron_config')
$cinder_hash = hiera('cinder')
$rabbit_hash = hiera('rabbit')
$bcf_mode = $bcf_hash['bcf_mode']
$bcf_controller_1 = "${bcf_hash['bcf_controller_1']}"
$bcf_controller_2 = "${bcf_hash['bcf_controller_2']}"
$bcf_username = $bcf_hash['bcf_controller_username']
$bcf_password = $bcf_hash['bcf_controller_password']
$bcf_instance_id = $bcf_hash['openstack_instance_id']
$bcf_os_mgmt_tenant = $bcf_hash['openstack_mgmt_tenant']
$bcf_version = $bcf_hash['bcf_version']
$access_tenant = 'services'
}

View File

@ -1,176 +0,0 @@
#!/usr/bin/env python
#
# Sends LLDP packets out of a specified network interface,
# either once or periodically at a fixed interval.
# The process can be optionally daemonized.
#
# Previous version:
#
# GitHub Repository: bigswitch/bigswitchcontroller
# Branch: bigdb
# Path: bare-metal/hypervisor/pcap_start_lldp.py
#
import argparse
import socket
import os
import time
LLDP_DST_MAC = "01:80:c2:00:00:0e"
LLDP_ETHERTYPE = 0x88cc
CHASSIS_ID = "Big Cloud Fabric"
TTL = 120
CHASSIS_ID_LOCALLY_ASSIGNED = 7
PORT_ID_INTERFACE_ALIAS = 1
def parse_args():
parser = argparse.ArgumentParser()
# LLDP packet arguments
parser.add_argument("--network_interface")
parser.add_argument("--system-name")
parser.add_argument("--system-desc")
# Other arguments
parser.add_argument("-i", "--interval", type=int, default=0)
parser.add_argument("-d", "--daemonize", action="store_true", default=False)
return parser.parse_args()
def validate_num_bits_of_int(int_value, num_bits, name=None):
mask = pow(2, num_bits) - 1
if (int_value & mask) != int_value:
name = name if name else "The integer value"
raise ValueError("%s must be %d-bit long. Given: %d (%s)"
% (name, num_bits, int_value, hex(int_value)))
def raw_bytes_of_hex_str(hex_str):
return hex_str.decode("hex")
def raw_bytes_of_mac_str(mac_str):
return raw_bytes_of_hex_str(mac_str.replace(":", ""))
def raw_bytes_of_int(int_value, num_bytes, name=None):
validate_num_bits_of_int(int_value, num_bytes * 8, name)
template = "%0" + "%d" % (num_bytes * 2) + "x"
return raw_bytes_of_hex_str(template % int_value)
def get_mac_str(network_interface):
with open("/sys/class/net/%s/address" % network_interface) as f:
return f.read().strip()
def lldp_ethertype():
return raw_bytes_of_int(LLDP_ETHERTYPE, 2, "LLDP ethertype")
def validate_tlv_type(type_):
validate_num_bits_of_int(type_, 7, "TLV type")
def validate_tlv_length(length):
validate_num_bits_of_int(length, 9, "TLV length")
def tlv_1st_2nd_bytes_of(type_, length):
validate_tlv_type(type_)
validate_tlv_length(length)
int_value = (type_ << (8 + 1)) | length
return raw_bytes_of_int(int_value, 2, "First 2 bytes of TLV")
def tlv_of(type_, str_value):
return tlv_1st_2nd_bytes_of(type_, len(str_value)) + str_value
def chassis_id_tlv_of(chassis_id, subtype=CHASSIS_ID_LOCALLY_ASSIGNED):
return tlv_of(1,
raw_bytes_of_int(subtype, 1, "Chassis ID subtype") + chassis_id)
def port_id_tlv_of(port_id, subtype=PORT_ID_INTERFACE_ALIAS):
return tlv_of(2, raw_bytes_of_int(subtype, 1, "Port ID subtype") + port_id)
def ttl_tlv_of(ttl_seconds):
return tlv_of(3, raw_bytes_of_int(ttl_seconds, 2, "TTL (seconds)"))
def system_name_tlv_of(system_name):
return tlv_of(5, system_name)
def system_desc_tlv_of(system_desc):
return tlv_of(6, system_desc)
def end_tlv():
return tlv_of(0, "")
def lldp_frame_of(chassis_id,
network_interface,
ttl,
system_name=None,
system_desc=None):
contents = [
# Ethernet header
raw_bytes_of_mac_str(LLDP_DST_MAC),
raw_bytes_of_mac_str(get_mac_str(network_interface)),
lldp_ethertype(),
# Required LLDP TLVs
chassis_id_tlv_of(chassis_id),
port_id_tlv_of(network_interface),
ttl_tlv_of(ttl)
]
# Optional LLDP TLVs
if system_name is not None:
contents.append(system_name_tlv_of(system_name))
if system_desc is not None:
contents.append(system_desc_tlv_of(system_desc))
# End TLV
contents.append(end_tlv())
return "".join(contents)
def daemonize():
# Do not use this code for daemonizing elsewhere as this is
# a very simple version that is just good enough for here.
pid = os.fork()
if pid != 0:
# Exit from the parent process
os._exit(os.EX_OK)
os.setsid()
pid = os.fork()
if pid != 0:
# Exit from the 2nd parent process
os._exit(os.EX_OK)
def main():
args = parse_args()
if args.daemonize:
daemonize()
senders = []
frames = []
intfs = args.network_interface.split(',')
for intf in intfs:
interface = intf.strip()
frame = lldp_frame_of(chassis_id=CHASSIS_ID,
network_interface=interface,
ttl=TTL,
system_name=args.system_name,
system_desc=args.system_desc)
frames.append(frame)
# Send the frame
s = socket.socket(socket.AF_PACKET, socket.SOCK_RAW)
s.bind((interface, 0))
senders.append(s)
while True:
for idx, s in enumerate(senders):
s.send(frames[idx])
if not args.interval:
break
time.sleep(args.interval)
if __name__ == "__main__":
main()

View File

@ -1,75 +0,0 @@
# These tasks will be merged into deployment graph. Here you
# can specify new tasks for any roles, even built-in ones.
- id: lacp-bond
type: puppet
groups: [primary-controller, controller, ceph-osd, cinder]
required_for: [openstack-controller, connectivity_tests]
requires: [netconfig]
parameters:
puppet_manifest: puppet/manifests/general-network-config.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 720
- id: compute-lacp-bond
type: puppet
groups: [compute]
required_for: [openstack-controller, connectivity_tests]
requires: [netconfig]
parameters:
puppet_manifest: puppet/manifests/compute-network-config.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 720
- id: openstack-cleanup
type: puppet
role: [primary-controller]
required_for: [post_deployment_end]
requires: [post_deployment_start]
parameters:
puppet_manifest: puppet/manifests/openstack-cleanup.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 720
- id: reconfigure-keystone
type: puppet
role: [primary-controller, controller]
required_for: [post_deployment_end]
requires: [openstack-cleanup]
parameters:
puppet_manifest: puppet/manifests/reconfigure-keystone.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 720
- id: reconfigure-neutron
type: puppet
role: [controller]
required_for: [post_deployment_end]
requires: [reconfigure-keystone]
parameters:
puppet_manifest: puppet/manifests/reconfigure-neutron.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 720
- id: reconfigure-primary-controller-neutron
type: puppet
role: [primary-controller]
required_for: [post_deployment_end]
requires: [reconfigure-neutron]
parameters:
puppet_manifest: puppet/manifests/reconfigure-neutron.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 720
- id: restart-cluster-services
type: puppet
role: [primary-controller]
required_for: [post_deployment_end]
requires: [reconfigure-primary-controller-neutron]
parameters:
puppet_manifest: puppet/manifests/restart-cluster-services.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 720
- id: compute-config
type: puppet
role: [compute]
required_for: [post_deployment_end]
requires: [restart-cluster-services, configure_default_route]
parameters:
puppet_manifest: puppet/manifests/compute-config.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 720

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 KiB

View File

@ -1,2 +0,0 @@
docutils==0.9.1
sphinx>=1.1.2,!=1.2.0,<1.3

View File

@ -1,177 +0,0 @@
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/FuelBigSwitchplugin.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/FuelBigSwitchplugin.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/FuelBigSwitchplugin"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/FuelBigSwitchplugin"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."

View File

@ -1,258 +0,0 @@
# -*- coding: utf-8 -*-
#
# Fuel BigSwitch plugin documentation build configuration file, created by
# sphinx-quickstart on Sun Feb 21 03:14:36 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
import os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = []
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'Fuel BigSwitch plugin'
copyright = u'2016, Big Switch Networks'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '1.0.0'
# The full version, including alpha/beta/rc tags.
release = '1.0.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'FuelBigSwitchplugindoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'FuelBigSwitchplugin.tex', u'Fuel BigSwitch plugin Documentation',
u'Kanzhe Jiang', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'fuelbigswitchplugin', u'Fuel BigSwitch plugin Documentation',
[u'Kanzhe Jiang'], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'FuelBigSwitchplugin', u'Fuel BigSwitch plugin Documentation',
u'Kanzhe Jiang', 'FuelBigSwitchplugin', 'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 KiB

View File

@ -1,43 +0,0 @@
.. Fuel BigSwitch plugin documentation master file, created by
sphinx-quickstart on Sun Feb 21 03:14:36 2016.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to Fuel BigSwitch plugin's documentation!
=================================================
Fuel BigSwitch plugin allows you to deploy Openstack cluster with BigSwitch's
BCF SND networking fabric.
In P-Only mode, plugin installs Neutron BigSwitch ML2 mechanism driver for
vlan segmentation.
In P+V mode, in addition to the BigSwitch ML2 mechanism driver, plugin also installs
L3 service plugin which allows routers to be created in BCF.
Plugin can work with BCF 3.5.
Plugin versions:
* 1.x.x series is compatible with Fuel 7.0.
Contents:
.. toctree::
:maxdepth: 2
source/build
source/installation
source/environment
source/configuration
source/usage
source/release-notes
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

View File

@ -1,41 +0,0 @@
How to build the plugin
=======================
To build the plugin you first need to install fuel-plugin-build 4.0.0[1_]
.. code-block:: bash
$ pip install fuel-plugin-builder==4.0.0
After that you can build the plugin:
.. code-block:: bash
$ git clone https://git.openstack.org/openstack/fuel-plugin-bigswitch
$ cd fuel-plugin-bigswitch/
puppet-librarian_ ruby package is required to installed. It is used to fetch
upstream fuel-library_ puppet modules that plugin use. It can be installed via
gem package manager:
.. code-block:: bash
$ gem install puppet-librarian
.. code-block:: bash
$ fpb --build .
fuel-plugin-builder will produce .rpm package of the plugin which you need to
upload to Fuel master node:
.. code-block:: bash
$ ls fuel-plugin-bigswitch-*.rpm
fuel-plugin-bigswitch-1.0-1.0.0-1.noarch.rpm
.. [1] https://pypi.python.org/pypi/fuel-plugin-builder/4.0.0
.. _puppet-librarian: https://librarian-puppet.com
.. _fuel-library: https://github.com/openstack/fuel-library

View File

@ -1,39 +0,0 @@
Configuration
=============
Switch to Settings tab of the Fuel web UI and click on "BigSwitch Networking Plugin"
section, tick the plugin checkbox to enable it.
.. image:: /image/bsn-plugin-configuration-page.png
:scale: 60 %
Plugin contains the following settings:
#. Fabric Mode -- Big Switch Big Cloud Fabric can be deployed as a p-only
(physical-only) fabric, which manages all the physical switches, or p+v
(physical and virtual) fabric, which manages all the physical and virtual
switches.
In P-only mode, BCF is a L2-only fabric in VLAN mode. L3-agent will provide
the routing function.
In P+V mode, BCF is a L2-and-L3 fabric in VLAN mode. All compute nodes will
install SL-v (Switch Light virtual) switches. All the SL-v switches and
physical switches will be managed by BCF SDN controller cluster. In P+V mode,
fuel bigswitch plugin will automatically un-install OVS and install SL-v
switches on all compute nodes.
#. BCF Controller1 -- This is the IP address of the first BCF controller in the
controller cluster. This is a required field. If the controller cluster only
has one controller, this is the place to enter the controller IP address.
#. BCF Controller2 -- This is the IP address of the second BCF controller in the
controller cluster. This is an optional field. If it is empty, then BCF
controller is in standalone mode.
#. BCF Controller Username -- The username to access BCF controller's REST APIs
#. BCF Controller Password -- The password to access BCF controller's REST APIs
#. Openstack Instance ID -- The ID of the Openstack instance. Mulitple cloud
orchestration systems can share the same BCF fabric. This field is to identify
the orchestration system.

View File

@ -1,31 +0,0 @@
OpenStack environment notes
===========================
Environment creation
--------------------
For every new deployment environment, please maually create logical
networks for pxe, public, management, and storage network. The VLAN
assignment for the above network must match the membership
configuration of the corresponding BCF logical networks.
.. image:: /image/BCF_prep.png
:scale: 70 %
#. In the environment setup wizard, Network setup step, make sure to
select "Neutron with VLAN segmentation".
.. image:: /image/Vlan-segmentation.png
:scale: 70 %
#. After adding each node, if the node's pnics are bonded, LACP mode
is recommended. The node can be controller, storage, or compute.
.. image:: /image/interface-bond.png
:scale: 70 %
Pay attention on which interface you assign *Public* network, OpenStack
controllers must have connectivity with BigSwitch BCF controllers through
public network since it is used as default route for packets.

View File

@ -1,39 +0,0 @@
Installation
============
#. Download plugin .rpm package
#. Upload package to Fuel master node.
#. Install the plugin with *fuel* command line tool:
.. code-block:: bash
[root@nailgun ~] fuel plugins --install fuel-plugin-bigswitch-1.0-1.0.0-1.noarch.rpm
#. Verify that the plugin is installed successfully:
.. code-block:: bash
[root@nailgun ~] fuel plugins
id | name | version | package_version
---|-----------------------|---------|----------------
1 | fuel-plugin-bigswitch | 1.0.0 | 3.0.0
After installation plugin can be used for new OpenStack clusters, it is not
possible to enable plugin on deployed clusters.
Uninstallation
--------------
Before uninstalling plugin be sure that there no environments left that use the
plugin, otherwise it is not possible to uninstall it.
To uninstall plugin run following:
.. code-block:: bash
[root@nailgun ~] fuel plugins --remove fuel-plugin-bigswitch==1.0.0
.. _Fuel plugin catalog: https://www.mirantis.com/products/openstack-drivers-and-plugins/fuel-plugins

View File

@ -1,8 +0,0 @@
Release notes
=============
Release notes for Fuel BigSwitch plugin 1.0.0:
* Plugin is compatible with Fuel 7.0.
* Support for Neutron server Kilo release.
* The release only supports p-only mode. P+V mode will be available in the next release.

View File

@ -1,78 +0,0 @@
attributes:
metadata:
restrictions:
- condition: "not (cluster:net_provider == 'neutron' and networking_parameters:segmentation_type == 'vlan')"
message: "Please use Neutron with VLAN segmentation, the only network type supported with Big Switch plugin."
bcf_mode:
type: "select"
weight: 5
value: "P-Only"
label: "BCF Fabric Mode"
description: "Big Cloud Fabric can be deployed in either physical-only or physical+virtual Modes."
values:
- data: "P-Only"
label: "P-Only"
- data: "P+V"
label: "P+V"
bcf_controller_1:
value: ""
label: "BCF Controller1"
description: "BCF Controller' IP address."
weight: 10
type: "text"
regex:
source: '^(?:\d|1?\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d|1?\d\d|2[0-4]\d|25[0-5])){3}$'
error: "Invalid IP address"
bcf_controller_2:
value: ""
label: "BCF Controller2"
description: "The second BCF Controller' IP address."
weight: 11
type: "text"
regex:
source: '(^$|^(?:\d|1?\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d|1?\d\d|2[0-4]\d|25[0-5])){3}$)'
error: "Invalid IP address"
bcf_controller_username:
value: ""
label: "BCF Controller Username"
description: "Username to access BCF controllers."
weight: 20
type: "text"
bcf_controller_password:
value: ""
label: "BCF Controller Password"
description: "Password to access BCF controllers."
weight: 21
type: "password"
openstack_instance_id:
value: ""
label: "Openstack Instance ID"
description: "The Openstack instance ID that is unique within the BCF fabric."
weight: 30
type: "text"
openstack_mgmt_tenant:
value: ""
label: "Management Tenant"
description: "The BCF Management Tenant. Not needed in P_Only mode."
weight: 40
type: "text"
bcf_version:
type: "select"
weight: 50
value: "3.5.0"
label: "BCF Fabric Version"
description: "The plugin supports BCF 3.5.0 or 3.6.0 release. Not needed in P_Only mode."
values:
- data: "3.5.0"
label: "3.5.0"
- data: "3.6.0"
label: "3.6.0"

View File

@ -1,30 +0,0 @@
# Plugin name
name: fuel-plugin-bigswitch
# Human-readable name for your plugin
title: Big Switch Networking Plugin
# Plugin version
version: '1.0.0'
# Description
description: Enable to use plugin Big Switch for Neutron
# Required fuel version
fuel_version: ['7.0']
# Specify license of your plugin
licenses: ['Apache License Version 2.0']
# Specify author or company name
authors: ['Kanzhe Jiang']
# A link to the plugin's page
homepage: 'https://github.com/openstack/fuel-plugin-bigswitch'
# Specify a group which your plugin implements, possible options:
# network, storage, storage::cinder, storage::glance, hypervisor
groups: ['network']
# The plugin is compatible with releases in the list
releases:
- os: ubuntu
version: 2015.1.0-7.0
mode: ['ha']
deployment_scripts_path: deployment_scripts/
repository_path: repositories/ubuntu
# Version of plugin package
package_version: '3.0.0'

View File

@ -1,15 +0,0 @@
# Unique network role name
- id: "example_net_role"
# Role mapping to network
default_mapping: "public"
properties:
# Should be true if network role requires subnet being set
subnet: true
# Should be true if network role requires gateway being set
gateway: false
# List of VIPs to be allocated
vip:
# Unique VIP name
- name: "vip_name"
# Optional linux namespace for VIP
namespace: "haproxy"

View File

@ -1,13 +0,0 @@
fuel-plugin-bigswitch:
# Role name
name: "Set here the name for the role. This name will be displayed in the Fuel web UI"
# Role description
description: "Write description for your role"
# If primaty then during orchestration this role will be
# splitted into primary-role and role
has_primary: false
# Assign public IP to node if true
public_ip_required: false
# Weight that will be used to sort out the
# roles on the Fuel web UI
weight: 1000

View File

@ -1,5 +0,0 @@
#!/bin/bash
# Add here any the actions which are required before plugin build
# like packages building, packages downloading from mirrors and so on.
# The script should return 0 if there were no errors.

View File

@ -1 +0,0 @@
--no-2sp_soft_tabs-check

View File

@ -1,177 +0,0 @@
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/FuelBigSwitchPlugin.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/FuelBigSwitchPlugin.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/FuelBigSwitchPlugin"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/FuelBigSwitchPlugin"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."

View File

@ -1,11 +0,0 @@
Fuel BigSwitch plugin documentation
===================================
If you want to build HTML variant of plugin specification first install
necessary sphinx requirements:
# pip install -r requirements.txt
Then you can build specification with `make' tool:
# make html

View File

@ -1,265 +0,0 @@
# -*- coding: utf-8 -*-
#
# FuelBigSwitchPlugin documentation build configuration file, created by
# sphinx-quickstart on Sun Feb 21 02:28:59 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
import os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'FuelBigSwitchPlugin'
copyright = u'2016, Big Switch Networks'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '1.0.0'
# The full version, including alpha/beta/rc tags.
release = '1.0.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'FuelBigSwitchPlugindoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'FuelBigSwitchPlugin.tex', u'Fuel BigSwitch Plugin Documentation',
u'Kanzhe Jiang', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'fuelbigswitchplugin', u'Fuel BigSwitch Plugin Documentation',
[u'Kanzhe Jiang'], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'FuelBigSwitchPlugin', u'Fuel BigSwitch Plugin Documentation',
u'Kanzhe Jiang', 'FuelBigSwitchPlugin', 'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'http://docs.python.org/': None}

View File

@ -1,23 +0,0 @@
.. FuelBigSwitchPlugin documentation master file, created by
sphinx-quickstart on Sun Feb 21 02:28:59 2016.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to FuelBigSwitchPlugin's documentation!
===============================================
Contents:
.. toctree::
:maxdepth: 2
plugin-1.0.0spec
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

View File

@ -1,259 +0,0 @@
..
This work is licensed under a Creative Commons Attribution 3.0 Unported
License.
http://creativecommons.org/licenses/by/3.0/legalcode
===========================================================
Fuel Plugin v1.0.0 for BigSwitch BCF SDN Fabric integration
===========================================================
BigSwitch plugin for Fuel provides an ability to deploy OpenStack cluster that is
utilizing BigSwitch Big Cloud Fabric network virtualization platform.
Problem description
===================
Proposed change
===============
Implement a Fuel plugin [1]_ which will deploy BigSwitch plugin as a P-only fabric
for OpenStack networking service (Neutron) and configure it.
Plugin assumes that end user already has BigSwitch Big Cloud Fabric running
Plugin components will include:
- puppet manifests for installation and configuration Neutron BigSwitch plugin
Architecture diagram
::
+----------------------------+
| Compute cluster |
| |
OpenStack | +--------------------+ |
Public network | | | | VLAN Segment
+----------------------+ + | | KVM host +-----+ | | +
| | | | | | | | | |
| OpenStack Controller | | | | | VM +-----------+
| | | | | | | | | |
| +------------------+ | | | | +-----+ | | |
| | | | | | +--------------------+ | |
| | Neutron server | | | | | |
| | | | | | | |
| | +-----------+ | | | | | |
| | | | | | | | | |
| | | BigSwitch | | +----------+ | | |
| | | plugin | | | | | +--------------------+ | |
| | | | | | | | | +-----+ | | |
| | +-----------+ | | | | | KVM host | | | | |
| | | | | | | | VM +-----------+
| +------------------+ | | | | | | | | |
+----------------------+ | | | +-----+ | | |
| | +--------------------+ | |
| | | |
| | +--------------------+ | |
| | | | | |
| | | KVM host +-----+ | | |
| | | | | | | |
| | | | VM +-----------+
| | | | | | | |
| | | +-----+ | | |
| | +--------------------+ | |
| +----------------------------+ |
| |
| +----------------------------+ |
| | | |
+--------+ BigSwitch BCF Controller | |
| | Cluster | |
| | | |
+ +----------------------------+ +
VM creation workflow:
::
Neutron server
Nova-api Nova-compute (BigSwitch plugin) BigSwitch Controller
+ + + +
| | | |
| | | |
| Create VM | | |
| | | |
| <--------> | Provision port | |
| | for VM | |
| | <-------------> | |
| | | Create port |
| | | <-----------> +---+
| | | | |
| | | Port ready | |
| | Port with UUID N | <-----------> +---+
| | ready | |
| | <-------------> | |
| | | |
| | | |
| | Create VM and attach to port with UUID N
| | <-------------------------------> |
| | | | |
+ + + + +
Plugin work items in pre-deployment stage:
- Install lldp daemon to form LACP lag groups for openstack controllers and compute nodes
Plugin actions in post-deployment stage:
#. Stop nova-network pacemaker resource
#. Configure neutron-server with notification
#. Configure keystone with notification
#. Install Neutron BigSwitch plugin
#. Configure the plugin
#. Start Neutron server
Deployment diagram:
::
BigSwitch manifests Neutron-server
+ +
| Configure LLDP Daemons on |
| Controllers and Computes |
| |
| Prepare data for Neutron |
| deployment tasks |
| |
| Stop Neutron agents |
| pacemaker resource |
| +------------------------> +
|
| Install BigSwitch plugin
|
| Configure neutron-server with BigSwitch
|
| Start Neutron-server
| +------------------------->+
| |
| Start Neutron agents |
| pacemaker resource |
| |
| |
v v
Plugin will be compatible with Fuel 7.0.
Alternatives
------------
None.
Data model impact
-----------------
Plugin will produce following array of settings into astute.yaml:
.. code-block:: yaml
bigswitch
REST API impact
---------------
None.
Upgrade impact
--------------
None.
Security impact
---------------
None.
Notifications impact
--------------------
None.
Other end user impact
---------------------
Plugin settings are available via the Settings tab on Fuel web UI.
Performance Impact
------------------
None.
Other deployer impact
---------------------
None.
Developer impact
----------------
Implementation
==============
Assignee(s)
-----------
Primary assignee:
- Kanzhe Jiang <kanzhe.jiang@bigswitch.com> - developer
Work Items
----------
* Create pre-dev environment and manually deploy BCF
* Create Fuel plugin bundle, which contains deployments scripts, puppet
modules and metadata
* Implement puppet module with the following functions:
- Install Neutron BigSwitch plugin on OpenStack controllers
- Configure Neutron server to use BigSwitch plugin and reload its configuration
- Create needed networks for OpenStack testing framework (OSTF)
* Create system test for the plugin
* Write documentation
Dependencies
============
* Fuel 7.0
Testing
=======
* Sanity checks including plugin build
* Syntax check
* Functional testing
Documentation Impact
====================
* Deployment Guide (how to prepare an env for installation, how to
install the plugin, how to deploy OpenStack env with the plugin)
* User Guide (which features the plugin provides, how to use them in
the deployed OS env)
References
==========
.. [1] Fuel Plug-in Guide http://docs.mirantis.com/openstack/fuel/fuel-7.0/plugin-dev.html
.. [2] https://github.com/openstack/fuel-library

View File

@ -1,3 +0,0 @@
docutils==0.9.1
oslosphinx
sphinx>=1.1.2,!=1.2.0,<1.3

View File

@ -1,7 +0,0 @@
volumes_roles_mapping:
# Default role mapping
fuel-plugin-bigswitch:
- {allocate_size: "min", id: "os"}
# Set here new volumes for your role
volumes: []