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: I58cefc49ce851e159b15919aac6e08082ed5fd2a
89
.gitignore
vendored
@ -1,89 +0,0 @@
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
env/
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*,cover
|
||||
.hypothesis/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
|
||||
# Flask instance folder
|
||||
instance/
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
doc/build/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
# IPython Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# pyenv
|
||||
.python-version
|
||||
|
||||
# celery beat schedule file
|
||||
celerybeat-schedule
|
||||
|
||||
# dotenv
|
||||
.env
|
||||
|
||||
# virtualenv
|
||||
venv/
|
||||
ENV/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
*.swp
|
||||
.build/
|
||||
midonet-*.rpm
|
201
LICENSE
@ -1,201 +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 2017 Midokura
|
||||
|
||||
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.
|
57
README.rst
@ -1,51 +1,10 @@
|
||||
Mirantis Fuel MidoNet plugin
|
||||
============================
|
||||
This project is no longer maintained.
|
||||
|
||||
Compatible versions:
|
||||
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".
|
||||
|
||||
- Mirantis Fuel 9.0 , Fuel 9.1 and Fuel 9.2
|
||||
- MidoNet v5.2 / v5.4
|
||||
- Midokura Enterprise MidoNet 5.2 & 5.4
|
||||
|
||||
How to build the plugin
|
||||
-----------------------
|
||||
|
||||
- Install Fuel plugin builder (fpb)
|
||||
|
||||
::
|
||||
|
||||
# pip install fuel-plugin-builder
|
||||
|
||||
- Clone the plugin repo and run fpb there:
|
||||
|
||||
::
|
||||
|
||||
$ git clone https://github.com/openstack/fuel-plugin-midonet
|
||||
$ cd fuel-plugin-midonet
|
||||
$ fpb --build .
|
||||
|
||||
A *rpm* called `midonet-9.2-9.2.0-1.noarch.rpm` should be created in
|
||||
the same directory.
|
||||
|
||||
Follow the documentation to install and configure the plugin. You can read the
|
||||
`rst` files in this very repository, or you can build a documentation file.
|
||||
|
||||
How to build the documentation
|
||||
------------------------------
|
||||
|
||||
You need to have **Sphinx** installed in your computer. Hint; for full Latex
|
||||
Sphinx support on Ubuntu one needs **python-sphinx**, **rst2pdf**, **texlive**
|
||||
and **texlive-latex-extra** packages. The Makefile provides several target
|
||||
formats to do so. Go to the `doc` directory and run:
|
||||
|
||||
make latexpdf
|
||||
|
||||
or:
|
||||
|
||||
make html
|
||||
|
||||
or:
|
||||
|
||||
make pdf
|
||||
|
||||
You will need `rst2pdf` to run the last one.
|
||||
For any further questions, please email
|
||||
openstack-discuss@lists.openstack.org or join #openstack-dev on
|
||||
Freenode.
|
||||
|
@ -1,14 +0,0 @@
|
||||
- name: 'network:neutron:midonet'
|
||||
label: 'Neutron with MidoNet'
|
||||
description: 'MidoNet is a production grade network virtualization software'
|
||||
bind: !!pairs
|
||||
- "cluster:net_provider": "neutron"
|
||||
- "cluster:net_segment_type": "tun"
|
||||
compatible:
|
||||
- name: 'hypervisor:kvm'
|
||||
- name: 'hypervisor:qemu'
|
||||
incompatible:
|
||||
- name: 'hypervisor:vmware'
|
||||
description: 'MidoNet plugin is not compatible with VMware'
|
||||
- name: 'additional_service:ironic'
|
||||
description: 'MidoNet plugin is not compatible with Ironic'
|
@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
puppet module install puppetlabs-java --version=1.6.0 --ignore-dependencies --force
|
||||
puppet module install locp-cassandra --version=1.25.2 --ignore-dependencies --force
|
||||
puppet module install deric-zookeeper --version=0.6.1 --ignore-dependencies --force
|
||||
puppet module install TubeMogul-curator --version=1.0.1 --ignore-dependencies --force
|
||||
puppet module install elasticsearch-elasticsearch --version=0.13.2 --ignore-dependencies --force
|
||||
puppet module install elasticsearch-logstash --version=0.6.4 --ignore-dependencies --force
|
||||
puppet module install electrical-file_concat --version=1.0.1 --ignore-dependencies --force
|
||||
puppet module install richardc-datacat --version=0.6.2 --ignore-dependencies --force
|
||||
|
||||
gem install faraday # This is needed by the midonet providers
|
||||
gem install netaddr # This is needed to calculate cidrs
|
@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
puppet module install puppetlabs-java --version=1.6.0 --ignore-dependencies --force
|
||||
puppet module install locp-cassandra --version=1.25.2 --ignore-dependencies --force
|
||||
puppet module install deric-zookeeper --version=0.6.1 --ignore-dependencies --force
|
||||
puppet module install TubeMogul-curator --version=1.0.1 --ignore-dependencies --force
|
||||
puppet module install elasticsearch-elasticsearch --version=0.15.1 --ignore-dependencies --force
|
||||
puppet module install elastic-logstash --version=5.0.3 --ignore-dependencies --force
|
||||
puppet module install electrical-file_concat --version=1.0.1 --ignore-dependencies --force
|
||||
puppet module install richardc-datacat --version=0.6.2 --ignore-dependencies --force
|
||||
|
||||
# Dirty sed because elk packages and fuel use different sysctl packages
|
||||
|
||||
sed -i "s| sysctl { 'vm| sysctl::value { 'vm|g" /etc/puppet/modules/elasticsearch/manifests/config.pp
|
||||
|
||||
gem install faraday # This is needed by the midonet providers
|
||||
gem install netaddr # This is needed to calculate cidrs
|
@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
#install git
|
||||
apt-get install -y git
|
||||
#install unzip
|
||||
apt-get install -y unzip
|
||||
|
||||
cd /tmp
|
||||
git clone https://github.com/midonet/puppet-midonet_openstack.git
|
||||
cd puppet-midonet_openstack
|
||||
git fetch
|
||||
git checkout stable/mitaka
|
||||
puppet module build
|
||||
puppet module install $(find . | grep .tar.gz) --ignore-dependencies --force
|
||||
|
||||
#cleanup
|
||||
rm -rf /tmp/puppet-midonet_openstack
|
@ -1,16 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
#install git
|
||||
apt-get install -y git
|
||||
|
||||
|
||||
cd /tmp
|
||||
git clone https://github.com/openstack/puppet-midonet.git
|
||||
cd puppet-midonet
|
||||
git fetch
|
||||
git checkout stable/mitaka
|
||||
puppet module build
|
||||
puppet module install $(find . | grep .tar.gz) --ignore-dependencies --force
|
||||
|
||||
#cleanup
|
||||
rm -rf /tmp/puppet-midonet
|
@ -1,43 +0,0 @@
|
||||
if [[ -e /etc/puppet/modules/neutron/lib/puppet/type/neutron_plugin_midonet.rb ]]; then
|
||||
# Apply the released patch of Neutron Puppet to allow midonet manifests
|
||||
wget https://github.com/openstack/puppet-neutron/commit/dfd4662347bec58644c6f22bf9ba2a433c23b4d9.diff -O /etc/puppet/modules/neutron/midonet.diff
|
||||
cd /etc/puppet/modules/neutron && patch -p1 --force --forward < midonet.diff && cd -
|
||||
fi
|
||||
|
||||
# Dirty way of checking if the neutron type is already patched. It is not possible to get
|
||||
# version Of the current fuel version from a node.
|
||||
NEUTRONTYPEPATCHED=$(cat /etc/puppet/modules/neutron/lib/puppet/type/neutron_port.rb | grep binding_host_id | head -n1)
|
||||
if [[ -z ${NEUTRONTYPEPATCHED} ]]; then
|
||||
if [[ -e /etc/puppet/modules/neutron/lib/puppet/provider/neutron_port/neutron.rb ]]; then
|
||||
# Apply the released patch of Neutron Puppet to allow midonet manifests
|
||||
wget https://github.com/openstack/puppet-neutron/commit/dcfb3dd946cbc6f6083afa35f023917dfe0369e4.diff -O /etc/puppet/modules/neutron/midonet2.diff
|
||||
cd /etc/puppet/modules/neutron && patch -p1 --force --forward < midonet2.diff && cd -
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -e /etc/puppet/modules/neutron/lib/puppet/type/neutron_network.rb ]]; then
|
||||
# Apply the released patch of Neutron Puppet to allow midonet manifests
|
||||
wget https://github.com/openstack/puppet-neutron/commit/95f0514a8ef6f5491d7e5775553d234435354cf8.diff -O /etc/puppet/modules/neutron/midonet3.diff
|
||||
cd /etc/puppet/modules/neutron && patch -p1 --force --forward < midonet3.diff && cd -
|
||||
fi
|
||||
|
||||
|
||||
if [[ -e /etc/puppet/modules/neutron/lib/puppet/provider/neutron.rb ]]; then
|
||||
# Apply the released patch of Neutron Puppet to allow midonet manifests
|
||||
wget https://github.com/openstack/puppet-neutron/commit/46e2d7acdcd5319bbc73483ff24cbafa0409d302.diff -O /etc/puppet/modules/neutron/midonet4.diff
|
||||
cd /etc/puppet/modules/neutron && patch -p1 --force --forward < midonet4.diff && cd -
|
||||
fi
|
||||
|
||||
if [[ -e /etc/puppet/modules/neutron/manifests/plugins/midonet.pp ]]; then
|
||||
# Apply the released patch of Neutron Puppet to allow midonet manifests
|
||||
wget https://github.com/openstack/puppet-neutron/commit/e4a79e348d110e7a80e042a045a671359f31c103.diff -O /etc/puppet/modules/neutron/midonet5.diff
|
||||
cd /etc/puppet/modules/neutron && patch -p1 --force --forward < midonet5.diff && cd -
|
||||
fi
|
||||
|
||||
if [[ -e /etc/puppet/modules/neutron/manifests/plugins/midonet.pp ]]; then
|
||||
# Apply the released patch of Neutron Puppet to allow midonet manifests
|
||||
wget https://github.com/openstack/puppet-neutron/commit/3af5e9a40400bc7dc47cd7c265b5f126637c4ba3.diff -O /etc/puppet/modules/neutron/midonet6.diff
|
||||
cd /etc/puppet/modules/neutron && patch -p1 --force --forward < midonet6.diff && cd -
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,11 +0,0 @@
|
||||
neutron::core_plugin: 'midonet.neutron.plugin_v2.MidonetPluginV2'
|
||||
neutron::service_plugins:
|
||||
- midonet.neutron.services.firewall.plugin.MidonetFirewallPlugin
|
||||
- lbaas
|
||||
- midonet.neutron.services.l3.l3_midonet.MidonetL3ServicePlugin
|
||||
horizon::neutron_options:
|
||||
- enable_lb: true
|
||||
- enable_firewall: true
|
||||
|
||||
neutron::server::service_providers:
|
||||
- LOADBALANCER:Midonet:midonet.neutron.services.loadbalancer.driver.MidonetLoadbalancerDriver:default
|
@ -1,6 +0,0 @@
|
||||
start on runlevel [123456]
|
||||
stop on shutdown
|
||||
|
||||
script
|
||||
puppet apply --modulepath=/etc/fuel/plugins/midonet-9.2/puppet/modules:/etc/puppet/modules /etc/fuel/plugins/midonet-9.2/puppet/manifests/midonet-gateway-static.pp
|
||||
end script
|
@ -1,6 +0,0 @@
|
||||
start on runlevel [123456]
|
||||
stop on shutdown
|
||||
|
||||
script
|
||||
puppet apply --modulepath=/etc/fuel/plugins/midonet-9.2/puppet/modules:/etc/puppet/modules /etc/fuel/plugins/midonet-9.2/puppet/manifests/midonet-bgp-interfaces.pp
|
||||
end script
|
@ -1,38 +0,0 @@
|
||||
notice('MODULAR: midonet-bgp-interfaces.pp')
|
||||
|
||||
|
||||
exec {'add veth interface':
|
||||
path => '/usr/bin:/usr/sbin:/sbin',
|
||||
command => 'ip link add gw-veth-br type veth peer name gw-veth-mn',
|
||||
unless => 'ip l | /bin/grep gw-veth-br'
|
||||
} ->
|
||||
|
||||
exec {'set gw-veth-br interface up':
|
||||
path => '/usr/bin:/usr/sbin:/sbin',
|
||||
command => 'ip l set dev gw-veth-br up'
|
||||
} ->
|
||||
|
||||
exec {'set gw-veth-mn interface up':
|
||||
path => '/usr/bin:/usr/sbin:/sbin',
|
||||
command => 'ip l set dev gw-veth-mn up'
|
||||
} ->
|
||||
|
||||
exec {'add veth to bridge':
|
||||
path => '/usr/bin:/usr/sbin:/sbin',
|
||||
command => 'brctl addif br-ex gw-veth-br',
|
||||
unless => 'brctl show br-ex | /bin/grep gw-veth-br'
|
||||
} ->
|
||||
|
||||
file {'/etc/sysconfig/network-scripts/ifcfg-p_br-floating-0':
|
||||
ensure => absent,
|
||||
} ->
|
||||
|
||||
exec {'set up external bridge':
|
||||
path => '/usr/bin:/usr/sbin:/sbin',
|
||||
command => 'ip link set dev br-ex up'
|
||||
} ->
|
||||
|
||||
file {'/etc/init/midonet-network.conf':
|
||||
ensure => present,
|
||||
source => '/etc/fuel/plugins/midonet-9.2/puppet/files/startup.conf'
|
||||
}
|
@ -1,69 +0,0 @@
|
||||
|
||||
notice('MODULAR: midonet-cleanup-masquerade.pp')
|
||||
include ::stdlib
|
||||
|
||||
$old_config = loadyamlv2('/etc/fuel/cluster/astute.yaml.old','notfound')
|
||||
|
||||
# If it's a redeploy and the file exists we can proceed
|
||||
if($old_config != 'notfound')
|
||||
{
|
||||
$old_gw_type = $old_config['midonet']['gateway_type']
|
||||
if ($old_gw_type == 'static') {
|
||||
|
||||
# Extract data from hiera
|
||||
$access_data = $old_config['access']
|
||||
$keystone_admin_tenant = $access_data['tenant']
|
||||
$net_metadata = $old_config['network_metadata']
|
||||
$neutron_settings = $old_config['quantum_settings']
|
||||
$external_net_name = $neutron_settings['default_floating_net']
|
||||
$tenant_net_name = $neutron_settings['default_private_net']
|
||||
$predefined_nets = $neutron_settings['predefined_networks']
|
||||
$tenant_net = $predefined_nets[$tenant_net_name]
|
||||
$external_net = $predefined_nets[$external_net_name]
|
||||
|
||||
$old_midonet_settings = $old_config['midonet']
|
||||
$old_net_metadata = $old_config['network_metadata']
|
||||
$controllers_map = get_nodes_hash_by_roles($old_net_metadata, ['controller', 'primary-controller'])
|
||||
|
||||
|
||||
$management_address = hiera('management_vip')
|
||||
$username = $access_data['user']
|
||||
$password = $access_data['password']
|
||||
$tenant_name = $access_data['tenant']
|
||||
|
||||
$midonet_settings = $old_config['midonet']
|
||||
$floating_cidr = $midonet_settings['floating_cidr']
|
||||
$f_net_cidr = split($midonet_settings['floating_cidr'], '/')
|
||||
|
||||
$static_linux_bridge_ip_netl = $midonet_settings['static_linux_bridge_address']
|
||||
$static_fake_edge_router_ip_netl = $midonet_settings['static_fake_edge_router_address']
|
||||
$static_use_masquerade = $midonet_settings['static_use_masquerade']
|
||||
|
||||
$static_linux_bridge_ip_address = split($static_linux_bridge_ip_netl,'/')
|
||||
$static_fake_edge_router_ip_address = split($static_fake_edge_router_ip_netl,'/')
|
||||
|
||||
$slbip_without_netl = $static_linux_bridge_ip_address[0]
|
||||
|
||||
$gw_hash = get_nodes_hash_by_roles($net_metadata, ['midonet-gw'])
|
||||
$gw_mgmt_ip_hash = get_node_to_ipaddr_map_by_network_role($gw_hash, 'management')
|
||||
$gw_mgmt_ip_list = values($gw_mgmt_ip_hash)
|
||||
$gw_keys = keys($gw_hash)
|
||||
|
||||
$nic = 'br-ex'
|
||||
$fip = $old_midonet_settings['floating_cidr']
|
||||
|
||||
file { 'delete masquerade script':
|
||||
ensure => present,
|
||||
path => '/tmp/remove_router_interfaces.sh',
|
||||
content => template('/etc/fuel/plugins/midonet-9.2/puppet/templates/cleanup_masquerade.sh.erb'),
|
||||
} ->
|
||||
|
||||
# Finally, execute the script
|
||||
exec { 'run delete masquerade script':
|
||||
command => '/bin/bash -x /tmp/cleanup_masquerade.sh 2>&1 | tee /tmp/cleanup_masq.out',
|
||||
returns => ['0', '7'],
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
|
||||
notice('MODULAR: midonet-cleanup-static-per-host.pp')
|
||||
|
||||
exec {'drop the veth pair':
|
||||
path => '/usr/bin:/usr/sbin:/sbin',
|
||||
command => 'ip link delete veth0',
|
||||
onlyif => 'ip l | /bin/grep -e veth0 -e veth1'
|
||||
} ->
|
||||
|
||||
exec {'shut off the uplinkbridge':
|
||||
path => '/usr/bin:/usr/sbin:/sbin',
|
||||
command => 'ifconfig uplinkbridge down',
|
||||
onlyif => 'ip l | /bin/grep -e uplinkbridge'
|
||||
} ->
|
||||
|
||||
exec {'delete the uplinkbridge':
|
||||
path => '/usr/bin:/usr/sbin:/sbin',
|
||||
command => 'brctl delbr uplinkbridge',
|
||||
onlyif => 'ip l | /bin/grep -e uplinkbridge'
|
||||
} ->
|
||||
|
||||
file {'/etc/init/midonet-network-static.conf':
|
||||
ensure => absent,
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
|
||||
notice('MODULAR: midonet-cleanup-static.pp')
|
||||
include ::stdlib
|
||||
|
||||
$old_config = loadyamlv2('/etc/fuel/cluster/astute.yaml.old','notfound')
|
||||
|
||||
# If it's a redeploy and the file exists we can proceed
|
||||
if($old_config != 'notfound')
|
||||
{
|
||||
$old_gw_type = $old_config['midonet']['gateway_type']
|
||||
if ($old_gw_type == 'static') {
|
||||
|
||||
# Extract data from hiera
|
||||
$access_data = $old_config['access']
|
||||
$keystone_admin_tenant = $access_data['tenant']
|
||||
$net_metadata = $old_config['network_metadata']
|
||||
$neutron_settings = $old_config['quantum_settings']
|
||||
$external_net_name = $neutron_settings['default_floating_net']
|
||||
$tenant_net_name = $neutron_settings['default_private_net']
|
||||
$predefined_nets = $neutron_settings['predefined_networks']
|
||||
$tenant_net = $predefined_nets[$tenant_net_name]
|
||||
$external_net = $predefined_nets[$external_net_name]
|
||||
|
||||
$old_midonet_settings = $old_config['midonet']
|
||||
$old_net_metadata = $old_config['network_metadata']
|
||||
$controllers_map = get_nodes_hash_by_roles($old_net_metadata, ['controller', 'primary-controller'])
|
||||
|
||||
|
||||
$management_address = hiera('management_vip')
|
||||
$username = $access_data['user']
|
||||
$password = $access_data['password']
|
||||
$tenant_name = $access_data['tenant']
|
||||
|
||||
$midonet_settings = $old_config['midonet']
|
||||
$floating_cidr = $midonet_settings['floating_cidr']
|
||||
$f_net_cidr = split($midonet_settings['floating_cidr'], '/')
|
||||
|
||||
$static_linux_bridge_ip_netl = $midonet_settings['static_linux_bridge_address']
|
||||
$static_fake_edge_router_ip_netl = $midonet_settings['static_fake_edge_router_address']
|
||||
$static_use_masquerade = $midonet_settings['static_use_masquerade']
|
||||
|
||||
$static_linux_bridge_ip_address = split($static_linux_bridge_ip_netl,'/')
|
||||
$static_fake_edge_router_ip_address = split($static_fake_edge_router_ip_netl,'/')
|
||||
|
||||
$slbip_without_netl = $static_linux_bridge_ip_address[0]
|
||||
|
||||
$gw_hash = get_nodes_hash_by_roles($old_net_metadata, ['midonet-gw'])
|
||||
$gw_mgmt_ip_hash = get_node_to_ipaddr_map_by_network_role($gw_hash, 'management')
|
||||
$gw_mgmt_ip_list = values($gw_mgmt_ip_hash)
|
||||
$gw_keys = keys($gw_hash)
|
||||
|
||||
$gw_fqdn = $gw_hash[$gw_keys[0]]['fqdn']
|
||||
|
||||
$nic = 'br-ex'
|
||||
$fip = $old_midonet_settings['floating_cidr']
|
||||
$edge_router = 'edge-router'
|
||||
$veth0_ip = $static_linux_bridge_ip_address[0]
|
||||
$veth1_ip = $static_fake_edge_router_ip_address[0]
|
||||
$veth_network = generate_cidr_from_ip_netlength($static_linux_bridge_ip_netl)
|
||||
$myhostname = $gw_mgmt_ip_list[0]
|
||||
|
||||
package { 'python-neutronclient':
|
||||
ensure => latest
|
||||
}
|
||||
|
||||
file { 'cleanup static script':
|
||||
ensure => present,
|
||||
path => '/tmp/cleanup_static_gateway.sh',
|
||||
content => template('/etc/fuel/plugins/midonet-9.2/puppet/templates/cleanup_static_gateway.sh.erb'),
|
||||
}
|
||||
|
||||
# Finally, execute the script
|
||||
exec { 'run gateway static cleanup script':
|
||||
command => '/bin/bash -x /tmp/cleanup_static_gateway.sh 2>&1 | tee /tmp/cleanup.out',
|
||||
returns => ['0', '7'],
|
||||
}
|
||||
|
||||
$ports_to_unbind = generate_router_interfaces_to_delete($gw_hash)
|
||||
|
||||
file { 'delete router interfaces script':
|
||||
ensure => present,
|
||||
path => '/tmp/remove_router_interfaces.sh',
|
||||
content => template('/etc/fuel/plugins/midonet-9.2/puppet/templates/remove_router_interfaces.sh.erb'),
|
||||
}
|
||||
|
||||
# Finally, execute the script
|
||||
exec { 'run delete router interfaces script':
|
||||
command => '/bin/bash -x /tmp/remove_router_interfaces.sh 2>&1 | tee /tmp/ri-delete.out',
|
||||
returns => ['0', '7'],
|
||||
}
|
||||
|
||||
neutron_port { "port-static-${gw_fqdn}":
|
||||
|
||||
ensure => absent,
|
||||
network_name => 'edge-net',
|
||||
binding_host_id => $gw_fqdn,
|
||||
binding_profile => {
|
||||
'interface_name' => 'veth1'
|
||||
},
|
||||
ip_address => [[$static_fake_edge_router_ip_address[0]],['0.0.0.0']],
|
||||
}
|
||||
|
||||
neutron_subnet { 'edge-subnet':
|
||||
ensure => absent,
|
||||
enable_dhcp => false,
|
||||
cidr => generate_cidr_from_ip_netlength($static_linux_bridge_ip_netl),
|
||||
tenant_id => $external_net['tenant'],
|
||||
network_name => 'edge-net',
|
||||
}
|
||||
|
||||
Package['python-neutronclient']
|
||||
-> File['cleanup static script']
|
||||
-> Exec['run gateway static cleanup script']
|
||||
-> File['delete router interfaces script']
|
||||
-> Exec['run delete router interfaces script']
|
||||
-> Neutron_port<||>
|
||||
-> Neutron_subnet['edge-subnet']
|
||||
|
||||
}
|
||||
}
|
@ -1,136 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: neutron-compute-nova.pp')
|
||||
|
||||
$network_scheme = hiera_hash('network_scheme', {})
|
||||
prepare_network_config($network_scheme)
|
||||
|
||||
$use_neutron = hiera('use_neutron', false)
|
||||
|
||||
include nova::params
|
||||
$neutron_config = hiera_hash('neutron_config', {})
|
||||
$neutron_integration_bridge = 'br-int'
|
||||
$nova_hash = hiera_hash('nova', {})
|
||||
$libvirt_vif_driver = pick($nova_hash['libvirt_vif_driver'], 'nova.virt.libvirt.vif.LibvirtGenericVIFDriver')
|
||||
|
||||
$management_vip = hiera('management_vip')
|
||||
$service_endpoint = hiera('service_endpoint', $management_vip)
|
||||
$admin_password = try_get_value($neutron_config, 'keystone/admin_password')
|
||||
$admin_tenant_name = try_get_value($neutron_config, 'keystone/admin_tenant', 'services')
|
||||
$admin_username = try_get_value($neutron_config, 'keystone/admin_user', 'neutron')
|
||||
$region_name = hiera('region', 'RegionOne')
|
||||
$auth_api_version = 'v3'
|
||||
$ssl_hash = hiera_hash('use_ssl', {})
|
||||
|
||||
$admin_identity_protocol = get_ssl_property($ssl_hash, {}, 'keystone', 'admin', 'protocol', 'http')
|
||||
$admin_identity_address = get_ssl_property($ssl_hash, {}, 'keystone', 'admin', 'hostname', [$service_endpoint, $management_vip])
|
||||
|
||||
$neutron_internal_protocol = get_ssl_property($ssl_hash, {}, 'neutron', 'internal', 'protocol', 'http')
|
||||
$neutron_endpoint = get_ssl_property($ssl_hash, {}, 'neutron', 'internal', 'hostname', [hiera('neutron_endpoint', ''), $management_vip])
|
||||
|
||||
$admin_identity_uri = "${admin_identity_protocol}://${admin_identity_address}:35357"
|
||||
$admin_auth_url = "${admin_identity_uri}/${auth_api_version}"
|
||||
$neutron_url = "${neutron_internal_protocol}://${neutron_endpoint}:9696"
|
||||
|
||||
$nova_migration_ip = get_network_role_property('nova/migration', 'ipaddr')
|
||||
|
||||
service { 'libvirt' :
|
||||
ensure => 'running',
|
||||
enable => true,
|
||||
# Workaround for bug LP #1469308
|
||||
# also service name for Ubuntu and Centos is the same.
|
||||
name => 'libvirtd',
|
||||
provider => $nova::params::special_service_provider,
|
||||
}
|
||||
|
||||
firewall { '999 accept all to metadata interface':
|
||||
proto => 'all',
|
||||
iniface => 'metadata',
|
||||
action => 'accept',
|
||||
}
|
||||
|
||||
exec { 'destroy_libvirt_default_network':
|
||||
command => 'virsh net-destroy default',
|
||||
onlyif => 'virsh net-info default | grep -qE "Active:.* yes"',
|
||||
path => [ '/bin', '/sbin', '/usr/bin', '/usr/sbin' ],
|
||||
tries => 3,
|
||||
require => Service['libvirt'],
|
||||
}
|
||||
|
||||
exec { 'undefine_libvirt_default_network':
|
||||
command => 'virsh net-undefine default',
|
||||
onlyif => 'virsh net-info default 2>&1 > /dev/null',
|
||||
path => [ '/bin', '/sbin', '/usr/bin', '/usr/sbin' ],
|
||||
tries => 3,
|
||||
require => Exec['destroy_libvirt_default_network'],
|
||||
}
|
||||
|
||||
Service['libvirt'] ~> Exec['destroy_libvirt_default_network']
|
||||
|
||||
# script called by qemu needs to manipulate the tap device
|
||||
file_line { 'clear_emulator_capabilities':
|
||||
path => '/etc/libvirt/qemu.conf',
|
||||
line => 'clear_emulator_capabilities = 0',
|
||||
notify => Service['libvirt']
|
||||
}
|
||||
|
||||
class { 'nova::compute::neutron':
|
||||
libvirt_vif_driver => $libvirt_vif_driver,
|
||||
}
|
||||
|
||||
nova_config {
|
||||
'DEFAULT/linuxnet_interface_driver': value => 'nova.network.linux_net.LinuxOVSInterfaceDriver';
|
||||
'DEFAULT/linuxnet_ovs_integration_bridge': value => $neutron_integration_bridge;
|
||||
'DEFAULT/network_device_mtu': value => '65000';
|
||||
'DEFAULT/my_ip': value => $nova_migration_ip;
|
||||
'DEFAULT/force_config_drive': value => 'False';
|
||||
}
|
||||
|
||||
class { 'nova::network::neutron' :
|
||||
neutron_admin_password => $admin_password,
|
||||
neutron_admin_tenant_name => $admin_tenant_name,
|
||||
neutron_region_name => $region_name,
|
||||
neutron_admin_username => $admin_username,
|
||||
neutron_admin_auth_url => $admin_auth_url,
|
||||
neutron_url => $neutron_url,
|
||||
neutron_ovs_bridge => $neutron_integration_bridge,
|
||||
}
|
||||
|
||||
augeas { 'sysctl-net.bridge.bridge-nf-call-arptables':
|
||||
context => '/files/etc/sysctl.conf',
|
||||
changes => "set net.bridge.bridge-nf-call-arptables '1'",
|
||||
before => Service['libvirt'],
|
||||
}
|
||||
augeas { 'sysctl-net.bridge.bridge-nf-call-iptables':
|
||||
context => '/files/etc/sysctl.conf',
|
||||
changes => "set net.bridge.bridge-nf-call-iptables '1'",
|
||||
before => Service['libvirt'],
|
||||
}
|
||||
augeas { 'sysctl-net.bridge.bridge-nf-call-ip6tables':
|
||||
context => '/files/etc/sysctl.conf',
|
||||
changes => "set net.bridge.bridge-nf-call-ip6tables '1'",
|
||||
before => Service['libvirt'],
|
||||
}
|
||||
|
||||
service { 'nova-compute':
|
||||
ensure => 'running',
|
||||
name => $::nova::params::compute_service_name,
|
||||
}
|
||||
Nova_config<| |> ~> Service['nova-compute']
|
||||
|
||||
if($::operatingsystem == 'Ubuntu') {
|
||||
tweaks::ubuntu_service_override { 'nova-network':
|
||||
package_name => 'nova-network',
|
||||
}
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: midonet-define-repositories.pp')
|
||||
|
||||
$midonet_settings = hiera('midonet')
|
||||
$mem = $midonet_settings['mem']
|
||||
$mem_version = $midonet_settings['midonet_version']
|
||||
$mem_user = $midonet_settings['mem_repo_user']
|
||||
$mem_password = $midonet_settings['mem_repo_password']
|
||||
$midonet_version = $midonet_settings['midonet_version']
|
||||
$openstack_release = 'mitaka'
|
||||
|
||||
include apt
|
||||
include apt::update
|
||||
include midonet::params
|
||||
|
||||
|
||||
if $mem {
|
||||
$midonet_repo_url = "http://${mem_user}:${mem_password}@${midonet::params::midonet_repo_baseurl}/mem-${mem_version}"
|
||||
}
|
||||
else {
|
||||
$midonet_repo_url = "http://${midonet::params::midonet_repo_baseurl}/midonet-${midonet_version}"
|
||||
}
|
||||
|
||||
apt::key { 'midorepo':
|
||||
id => 'E9996503AEB005066261D3F38DDA494E99143E75',
|
||||
source => $midonet::params::midonet_key_url
|
||||
} ->
|
||||
|
||||
apt::source {'midonet':
|
||||
comment => 'Midonet apt repository',
|
||||
location => $midonet_repo_url,
|
||||
release => 'unstable',
|
||||
key => {
|
||||
'id' => 'E9996503AEB005066261D3F38DDA494E99143E75',
|
||||
'server' => 'subkeys.pgp.net',
|
||||
},
|
||||
include => {
|
||||
'src' => false,
|
||||
}
|
||||
} ->
|
||||
|
||||
apt::source {'midonet-openstack-integration':
|
||||
comment => 'Midonet apt plugin repository',
|
||||
location => "http://${midonet::params::midonet_repo_baseurl}/openstack-${openstack_release}",
|
||||
release => 'stable',
|
||||
include => {
|
||||
'src' => false,
|
||||
}
|
||||
} ->
|
||||
|
||||
apt::source {'midonet-openstack-misc':
|
||||
comment => 'Midonet 3rd party tools and libraries',
|
||||
location => "http://${midonet::params::midonet_repo_baseurl}/misc",
|
||||
release => 'stable',
|
||||
include => {
|
||||
'src' => false,
|
||||
}
|
||||
}
|
||||
|
||||
# Dummy exec to wrap apt_update
|
||||
exec {'update-midonet-repos':
|
||||
command => '/bin/true',
|
||||
require => [Exec['apt_update'],
|
||||
Apt::Source['midonet'],
|
||||
Apt::Source['midonet-openstack-integration']]
|
||||
|
||||
}
|
||||
|
||||
Apt::Source<| |> -> Exec<| title == 'update-midonet-repos' |>
|
@ -1,116 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: midonet-disable-services.pp')
|
||||
include ::stdlib
|
||||
|
||||
# Extract hiera data
|
||||
$net_metadata = hiera_hash('network_metadata')
|
||||
|
||||
$node = get_node_by_fqdn($net_metadata, $::fqdn)
|
||||
|
||||
$roles = $node['node_roles']
|
||||
|
||||
$ovs_agent_name = $operatingsystem ? {
|
||||
'CentOS' => 'neutron-openvswitch-agent',
|
||||
'Ubuntu' => 'neutron-plugin-openvswitch-agent',
|
||||
}
|
||||
|
||||
$l3_agent_name = $operatingsystem ? {
|
||||
'CentOS' => 'neutron-l3-agent',
|
||||
'Ubuntu' => 'neutron-l3-agent'
|
||||
}
|
||||
|
||||
$dhcp_agent_name = $operatingsystem ? {
|
||||
'CentOS' => 'neutron-dhcp-agent',
|
||||
'Ubuntu' => 'neutron-dhcp-agent'
|
||||
}
|
||||
|
||||
$metadata_agent_name = $operatingsystem ? {
|
||||
'CentOS' => 'neutron-metadata-agent',
|
||||
'Ubuntu' => 'neutron-metadata-agent'
|
||||
}
|
||||
|
||||
if member($roles, 'primary-controller') {
|
||||
|
||||
exec {'stop-dhcp-agent':
|
||||
command => 'crm resource stop clone_neutron-dhcp-agent',
|
||||
path => '/usr/bin:/usr/sbin',
|
||||
onlyif => 'crm resource status clone_neutron-dhcp-agent'
|
||||
} ->
|
||||
exec {'stop-metadata-agent':
|
||||
command => 'crm resource stop clone_neutron-metadata-agent',
|
||||
path => '/usr/bin:/usr/sbin',
|
||||
onlyif => 'crm resource status clone_neutron-metadata-agent'
|
||||
} ->
|
||||
exec {'delete-metadata-agent':
|
||||
command => 'crm configure delete clone_neutron-metadata-agent',
|
||||
path => '/usr/bin:/usr/sbin',
|
||||
onlyif => 'crm resource status clone_neutron-metadata-agent'
|
||||
}->
|
||||
exec {'delete-dhcp-agent':
|
||||
command => 'crm configure delete clone_neutron-dhcp-agent',
|
||||
path => '/usr/bin:/usr/sbin',
|
||||
onlyif => 'crm resource status clone_neutron-dhcp-agent'
|
||||
}->
|
||||
exec {'stop-dhcp-agent-N':
|
||||
command => 'crm resource stop neutron-dhcp-agent',
|
||||
path => '/usr/bin:/usr/sbin',
|
||||
onlyif => 'crm resource status neutron-dhcp-agent'
|
||||
} ->
|
||||
exec {'stop-metadata-agent-N':
|
||||
command => 'crm resource stop neutron-metadata-agent',
|
||||
path => '/usr/bin:/usr/sbin',
|
||||
onlyif => 'crm resource status neutron-metadata-agent'
|
||||
} ->
|
||||
exec {'delete-metadata-agent-N':
|
||||
command => 'crm configure delete neutron-metadata-agent',
|
||||
path => '/usr/bin:/usr/sbin',
|
||||
onlyif => 'crm resource status neutron-metadata-agent'
|
||||
}->
|
||||
exec {'delete-dhcp-agent-N':
|
||||
command => 'crm configure delete neutron-dhcp-agent',
|
||||
path => '/usr/bin:/usr/sbin',
|
||||
onlyif => 'crm resource status neutron-dhcp-agent'
|
||||
}->
|
||||
exec {'stop-l3-agent':
|
||||
command => 'crm resource stop p_neutron-l3-agent',
|
||||
path => '/usr/bin:/usr/sbin',
|
||||
onlyif => 'crm resource status p_neutron-l3-agent'
|
||||
} ->
|
||||
exec {'delete-l3-agent':
|
||||
command => 'crm configure delete p_neutron-l3-agent',
|
||||
path => '/usr/bin:/usr/sbin',
|
||||
onlyif => 'crm resource status p_neutron-l3-agent'
|
||||
}->
|
||||
service {$dhcp_agent_name:
|
||||
ensure => stopped,
|
||||
enable => false
|
||||
}->
|
||||
|
||||
service {$metadata_agent_name:
|
||||
ensure => stopped,
|
||||
enable => false
|
||||
}
|
||||
} else {
|
||||
|
||||
service {$dhcp_agent_name:
|
||||
ensure => stopped,
|
||||
enable => false
|
||||
}
|
||||
|
||||
service {$metadata_agent_name:
|
||||
ensure => stopped,
|
||||
enable => false
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: midonet-edge-router-cleanup-bgp-gw.pp')
|
||||
|
||||
|
||||
file {'/etc/init/midonet-network.conf':
|
||||
ensure => absent,
|
||||
source => '/etc/fuel/plugins/midonet-9.2/puppet/files/startup.conf'
|
||||
}
|
@ -1,116 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: midonet-edge-router-cleanup-bgp.pp')
|
||||
|
||||
include ::stdlib
|
||||
|
||||
$old_config = loadyamlv2('/etc/fuel/cluster/astute.yaml.old','notfound')
|
||||
|
||||
# If it's a redeploy and the file exists we can proceed
|
||||
if($old_config != 'notfound')
|
||||
{
|
||||
$old_gw_type = $old_config['midonet']['gateway_type']
|
||||
if ($old_gw_type == 'bgp') {
|
||||
# Extract data from hiera
|
||||
$access_data = $old_config['access']
|
||||
$management_address = hiera('management_vip')
|
||||
$keystone_admin_tenant = $access_data['tenant']
|
||||
$net_metadata = $old_config['network_metadata']
|
||||
$gw_hash = get_nodes_hash_by_roles($net_metadata, ['midonet-gw'])
|
||||
$gw_keys = keys($gw_hash)
|
||||
$neutron_settings = $old_config['quantum_settings']
|
||||
$external_net_name = $neutron_settings['default_floating_net']
|
||||
$tenant_net_name = $neutron_settings['default_private_net']
|
||||
$predefined_nets = $neutron_settings['predefined_networks']
|
||||
$tenant_net = $predefined_nets[$tenant_net_name]
|
||||
$external_net = $predefined_nets[$external_net_name]
|
||||
|
||||
$username = $access_data['user']
|
||||
$password = $access_data['password']
|
||||
$tenant_name = $access_data['tenant']
|
||||
|
||||
# Plugin settings data (overrides $external_net l3 values)
|
||||
$midonet_settings = $old_config['midonet']
|
||||
$tz_type = $midonet_settings['tunnel_type']
|
||||
$floating_range_start = $midonet_settings['floating_ip_range_start']
|
||||
$floating_range_end = $midonet_settings['floating_ip_range_end']
|
||||
$floating_cidr = $midonet_settings['floating_cidr']
|
||||
$floating_gateway_ip = $midonet_settings['gateway']
|
||||
$bgp_local_as = $midonet_settings['bgp_local_as']
|
||||
$bgp_neighbors = $midonet_settings['bgp_neighbors']
|
||||
|
||||
$edge_router = 'edge-router'
|
||||
|
||||
$allocation_pools = "start=${floating_range_start},end=${floating_range_end}"
|
||||
|
||||
$myhostname = $gw_keys[0]
|
||||
|
||||
$ports_to_unbind = generate_router_interfaces_list($bgp_neighbors)
|
||||
|
||||
|
||||
file { 'delete router interfaces script':
|
||||
ensure => present,
|
||||
path => '/tmp/delete_router_interfaces_bgp.sh',
|
||||
content => template('/etc/fuel/plugins/midonet-9.2/puppet/templates/delete_router_interfaces_bgp.sh.erb'),
|
||||
}
|
||||
|
||||
# Finally, execute the script
|
||||
exec { 'run delete router interfaces script':
|
||||
command => '/bin/bash -x /tmp/delete_router_interfaces_bgp.sh 2>&1 | tee /tmp/ri-delete-bgp.out',
|
||||
returns => ['0', '7'],
|
||||
}
|
||||
|
||||
$defaults_for_subnet = {
|
||||
ensure => absent,
|
||||
enable_dhcp => false,
|
||||
network_name => 'edge-net',
|
||||
tenant_id => $external_net['tenant']
|
||||
}
|
||||
|
||||
create_resources('neutron_subnet',
|
||||
generate_bgp_edge_subnet_hash($bgp_neighbors),
|
||||
$defaults_for_subnet)
|
||||
|
||||
$defaults_for_port = {
|
||||
ensure => absent,
|
||||
network_name => 'edge-net',
|
||||
binding_host_id => $gw_hash[$gw_keys[0]]['fqdn'],
|
||||
binding_profile => {
|
||||
'interface_name' => 'gw-veth-mn'
|
||||
},
|
||||
}
|
||||
|
||||
create_resources('neutron_port',
|
||||
generate_bgp_edge_port_hash($bgp_neighbors),
|
||||
$defaults_for_port)
|
||||
|
||||
midonet_gateway_bgp { 'edge-router':
|
||||
ensure => absent,
|
||||
bgp_local_as_number => $bgp_local_as,
|
||||
username => $username,
|
||||
password => $password,
|
||||
tenant_name => $tenant_name,
|
||||
midonet_api_url => "http://${management_address}:8181/midonet-api",
|
||||
bgp_advertised_networks => $floating_cidr,
|
||||
bgp_neighbors => generate_bgp_neighbors_for_gateway_bgp($bgp_neighbors)
|
||||
}
|
||||
|
||||
File['delete router interfaces script']
|
||||
-> Exec['run delete router interfaces script']
|
||||
-> Neutron_subnet<||>
|
||||
-> Neutron_port<||>
|
||||
-> Midonet_gateway_bgp['edge-router']
|
||||
}
|
||||
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: midonet-edge-router-setup-bgp-gw.pp')
|
||||
|
||||
include ::stdlib
|
||||
# Extract data from hiera
|
||||
$access_data = hiera_hash('access')
|
||||
$management_address = hiera('management_vip')
|
||||
$keystone_admin_tenant = $access_data['tenant']
|
||||
$net_metadata = hiera_hash('network_metadata')
|
||||
$gw_hash = get_nodes_hash_by_roles($net_metadata, ['midonet-gw'])
|
||||
$gw_keys = keys($gw_hash)
|
||||
$neutron_settings = hiera('neutron_config')
|
||||
$external_net_name = $neutron_settings['default_floating_net']
|
||||
$tenant_net_name = $neutron_settings['default_private_net']
|
||||
$predefined_nets = $neutron_settings['predefined_networks']
|
||||
$tenant_net = $predefined_nets[$tenant_net_name]
|
||||
$external_net = $predefined_nets[$external_net_name]
|
||||
|
||||
$username = $access_data['user']
|
||||
$password = $access_data['password']
|
||||
$tenant_name = $access_data['tenant']
|
||||
|
||||
# Plugin settings data (overrides $external_net l3 values)
|
||||
$midonet_settings = hiera_hash('midonet')
|
||||
$tz_type = $midonet_settings['tunnel_type']
|
||||
$floating_range_start = $midonet_settings['floating_ip_range_start']
|
||||
$floating_range_end = $midonet_settings['floating_ip_range_end']
|
||||
$floating_cidr = $midonet_settings['floating_cidr']
|
||||
$floating_gateway_ip = $midonet_settings['gateway']
|
||||
$bgp_local_as = $midonet_settings['bgp_local_as']
|
||||
$bgp_neighbors = $midonet_settings['bgp_neighbors']
|
||||
|
||||
$edge_router = 'edge-router'
|
||||
|
||||
$allocation_pools = "start=${floating_range_start},end=${floating_range_end}"
|
||||
|
||||
# Create one subnet per each network used.
|
||||
$myhostname = $::fqdn
|
||||
|
||||
$ports_to_bind = generate_router_interfaces_list($bgp_neighbors)
|
||||
|
||||
package { 'python-neutronclient':
|
||||
ensure => latest
|
||||
} ->
|
||||
|
||||
file { 'create router interfaces script':
|
||||
ensure => present,
|
||||
path => '/tmp/create_router_interfaces.sh',
|
||||
content => template('/etc/fuel/plugins/midonet-9.2/puppet/templates/create_router_interfaces.sh.erb'),
|
||||
} ->
|
||||
|
||||
# Finally, execute the script
|
||||
exec { 'run create router interfaces script':
|
||||
command => '/bin/bash -x /tmp/create_router_interfaces.sh 2>&1 | tee /tmp/ri-create.out',
|
||||
returns => ['0', '7'],
|
||||
} ->
|
||||
|
||||
midonet_gateway_bgp { 'edge-router':
|
||||
ensure => present,
|
||||
bgp_local_as_number => $bgp_local_as,
|
||||
username => $username,
|
||||
password => $password,
|
||||
tenant_name => $tenant_name,
|
||||
midonet_api_url => "http://${management_address}:8181/midonet-api",
|
||||
bgp_advertised_networks => $floating_cidr,
|
||||
bgp_neighbors => generate_bgp_neighbors_for_gateway_bgp($bgp_neighbors)
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: midonet-edge-router-setup-bgp.pp')
|
||||
|
||||
include ::stdlib
|
||||
# Extract data from hiera
|
||||
$access_data = hiera_hash('access')
|
||||
$keystone_admin_tenant = $access_data['tenant']
|
||||
$net_metadata = hiera_hash('network_metadata')
|
||||
$gw_hash = get_nodes_hash_by_roles($net_metadata, ['midonet-gw'])
|
||||
$gw_keys = keys($gw_hash)
|
||||
$neutron_settings = hiera('neutron_config')
|
||||
$external_net_name = $neutron_settings['default_floating_net']
|
||||
$tenant_net_name = $neutron_settings['default_private_net']
|
||||
$predefined_nets = $neutron_settings['predefined_networks']
|
||||
$tenant_net = $predefined_nets[$tenant_net_name]
|
||||
$external_net = $predefined_nets[$external_net_name]
|
||||
|
||||
$username = $access_data['user']
|
||||
$password = $access_data['password']
|
||||
$tenant_name = $access_data['tenant']
|
||||
|
||||
# Plugin settings data (overrides $external_net l3 values)
|
||||
$midonet_settings = hiera_hash('midonet')
|
||||
$tz_type = $midonet_settings['tunnel_type']
|
||||
$floating_range_start = $midonet_settings['floating_ip_range_start']
|
||||
$floating_range_end = $midonet_settings['floating_ip_range_end']
|
||||
$floating_cidr = $midonet_settings['floating_cidr']
|
||||
$floating_gateway_ip = $midonet_settings['gateway']
|
||||
$bgp_local_as = $midonet_settings['bgp_local_as']
|
||||
$bgp_neighbors = $midonet_settings['bgp_neighbors']
|
||||
|
||||
$edge_router = 'edge-router'
|
||||
|
||||
$allocation_pools = "start=${floating_range_start},end=${floating_range_end}"
|
||||
|
||||
# Create one subnet per each network used.
|
||||
|
||||
if size($gw_keys) < 1 {
|
||||
fail('A Midonet Gateway node is required to run on BGP mode')
|
||||
}
|
||||
|
||||
$defaults_for_subnet = {
|
||||
ensure => present,
|
||||
enable_dhcp => false,
|
||||
network_name => 'edge-net',
|
||||
tenant_id => $external_net['tenant']
|
||||
}
|
||||
|
||||
create_resources('neutron_subnet',
|
||||
generate_bgp_edge_subnet_hash($bgp_neighbors),
|
||||
$defaults_for_subnet)
|
||||
|
||||
$defaults_for_port = {
|
||||
ensure => present,
|
||||
network_name => 'edge-net',
|
||||
binding_host_id => $gw_hash[$gw_keys[0]]['fqdn'],
|
||||
binding_profile => {
|
||||
'interface_name' => 'gw-veth-mn'
|
||||
},
|
||||
}
|
||||
|
||||
create_resources('neutron_port',
|
||||
generate_bgp_edge_port_hash($bgp_neighbors),
|
||||
$defaults_for_port)
|
||||
|
||||
|
||||
|
||||
Neutron_subnet<||>
|
||||
-> Neutron_port<||>
|
@ -1,64 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: midonet-edge-router-setup-static-per-host.pp')
|
||||
|
||||
include ::stdlib
|
||||
|
||||
# Extract data from hiera
|
||||
$access_data = hiera_hash('access')
|
||||
$keystone_admin_tenant = $access_data['tenant']
|
||||
$net_metadata = hiera_hash('network_metadata')
|
||||
$neutron_settings = hiera('neutron_config')
|
||||
$external_net_name = $neutron_settings['default_floating_net']
|
||||
$tenant_net_name = $neutron_settings['default_private_net']
|
||||
$predefined_nets = $neutron_settings['predefined_networks']
|
||||
$tenant_net = $predefined_nets[$tenant_net_name]
|
||||
$external_net = $predefined_nets[$external_net_name]
|
||||
|
||||
# Plugin settings data (overrides $external_net l3 values)
|
||||
$midonet_settings = hiera_hash('midonet')
|
||||
$tz_type = $midonet_settings['tunnel_type']
|
||||
$floating_range_start = $midonet_settings['floating_ip_range_start']
|
||||
$floating_range_end = $midonet_settings['floating_ip_range_end']
|
||||
$floating_cidr = $midonet_settings['floating_cidr']
|
||||
$floating_gateway_ip = $midonet_settings['gateway']
|
||||
$bgp_subnets = $midonet_settings['bgp_cidr']
|
||||
$static_linux_bridge_ip_netl = $midonet_settings['static_linux_bridge_address']
|
||||
$static_fake_edge_router_ip_netl = $midonet_settings['static_fake_edge_router_address']
|
||||
$static_use_masquerade = $midonet_settings['static_use_masquerade']
|
||||
|
||||
$static_linux_bridge_ip_address = split($static_linux_bridge_ip_netl,'/')
|
||||
$static_fake_edge_router_ip_address = split($static_fake_edge_router_ip_netl,'/')
|
||||
|
||||
$allocation_pools = "start=${floating_range_start},end=${floating_range_end}"
|
||||
|
||||
$gw_hash = get_nodes_hash_by_roles($net_metadata, ['midonet-gw'])
|
||||
$gw_mgmt_ip_hash = get_node_to_ipaddr_map_by_network_role($gw_hash, 'management')
|
||||
$gw_mgmt_ip_list = values($gw_mgmt_ip_hash)
|
||||
$gw_keys = keys($gw_hash)
|
||||
|
||||
$gw_fqdn = $gw_hash[$gw_keys[0]]['fqdn']
|
||||
|
||||
# Warning: The 0.0.0.0 is there just to get away with a bug in puppet-neutron.
|
||||
# It doesnt get evaluated but forces the type to get the correct value
|
||||
neutron_port { "port-static-${gw_fqdn}":
|
||||
|
||||
ensure => present,
|
||||
network_name => 'edge-net',
|
||||
binding_host_id => $gw_fqdn,
|
||||
binding_profile => {
|
||||
'interface_name' => 'veth1'
|
||||
},
|
||||
ip_address => [[$static_fake_edge_router_ip_address[0]],['0.0.0.0']],
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: midonet-edge-router-setup-static.pp')
|
||||
|
||||
include ::stdlib
|
||||
# Extract data from hiera
|
||||
$access_data = hiera_hash('access')
|
||||
$keystone_admin_tenant = $access_data['tenant']
|
||||
$neutron_settings = hiera('neutron_config')
|
||||
$external_net_name = $neutron_settings['default_floating_net']
|
||||
$tenant_net_name = $neutron_settings['default_private_net']
|
||||
$predefined_nets = $neutron_settings['predefined_networks']
|
||||
$tenant_net = $predefined_nets[$tenant_net_name]
|
||||
$external_net = $predefined_nets[$external_net_name]
|
||||
|
||||
# Plugin settings data (overrides $external_net l3 values)
|
||||
$midonet_settings = hiera_hash('midonet')
|
||||
$tz_type = $midonet_settings['tunnel_type']
|
||||
$floating_range_start = $midonet_settings['floating_ip_range_start']
|
||||
$floating_range_end = $midonet_settings['floating_ip_range_end']
|
||||
$floating_cidr = $midonet_settings['floating_cidr']
|
||||
$floating_gateway_ip = $midonet_settings['gateway']
|
||||
$static_linux_bridge_ip_netl = $midonet_settings['static_linux_bridge_address']
|
||||
$static_fake_edge_router_ip_netl = $midonet_settings['static_fake_edge_router_address']
|
||||
$static_use_masquerade = $midonet_settings['static_use_masquerade']
|
||||
|
||||
$static_linux_bridge_ip_address = split($static_linux_bridge_ip_netl,'/')
|
||||
$static_fake_edge_router_ip_address = split($static_fake_edge_router_ip_netl,'/')
|
||||
|
||||
$allocation_pools = "start=${floating_range_start},end=${floating_range_end}"
|
||||
|
||||
package { 'python-neutronclient':
|
||||
ensure => latest
|
||||
} ->
|
||||
|
||||
neutron_subnet { 'edge-subnet':
|
||||
ensure => present,
|
||||
enable_dhcp => false,
|
||||
cidr => generate_cidr_from_ip_netlength($static_linux_bridge_ip_netl),
|
||||
tenant_id => $external_net['tenant'],
|
||||
network_name => 'edge-net',
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: midonet-edge-router-setup.pp')
|
||||
|
||||
# Extract data from hiera
|
||||
$access_data = hiera_hash('access')
|
||||
$keystone_admin_tenant = $access_data['tenant']
|
||||
$neutron_settings = hiera('neutron_config')
|
||||
$external_net_name = $neutron_settings['default_floating_net']
|
||||
$tenant_net_name = $neutron_settings['default_private_net']
|
||||
$predefined_nets = $neutron_settings['predefined_networks']
|
||||
$tenant_net = $predefined_nets[$tenant_net_name]
|
||||
$external_net = $predefined_nets[$external_net_name]
|
||||
|
||||
# Plugin settings data (overrides $external_net l3 values)
|
||||
$midonet_settings = hiera_hash('midonet')
|
||||
$tz_type = $midonet_settings['tunnel_type']
|
||||
$floating_range_start = $midonet_settings['floating_ip_range_start']
|
||||
$floating_range_end = $midonet_settings['floating_ip_range_end']
|
||||
$floating_cidr = $midonet_settings['floating_cidr']
|
||||
$floating_gateway_ip = $midonet_settings['gateway']
|
||||
|
||||
|
||||
$allocation_pools = "start=${floating_range_start},end=${floating_range_end}"
|
||||
|
||||
neutron_router { 'edge-router':
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
neutron_router_interface { "edge-router:${external_net_name}__subnet":
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
neutron_network { 'edge-net':
|
||||
ensure => present,
|
||||
tenant_id => $external_net['tenant'],
|
||||
provider_network_type => 'uplink',
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: midonet-enable-ip.forward.pp')
|
||||
|
||||
sysctl::value { 'net.ipv4.ip_forward':
|
||||
value => '1'
|
||||
} ->
|
||||
|
||||
exec { 'load-sysctl':
|
||||
command => '/sbin/sysctl -p /etc/sysctl.conf',
|
||||
refreshonly => true
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
if $::osfamily == 'Debian' {
|
||||
|
||||
package { 'nova-network':
|
||||
ensure => installed
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,56 +0,0 @@
|
||||
|
||||
notice('MODULAR: midonet-gateway-static-router-ifaces.pp')
|
||||
|
||||
$management_address = hiera('management_vip')
|
||||
$access_data = hiera_hash('access')
|
||||
$username = $access_data['user']
|
||||
$password = $access_data['password']
|
||||
$tenant_name = $access_data['tenant']
|
||||
|
||||
$midonet_settings = hiera_hash('midonet')
|
||||
$floating_cidr = $midonet_settings['floating_cidr']
|
||||
$f_net_cidr = split($midonet_settings['floating_cidr'], '/')
|
||||
|
||||
$nodes_hash = hiera('nodes')
|
||||
$node = filter_nodes($nodes_hash, 'fqdn', $::fqdn)
|
||||
$gw_ip = $node[0]['public_address']
|
||||
$gw_mask = $node[0]['public_netmask']
|
||||
$net_hash = public_network_hash($gw_ip, $gw_mask)
|
||||
|
||||
$static_linux_bridge_ip_netl = $midonet_settings['static_linux_bridge_address']
|
||||
$static_fake_edge_router_ip_netl = $midonet_settings['static_fake_edge_router_address']
|
||||
$static_use_masquerade = $midonet_settings['static_use_masquerade']
|
||||
|
||||
$static_linux_bridge_ip_address = split($static_linux_bridge_ip_netl,'/')
|
||||
$static_fake_edge_router_ip_address = split($static_fake_edge_router_ip_netl,'/')
|
||||
|
||||
$slbip_without_netl = $static_linux_bridge_ip_address[0]
|
||||
|
||||
$net_metadata = hiera_hash('network_metadata')
|
||||
|
||||
$gw_hash = get_nodes_hash_by_roles($net_metadata, ['midonet-gw'])
|
||||
$gw_keys = keys($gw_hash)
|
||||
|
||||
$gw_fqdn = $gw_hash[$gw_keys[0]]['fqdn']
|
||||
|
||||
$ports_to_bind = "port-static-${gw_fqdn}"
|
||||
|
||||
$edge_router = 'edge-router'
|
||||
|
||||
$myhostname = $::fqdn
|
||||
|
||||
package { 'python-neutronclient':
|
||||
ensure => latest
|
||||
} ->
|
||||
|
||||
file { 'create router interfaces script':
|
||||
ensure => present,
|
||||
path => '/tmp/create_router_interfaces_static.sh',
|
||||
content => template('/etc/fuel/plugins/midonet-9.2/puppet/templates/create_router_interfaces_static.sh.erb'),
|
||||
} ->
|
||||
|
||||
# Finally, execute the script
|
||||
exec { 'run create router interfaces script':
|
||||
command => '/bin/bash -x /tmp/create_router_interfaces_static.sh 2>&1 | tee /tmp/ri-create.out',
|
||||
returns => ['0', '7'],
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
|
||||
notice('MODULAR: midonet-gateway-static.pp')
|
||||
|
||||
$management_address = hiera('management_vip')
|
||||
$access_data = hiera_hash('access')
|
||||
$username = $access_data['user']
|
||||
$password = $access_data['password']
|
||||
$tenant_name = $access_data['tenant']
|
||||
|
||||
$midonet_settings = hiera_hash('midonet')
|
||||
$floating_cidr = $midonet_settings['floating_cidr']
|
||||
$f_net_cidr = split($midonet_settings['floating_cidr'], '/')
|
||||
|
||||
$nodes_hash = hiera('nodes')
|
||||
$node = filter_nodes($nodes_hash, 'fqdn', $::fqdn)
|
||||
$gw_ip = $node[0]['public_address']
|
||||
$gw_mask = $node[0]['public_netmask']
|
||||
$net_hash = public_network_hash($gw_ip, $gw_mask)
|
||||
|
||||
$static_linux_bridge_ip_netl = $midonet_settings['static_linux_bridge_address']
|
||||
$static_fake_edge_router_ip_netl = $midonet_settings['static_fake_edge_router_address']
|
||||
$static_use_masquerade = $midonet_settings['static_use_masquerade']
|
||||
|
||||
$static_linux_bridge_ip_address = split($static_linux_bridge_ip_netl,'/')
|
||||
$static_fake_edge_router_ip_address = split($static_fake_edge_router_ip_netl,'/')
|
||||
|
||||
$slbip_without_netl = $static_linux_bridge_ip_address[0]
|
||||
|
||||
class { 'midonet::gateway::static':
|
||||
nic => 'br-ex',
|
||||
fip => $floating_cidr,
|
||||
edge_router => 'edge-router',
|
||||
veth0_ip => $static_linux_bridge_ip_address[0],
|
||||
veth1_ip => $static_fake_edge_router_ip_address[0],
|
||||
veth_network => generate_cidr_from_ip_netlength($static_linux_bridge_ip_netl),
|
||||
scripts_dir => '/tmp',
|
||||
uplink_script => 'create_fake_uplink_l2.sh',
|
||||
ensure_scripts => 'present',
|
||||
masquerade => $static_use_masquerade? {true => 'on' ,default => 'off' }
|
||||
}
|
||||
contain ::midonet::gateway::static
|
||||
|
||||
file {'/etc/init/midonet-network-static.conf':
|
||||
ensure => present,
|
||||
source => '/etc/fuel/plugins/midonet-9.2/puppet/files/startup-static.conf',
|
||||
require => Exec['run gateway static creation script']
|
||||
}
|
@ -1,57 +0,0 @@
|
||||
# Copyright 2015 Midokura SARL.
|
||||
#
|
||||
# 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: midonet-generate-openrc-for-gw.pp')
|
||||
|
||||
$access_hash = hiera_hash('access', {})
|
||||
$keystone_hash = hiera_hash('keystone', {})
|
||||
$admin_tenant = $access_hash['tenant']
|
||||
$admin_email = $access_hash['email']
|
||||
$admin_user = $access_hash['user']
|
||||
$admin_password = $access_hash['password']
|
||||
$ssl_hash = hiera_hash('use_ssl', {})
|
||||
$management_vip = hiera('management_vip')
|
||||
$service_endpoint = hiera('service_endpoint', $management_vip)
|
||||
$internal_protocol = get_ssl_property($ssl_hash, {}, 'keystone', 'internal', 'protocol', 'http')
|
||||
$internal_address = get_ssl_property($ssl_hash, {}, 'keystone', 'internal', 'hostname', [$service_endpoint, $management_vip])
|
||||
$internal_port = '5000'
|
||||
$internal_url = "${internal_protocol}://${internal_address}:${internal_port}"
|
||||
$region = hiera('region', 'RegionOne')
|
||||
$auth_suffix = pick($keystone_hash['auth_suffix'], '/')
|
||||
$auth_url = "${internal_url}${auth_suffix}"
|
||||
|
||||
|
||||
$murano_settings_hash = hiera_hash('murano_settings', {})
|
||||
if has_key($murano_settings_hash, 'murano_repo_url') {
|
||||
$murano_repo_url = $murano_settings_hash['murano_repo_url']
|
||||
} else {
|
||||
$murano_repo_url = 'http://storage.apps.openstack.org'
|
||||
}
|
||||
|
||||
$murano_hash = hiera_hash('murano', {})
|
||||
$murano_plugins = pick($murano_hash['plugins'], {})
|
||||
if has_key($murano_plugins, 'glance_artifacts_plugin') {
|
||||
$murano_glare_plugin = $murano_plugins['glance_artifacts_plugin']['enabled']
|
||||
} else {
|
||||
$murano_glare_plugin = false
|
||||
}
|
||||
|
||||
osnailyfacter::credentials_file { '/root/openrc':
|
||||
admin_user => $admin_user,
|
||||
admin_password => $admin_password,
|
||||
admin_tenant => $admin_tenant,
|
||||
region_name => $region,
|
||||
auth_url => $auth_url,
|
||||
murano_repo_url => $murano_repo_url,
|
||||
murano_glare_plugin => $murano_glare_plugin,
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: midonet-horizon-lb-firewall.pp')
|
||||
include ::stdlib
|
||||
|
||||
service { 'apache2':
|
||||
ensure => running,
|
||||
enable => true,
|
||||
hasrestart => true,
|
||||
hasstatus => true,
|
||||
}
|
||||
|
||||
file_line { 'firewall enable horizon':
|
||||
path => '/etc/openstack-dashboard/local_settings.py',
|
||||
line => " 'enable_firewall': True,",
|
||||
match => '^\ \ \ \ \'enable_firewall.*$',
|
||||
} ->
|
||||
|
||||
file_line { 'lb enable horizon':
|
||||
path => '/etc/openstack-dashboard/local_settings.py',
|
||||
line => " 'enable_lb': True,",
|
||||
match => '^\ \ \ \ \'enable_lb.*$',
|
||||
notify => Service['apache2']
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
# Copyright 2015 Midokura SARL.
|
||||
#
|
||||
# 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: midonet-host-registry.pp')
|
||||
|
||||
# Extract data from hiera
|
||||
$api_ip = hiera('management_vip')
|
||||
$access_data = hiera_hash('access')
|
||||
$username = $access_data['user']
|
||||
$password = $access_data['password']
|
||||
$tenant_name = $access_data['tenant']
|
||||
|
||||
# Plugin settings data
|
||||
$midonet_settings = hiera_hash('midonet')
|
||||
$tz_type = $midonet_settings['tunnel_type']
|
||||
|
||||
$service_path = $operatingsystem ? {
|
||||
'CentOS' => '/sbin',
|
||||
'Ubuntu' => '/usr/bin:/usr/sbin:/sbin'
|
||||
}
|
||||
|
||||
# Somehow, there are times where the hosts don't register
|
||||
# to NSDB. Restarting midolman forces the registration
|
||||
exec {'service midolman restart':
|
||||
path => $service_path
|
||||
} ->
|
||||
|
||||
midonet_host_registry {$::fqdn:
|
||||
ensure => present,
|
||||
midonet_api_url => "http://${api_ip}:8181",
|
||||
username => $username,
|
||||
password => $password,
|
||||
tenant_name => $tenant_name,
|
||||
underlay_ip_address => $::ipaddress_br_mesh,
|
||||
tunnelzone_type => $tz_type,
|
||||
tunnelzone_name => 'tzonefuel'
|
||||
}
|
@ -1,93 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: midonet-install-agent.pp')
|
||||
|
||||
# Extract data from hiera
|
||||
$midonet_settings = hiera('midonet')
|
||||
$net_metadata = hiera_hash('network_metadata')
|
||||
$neutron_config = hiera_hash('quantum_settings')
|
||||
$segmentation_type = $neutron_config['L2']['segmentation_type']
|
||||
$nsdb_hash = get_nodes_hash_by_roles($net_metadata, ['nsdb'])
|
||||
$nsdb_mgmt_ips = get_node_to_ipaddr_map_by_network_role($nsdb_hash, 'management')
|
||||
$zoo_ips_hash = generate_api_zookeeper_ips(values($nsdb_mgmt_ips))
|
||||
$api_ip = hiera('management_vip')
|
||||
$access_data = hiera_hash('access')
|
||||
$username = $access_data['user']
|
||||
$password = $access_data['password']
|
||||
$tenant_name = $access_data['tenant']
|
||||
$mem = $midonet_settings['mem']
|
||||
$mem_user = $midonet_settings['mem_repo_user']
|
||||
$mem_password = $midonet_settings['mem_repo_password']
|
||||
$metadata_hash = hiera_hash('quantum_settings', {})
|
||||
$metadata_secret = pick($metadata_hash['metadata']['metadata_proxy_shared_secret'], 'root')
|
||||
|
||||
|
||||
$ovsdb_service_name = $operatingsystem ? {
|
||||
'CentOS' => 'openvswitch',
|
||||
'Ubuntu' => 'openvswitch-switch'
|
||||
}
|
||||
|
||||
$openvswitch_package_neutron = $operatingsystem ? {
|
||||
'CentOS' => 'openstack-neutron-openvswitch',
|
||||
'Ubuntu' => 'neutron-plugin-openvswitch-agent'
|
||||
}
|
||||
|
||||
$openvswitch_package = $operatingsystem ? {
|
||||
'CentOS' => 'openvswitch',
|
||||
'Ubuntu' => 'openvswitch-switch'
|
||||
}
|
||||
|
||||
package {$openvswitch_package_neutron:
|
||||
ensure => purged
|
||||
} ->
|
||||
|
||||
package {$openvswitch_package:
|
||||
ensure => purged
|
||||
} ->
|
||||
|
||||
class {'::midonet::agent':
|
||||
zookeeper_hosts => $zoo_ips_hash,
|
||||
is_mem => $mem,
|
||||
mem_username => $mem_user,
|
||||
mem_password => $mem_password,
|
||||
metadata_port => '8775',
|
||||
shared_secret => $metadata_secret,
|
||||
controller_host => $api_ip
|
||||
} ->
|
||||
|
||||
class {'::midonet::cli':
|
||||
api_endpoint => "http://${api_ip}:8181/midonet-api",
|
||||
username => $username,
|
||||
password => $password,
|
||||
tenant_name => $tenant_name,
|
||||
}
|
||||
|
||||
# Firewall rule to allow the udp port used for vxlan tunnelling of overlay
|
||||
# traffic from midolman hosts to other midolman hosts.
|
||||
|
||||
class { 'firewall': }
|
||||
|
||||
if $segmentation_type =='tun' {
|
||||
firewall {'6677 vxlan port':
|
||||
port => '6677',
|
||||
proto => 'udp',
|
||||
action => 'accept',
|
||||
}
|
||||
}
|
||||
|
||||
exec {'/usr/bin/mm-dpctl --delete-dp ovs-system':
|
||||
path => '/usr/bin:/usr/sbin:/bin',
|
||||
onlyif => '/usr/bin/mm-dpctl --show-dp ovs-system',
|
||||
require => Class['::midonet::agent']
|
||||
}
|
@ -1,93 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: midonet-install-analytics.pp')
|
||||
include ::stdlib
|
||||
|
||||
# Extract data from hiera
|
||||
$ssl_hash = hiera_hash('use_ssl', {})
|
||||
|
||||
$midonet_settings = hiera('midonet')
|
||||
$net_metadata = hiera_hash('network_metadata')
|
||||
$controllers_map = get_nodes_hash_by_roles($net_metadata, ['controller', 'primary-controller'])
|
||||
$controllers_mgmt_ips = get_node_to_ipaddr_map_by_network_role($controllers_map, 'management')
|
||||
$nsdb_hash = get_nodes_hash_by_roles($net_metadata, ['nsdb'])
|
||||
$nsdb_mgmt_ips = get_node_to_ipaddr_map_by_network_role($nsdb_hash, 'management')
|
||||
$zoo_ips_hash = generate_api_zookeeper_ips(values($nsdb_mgmt_ips))
|
||||
$management_vip = hiera('management_vip')
|
||||
$public_vip = hiera('public_vip')
|
||||
$keystone_data = hiera_hash('keystone')
|
||||
$access_data = hiera_hash('access')
|
||||
$public_ssl_hash = hiera('public_ssl')
|
||||
$cass_ips = values($nsdb_mgmt_ips)
|
||||
$mem = $midonet_settings['mem']
|
||||
$admin_identity_protocol = get_ssl_property($ssl_hash, {}, 'keystone', 'admin', 'protocol', 'http')
|
||||
$metadata_hash = hiera_hash('quantum_settings', {})
|
||||
$metadata_secret = pick($metadata_hash['metadata']['metadata_proxy_shared_secret'], 'root')
|
||||
|
||||
$ana_hash = get_nodes_hash_by_roles($net_metadata, ['midonet-analytics'])
|
||||
$ana_mgmt_ip_hash = get_node_to_ipaddr_map_by_network_role($ana_hash, 'management')
|
||||
$ana_mgmt_ip_list = values($ana_mgmt_ip_hash)
|
||||
$ana_keys = keys($ana_hash)
|
||||
|
||||
$ana_mgmt_ip = empty($ana_keys)? {true => $public_vip , default => $ana_mgmt_ip_list[0] }
|
||||
|
||||
$midonet_version = $midonet_settings['midonet_version']
|
||||
|
||||
$nodes_hash = hiera('nodes')
|
||||
$node = filter_nodes($nodes_hash, 'fqdn', $::fqdn)
|
||||
$priv_ip = $node[0]['internal_address']
|
||||
$priv_netmask = $node[0]['internal_netmask']
|
||||
$pub_ip = $node[0]['public_address']
|
||||
#Add MEM analytics class
|
||||
class {'midonet::analytics':
|
||||
zookeeper_hosts => $zoo_ips_hash,
|
||||
is_mem => true,
|
||||
manage_repo => false,
|
||||
heap_size_gb => '3',
|
||||
midonet_version => $midonet_version,
|
||||
elk_bind_ip => $priv_ip,
|
||||
elk_hosts => $ana_mgmt_ip_list
|
||||
}
|
||||
|
||||
class { 'firewall': }
|
||||
|
||||
firewall {'507 Midonet elk 1':
|
||||
port => '9200',
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
}
|
||||
|
||||
firewall {'508 Midonet clio':
|
||||
port => '5000',
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
}
|
||||
|
||||
firewall {'509 Midonet flow history':
|
||||
port => '5001',
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
}
|
||||
|
||||
firewall {'520 Midonet elk 2':
|
||||
port => '9300',
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
}
|
||||
|
||||
firewall {'520 Midonet elk 3':
|
||||
port => '5005',
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
}
|
@ -1,129 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: midonet-install-cluster.pp')
|
||||
# Extract data from hiera
|
||||
$ssl_hash = hiera_hash('use_ssl', {})
|
||||
$midonet_settings = hiera('midonet')
|
||||
$net_metadata = hiera_hash('network_metadata')
|
||||
$controllers_map = get_nodes_hash_by_roles($net_metadata, ['controller', 'primary-controller'])
|
||||
$controllers_mgmt_ips = get_node_to_ipaddr_map_by_network_role($controllers_map, 'management')
|
||||
$nsdb_hash = get_nodes_hash_by_roles($net_metadata, ['nsdb'])
|
||||
$nsdb_mgmt_ips = get_node_to_ipaddr_map_by_network_role($nsdb_hash, 'management')
|
||||
$zoo_ips_hash = generate_api_zookeeper_ips(values($nsdb_mgmt_ips))
|
||||
$management_vip = hiera('management_vip')
|
||||
$public_vip = hiera('public_vip')
|
||||
$keystone_data = hiera_hash('keystone')
|
||||
$access_data = hiera_hash('access')
|
||||
$public_ssl_hash = hiera('public_ssl')
|
||||
$cass_ips = values($nsdb_mgmt_ips)
|
||||
$mem = $midonet_settings['mem']
|
||||
$admin_identity_protocol = get_ssl_property($ssl_hash, {}, 'keystone', 'admin', 'protocol', 'http')
|
||||
$metadata_hash = hiera_hash('quantum_settings', {})
|
||||
$metadata_secret = pick($metadata_hash['metadata']['metadata_proxy_shared_secret'], 'root')
|
||||
$ana_hash = get_nodes_hash_by_roles($net_metadata, ['midonet-analytics'])
|
||||
$ana_mgmt_ip_hash = get_node_to_ipaddr_map_by_network_role($ana_hash, 'management')
|
||||
$ana_mgmt_ip_list = values($ana_mgmt_ip_hash)
|
||||
$ana_keys = keys($ana_hash)
|
||||
$ana_mgmt_ip = empty($ana_keys)? {true => $public_vip , default => $ana_mgmt_ip_list[0] }
|
||||
$insights = $midonet_settings['mem_insights']
|
||||
|
||||
$midonet_version = $midonet_settings['midonet_version']
|
||||
|
||||
$nodes_hash = hiera('nodes')
|
||||
$node = filter_nodes($nodes_hash, 'fqdn', $::fqdn)
|
||||
$priv_ip = $node[0]['internal_address']
|
||||
$priv_netmask = $node[0]['internal_netmask']
|
||||
$pub_ip = $node[0]['public_address']
|
||||
|
||||
|
||||
include ::stdlib
|
||||
class {'::midonet::cluster':
|
||||
is_mem => $mem,
|
||||
zookeeper_hosts => $zoo_ips_hash,
|
||||
cassandra_servers => $cass_ips,
|
||||
cassandra_rep_factor => size($nsdb_hash),
|
||||
keystone_host => $management_vip,
|
||||
keystone_admin_token => $keystone_data['admin_token'],
|
||||
keystone_tenant_name => $access_data['tenant'],
|
||||
keystone_protocol => $admin_identity_protocol,
|
||||
cluster_port => '8181',
|
||||
is_insights => $insights,
|
||||
analytics_ip => $ana_mgmt_ip,
|
||||
max_heap_size => '2048M',
|
||||
heap_newsize => '1024M',
|
||||
midonet_version => $midonet_version,
|
||||
endpoint_host => $priv_ip,
|
||||
endpoint_port => '8999',
|
||||
elk_seeds => join($ana_mgmt_ip_list,','),
|
||||
elk_target_endpoint => generate_cidr_from_ip_netlength("${priv_ip} ${priv_netmask}"),
|
||||
jarvis_enabled => false,
|
||||
state_proxy_address => $priv_ip
|
||||
}
|
||||
# HA proxy configuration
|
||||
Haproxy::Service { use_include => true }
|
||||
Haproxy::Balancermember { use_include => true }
|
||||
Openstack::Ha::Haproxy_service {
|
||||
server_names => keys($controllers_mgmt_ips),
|
||||
ipaddresses => values($controllers_mgmt_ips),
|
||||
public_virtual_ip => $public_vip,
|
||||
internal_virtual_ip => $management_vip,
|
||||
}
|
||||
openstack::ha::haproxy_service { 'midonetcluster':
|
||||
order => 199,
|
||||
listen_port => 8181,
|
||||
balancermember_port => 8181,
|
||||
define_backups => true,
|
||||
before_start => true,
|
||||
public => true,
|
||||
haproxy_config_options => {
|
||||
'balance' => 'roundrobin',
|
||||
'option' => ['httplog'],
|
||||
},
|
||||
balancermember_options => 'check',
|
||||
}
|
||||
exec { 'haproxy reload':
|
||||
command => 'export OCF_ROOT="/usr/lib/ocf"; (ip netns list | grep haproxy) && ip netns exec haproxy /usr/lib/ocf/resource.d/fuel/ns_haproxy reload',
|
||||
path => '/usr/bin:/usr/sbin:/bin:/sbin',
|
||||
logoutput => true,
|
||||
provider => 'shell',
|
||||
tries => 10,
|
||||
try_sleep => 10,
|
||||
returns => [0, ''],
|
||||
}
|
||||
Haproxy::Listen <||> -> Exec['haproxy reload']
|
||||
Haproxy::Balancermember <||> -> Exec['haproxy reload']
|
||||
class { 'firewall': }
|
||||
firewall {'502 Midonet cluster':
|
||||
port => '8181',
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
}
|
||||
|
||||
firewall {'503 Midonet cluster state proxy':
|
||||
port => '2346',
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
}
|
||||
|
||||
firewall {'511 Midonet cluster unified endpoint':
|
||||
port => '8999',
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
}
|
||||
|
||||
firewall {'521 Midonet flow history':
|
||||
port => '5001',
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: midonet-install-haveged.pp')
|
||||
|
||||
package { 'haveged':
|
||||
ensure => present,
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: midonet-install-java8.pp')
|
||||
|
||||
class { '::midonet_openstack::profile::midojava::midojava':
|
||||
}
|
@ -1,273 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: midonet-install-mem.pp')
|
||||
include ::stdlib
|
||||
# Extract data from hiera
|
||||
$ssl_hash = hiera_hash('use_ssl', {})
|
||||
$midonet_settings = hiera('midonet')
|
||||
$net_metadata = hiera_hash('network_metadata')
|
||||
$controllers_map = get_nodes_hash_by_roles($net_metadata, ['controller', 'primary-controller'])
|
||||
$controllers_mgmt_ips = get_node_to_ipaddr_map_by_network_role($controllers_map, 'management')
|
||||
$nsdb_hash = get_nodes_hash_by_roles($net_metadata, ['nsdb'])
|
||||
$nsdb_mgmt_ips = get_node_to_ipaddr_map_by_network_role($nsdb_hash, 'management')
|
||||
$zoo_ips_hash = generate_api_zookeeper_ips(values($nsdb_mgmt_ips))
|
||||
$management_vip = hiera('management_vip')
|
||||
$public_vip = hiera('public_vip')
|
||||
$keystone_data = hiera_hash('keystone')
|
||||
$access_data = hiera_hash('access')
|
||||
$public_ssl_hash = hiera('public_ssl')
|
||||
$cass_ips = values($nsdb_mgmt_ips)
|
||||
$mem = $midonet_settings['mem']
|
||||
$admin_identity_protocol = get_ssl_property($ssl_hash, {}, 'keystone', 'admin', 'protocol', 'http')
|
||||
$metadata_hash = hiera_hash('quantum_settings', {})
|
||||
$metadata_secret = pick($metadata_hash['metadata']['metadata_proxy_shared_secret'], 'root')
|
||||
$ana_hash = get_nodes_hash_by_roles($net_metadata, ['midonet-analytics'])
|
||||
$ana_mgmt_ip_hash = get_node_to_ipaddr_map_by_network_role($ana_hash, 'management')
|
||||
$ana_mgmt_ip_list = values($ana_mgmt_ip_hash)
|
||||
$ana_keys = keys($ana_hash)
|
||||
$ana_mgmt_ip = empty($ana_keys)? {true => $public_vip , default => $ana_mgmt_ip_list[0] }
|
||||
$ssl_horizon = $public_ssl_hash['horizon']
|
||||
$is_insights = $midonet_settings['mem_insights']
|
||||
|
||||
$midonet_version = $midonet_settings['midonet_version']
|
||||
$new_api = versioncmp($midonet_version,'5.2') ? {'1' => true, default => false}
|
||||
|
||||
service { 'apache2':
|
||||
ensure => running,
|
||||
enable => true,
|
||||
hasrestart => true,
|
||||
hasstatus => true,
|
||||
}
|
||||
#Add MEM manager class
|
||||
class {'midonet::mem':
|
||||
cluster_ip => $public_vip,
|
||||
analytics_ip => $public_vip,
|
||||
is_insights => $is_insights,
|
||||
mem_api_port => '',
|
||||
mem_trace_port => '',
|
||||
mem_analytics_port => '',
|
||||
mem_subscription_port => '',
|
||||
mem_fabric_port => '',
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($public_ssl_hash['horizon'])
|
||||
{
|
||||
exec { 'https override':
|
||||
command => "sed -i 's/http:/https:/g' /var/www/html/midonet-manager/config/client.js",
|
||||
path => '/usr/bin:/usr/sbin:/bin:/sbin',
|
||||
logoutput => true,
|
||||
provider => 'shell',
|
||||
tries => 10,
|
||||
try_sleep => 10,
|
||||
returns => [0, ''],
|
||||
require => File['midonet-manager-config']
|
||||
}
|
||||
exec { 'wss override':
|
||||
command => "sed -i 's/ws:/wss:/g' /var/www/html/midonet-manager/config/client.js",
|
||||
path => '/usr/bin:/usr/sbin:/bin:/sbin',
|
||||
logoutput => true,
|
||||
provider => 'shell',
|
||||
tries => 10,
|
||||
try_sleep => 10,
|
||||
returns => [0, ''],
|
||||
require => File['midonet-manager-config']
|
||||
}
|
||||
}
|
||||
else {
|
||||
exec { 'wss override':
|
||||
command => "sed -i 's/wss:/ws:/g' /var/www/html/midonet-manager/config/client.js",
|
||||
path => '/usr/bin:/usr/sbin:/bin:/sbin',
|
||||
logoutput => true,
|
||||
provider => 'shell',
|
||||
tries => 10,
|
||||
try_sleep => 10,
|
||||
returns => [0, ''],
|
||||
require => File['midonet-manager-config']
|
||||
}
|
||||
}
|
||||
exec { 'a2enmod headers':
|
||||
path => '/usr/bin:/usr/sbin:/bin',
|
||||
alias => 'enable-mod-headers',
|
||||
creates => '/etc/apache2/mods-enabled/headers.load',
|
||||
notify => Service['apache2'],
|
||||
tag => 'a2enmod-mem'
|
||||
}
|
||||
exec { 'a2enmod proxy':
|
||||
path => '/usr/bin:/usr/sbin:/bin',
|
||||
alias => 'enable-mod-proxy',
|
||||
creates => '/etc/apache2/mods-enabled/proxy.load',
|
||||
notify => Service['apache2'],
|
||||
tag => 'a2enmod-mem'
|
||||
}
|
||||
exec { 'a2enmod proxy_http':
|
||||
path => '/usr/bin:/usr/sbin:/bin',
|
||||
alias => 'enable-mod-proxy-http',
|
||||
creates => '/etc/apache2/mods-enabled/proxy_http.load',
|
||||
notify => Service['apache2'],
|
||||
tag => 'a2enmod-mem'
|
||||
}
|
||||
exec { 'a2enmod proxy_wstunnel':
|
||||
path => '/usr/bin:/usr/sbin:/bin',
|
||||
alias => 'enable-mod-proxy-wstunnel',
|
||||
creates => '/etc/apache2/mods-enabled/proxy_wstunnel.load',
|
||||
notify => Service['apache2'],
|
||||
tag => 'a2enmod-mem'
|
||||
}
|
||||
exec { 'a2enmod ssl':
|
||||
path => '/usr/bin:/usr/sbin:/bin',
|
||||
alias => 'enable-mod-ssl',
|
||||
creates => '/etc/apache2/mods-enabled/ssl.load',
|
||||
notify => Service['apache2'],
|
||||
tag => 'a2enmod-mem'
|
||||
}
|
||||
file { 'mem-vhost':
|
||||
ensure => present,
|
||||
path => '/etc/apache2/sites-available/30-midonet-mem.conf',
|
||||
content => template('/etc/fuel/plugins/midonet-9.2/puppet/templates/vhost_mem_manager.erb'),
|
||||
}
|
||||
exec { 'a2ensite 30-midonet-mem':
|
||||
path => '/usr/bin:/usr/sbin:/bin',
|
||||
alias => 'enable-mem-vhost',
|
||||
creates => '/etc/apache2/sites-enabled/30-midonet-mem.conf',
|
||||
notify => Service['apache2'],
|
||||
}
|
||||
Exec<| tag == 'a2enmod-mem' |>
|
||||
-> File['mem-vhost']
|
||||
-> Exec['a2ensite 30-midonet-mem']
|
||||
if ($is_insights)
|
||||
{
|
||||
if($new_api)
|
||||
{
|
||||
Haproxy::Service { use_include => true }
|
||||
Haproxy::Balancermember { use_include => true }
|
||||
Openstack::Ha::Haproxy_service {
|
||||
server_names => keys($controllers_mgmt_ips),
|
||||
ipaddresses => values($controllers_mgmt_ips),
|
||||
public_virtual_ip => $public_vip,
|
||||
internal_virtual_ip => $management_vip,
|
||||
}
|
||||
openstack::ha::haproxy_service { 'midonetunified':
|
||||
order => 200,
|
||||
listen_port => 8999,
|
||||
balancermember_port => 8999,
|
||||
define_backups => true,
|
||||
before_start => true,
|
||||
public => true,
|
||||
haproxy_config_options => {
|
||||
'balance' => 'roundrobin',
|
||||
'option' => ['httplog'],
|
||||
},
|
||||
balancermember_options => 'check',
|
||||
}
|
||||
class { 'firewall': }
|
||||
firewall {'504 Midonet Unified Endpoint':
|
||||
port => '8999',
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Haproxy::Service { use_include => true }
|
||||
Haproxy::Balancermember { use_include => true }
|
||||
Openstack::Ha::Haproxy_service {
|
||||
server_names => keys($controllers_mgmt_ips),
|
||||
ipaddresses => values($controllers_mgmt_ips),
|
||||
public_virtual_ip => $public_vip,
|
||||
internal_virtual_ip => $management_vip,
|
||||
}
|
||||
openstack::ha::haproxy_service { 'midonetsubscriptions':
|
||||
order => 200,
|
||||
listen_port => 8007,
|
||||
balancermember_port => 8007,
|
||||
define_backups => true,
|
||||
before_start => true,
|
||||
public => true,
|
||||
haproxy_config_options => {
|
||||
'balance' => 'roundrobin',
|
||||
'option' => ['httplog'],
|
||||
},
|
||||
balancermember_options => 'check',
|
||||
}
|
||||
openstack::ha::haproxy_service { 'midonettrace':
|
||||
order => 201,
|
||||
listen_port => 8460,
|
||||
balancermember_port => 8460,
|
||||
define_backups => true,
|
||||
before_start => true,
|
||||
public => true,
|
||||
haproxy_config_options => {
|
||||
'balance' => 'roundrobin',
|
||||
'option' => ['httplog'],
|
||||
},
|
||||
balancermember_options => 'check',
|
||||
}
|
||||
openstack::ha::haproxy_service { 'midonetfabric':
|
||||
order => 202,
|
||||
listen_port => 8009,
|
||||
balancermember_port => 8009,
|
||||
define_backups => true,
|
||||
before_start => true,
|
||||
public => true,
|
||||
haproxy_config_options => {
|
||||
'balance' => 'roundrobin',
|
||||
'option' => ['httplog'],
|
||||
},
|
||||
balancermember_options => 'check',
|
||||
}
|
||||
class { 'firewall': }
|
||||
firewall {'504 Midonet subscription':
|
||||
port => '8007',
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
}
|
||||
firewall {'505 Midonet trace':
|
||||
port => '8460',
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
}
|
||||
firewall {'506 Midonet fabric':
|
||||
port => '8009',
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
}
|
||||
}
|
||||
# HA proxy configuration
|
||||
|
||||
file_line { 'Update tunnel timeout on haproxy':
|
||||
path => '/etc/haproxy/haproxy.cfg',
|
||||
line => ' timeout tunnel 3600s',
|
||||
after => ' timeout check'
|
||||
}
|
||||
|
||||
exec { 'haproxy reload':
|
||||
command => 'export OCF_ROOT="/usr/lib/ocf"; (ip netns list | grep haproxy) && ip netns exec haproxy /usr/lib/ocf/resource.d/fuel/ns_haproxy reload',
|
||||
path => '/usr/bin:/usr/sbin:/bin:/sbin',
|
||||
logoutput => true,
|
||||
provider => 'shell',
|
||||
tries => 10,
|
||||
try_sleep => 10,
|
||||
returns => [0, ''],
|
||||
}
|
||||
Haproxy::Listen <||> ->
|
||||
File_line['Update tunnel timeout on haproxy'] ->
|
||||
Exec['haproxy reload']
|
||||
|
||||
Haproxy::Balancermember <||> ->
|
||||
File_line['Update tunnel timeout on haproxy'] ->
|
||||
Exec['haproxy reload']
|
||||
|
||||
}
|
@ -1,72 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: midonet-mem-horizon-override.pp')
|
||||
include ::stdlib
|
||||
|
||||
service { 'apache2':
|
||||
ensure => running,
|
||||
enable => true,
|
||||
hasrestart => true,
|
||||
hasstatus => true,
|
||||
}
|
||||
|
||||
file_line { 'vhost horizon start':
|
||||
ensure => absent,
|
||||
path => '/etc/apache2/sites-enabled/horizon_vhost.conf',
|
||||
line => '# disabled by puppet',
|
||||
match => '^\<VirtualHost.*',
|
||||
match_for_absence => true,
|
||||
replace => false
|
||||
} ->
|
||||
|
||||
file_line { 'dont aggresively redirect horizon':
|
||||
ensure => absent,
|
||||
path => '/etc/apache2/sites-enabled/horizon_vhost.conf',
|
||||
line => '# disabled by puppet',
|
||||
match => '^\ \ RedirectMatch.*',
|
||||
match_for_absence => true,
|
||||
replace => false
|
||||
} ->
|
||||
|
||||
file_line { 'dont set servername again for horizon':
|
||||
ensure => absent,
|
||||
path => '/etc/apache2/sites-enabled/horizon_vhost.conf',
|
||||
line => '# disabled by puppet',
|
||||
match => '^\ \ ServerName.*',
|
||||
match_for_absence => true,
|
||||
replace => false
|
||||
} ->
|
||||
|
||||
file_line { 'dont set serveralias again for horizon':
|
||||
ensure => absent,
|
||||
path => '/etc/apache2/sites-enabled/horizon_vhost.conf',
|
||||
line => '# disabled by puppet',
|
||||
match => '^\ \ ServerAlias.*',
|
||||
match_for_absence => true,
|
||||
replace => false
|
||||
} ->
|
||||
|
||||
file_line { 'remove closing horizon vhost':
|
||||
ensure => absent,
|
||||
path => '/etc/apache2/sites-enabled/horizon_vhost.conf',
|
||||
line => '# disabled by puppet',
|
||||
match => '^\<\/VirtualHost.*',
|
||||
match_for_absence => true,
|
||||
replace => false,
|
||||
notify => Service['apache2']
|
||||
} ->
|
||||
|
||||
file { '/var/www/html/index.html':
|
||||
ensure => absent
|
||||
}
|
@ -1,161 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: midonet-neutron-configure.pp')
|
||||
|
||||
# Neutron data
|
||||
$amqp_port = '5673'
|
||||
$rabbit_hash = hiera('rabbit', {})
|
||||
$management_vip = hiera('management_vip')
|
||||
$service_endpoint = hiera('service_endpoint', $management_vip)
|
||||
$neutron_config = hiera('quantum_settings')
|
||||
$neutron_db_password = $neutron_config['database']['passwd']
|
||||
$neutron_user_password = $neutron_config['keystone']['admin_password']
|
||||
|
||||
$neutron_username = pick($neutron_config['keystone']['admin_user'], 'neutron')
|
||||
$neutron_project_name = pick($neutron_config['keystone']['admin_tenant'], 'services')
|
||||
$region_name = hiera('region', 'RegionOne')
|
||||
$auth_endpoint_type = 'internalURL'
|
||||
|
||||
$ssl_hash = hiera_hash('use_ssl', {})
|
||||
|
||||
$internal_auth_protocol = get_ssl_property($ssl_hash, {}, 'keystone', 'internal', 'protocol', 'http')
|
||||
$internal_auth_endpoint = get_ssl_property($ssl_hash, {}, 'keystone', 'internal', 'hostname', [$service_endpoint, $management_vip])
|
||||
|
||||
# Neutron plugin data
|
||||
$access_data = hiera_hash('access')
|
||||
$username = $access_data['user']
|
||||
$password = $access_data['password']
|
||||
$tenant_name = $access_data['tenant']
|
||||
|
||||
$openstack_network_hash = hiera_hash('openstack_network', { })
|
||||
$use_syslog = hiera('use_syslog', true)
|
||||
$use_stderr = hiera('use_stderr', false)
|
||||
$verbose = pick($openstack_network_hash['verbose'], hiera('verbose', true))
|
||||
|
||||
$primary_ctrl = hiera('primary_controller')
|
||||
|
||||
|
||||
# Unfortunately, core_plugin in the 'openstack-network-common-config'
|
||||
# task is hardcoded. The core_plugin value for midonet is overrided
|
||||
# in hiera file, so running again class{'::neutron'} should modify
|
||||
# the core_plugin value in /etc/neutron/neutron.conf.
|
||||
# Same goes for service_plugins
|
||||
#
|
||||
# Hoping that Fuel will make the core plugin configurable and we
|
||||
# can remove this step
|
||||
class {'::neutron':
|
||||
verbose => $verbose,
|
||||
debug => false,
|
||||
use_syslog => $use_syslog,
|
||||
use_stderr => $use_stderr,
|
||||
log_facility => 'LOG_USER',
|
||||
base_mac => 'fa:16:3e:00:00:00',
|
||||
allow_overlapping_ips => true,
|
||||
mac_generation_retries => '32',
|
||||
dhcp_agent_notification => false,
|
||||
report_interval => '10',
|
||||
rabbit_user => $rabbit_hash['user'],
|
||||
rabbit_host => ['localhost'],
|
||||
rabbit_hosts => split(hiera('amqp_hosts', ''), ','),
|
||||
rabbit_port => '5672',
|
||||
rabbit_password => $rabbit_hash['password'],
|
||||
kombu_reconnect_delay => '5.0',
|
||||
network_device_mtu => undef,
|
||||
advertise_mtu => true
|
||||
} ->
|
||||
|
||||
# NOTE: Don't comment these lines. Since we have changed the name
|
||||
# of the package, we are trying to get rid of this restriction:
|
||||
# https://github.com/openstack/puppet-neutron/blob/7.0.0/manifests/plugins/midonet.pp#L108
|
||||
package {'python-neutron-plugin-midonet':
|
||||
ensure => absent
|
||||
}
|
||||
|
||||
file {'/etc/default/neutron-server':
|
||||
ensure => present,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644'
|
||||
} ->
|
||||
class { '::midonet::neutron_plugin':
|
||||
midonet_api_ip => $service_endpoint,
|
||||
midonet_api_port => '8181',
|
||||
keystone_username => $username,
|
||||
keystone_password => $password,
|
||||
keystone_tenant => $tenant_name,
|
||||
sync_db => $primary_ctrl ? {true => true,default => false},
|
||||
}
|
||||
|
||||
|
||||
class { '::neutron::server':
|
||||
sync_db => $primary_ctrl ? {true => 'primary',default => 'slave'},
|
||||
|
||||
username => $neutron_username,
|
||||
password => $neutron_user_password,
|
||||
|
||||
auth_uri => "${internal_auth_protocol}://${internal_auth_endpoint}:5000/",
|
||||
auth_url => "${internal_auth_protocol}://${internal_auth_endpoint}:35357/",
|
||||
|
||||
region_name => $region_name,
|
||||
project_name => $neutron_project_name,
|
||||
|
||||
database_retry_interval => 2,
|
||||
database_connection => "mysql://${neutron_username}:${neutron_db_password}@${service_endpoint}/neutron?&read_timeout=60",
|
||||
database_max_retries => -1,
|
||||
|
||||
agent_down_time => 15,
|
||||
|
||||
api_workers => min($::processorcount + 0, 50 + 0),
|
||||
rpc_workers => 0,
|
||||
}
|
||||
|
||||
if !defined(Neutron_config['service_providers/service_provider'])
|
||||
{
|
||||
# The version of puppet-neutron included in Fuel 9 doesnt allow passing in service_providers option
|
||||
# so let's override it directly
|
||||
neutron_config {
|
||||
'service_providers/service_provider': value => ['LOADBALANCER:Midonet:midonet.neutron.services.loadbalancer.driver.MidonetLoadbalancerDriver:default']
|
||||
}
|
||||
Class['::midonet::neutron_plugin'] -> Neutron_config['service_providers/service_providers'] -> Service['neutron-server']
|
||||
}
|
||||
|
||||
Neutron_config<| title == 'service_providers/service_provider' |> {
|
||||
value => ['LOADBALANCER:Midonet:midonet.neutron.services.loadbalancer.driver.MidonetLoadbalancerDriver:default']
|
||||
}
|
||||
|
||||
|
||||
# Nova notifications needed data
|
||||
$nova_endpoint = hiera('nova_endpoint', $management_vip)
|
||||
$nova_hash = hiera_hash('nova', {})
|
||||
$nova_internal_protocol = get_ssl_property($ssl_hash, {}, 'nova', 'internal', 'protocol', 'http')
|
||||
$nova_internal_endpoint = get_ssl_property($ssl_hash, {}, 'nova', 'internal', 'hostname', [$nova_endpoint])
|
||||
$admin_auth_protocol = get_ssl_property($ssl_hash, {}, 'keystone', 'admin', 'protocol', 'http')
|
||||
$admin_auth_endpoint = get_ssl_property($ssl_hash, {}, 'keystone', 'admin', 'hostname', [$service_endpoint, $management_vip])
|
||||
|
||||
# Actual attributes
|
||||
$nova_url = "${nova_internal_protocol}://${nova_internal_endpoint}:8774/v2"
|
||||
$nova_admin_auth_url = "${admin_auth_protocol}://${admin_auth_endpoint}:35357/"
|
||||
$nova_auth_user = pick($nova_hash['user'], 'nova')
|
||||
$nova_auth_tenant = pick($nova_hash['tenant'], 'services')
|
||||
$nova_auth_password = $nova_hash['user_password']
|
||||
$auth_region = hiera('region', 'RegionOne')
|
||||
|
||||
class { 'neutron::server::notifications':
|
||||
nova_url => $nova_url,
|
||||
auth_url => $nova_admin_auth_url,
|
||||
username => $nova_auth_user,
|
||||
tenant_name => $nova_auth_tenant,
|
||||
password => $nova_auth_password,
|
||||
region_name => $auth_region,
|
||||
}
|
@ -1,84 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: midonet-neutron-networks.pp')
|
||||
|
||||
# Extract data from hiera
|
||||
$access_data = hiera_hash('access')
|
||||
$keystone_admin_tenant = $access_data['tenant']
|
||||
$net_metadata = hiera_hash('network_metadata')
|
||||
$neutron_settings = hiera('neutron_config')
|
||||
$external_net_name = $neutron_settings['default_floating_net']
|
||||
$tenant_net_name = $neutron_settings['default_private_net']
|
||||
$predefined_nets = $neutron_settings['predefined_networks']
|
||||
$tenant_net = $predefined_nets[$tenant_net_name]
|
||||
$external_net = $predefined_nets[$external_net_name]
|
||||
|
||||
# Plugin settings data (overrides $external_net l3 values)
|
||||
$midonet_settings = hiera_hash('midonet')
|
||||
$tz_type = $midonet_settings['tunnel_type']
|
||||
$floating_range_start = $midonet_settings['floating_ip_range_start']
|
||||
$floating_range_end = $midonet_settings['floating_ip_range_end']
|
||||
$floating_cidr = $midonet_settings['floating_cidr']
|
||||
$floating_gateway_ip = $midonet_settings['gateway']
|
||||
|
||||
$allocation_pools = "start=${floating_range_start},end=${floating_range_end}"
|
||||
|
||||
service { 'neutron-server':
|
||||
ensure => running,
|
||||
}
|
||||
|
||||
neutron_network { $tenant_net_name:
|
||||
ensure => present,
|
||||
router_external => $tenant_net['L2']['router_ext'],
|
||||
tenant_name => $tenant_net['tenant'],
|
||||
shared => $tenant_net['shared']
|
||||
} ->
|
||||
|
||||
neutron_subnet { "${tenant_net_name}__subnet":
|
||||
ensure => present,
|
||||
cidr => $tenant_net['L3']['subnet'],
|
||||
network_name => $tenant_net_name,
|
||||
tenant_name => $tenant_net['tenant'],
|
||||
gateway_ip => $tenant_net['L3']['gateway'],
|
||||
enable_dhcp => $tenant_net['L3']['enable_dhcp'],
|
||||
dns_nameservers => $tenant_net['L3']['nameservers']
|
||||
} ->
|
||||
|
||||
neutron_network { $external_net_name:
|
||||
ensure => present,
|
||||
router_external => $external_net['L2']['router_ext'],
|
||||
tenant_name => $external_net['tenant'],
|
||||
shared => $external_net['shared']
|
||||
} ->
|
||||
|
||||
neutron_subnet { "${external_net_name}__subnet":
|
||||
ensure => present,
|
||||
cidr => $floating_cidr,
|
||||
network_name => $external_net_name,
|
||||
tenant_name => $external_net['tenant'],
|
||||
gateway_ip => $floating_gateway_ip,
|
||||
enable_dhcp => $external_net['L3']['enable_dhcp'],
|
||||
dns_nameservers => $external_net['L3']['nameservers'],
|
||||
allocation_pools => $allocation_pools
|
||||
} ->
|
||||
|
||||
neutron_router { 'mido_router':
|
||||
ensure => present,
|
||||
tenant_name => $external_net['tenant'],
|
||||
gateway_network_name => $external_net_name,
|
||||
} ->
|
||||
|
||||
neutron_router_interface { "mido_router:${tenant_net_name}__subnet":
|
||||
ensure => present,
|
||||
}
|
@ -1,88 +0,0 @@
|
||||
# Copyright 2015 Midokura SARL.
|
||||
#
|
||||
# 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: midonet-nsdb.pp')
|
||||
|
||||
# Extract data from hiera
|
||||
$fuel_settings = parseyaml($astute_settings_yaml)
|
||||
$net_metadata = hiera_hash('network_metadata')
|
||||
$nsdb_map = get_nodes_hash_by_roles($net_metadata, ['nsdb'])
|
||||
$zoo_hash = generate_zookeeper_hash($nsdb_map)
|
||||
$nsdb_mgmt_map = get_node_to_ipaddr_map_by_network_role($nsdb_map, 'management')
|
||||
|
||||
class { '::midonet_openstack::profile::midojava::midojava':}
|
||||
contain '::midonet_openstack::profile::midojava::midojava'
|
||||
|
||||
class { '::midonet_openstack::profile::zookeeper::midozookeeper':
|
||||
zk_servers => $zoo_hash['servers'],
|
||||
id => $zoo_hash["${::fqdn}"]['id'],
|
||||
client_ip => $zoo_hash["${::fqdn}"]['host'],
|
||||
require => File['/usr/java/default']
|
||||
}
|
||||
|
||||
class {'::midonet_openstack::profile::cassandra::midocassandra':
|
||||
seeds => join(values($nsdb_mgmt_map),','),
|
||||
seed_address => $zoo_hash["${::fqdn}"]['host'],
|
||||
require => File['/usr/java/default']
|
||||
}
|
||||
|
||||
class { 'firewall': }
|
||||
|
||||
firewall {'500 zookeeper ports':
|
||||
port => '2888-3888',
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
require => Class['::zookeeper']
|
||||
}
|
||||
|
||||
firewall {'501 zookeeper ports':
|
||||
port => '2181',
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
require => Class['::zookeeper']
|
||||
}
|
||||
|
||||
firewall {'550 cassandra ports':
|
||||
port => '9042',
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
require => Class['::cassandra']
|
||||
}
|
||||
|
||||
firewall {'551 cassandra ports':
|
||||
port => '7000',
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
require => Class['::cassandra']
|
||||
}
|
||||
|
||||
firewall {'552 cassandra ports':
|
||||
port => '7199',
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
require => Class['::cassandra']
|
||||
}
|
||||
|
||||
firewall {'553 cassandra ports':
|
||||
port => '9160',
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
require => Class['::cassandra']
|
||||
}
|
||||
|
||||
firewall {'554 cassandra ports':
|
||||
port => '59471',
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
require => Class['::cassandra']
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: midonet-override-hiera.pp')
|
||||
|
||||
$midonet_settings = hiera('midonet')
|
||||
$mem = $midonet_settings['mem']
|
||||
|
||||
file {'/etc/hiera/plugins/midonet.yaml':
|
||||
ensure => file,
|
||||
source => '/etc/fuel/plugins/midonet-9.2/puppet/files/midonet.yaml'
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
# Copyright 2015 Midokura SARL.
|
||||
#
|
||||
# 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: midonet-replace-guess-func.pp')
|
||||
|
||||
# NOTE: This replacement may be only needed on Ubuntu hosts
|
||||
file_line { 'replace_guess':
|
||||
path => '/usr/share/neutron-common/plugin_guess_func',
|
||||
match => '"neutron.plugins.midonet.plugin.MidonetPluginV2"',
|
||||
line => "\t\"midonet.neutron.plugin_v2.MidonetPluginV2\")",
|
||||
multiple => true
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: midonet-restart-agent.pp')
|
||||
|
||||
exec { 'service midolman restart':
|
||||
path => '/usr/bin:/usr/sbin:/sbin:/bin'
|
||||
} ->
|
||||
|
||||
exec { 'sleep 4':
|
||||
path => '/usr/bin:/usr/sbin:/sbin:/bin'
|
||||
} ->
|
||||
|
||||
exec { 'service midonet-jmxscraper restart':
|
||||
path => '/usr/bin:/usr/sbin:/sbin:/bin'
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
# Copyright 2016 Midokura, SARL.
|
||||
#
|
||||
# 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: midonet-restart-cluster.pp')
|
||||
|
||||
exec { 'service midonet-cluster restart':
|
||||
path => '/usr/bin:/usr/sbin:/sbin:/bin'
|
||||
} ->
|
||||
|
||||
exec { 'sleep 4':
|
||||
path => '/usr/bin:/usr/sbin:/sbin:/bin'
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
module Puppet::Parser::Functions
|
||||
newfunction(:filter_nodes, :type => :rvalue) do |args|
|
||||
name = args[1]
|
||||
value = args[2]
|
||||
args[0].select do |it|
|
||||
it[name] == value
|
||||
end
|
||||
end
|
||||
end
|
@ -1,27 +0,0 @@
|
||||
# Copyright 2015 Midokura SARL, 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.
|
||||
|
||||
module Puppet::Parser::Functions
|
||||
newfunction(:generate_api_zookeeper_ips, :type => :rvalue, :doc => <<-EOS
|
||||
This function returns Zookeper configuration hash
|
||||
EOS
|
||||
) do |argv|
|
||||
result = []
|
||||
nodes_hash = argv[0]
|
||||
nodes_hash.each do |zk_ip|
|
||||
result.push({'ip' => zk_ip})
|
||||
end
|
||||
return result
|
||||
end
|
||||
end
|
@ -1,36 +0,0 @@
|
||||
# Copyright 2015 Midokura SARL, 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.
|
||||
|
||||
require 'csv'
|
||||
require 'netaddr'
|
||||
|
||||
module Puppet::Parser::Functions
|
||||
newfunction(:generate_bgp_edge_port_hash, :type => :rvalue, :doc => <<-EOS
|
||||
This function generates a Hash to create the neutron subnet resources for BGP
|
||||
on the edge router
|
||||
EOS
|
||||
) do |argv|
|
||||
result = {}
|
||||
list_of_neighbors = argv[0].split(',')
|
||||
list_of_local_ips = list_of_neighbors.collect { |x| x.split('-')[0].split('/')[0] }.uniq
|
||||
list_of_local_ips.each do |localip|
|
||||
port_name = 'edge-port-' + localip.gsub('.','')
|
||||
result[port_name] = {
|
||||
'ip_address' => [[localip],['0.0.0.0']]
|
||||
}
|
||||
end
|
||||
|
||||
return result
|
||||
end
|
||||
end
|
@ -1,37 +0,0 @@
|
||||
# Copyright 2015 Midokura SARL, 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.
|
||||
|
||||
require 'csv'
|
||||
require 'netaddr'
|
||||
|
||||
module Puppet::Parser::Functions
|
||||
newfunction(:generate_bgp_edge_subnet_hash, :type => :rvalue, :doc => <<-EOS
|
||||
This function generates a Hash to create the neutron subnet resources for BGP
|
||||
on the edge router
|
||||
EOS
|
||||
) do |argv|
|
||||
result = {}
|
||||
list_of_neighbors = argv[0].split(',')
|
||||
list_of_neighbors.each do |neighbor|
|
||||
ip_netnl = neighbor.split('-')[0]
|
||||
cidr = NetAddr::CIDR.create(ip_netnl).to_s
|
||||
subnet_name = 'edge-subnet-' + cidr.gsub('.','').gsub("/","")
|
||||
result[subnet_name] = {
|
||||
'cidr' => NetAddr::CIDR.create(ip_netnl).to_s
|
||||
}
|
||||
end
|
||||
|
||||
return result
|
||||
end
|
||||
end
|
@ -1,42 +0,0 @@
|
||||
# Copyright 2015 Midokura SARL, 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.
|
||||
|
||||
require 'csv'
|
||||
require 'netaddr'
|
||||
|
||||
module Puppet::Parser::Functions
|
||||
newfunction(:generate_bgp_neighbors_for_gateway_bgp, :type => :rvalue, :doc => <<-EOS
|
||||
This function generates a Hash to create the neutron subnet resources for BGP
|
||||
on the edge router
|
||||
EOS
|
||||
) do |argv|
|
||||
result = []
|
||||
split_list_of_neighbors = argv[0].split(',')
|
||||
split_list_of_neighbors.each do |neighbor|
|
||||
split_neighbor = neighbor.split('-')
|
||||
remote_net = NetAddr::CIDR.create(split_neighbor[0]).to_s
|
||||
ip_address = split_neighbor[1]
|
||||
remote_asn = split_neighbor[2]
|
||||
result.push (
|
||||
{
|
||||
'ip_address' => ip_address,
|
||||
'remote_asn' => remote_asn,
|
||||
'remote_net' => remote_net
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
return result
|
||||
end
|
||||
end
|
@ -1,25 +0,0 @@
|
||||
# Copyright 2015 Midokura SARL, 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.
|
||||
|
||||
require 'netaddr'
|
||||
|
||||
module Puppet::Parser::Functions
|
||||
newfunction(:generate_cidr_from_ip_netlength, :type => :rvalue, :doc => <<-EOS
|
||||
This function returns BGP cidr CSV as an array
|
||||
EOS
|
||||
) do |argv|
|
||||
result = NetAddr::CIDR.create(argv[0]).to_s
|
||||
return result
|
||||
end
|
||||
end
|
@ -1,30 +0,0 @@
|
||||
# Copyright 2015 Midokura SARL, 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.
|
||||
|
||||
require 'csv'
|
||||
|
||||
module Puppet::Parser::Functions
|
||||
newfunction(:generate_fqdn_list, :type => :rvalue, :doc => <<-EOS
|
||||
This function returns a list of fqdns!
|
||||
EOS
|
||||
) do |argv|
|
||||
controllers_map = argv[0]
|
||||
result = ''
|
||||
controllers_map.each do |key,value|
|
||||
result << value['fqdn'] + ','
|
||||
end
|
||||
|
||||
return result.chop
|
||||
end
|
||||
end
|
@ -1,33 +0,0 @@
|
||||
# Copyright 2015 Midokura SARL, 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.
|
||||
|
||||
require 'csv'
|
||||
|
||||
module Puppet::Parser::Functions
|
||||
newfunction(:generate_port_bindings_to_delete, :type => :rvalue, :doc => <<-EOS
|
||||
This function returns the port bindings to delete for create_resources
|
||||
EOS
|
||||
) do |argv|
|
||||
controllers_map = argv[0]
|
||||
result = {}
|
||||
controllers_map.each do |key,value|
|
||||
port_name = 'port-static-' + argv[1]
|
||||
result[port_name] = {
|
||||
'binding_host_id' => argv[1]
|
||||
}
|
||||
end
|
||||
|
||||
return result
|
||||
end
|
||||
end
|
@ -1,32 +0,0 @@
|
||||
# Copyright 2015 Midokura SARL, 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.
|
||||
|
||||
require 'csv'
|
||||
|
||||
module Puppet::Parser::Functions
|
||||
newfunction(:generate_router_interfaces_list, :type => :rvalue, :doc => <<-EOS
|
||||
This function returns the port bindings to create to pass to the shell script
|
||||
Since you can't send an array to a bash script, let's send a CSV instead.
|
||||
EOS
|
||||
) do |argv|
|
||||
result = ''
|
||||
list_of_neighbors = argv[0].split(',')
|
||||
list_of_ports = list_of_neighbors.collect { |x| 'edge-port-' + x.split('-')[0].split('/')[0].gsub('.','') }.uniq
|
||||
list_of_ports.each do |port|
|
||||
result << port + ','
|
||||
end
|
||||
|
||||
return result.chop
|
||||
end
|
||||
end
|
@ -1,32 +0,0 @@
|
||||
# Copyright 2015 Midokura SARL, 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.
|
||||
|
||||
require 'csv'
|
||||
|
||||
module Puppet::Parser::Functions
|
||||
newfunction(:generate_router_interfaces_to_delete, :type => :rvalue, :doc => <<-EOS
|
||||
This function returns the port bindings to delete to pass to the shell script
|
||||
Since you can't send an array to a bash script, let's send a CSV instead.
|
||||
EOS
|
||||
) do |argv|
|
||||
controllers_map = argv[0]
|
||||
result = ''
|
||||
controllers_map.each do |key,value|
|
||||
port_name = 'port-static-' + argv[1]
|
||||
result << port_name + ','
|
||||
end
|
||||
|
||||
return result.chop
|
||||
end
|
||||
end
|
@ -1,36 +0,0 @@
|
||||
# Copyright 2015 Midokura SARL, 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.
|
||||
#
|
||||
module Puppet::Parser::Functions
|
||||
newfunction(:generate_zookeeper_hash, :type => :rvalue, :doc => <<-EOS
|
||||
This function returns Zookeper configuration hash
|
||||
EOS
|
||||
) do |argv|
|
||||
nodes_hash = argv[0]
|
||||
result = {}
|
||||
nodes_hash.each_with_index do |ctrl, index|
|
||||
result[ctrl[1]['fqdn']] = {
|
||||
'host' => ctrl[1]['network_roles']['management'],
|
||||
'id' => (index + 1).to_s,
|
||||
}
|
||||
end
|
||||
|
||||
result['servers'] = []
|
||||
nodes_hash.each do |ctrl|
|
||||
result['servers'] << ctrl[1]['network_roles']['management']
|
||||
end
|
||||
|
||||
return result
|
||||
end
|
||||
end
|
@ -1,19 +0,0 @@
|
||||
module Puppet::Parser::Functions
|
||||
newfunction(:get_node_by_fqdn, :type => :rvalue, :doc => <<-EOS
|
||||
Return a node (node names are keys) that match the fqdn.
|
||||
example:
|
||||
get_node_by_fqdn($network_metadata_hash, 'test.function.com')
|
||||
EOS
|
||||
) do |args|
|
||||
errmsg = "get_node_by_fqdn($network_metadata_hash, $fqdn)"
|
||||
n_metadata, fqdn = args
|
||||
raise(Puppet::ParseError, "#{errmsg}: 1st argument should be a hash") if !n_metadata.is_a?(Hash)
|
||||
raise(Puppet::ParseError, "#{errmsg}: 1st argument should be a valid network_metadata hash") if !n_metadata.has_key?('nodes')
|
||||
raise(Puppet::ParseError, "#{errmsg}: 2nd argument should be an string") if !fqdn.is_a?(String)
|
||||
nodes = n_metadata['nodes']
|
||||
# Using unrequired node_property bellow -- is a workaround for ruby 1.8
|
||||
mynode = nodes.reject {|node_name, node_property| fqdn != node_property['fqdn']}
|
||||
raise(Puppet::ArgumentError, "#{errmsg}: No matching node found") if mynode.empty?
|
||||
return mynode.values[0]
|
||||
end
|
||||
end
|
@ -1,34 +0,0 @@
|
||||
module Puppet::Parser::Functions
|
||||
newfunction(:loadyamlv2, :type => :rvalue, :arity => -2, :doc => <<-'ENDHEREDOC') do |args|
|
||||
Load a YAML file containing an array, string, or hash, and return the data
|
||||
in the corresponding native data type.
|
||||
The second parameter is the default value. It will be returned if the file
|
||||
was not found or could not be parsed.
|
||||
|
||||
For example:
|
||||
|
||||
$myhash = loadyaml('/etc/puppet/data/myhash.yaml')
|
||||
$myhash = loadyaml('no-file.yaml', {'default' => 'value'})
|
||||
ENDHEREDOC
|
||||
|
||||
raise ArgumentError, 'Wrong number of arguments. 1 or 2 arguments should be provided.' unless args.length >= 1
|
||||
require 'yaml'
|
||||
|
||||
if File.exists?(args[0])
|
||||
begin
|
||||
YAML::load_file(args[0]) || args[1]
|
||||
rescue Exception => e
|
||||
if args[1]
|
||||
args[1]
|
||||
else
|
||||
raise e
|
||||
end
|
||||
end
|
||||
else
|
||||
warning("Can't load '#{args[0]}' File does not exist!")
|
||||
args[1]
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
@ -1,29 +0,0 @@
|
||||
# Copyright 2015 Midokura SARL, 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.
|
||||
require 'ipaddr'
|
||||
|
||||
module Puppet::Parser::Functions
|
||||
newfunction(:public_network_hash, :type => :rvalue, :doc => <<-EOS
|
||||
This function returns a network address and an integer mask based
|
||||
on and IP address of the network and its IP mask
|
||||
EOS
|
||||
) do |argv|
|
||||
ip = argv[0]
|
||||
netmask = argv[1]
|
||||
result = {}
|
||||
result['network_address'] = IPAddr.new(ip).mask(netmask).to_s
|
||||
result['mask'] = IPAddr.new(netmask).to_i.to_s(2).count("1").to_s
|
||||
return result
|
||||
end
|
||||
end
|
@ -1,29 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2016 Midokura SARL
|
||||
#
|
||||
# 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.
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
FIP=<%= @fip %>
|
||||
NIC=<%= @nic %>
|
||||
|
||||
|
||||
# Delete masquerading to enable NATing
|
||||
if [ -n "$(iptables -v -n -L -t nat | grep "MASQUERADE" | grep "${FIP}" | grep "${NIC}")" ]; then
|
||||
iptables -t nat -D POSTROUTING -o ${NIC} -s ${FIP} -j MASQUERADE
|
||||
iptables -D FORWARD -s ${FIP} -j ACCEPT
|
||||
echo "Succesfully deleted masquerading"
|
||||
fi
|
@ -1,47 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2016 Midokura SARL
|
||||
#
|
||||
# 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.
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
FIP=<%= @fip %>
|
||||
NIC=<%= @nic %>
|
||||
EDGE_ROUTER=<%= @edge_router %>
|
||||
VETH0_IP=<%= @veth0_ip %>
|
||||
VETH1_IP=<%= @veth1_ip %>
|
||||
VETH_NETWORK=<%= @veth_network %>
|
||||
HOSTNAME=<%= @myhostname %>
|
||||
|
||||
|
||||
# Delete Route packets towards floating IP network through the bridge
|
||||
if [ -n "$(ip route | /bin/grep "${FIP} via ${VETH_1}")" ]; then
|
||||
ip route delete ${FIP} via ${VETH1_IP}
|
||||
echo "Succesfully deleted route to send packets on the bridge"
|
||||
fi
|
||||
|
||||
for host in ${HOSTNAME//,/ }
|
||||
do
|
||||
HOST_ID=$(midonet-cli -A -e host list | grep ${host} | awk '{ print $2 }')
|
||||
|
||||
ROUTER_ID=$(midonet-cli -A -e router list | grep ${EDGE_ROUTER} | awk '{ print $2 }')
|
||||
PORT_ID=$(midonet-cli -A -e host ${HOST_ID} binding list | grep veth1 | awk '{ print $6}')
|
||||
ROUTE_ID=$(midonet-cli -A -e router ${ROUTER_ID} route list | grep "src 0.0.0.0/0 dst 0.0.0.0/0 gw ${VETH0_IP} port ${PORT_ID}" | awk '{ print $2 }')
|
||||
|
||||
if [ -n ${ROUTE_ID} ]; then
|
||||
midonet-cli -e router ${ROUTER_ID} delete route ${ROUTE_ID}
|
||||
echo "Successfully deleted default route on edge router"
|
||||
fi
|
||||
done
|
@ -1,43 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2016 Midokura SARL
|
||||
#
|
||||
# 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.
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
|
||||
EDGE_ROUTER=<%= @edge_router %>
|
||||
PORTS=<%= @ports_to_bind %>
|
||||
HOSTNAME=<%= @myhostname %>
|
||||
|
||||
HOST_ID=$(midonet-cli -A -e host list | grep ${HOSTNAME} | awk '{ print $2 }')
|
||||
|
||||
ROUTER_ID=$(midonet-cli -A -e router list | grep ${EDGE_ROUTER} | awk '{ print $2 }')
|
||||
|
||||
PORT_BINDING_LIST=$(midonet-cli -A -e host ${HOST_ID} binding list)
|
||||
|
||||
if [ -z "${PORT_BINDING_LIST}" ]; then
|
||||
PORT_ID=
|
||||
else
|
||||
PORT_ID=$(midonet-cli -A -e host ${HOST_ID} binding list | grep gw-veth-mn)
|
||||
fi
|
||||
|
||||
|
||||
if [ -z "${PORT_ID}" ]; then
|
||||
for port in ${PORTS//,/ }
|
||||
do
|
||||
source /root/openrc && neutron router-interface-add ${EDGE_ROUTER} port=${port}
|
||||
done
|
||||
fi
|
@ -1,43 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2016 Midokura SARL
|
||||
#
|
||||
# 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.
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
|
||||
EDGE_ROUTER=<%= @edge_router %>
|
||||
PORTS=<%= @ports_to_bind %>
|
||||
HOSTNAME=<%= @myhostname %>
|
||||
|
||||
HOST_ID=$(midonet-cli -A -e host list | grep ${HOSTNAME} | awk '{ print $2 }')
|
||||
|
||||
ROUTER_ID=$(midonet-cli -A -e router list | grep ${EDGE_ROUTER} | awk '{ print $2 }')
|
||||
|
||||
PORT_BINDING_LIST=$(midonet-cli -A -e host ${HOST_ID} binding list)
|
||||
|
||||
if [ -z ${PORT_BINDING_LIST} ]; then
|
||||
PORT_ID=
|
||||
else
|
||||
PORT_ID=$(midonet-cli -A -e host ${HOST_ID} binding list | grep veth1)
|
||||
fi
|
||||
|
||||
|
||||
if [ -z ${PORT_ID} ]; then
|
||||
for port in ${PORTS//,/ }
|
||||
do
|
||||
source /root/openrc && neutron router-interface-add ${EDGE_ROUTER} port=${port}
|
||||
done
|
||||
fi
|
@ -1,31 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2016 Midokura SARL
|
||||
#
|
||||
# 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.
|
||||
|
||||
set -x
|
||||
|
||||
|
||||
EDGE_ROUTER=<%= @edge_router %>
|
||||
PORTS=<%= @ports_to_unbind %>
|
||||
HOSTNAME=<%= @myhostname %>
|
||||
|
||||
ROUTER_ID=$(midonet-cli -A -e router list | grep ${EDGE_ROUTER} | awk '{ print $2 }')
|
||||
|
||||
for port in ${PORTS//,/ }
|
||||
do
|
||||
source /root/openrc && neutron router-interface-delete ${EDGE_ROUTER} port=${port}
|
||||
done
|
||||
|
||||
exit 0
|
@ -1,28 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2016 Midokura SARL
|
||||
#
|
||||
# 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.
|
||||
|
||||
set -x
|
||||
|
||||
|
||||
EDGE_ROUTER=<%= @edge_router %>
|
||||
PORTS=<%= @ports_to_unbind %>
|
||||
|
||||
for port in ${PORTS//,/ }
|
||||
do
|
||||
source /root/openrc && neutron router-interface-delete ${EDGE_ROUTER} port=${port}
|
||||
done
|
||||
|
||||
exit 0
|
@ -1,46 +0,0 @@
|
||||
<% if !@new_api %>
|
||||
|
||||
ProxyPreserveHost On
|
||||
Alias /midonet-manager "/var/www/html/midonet-manager"
|
||||
|
||||
ProxyPass /midonet-api http://<%= @public_vip %>:8181/midonet-api
|
||||
ProxyPassReverse /midonet-api http://<%= @public_vip %>:8181/midonet-api
|
||||
|
||||
ProxyPass /subscription ws://<%= @public_vip %>:8007/subscription
|
||||
ProxyPassReverse /subscription ws://<%= @public_vip %>:8007/subscription
|
||||
|
||||
ProxyPass /trace ws://<%= @public_vip %>:8460/trace
|
||||
ProxyPassReverse /trace ws://<%= @public_vip %>:8460/trace
|
||||
|
||||
ProxyPass /fabric ws://<%= @public_vip %>:8009/fabric
|
||||
ProxyPassReverse /fabric ws://<%= @public_vip %>:8009/fabric
|
||||
|
||||
ProxyPass /analytics ws://<%= @ana_mgmt_ip %>:8080/analytics
|
||||
ProxyPassReverse /analytics ws://<%= @ana_mgmt_ip %>:8080/analytics
|
||||
|
||||
Header set Access-Control-Allow-Origin *
|
||||
Header append Access-Control-Allow-Headers Content-Type
|
||||
Header append Access-Control-Allow-Headers X-Auth-Token
|
||||
<% else %>
|
||||
ProxyPreserveHost On
|
||||
Alias /midonet-manager "/var/www/html/midonet-manager"
|
||||
|
||||
ProxyPass /midonet-api http://<%= @public_vip %>:8181/midonet-api
|
||||
ProxyPassReverse /midonet-api http://<%= @public_vip %>:8181/midonet-api
|
||||
|
||||
ProxyPass /subscription ws://<%= @public_vip %>:8999/subscription
|
||||
ProxyPassReverse /subscription ws://<%= @public_vip %>:8999/subscription
|
||||
|
||||
ProxyPass /trace ws://<%= @public_vip %>:8999/trace
|
||||
ProxyPassReverse /trace ws://<%= @public_vip %>:8999/trace
|
||||
|
||||
ProxyPass /fabric ws://<%= @public_vip %>:8999/fabric
|
||||
ProxyPassReverse /fabric ws://<%= @public_vip %>:8999/fabric
|
||||
|
||||
ProxyPass /analytics ws://<%= @public_vip %>:8999/analytics
|
||||
ProxyPassReverse /analytics ws://<%= @public_vip %>:8999/analytics
|
||||
|
||||
Header set Access-Control-Allow-Origin *
|
||||
Header append Access-Control-Allow-Headers Content-Type
|
||||
Header append Access-Control-Allow-Headers X-Auth-Token
|
||||
<% end %>
|
@ -1,977 +0,0 @@
|
||||
#
|
||||
# GROUPS
|
||||
#
|
||||
- id: nsdb
|
||||
parameters:
|
||||
strategy:
|
||||
type: parallel
|
||||
requires:
|
||||
- deploy_start
|
||||
required_for:
|
||||
- controller
|
||||
- primary-controller
|
||||
- deploy_end
|
||||
role:
|
||||
- nsdb
|
||||
type: group
|
||||
tasks:
|
||||
- logging
|
||||
- hiera
|
||||
- globals
|
||||
- netconfig
|
||||
|
||||
- id: midonet-gw
|
||||
parameters:
|
||||
strategy:
|
||||
type: parallel
|
||||
requires:
|
||||
- deploy_start
|
||||
- nsdb
|
||||
required_for:
|
||||
- deploy_end
|
||||
role:
|
||||
- midonet-gw
|
||||
type: group
|
||||
tasks:
|
||||
- logging
|
||||
- hiera
|
||||
- globals
|
||||
- netconfig
|
||||
|
||||
- id: midonet-analytics
|
||||
parameters:
|
||||
strategy:
|
||||
type: parallel
|
||||
requires:
|
||||
- deploy_start
|
||||
- nsdb
|
||||
required_for:
|
||||
- deploy_end
|
||||
role:
|
||||
- midonet-analytics
|
||||
type: group
|
||||
tasks:
|
||||
- logging
|
||||
- hiera
|
||||
- globals
|
||||
- netconfig
|
||||
|
||||
# Override neutron params
|
||||
- id: install_common_deps
|
||||
role:
|
||||
- primary-controller
|
||||
- controller
|
||||
- compute
|
||||
- nsdb
|
||||
- midonet-gw
|
||||
- midonet-analytics
|
||||
type: shell
|
||||
requires: [pre_deployment_start]
|
||||
required_for: [pre_deployment_end]
|
||||
version: 2.1.0
|
||||
parameters:
|
||||
cmd: bash install_midonet_common_modules_and_gems.sh
|
||||
timeout: 1440
|
||||
condition:
|
||||
yaql_exp: "$.midonet.midonet_version = '5.2'"
|
||||
|
||||
- id: install_common_deps_54
|
||||
role:
|
||||
- primary-controller
|
||||
- controller
|
||||
- compute
|
||||
- nsdb
|
||||
- midonet-gw
|
||||
- midonet-analytics
|
||||
type: shell
|
||||
requires: [pre_deployment_start]
|
||||
required_for: [pre_deployment_end]
|
||||
version: 2.1.0
|
||||
parameters:
|
||||
cmd: bash install_midonet_common_modules_and_gems_54.sh
|
||||
timeout: 1440
|
||||
condition:
|
||||
yaql_exp: "$.midonet.midonet_version = '5.4'"
|
||||
|
||||
|
||||
- id: override_neutron_module
|
||||
role:
|
||||
- primary-controller
|
||||
- controller
|
||||
- compute
|
||||
- nsdb
|
||||
- midonet-gw
|
||||
- midonet-analytics
|
||||
type: shell
|
||||
requires: [pre_deployment_start]
|
||||
required_for: [pre_deployment_end]
|
||||
version: 2.1.0
|
||||
parameters:
|
||||
cmd: bash override_neutron_module.sh
|
||||
timeout: 1440
|
||||
|
||||
# Override neutron params
|
||||
- id: neutron-override
|
||||
role:
|
||||
- primary-controller
|
||||
- controller
|
||||
- compute
|
||||
- nsdb
|
||||
- midonet-gw
|
||||
- midonet-analytics
|
||||
type: puppet
|
||||
requires: [pre_deployment_start]
|
||||
required_for: [pre_deployment_end]
|
||||
version: 2.1.0
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-override-hiera.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 1440
|
||||
|
||||
# Install the MidoNet Package. Everywhere
|
||||
- id: install_midonet_package
|
||||
role:
|
||||
- primary-controller
|
||||
- controller
|
||||
- compute
|
||||
- nsdb
|
||||
- midonet-gw
|
||||
- midonet-analytics
|
||||
type: shell
|
||||
requires: [deploy_start,setup_repositories]
|
||||
required_for: [fuel_pkgs]
|
||||
version: 2.1.0
|
||||
parameters:
|
||||
cmd: bash install_midonet_package_from_source.sh
|
||||
timeout: 1440
|
||||
|
||||
|
||||
# Install the MidoNet_Openstack Package where needed. For Java, Zookeeper and Cassandra
|
||||
- id: install_midonet_openstack_package
|
||||
role:
|
||||
- primary-controller
|
||||
- controller
|
||||
- compute
|
||||
- nsdb
|
||||
- midonet-gw
|
||||
- midonet-analytics
|
||||
type: shell
|
||||
requires: [deploy_start,setup_repositories]
|
||||
required_for: [fuel_pkgs]
|
||||
version: 2.1.0
|
||||
parameters:
|
||||
cmd: bash install_midonet_openstack_package.sh
|
||||
timeout: 1440
|
||||
|
||||
|
||||
# First independent tasks
|
||||
- id: setup_repositories_midonet
|
||||
groups:
|
||||
- primary-controller
|
||||
- controller
|
||||
- compute
|
||||
- nsdb
|
||||
- midonet-gw
|
||||
- midonet-analytics
|
||||
required_for:
|
||||
- deploy_end
|
||||
requires:
|
||||
- netconfig
|
||||
- install_common_deps
|
||||
- install_common_deps_54
|
||||
- install_midonet_package
|
||||
- install_midonet_openstack_package
|
||||
- override_neutron_module
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-define-repositories.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 1440
|
||||
|
||||
- id: enable_ip_forward_midonet
|
||||
groups:
|
||||
- compute
|
||||
- controller
|
||||
- primary-controller
|
||||
- midonet-gw
|
||||
- midonet-analytics
|
||||
required_for:
|
||||
- deploy_end
|
||||
requires:
|
||||
- deploy_start
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-enable-ip-forward.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 720
|
||||
|
||||
|
||||
# PRE-NEUTRON CONFIGURATION
|
||||
- id: deploy_cluster_midonet
|
||||
groups:
|
||||
- primary-controller
|
||||
- controller
|
||||
required_for:
|
||||
- deploy_end
|
||||
- openstack-network-start
|
||||
requires:
|
||||
- setup_repositories_midonet
|
||||
- enable_ip_forward_midonet
|
||||
- firewall
|
||||
- primary-cluster-haproxy
|
||||
- cluster-haproxy
|
||||
cross-depends:
|
||||
- name: zookeeper_and_cassandra_midonet
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-install-cluster.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 3600
|
||||
|
||||
# In controllers, we have to install midolman 'before' the neutron
|
||||
# configuration, because subnet creates a the DHCP port in neutron
|
||||
# and we need to do the binding.
|
||||
- id: agent-midonet-controller
|
||||
groups:
|
||||
- primary-controller
|
||||
- controller
|
||||
required_for:
|
||||
- deploy_end
|
||||
- openstack-network-start
|
||||
requires:
|
||||
- deploy_cluster_midonet
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-install-agent.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 4500
|
||||
|
||||
|
||||
# NEUTRON CONFIGURATION
|
||||
- id: openstack-network-midonet-replace-service-name
|
||||
groups:
|
||||
- primary-controller
|
||||
- controller
|
||||
requires:
|
||||
- openstack-network-common-config
|
||||
required_for:
|
||||
- openstack-network-end
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-replace-guess-func.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 1440
|
||||
|
||||
- id: openstack-network-midonet-config
|
||||
groups:
|
||||
- primary-controller
|
||||
- controller
|
||||
requires:
|
||||
- openstack-network-midonet-replace-service-name
|
||||
- setup_repositories_midonet
|
||||
required_for:
|
||||
- openstack-network-server-config
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-neutron-configure.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 1440
|
||||
|
||||
- id: openstack-network-midonet-networks
|
||||
groups:
|
||||
- primary-controller
|
||||
requires:
|
||||
- openstack-network-server-config
|
||||
- openstack-network-midonet-config
|
||||
- setup_repositories_midonet
|
||||
required_for:
|
||||
- openstack-network-end
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-neutron-networks.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 1440
|
||||
|
||||
- id: openstack-network-midonet-cleanup-static
|
||||
groups:
|
||||
- primary-controller
|
||||
requires:
|
||||
- openstack-network-server-config
|
||||
- openstack-network-midonet-config
|
||||
- setup_repositories_midonet
|
||||
- openstack-network-midonet-networks
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
required_for:
|
||||
- openstack-network-end
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-cleanup-static.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 1440
|
||||
condition:
|
||||
yaql_exp: >
|
||||
changedAny($.midonet.gateway_type,$.midonet.static_linux_bridge_address,
|
||||
$.midonet.static_fake_edge_router_address,
|
||||
$.midonet.static_use_masquerade) and $.cluster.status != 'new'
|
||||
|
||||
- id: openstack-network-midonet-cleanup-bgp
|
||||
groups:
|
||||
- primary-controller
|
||||
requires:
|
||||
- openstack-network-server-config
|
||||
- openstack-network-midonet-config
|
||||
- setup_repositories_midonet
|
||||
- openstack-network-midonet-networks
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
required_for:
|
||||
- openstack-network-end
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-edge-router-cleanup-bgp.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 1440
|
||||
condition:
|
||||
yaql_exp: >
|
||||
(changedAny($.midonet.gateway_type,$.midonet.bgp_local_as,
|
||||
$.midonet.bgp_neighbors) and $.cluster.status != 'new')
|
||||
|
||||
- id: openstack-network-midonet-edge
|
||||
groups:
|
||||
- primary-controller
|
||||
requires:
|
||||
- openstack-network-server-config
|
||||
- openstack-network-midonet-config
|
||||
- setup_repositories_midonet
|
||||
- openstack-network-midonet-networks
|
||||
- openstack-network-midonet-cleanup-static
|
||||
- openstack-network-midonet-cleanup-bgp
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
required_for:
|
||||
- openstack-network-end
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-edge-router-setup.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 1440
|
||||
|
||||
- id: openstack-network-midonet-edge-bgp
|
||||
groups:
|
||||
- primary-controller
|
||||
requires:
|
||||
- openstack-network-server-config
|
||||
- openstack-network-midonet-config
|
||||
- setup_repositories_midonet
|
||||
- openstack-network-midonet-networks
|
||||
- openstack-network-midonet-edge
|
||||
- openstack-network-midonet-cleanup-static
|
||||
- openstack-network-midonet-cleanup-bgp
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
required_for:
|
||||
- openstack-network-end
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-edge-router-setup-bgp.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 1440
|
||||
condition:
|
||||
yaql_exp: >
|
||||
(changedAny($.midonet.gateway_type,$.midonet.bgp_local_as,
|
||||
$.midonet.bgp_neighbors) and $.midonet.gateway_type = 'bgp')
|
||||
|
||||
- id: openstack-network-midonet-edge-static
|
||||
groups:
|
||||
- primary-controller
|
||||
requires:
|
||||
- openstack-network-server-config
|
||||
- openstack-network-midonet-config
|
||||
- setup_repositories_midonet
|
||||
- openstack-network-midonet-networks
|
||||
- openstack-network-midonet-edge
|
||||
- openstack-network-midonet-cleanup-bgp
|
||||
- openstack-network-midonet-cleanup-static
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
required_for:
|
||||
- openstack-network-end
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-edge-router-setup-static.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 1440
|
||||
condition:
|
||||
yaql_exp: >
|
||||
(changedAny($.midonet.gateway_type,$.midonet.static_linux_bridge_address,
|
||||
$.midonet.static_fake_edge_router_address,
|
||||
$.midonet.static_use_masquerade) and $.midonet.gateway_type = 'static')
|
||||
|
||||
- id: openstack-network-midonet-edge-static-per-host
|
||||
groups:
|
||||
- primary-controller
|
||||
requires:
|
||||
- openstack-network-server-config
|
||||
- openstack-network-midonet-config
|
||||
- setup_repositories_midonet
|
||||
- openstack-network-midonet-networks
|
||||
- openstack-network-midonet-edge
|
||||
- openstack-network-midonet-cleanup-static
|
||||
- openstack-network-midonet-cleanup-bgp
|
||||
- openstack-network-midonet-edge-static
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
required_for:
|
||||
- openstack-network-end
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-edge-router-setup-static-per-host.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 1440
|
||||
condition:
|
||||
yaql_exp: >
|
||||
(changedAny($.midonet.gateway_type,$.midonet.static_linux_bridge_address,
|
||||
$.midonet.static_fake_edge_router_address,
|
||||
$.midonet.static_use_masquerade) and $.midonet.gateway_type = 'static')
|
||||
|
||||
- id: openstack-network-midonet-compute-nova
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-compute-nova.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 1440
|
||||
required_for:
|
||||
- openstack-network-end
|
||||
requires:
|
||||
- setup_repositories_midonet
|
||||
- openstack-network-common-config
|
||||
- openstack-network-agents-l3
|
||||
- openstack-network-agents-metadata
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
groups:
|
||||
- compute
|
||||
|
||||
# NSDB-only tasks
|
||||
- id: zookeeper_and_cassandra_midonet
|
||||
groups:
|
||||
- nsdb
|
||||
required_for:
|
||||
- deploy_end
|
||||
requires:
|
||||
- deploy_start
|
||||
- install_midonet_openstack_package
|
||||
- install_midonet_package
|
||||
- netconfig
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-nsdb.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 3600
|
||||
|
||||
# Analytics Only tasks
|
||||
|
||||
- id: mem-analytics-java8
|
||||
role:
|
||||
- midonet-analytics
|
||||
required_for:
|
||||
- deploy_end
|
||||
requires:
|
||||
- deploy_start
|
||||
- install_midonet_openstack_package
|
||||
- install_midonet_package
|
||||
- netconfig
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-install-java8.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 720
|
||||
condition:
|
||||
yaql_exp: "$.midonet.mem = true and $.midonet.mem_insights = true"
|
||||
|
||||
- id: mem-analytics-haveged
|
||||
role:
|
||||
- midonet-analytics
|
||||
required_for:
|
||||
- deploy_end
|
||||
requires:
|
||||
- deploy_start
|
||||
- install_midonet_openstack_package
|
||||
- install_midonet_package
|
||||
- netconfig
|
||||
- mem-analytics-java8
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-install-haveged.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 720
|
||||
condition:
|
||||
yaql_exp: "$.midonet.mem = true and $.midonet.mem_insights = true and $.midonet.vm_install = true"
|
||||
|
||||
- id: mem-analytics-install
|
||||
role:
|
||||
- midonet-analytics
|
||||
required_for:
|
||||
- deploy_end
|
||||
requires:
|
||||
- deploy_start
|
||||
- install_midonet_openstack_package
|
||||
- install_midonet_package
|
||||
- netconfig
|
||||
- mem-analytics-java8
|
||||
- setup_repositories_midonet
|
||||
- mem-analytics-haveged
|
||||
cross-depends:
|
||||
- name: zookeeper_and_cassandra_midonet
|
||||
- name: deploy_cluster_midonet
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-install-analytics.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 4500
|
||||
condition:
|
||||
yaql_exp: "$.midonet.mem = true and $.midonet.mem_insights = true"
|
||||
|
||||
|
||||
# Skipped tasks
|
||||
- id: openstack-network-server-config
|
||||
type: skipped
|
||||
- id: openstack-network-networks
|
||||
type: skipped
|
||||
- id: openstack-network-routers
|
||||
type: skipped
|
||||
- id: openstack-network-plugins-l2
|
||||
type: skipped
|
||||
- id: primary-openstack-network-plugins-l2
|
||||
type: skipped
|
||||
- id: openstack-network-agents-l3
|
||||
type: skipped
|
||||
- id: primary-openstack-network-agents-l3
|
||||
type: skipped
|
||||
- id: openstack-network-compute-nova
|
||||
type: skipped
|
||||
# This task tries to enable the service nova_compute but we already to that
|
||||
# inside our custom midonet-compute-nova task.
|
||||
- id: enable_nova_compute_service
|
||||
type: skipped
|
||||
|
||||
# POST-DEPLOYMENT TASKS
|
||||
|
||||
# The task configure_default_route reinstalls openvswitch-switch
|
||||
# and removes midolman. This task only runs on compute hosts, so
|
||||
# we have to make sure that midolman is installed 'after' the
|
||||
# 'configure_default_route' task has run
|
||||
- id: agent-midonet-compute
|
||||
role:
|
||||
- compute
|
||||
- midonet-gw
|
||||
required_for:
|
||||
- post_deployment_end
|
||||
requires:
|
||||
- configure_default_route
|
||||
- post_deployment_start
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-install-agent.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 4500
|
||||
|
||||
- id: tunnel-zones-midonet
|
||||
role:
|
||||
- compute
|
||||
- controller
|
||||
- primary-controller
|
||||
- midonet-gw
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
required_for:
|
||||
- post_deployment_end
|
||||
requires:
|
||||
- post_deployment_start
|
||||
- agent-midonet-compute
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-host-registry.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 720
|
||||
|
||||
- id: generate-openrc-gw
|
||||
role:
|
||||
- midonet-gw
|
||||
required_for:
|
||||
- post_deployment_end
|
||||
requires:
|
||||
- post_deployment_start
|
||||
- tunnel-zones-midonet
|
||||
version: 2.1.0
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-generate-openrc-for-gw.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 720
|
||||
|
||||
- id: midonet-edge-router-cleanup-bgp-gw
|
||||
role:
|
||||
- midonet-gw
|
||||
required_for:
|
||||
- post_deployment_end
|
||||
requires:
|
||||
- generate-openrc-gw
|
||||
- post_deployment_start
|
||||
- tunnel-zones-midonet
|
||||
type: puppet
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-edge-router-cleanup-bgp-gw.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 720
|
||||
version: 2.1.0
|
||||
condition:
|
||||
yaql_exp: >
|
||||
(changedAny($.midonet.gateway_type,$.midonet.bgp_local_as,
|
||||
$.midonet.bgp_neighbors) and $.cluster.status != 'new' )
|
||||
|
||||
- id: openstack-network-midonet-cleanup-static-per-host
|
||||
role:
|
||||
- midonet-gw
|
||||
required_for:
|
||||
- post_deployment_end
|
||||
requires:
|
||||
- generate-openrc-gw
|
||||
- post_deployment_start
|
||||
- tunnel-zones-midonet
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-cleanup-static-per-host.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 1440
|
||||
condition:
|
||||
yaql_exp: >
|
||||
changedAny($.midonet.gateway_type,$.midonet.static_linux_bridge_address,
|
||||
$.midonet.static_fake_edge_router_address,
|
||||
$.midonet.static_use_masquerade) and $.cluster.status != 'new'
|
||||
|
||||
- id: openstack-network-midonet-cleanup-masq
|
||||
role:
|
||||
- midonet-gw
|
||||
required_for:
|
||||
- post_deployment_end
|
||||
requires:
|
||||
- generate-openrc-gw
|
||||
- post_deployment_start
|
||||
- tunnel-zones-midonet
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-cleanup-masquerade.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 1440
|
||||
condition:
|
||||
yaql_exp: >
|
||||
changedAny($.midonet.gateway_type,$.midonet.static_linux_bridge_address,
|
||||
$.midonet.static_fake_edge_router_address,
|
||||
$.midonet.static_use_masquerade) and $.cluster.status != 'new'
|
||||
|
||||
- id: midonet-bgp-interfaces
|
||||
role:
|
||||
- midonet-gw
|
||||
required_for:
|
||||
- post_deployment_end
|
||||
requires:
|
||||
- generate-openrc-gw
|
||||
- midonet-edge-router-cleanup-bgp-gw
|
||||
- openstack-network-midonet-cleanup-static-per-host
|
||||
- openstack-network-midonet-cleanup-masq
|
||||
- post_deployment_start
|
||||
- tunnel-zones-midonet
|
||||
type: puppet
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
version: 2.1.0
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-bgp-interfaces.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 720
|
||||
condition:
|
||||
yaql_exp: "$.midonet.gateway_type = 'bgp'"
|
||||
|
||||
|
||||
- id: midonet-edge-router-setup-bgp-gw
|
||||
role:
|
||||
- midonet-gw
|
||||
required_for:
|
||||
- post_deployment_end
|
||||
requires:
|
||||
- generate-openrc-gw
|
||||
- post_deployment_start
|
||||
- midonet-bgp-interfaces
|
||||
- tunnel-zones-midonet
|
||||
- midonet-edge-router-cleanup-bgp-gw
|
||||
- openstack-network-midonet-cleanup-masq
|
||||
- openstack-network-midonet-cleanup-static-per-host
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-edge-router-setup-bgp-gw.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 720
|
||||
condition:
|
||||
yaql_exp: >
|
||||
(changedAny($.midonet.gateway_type,$.midonet.bgp_local_as,
|
||||
$.midonet.bgp_neighbors) and $.midonet.gateway_type = 'bgp')
|
||||
|
||||
- id: openstack-network-midonet-gateway-static-router-ifaces
|
||||
role:
|
||||
- midonet-gw
|
||||
required_for:
|
||||
- post_deployment_end
|
||||
requires:
|
||||
- generate-openrc-gw
|
||||
- post_deployment_start
|
||||
- midonet-bgp-interfaces
|
||||
- tunnel-zones-midonet
|
||||
- midonet-edge-router-cleanup-bgp-gw
|
||||
- openstack-network-midonet-cleanup-masq
|
||||
- openstack-network-midonet-cleanup-static-per-host
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-gateway-static-router-ifaces.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 1440
|
||||
condition:
|
||||
yaql_exp: "$.midonet.gateway_type = 'static'"
|
||||
|
||||
- id: openstack-network-midonet-gateway-static
|
||||
role:
|
||||
- midonet-gw
|
||||
required_for:
|
||||
- post_deployment_end
|
||||
requires:
|
||||
- generate-openrc-gw
|
||||
- post_deployment_start
|
||||
- midonet-bgp-interfaces
|
||||
- tunnel-zones-midonet
|
||||
- midonet-edge-router-cleanup-bgp-gw
|
||||
- openstack-network-midonet-cleanup-masq
|
||||
- openstack-network-midonet-cleanup-static-per-host
|
||||
- openstack-network-midonet-gateway-static-router-ifaces
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-gateway-static.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 1440
|
||||
condition:
|
||||
yaql_exp: "$.midonet.gateway_type = 'static'"
|
||||
|
||||
|
||||
- id: rootwrap-midonet
|
||||
role:
|
||||
- compute
|
||||
- controller
|
||||
- primary-controller
|
||||
- midonet-gw
|
||||
required_for:
|
||||
- post_deployment_end
|
||||
requires:
|
||||
- post_deployment_start
|
||||
- agent-midonet-compute
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-ensure-rootwrap.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 720
|
||||
|
||||
# Midonet Enterprise Post-Deployment Tasks
|
||||
|
||||
- id: mem-install
|
||||
role:
|
||||
- controller
|
||||
- primary-controller
|
||||
required_for:
|
||||
- post_deployment_end
|
||||
requires:
|
||||
- post_deployment_start
|
||||
type: puppet
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
version: 2.1.0
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-install-mem.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 3600
|
||||
condition:
|
||||
yaql_exp: "$.midonet.mem = true"
|
||||
|
||||
- id: mem-horizon-override
|
||||
role:
|
||||
- controller
|
||||
- primary-controller
|
||||
required_for:
|
||||
- post_deployment_end
|
||||
requires:
|
||||
- post_deployment_start
|
||||
- mem-install
|
||||
version: 2.1.0
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-mem-horizon-override.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 720
|
||||
condition:
|
||||
yaql_exp: "$.midonet.mem = true"
|
||||
|
||||
- id: mem-horizon-enable-lb
|
||||
role:
|
||||
- controller
|
||||
- primary-controller
|
||||
required_for:
|
||||
- post_deployment_end
|
||||
requires:
|
||||
- post_deployment_start
|
||||
- mem-install
|
||||
version: 2.1.0
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-horizon-lb-firewall.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 720
|
||||
|
||||
- id: mem-restart-cluster
|
||||
role:
|
||||
- controller
|
||||
- primary-controller
|
||||
required_for:
|
||||
- post_deployment_end
|
||||
requires:
|
||||
- post_deployment_start
|
||||
- mem-install
|
||||
- mem-horizon-override
|
||||
- agent-midonet-compute
|
||||
- tunnel-zones-midonet
|
||||
- openstack-network-midonet-cleanup-static-per-host
|
||||
cross-depends:
|
||||
- name: midonet-edge-router-setup-bgp-gw
|
||||
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-restart-cluster.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 720
|
||||
condition:
|
||||
yaql_exp: "$.midonet.mem = true"
|
||||
|
||||
- id: mem-restart-agent
|
||||
role:
|
||||
- midonet-gw
|
||||
- controller
|
||||
- primary-controller
|
||||
- compute
|
||||
required_for:
|
||||
- post_deployment_end
|
||||
requires:
|
||||
- post_deployment_start
|
||||
- mem-install
|
||||
- mem-horizon-override
|
||||
- agent-midonet-compute
|
||||
- tunnel-zones-midonet
|
||||
- openstack-network-midonet-cleanup-static-per-host
|
||||
cross-depends:
|
||||
- name: midonet-edge-router-setup-bgp-gw
|
||||
version: 2.1.0
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-restart-agent.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 720
|
||||
condition:
|
||||
yaql_exp: "$.midonet.mem = true"
|
||||
|
||||
# Kill the unneccessary agents the hard way
|
||||
- id: openstack-network-disable-services
|
||||
role:
|
||||
- primary-controller
|
||||
- controller
|
||||
requires:
|
||||
- post_deployment_start
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
required_for:
|
||||
- post_deployment_end
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/midonet-disable-services.pp
|
||||
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
||||
timeout: 1440
|
||||
|
||||
# In the end..
|
||||
|
||||
# Grab the Old Astute.yaml and save it somewhere so we can parse it
|
||||
# later and do cleanup
|
||||
|
||||
- id: save_old_astute
|
||||
type: shell
|
||||
version: 2.1.0
|
||||
role:
|
||||
- controller
|
||||
- primary-controller
|
||||
required_for:
|
||||
- post_deployment_end
|
||||
requires:
|
||||
- post_deployment_start
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
parameters:
|
||||
cmd: cp /etc/fuel/cluster/{CLUSTER_ID}/astute.yaml /etc/fuel/cluster/astute.yaml.old
|
||||
timeout: 180
|
184
doc/Makefile
@ -1,184 +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) source
|
||||
# the i18n builder cannot share the environment and doctrees with the others
|
||||
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
|
||||
|
||||
.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)"
|
||||
@echo " pdf to make a PDF file"
|
||||
|
||||
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/Together-Message.qhcp"
|
||||
@echo "To view the help file:"
|
||||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Together-Message.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/Together-Message"
|
||||
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Together-Message"
|
||||
@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."
|
||||
|
||||
pdf:
|
||||
$(SPHINXBUILD) -b pdf $(ALLSPHINXOPTS) $(BUILDDIR)/pdf
|
||||
@echo
|
||||
@echo "Build finished. The PDF file is in $(BUILDDIR)/pdf."
|
||||
|
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 231 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 61 KiB |
@ -1,16 +0,0 @@
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak oneColumn
|
||||
|
||||
|
||||
Appendix B - references
|
||||
=======================
|
||||
|
||||
- `MidoNet Web Site <http://midonet.org/>`_
|
||||
- `MidoNet v5.2 Documentation <http://docs.midonet.org/>`_
|
||||
- `MidoNet v5.2 Code <https://github.com/midonet/midonet/tree/stable/v5.2.1>`_
|
||||
- `Midokura Enterprise MidoNet (MEM) v5.2 Documentation <http://docs.midokura.com/docs/latest/manager-guide/content/index.html>`_
|
||||
- `Midokura Enterprise MidoNet (MEM) 30 Day Trial <http://www.midokura.com/mem-eval/>`_
|
||||
- `Partner Community Catalog, Midokura <https://www.mirantis.com/partners/midokura/>`_
|
||||
|
@ -1,9 +0,0 @@
|
||||
Appendixes
|
||||
==========
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
licenses
|
||||
appendix
|
||||
bgp-peer
|
@ -1,343 +0,0 @@
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak oneColumn
|
||||
|
||||
.. _bgp_peer:
|
||||
|
||||
Appendix C - Setting up test BGP peer
|
||||
=====================================
|
||||
|
||||
`BGP`_ routing is an exterior gateway protocol supported and recommended to
|
||||
MidoNet production use case. An external BGP peer is necessary for Floating IP
|
||||
(FIP) traffic between the deployed OpenStack cloud instances and the external
|
||||
network(s). These BGP peers are usually available for production or data-center
|
||||
ISP environments, so for the sake of supporting BGP tests under lab or
|
||||
proof-of-concept conditions we are providing instructions on how to set up a
|
||||
"fake" BGP peer that provide fully functional external connectivity. This guide
|
||||
shows how it can be done by setting up VyOS network operating system instance
|
||||
to serve up as an external BGP peer.
|
||||
|
||||
`VyOS`_ is a community fork of `Vyatta`_, a Linux-based network operating
|
||||
system that provides software-based network routing, firewall, and VPN
|
||||
functionality.
|
||||
|
||||
.. _BGP: https://en.wikipedia.org/wiki/Border_Gateway_Protocol
|
||||
.. _VyOS: http://vyos.net
|
||||
.. _Vyatta: https://en.wikipedia.org/wiki/Vyatta
|
||||
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
VyOS works just fine as a live OS when booted from `VyOS ISO`_ and configured
|
||||
properly, but we will cover some basic steps on how to install it to an actual
|
||||
server or a virtual machine. Being a network operating system and a router
|
||||
appliance, it makes sense to install it on a host that has multiple network
|
||||
interfaces. Minimum hardware requirements for VyOS are single core CPU and
|
||||
512MB of RAM. It can run just fine without any permanent storage, which is
|
||||
only necessary to save the configuration state.
|
||||
|
||||
.. _VyOS ISO: <http://mirror.vyos.net/iso/release/1.1.7/vyos-1.1.7-amd64.iso
|
||||
|
||||
|
||||
Required addressing information
|
||||
-------------------------------
|
||||
|
||||
For the sake of this example we assume following IP addresses will be used
|
||||
in this guide:
|
||||
|
||||
- VyOS management IP on eth0 interface: **10.20.0.254/24**
|
||||
- Default gateway for management subnet: **10.20.0.1**
|
||||
|
||||
|
||||
Also, BGP protocol itself needs some parameters to be set up. For our simple
|
||||
demonstration we assume that VyOS BGP peer that we are creating is going to
|
||||
communicate with MidoNet gateway BGP peer. As a part of BGP specification, each
|
||||
BGP peer has to have AS number which identifies it when connecting to other
|
||||
peers. Also, BGP peers needs to find each other on specific IP addresses,
|
||||
belonging to a same IP subnet. For our example, we assume following AS numbers
|
||||
and IP addresses:
|
||||
|
||||
- BGP IP subnet: **10.88.88.0/30**
|
||||
- VyOS BGP peer IP address: **10.88.88.1**
|
||||
- VyOS BGP peer AS number: **65535**
|
||||
- MidoNet BGP gateway IP address: **10.88.88.2**
|
||||
- MidoNet BGP gateway AS number: **12345**
|
||||
|
||||
|
||||
Finally, to fulfill the purpose of this BGP setup, we need to know which
|
||||
Floating IP subnet is going to be handled by MidoNet-based OpenStack cloud,
|
||||
so we specify subnet:
|
||||
|
||||
- Floating IP subnet: **200.200.200.0/24**
|
||||
|
||||
|
||||
|
||||
VyOS Installation
|
||||
-----------------
|
||||
|
||||
We start installing by booting our server or VM from `VyOS ISO`_ and logging
|
||||
in with username and password, both **vyos** by default. Following that,
|
||||
we run this command to install VyOS to a hard drive:
|
||||
|
||||
::
|
||||
|
||||
vyos@vyos:~$ install image
|
||||
|
||||
After that the following installation prompts will be displayed:
|
||||
|
||||
::
|
||||
|
||||
Welcome to the VyOS install program. This script
|
||||
will walk you through the process of installing the
|
||||
VyOS image to a local hard drive.
|
||||
Would you like to continue? (Yes/No) [Yes]: Yes
|
||||
Probing drives: OK
|
||||
Looking for pre-existing RAID groups...none found.
|
||||
The VyOS image will require a minimum 1000MB root.
|
||||
Would you like me to try to partition a drive automatically
|
||||
or would you rather partition it manually with parted? If
|
||||
you have already setup your partitions, you may skip this step
|
||||
|
||||
Partition (Auto/Parted/Skip) [Auto]:
|
||||
|
||||
I found the following drives on your system:
|
||||
vda 4294MB
|
||||
|
||||
Install the image on? [vda]:
|
||||
|
||||
This will destroy all data on /dev/vda.
|
||||
Continue? (Yes/No) [No]:
|
||||
|
||||
Confirm the that you really want to install VyOS to the target disk drive by
|
||||
typing **Yes**. The rest of the installation can be completed by simply
|
||||
pressing Enter on each prompt, and typing the desired administrator password when
|
||||
asked:
|
||||
|
||||
::
|
||||
|
||||
How big of a root partition should I create? (1000MB - 4294MB) [4294]MB:
|
||||
|
||||
Creating filesystem on /dev/vda1: OK
|
||||
Done!
|
||||
Mounting /dev/vda1...
|
||||
What would you like to name this image? [1.1.7]:
|
||||
OK. This image will be named: 1.1.7
|
||||
Copying squashfs image...
|
||||
Copying kernel and initrd images...
|
||||
Done!
|
||||
I found the following configuration files:
|
||||
/config/config.boot
|
||||
/opt/vyatta/etc/config.boot.default
|
||||
Which one should I copy to vda? [/config/config.boot]:
|
||||
|
||||
Copying /config/config.boot to vda.
|
||||
Enter password for administrator account
|
||||
Enter password for user 'vyos':
|
||||
Retype password for user 'vyos':
|
||||
I need to install the GRUB boot loader.
|
||||
I found the following drives on your system:
|
||||
vda 4294MB
|
||||
|
||||
Which drive should GRUB modify the boot partition on? [vda]:
|
||||
|
||||
Setting up grub: OK
|
||||
Done!
|
||||
vyos@vyos:~$
|
||||
|
||||
This means that the installation has been successful, time to reboot
|
||||
VyOS and do some configuration:
|
||||
|
||||
::
|
||||
|
||||
vyos@vyos:~$ reboot
|
||||
Proceed with reboot? (Yes/No) [No] Yes
|
||||
|
||||
Broadcast message from root@vyos (ttyS0) (Mon Feb 29 12:28:15 2016):
|
||||
|
||||
The system is going down for reboot NOW!
|
||||
|
||||
|
||||
Essential VyOS Configuration
|
||||
----------------------------
|
||||
|
||||
Following the reboot, we need to configure VyOS management IP address and ssh
|
||||
access. Do this by accessing **configuration** mode:
|
||||
|
||||
::
|
||||
|
||||
vyos@vyos:~$ configure
|
||||
[edit]
|
||||
|
||||
Set up management IP address, default gateway, ssh access and a DNS name:
|
||||
|
||||
::
|
||||
|
||||
vyos@vyos# set interfaces ethernet eth0 address 10.20.0.254/24
|
||||
[edit]
|
||||
vyos@vyos# set interfaces ethernet eth0 description MGMT
|
||||
[edit]
|
||||
vyos@vyos# set protocols static route 0.0.0.0/0 next-hop 10.20.0.1
|
||||
[edit]
|
||||
vyos@vyos# set service ssh port 22
|
||||
[edit]
|
||||
vyos@vyos# set service dns forwarding listen-on eth0
|
||||
[edit]
|
||||
vyos@vyos# set service dns forwarding name-server 8.8.8.8
|
||||
[edit]
|
||||
|
||||
To apply as well as save the configuration changes do:
|
||||
|
||||
::
|
||||
|
||||
vyos@vyos# commit
|
||||
[ service ssh ]
|
||||
Restarting OpenBSD Secure Shell server: sshd.
|
||||
|
||||
[edit]
|
||||
vyos@vyos# save
|
||||
Saving configuration to '/config/config.boot'...
|
||||
Done
|
||||
[edit]
|
||||
vyos@vyos# exit
|
||||
exit
|
||||
vyos@vyos:~$ exit
|
||||
logout
|
||||
|
||||
Our VyOS instance should be accessible via ssh at 10.20.0.254 now:
|
||||
|
||||
::
|
||||
|
||||
$ ssh vyos@10.20.0.254
|
||||
|
||||
|
||||
VyOS BGP Configuration
|
||||
----------------------
|
||||
|
||||
It is time to configure VyOS as a BGP peer. For this we will use all the
|
||||
IP and AS addresses we mentioned above. Enter the configuration mode,
|
||||
|
||||
::
|
||||
|
||||
vyos@vyos:~$ configure
|
||||
[edit]
|
||||
|
||||
followed by a stream of commands:
|
||||
|
||||
::
|
||||
|
||||
set interfaces ethernet eth1 address 10.88.88.1/30
|
||||
set policy prefix-list DEFAULT rule 100 action permit
|
||||
set policy prefix-list DEFAULT rule 100 prefix 0.0.0.0/0
|
||||
set policy prefix-list DEFAULT rule 999 action deny
|
||||
set policy prefix-list DEFAULT rule 999 le 32
|
||||
set policy prefix-list DEFAULT rule 999 prefix 0.0.0.0/0
|
||||
set policy prefix-list fromAS12345 rule 100 action permit
|
||||
set policy prefix-list fromAS12345 rule 100 le 32
|
||||
set policy prefix-list fromAS12345 rule 100 prefix 200.200.200.0/24
|
||||
set policy prefix-list fromAS12345 rule 999 action deny
|
||||
set policy prefix-list fromAS12345 rule 999 le 32
|
||||
set policy prefix-list fromAS12345 rule 999 prefix 0.0.0.0/0
|
||||
commit
|
||||
|
||||
set policy route-map fromAS12345 rule 100 match ip address prefix-list fromAS12345
|
||||
set policy route-map fromAS12345 rule 100 action permit
|
||||
set policy route-map fromAS12345 rule 999 action deny
|
||||
commit
|
||||
|
||||
set policy route-map toAS12345 rule 100 action permit
|
||||
set policy route-map toAS12345 rule 100 match ip address prefix-list DEFAULT
|
||||
set policy route-map toAS12345 rule 100 set metric 100
|
||||
set policy route-map toAS12345 rule 999 action deny
|
||||
commit
|
||||
|
||||
set protocols bgp 65535 neighbor 10.88.88.2 default-originate route-map toAS12345
|
||||
set protocols bgp 65535 neighbor 10.88.88.2 route-map export toAS12345
|
||||
set protocols bgp 65535 neighbor 10.88.88.2 route-map import fromAS12345
|
||||
set protocols bgp 65535 neighbor 10.88.88.2 soft-reconfiguration inbound
|
||||
set protocols bgp 65535 neighbor 10.88.88.2 remote-as 12345
|
||||
commit
|
||||
|
||||
Now, we can verify if our VyOS BGP peer is actually connected to the other BGP peer(s):
|
||||
|
||||
::
|
||||
|
||||
vyos@vyos# run show ip bgp summary
|
||||
BGP router identifier 10.20.0.254, local AS number 65535
|
||||
IPv4 Unicast - max multipaths: ebgp 1 ibgp 1
|
||||
RIB entries 1, using 96 bytes of memory
|
||||
Peers 1, using 4560 bytes of memory
|
||||
|
||||
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
|
||||
10.88.88.2 4 12345 7 8 0 0 0 00:04:22 1
|
||||
|
||||
Total number of neighbors 1
|
||||
|
||||
If you see an output similar to the above, congratulations, you have set up your
|
||||
VyOS BGP peer correctly! It is advised to save this configuration:
|
||||
|
||||
::
|
||||
|
||||
vyos@vyos# save
|
||||
Saving configuration to '/config/config.boot'...
|
||||
Done
|
||||
[edit]
|
||||
|
||||
|
||||
VyOS NAT Configuration
|
||||
----------------------
|
||||
|
||||
In our test setup, the Floating IP subnet 200.200.200.0/24 is not real
|
||||
public IP subnet, hence the "fake BGP peer" mention in the begining of
|
||||
this guide. In lab condition we want to make "fake" OpenStack instances
|
||||
into believing they really can use a floating IP from a
|
||||
200.200.200.0/24 subnet. For that to work we have to set up some
|
||||
NAT rules in our VyOS so that our OpenStack instances can really talk to
|
||||
public Internet.
|
||||
First, we create this NAT rule to allow Floating IP subnet to access
|
||||
public Internet:
|
||||
|
||||
::
|
||||
|
||||
set nat source rule 10 source address 200.200.200.0/24
|
||||
set nat source rule 10 outbound-interface eth0
|
||||
set nat source rule 10 protocol all
|
||||
set nat source rule 10 translation address masquerade
|
||||
commit
|
||||
|
||||
Second, we create NAT rule that will allow traffic from out management
|
||||
subnet, 10.20.0.0/24, to a fake public Floating IP subnet:
|
||||
|
||||
::
|
||||
|
||||
set nat source rule 11 source address 10.20.0.0/24
|
||||
set nat source rule 11 outbound-interface eth1
|
||||
set nat source rule 11 protocol all
|
||||
set nat source rule 11 translation address masquerade
|
||||
commit
|
||||
|
||||
Don't forget to save this configuration:
|
||||
|
||||
::
|
||||
|
||||
vyos@vyos# save
|
||||
Saving configuration to '/config/config.boot'...
|
||||
Done
|
||||
[edit]
|
||||
|
||||
|
||||
Final consideration
|
||||
-------------------
|
||||
|
||||
In a likely case that we want to make fake Floating IP subnet,
|
||||
200.200.200.0/24, available from the rest of our internal management
|
||||
network, 10.20.0.0/24, it is highly advised to set up a static route
|
||||
in the management network gateway router, 10.20.0.1. For example:
|
||||
|
||||
::
|
||||
|
||||
# ip route add 200.200.200.0/24 via 10.20.0.254
|
||||
|
||||
In case management gateway router is not accessible, the above
|
||||
static route can be set at each individual host that needs to access
|
||||
"fake" Floating IP network range.
|
@ -1,82 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# 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.
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.abspath('../..'))
|
||||
# -- General configuration ----------------------------------------------------
|
||||
|
||||
# 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.autodoc',
|
||||
# 'reno.sphinxext',
|
||||
'rst2pdf.pdfbuilder'
|
||||
]
|
||||
|
||||
# autodoc generation is a bit aggressive and a nuisance when doing heavy
|
||||
# text edit cycles.
|
||||
# execute "export SPHINX_DEBUG=1" in your terminal to disable
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.rst'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'fuel-midonet-plugin'
|
||||
copyright = u'2017, Midokura SARL'
|
||||
version = '9.2.0'
|
||||
release = version[:3] + '-' + version + '-1'
|
||||
|
||||
# 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
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
# -- Options for HTML output --------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. Major themes that come with
|
||||
# Sphinx are currently 'default' and 'sphinxdoc'.
|
||||
# html_theme_path = ["."]
|
||||
html_theme = 'default'
|
||||
# html_static_path = ['_static']
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = '%sdoc' % project
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass
|
||||
# [howto/manual]).
|
||||
latex_documents = [
|
||||
('index',
|
||||
'%s.tex' % project,
|
||||
u'Guide to the MidoNet Plugin',
|
||||
u'OpenStack Foundation', 'manual'),
|
||||
]
|
||||
|
||||
latex_elements = { 'classoptions': ',openany,oneside', 'babel' : '\\usepackage[english]{babel}' }
|
||||
|
||||
pdf_documents = [(master_doc, project, u'MidoNet plugin for Fuel 9', copyright),]
|
||||
pdf_inline_footnotes = True
|
||||
|
||||
# Example configuration for intersphinx: refer to the Python standard library.
|
||||
#intersphinx_mapping = {'http://docs.python.org/': None}
|
@ -1,62 +0,0 @@
|
||||
.. |FuelVer| replace:: 9.0/9.1/9.2
|
||||
.. |PrevPluginVer| replace:: 4.1.0
|
||||
.. |PluginVer| replace:: 9.2.0
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak oneColumn
|
||||
|
||||
|
||||
Introduction
|
||||
============
|
||||
|
||||
MidoNet is an Apache licensed production grade network virtualization software
|
||||
for Infrastructure-as-a-Service (IaaS) clouds. Plugin for Fuel |FuelVer| provides the
|
||||
puppet manifests to install all the components to deploy easily MidoNet with
|
||||
Fuel in both lab or production environments.
|
||||
|
||||
Fuel MidoNet plugin is capable of deploying MidoNet v5.2_ and v5.4_ on top of Mirantis
|
||||
OpenStack Fuel version |FuelVer|. There are no prerequisites to use the MidoNet
|
||||
plugin: MidoNet is Open Source, and the plugin sets the repositories from where
|
||||
download and install MidoNet packages.
|
||||
|
||||
This plugin also supports installation of same version of Midokura Enterprise
|
||||
MidoNet (MEM_) by allowing the user to choose the option from the Fuel Web UI.
|
||||
The packages are available to download from a password protected-repository.
|
||||
The needed credentials will be provided_ by Midokura.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
======================= ===============
|
||||
Requirement Version/Comment
|
||||
======================= ===============
|
||||
Fuel |FuelVer|
|
||||
MidoNet plugin for Fuel |PluginVer|
|
||||
======================= ===============
|
||||
|
||||
.. _known_limitations:
|
||||
|
||||
Known Limitations
|
||||
-----------------
|
||||
|
||||
* The plugin has some limitations regarding node count regarding
|
||||
Analytics/Insight MEM-only feature. Currently, only one such node can be
|
||||
deployed. *Starting with 5.4 Multiple Analytics node can be used*
|
||||
|
||||
* Current version of plugin can only deploy single MidoNet Gateway role node.
|
||||
MidoNet itself supports any number of gateway nodes, it is only a plugin limitation,
|
||||
additional nodes needs to be set up manually.
|
||||
|
||||
.. _v5.2: https://github.com/midonet/midonet/tree/v5.2.1
|
||||
.. _v5.4: https://github.com/midonet/midonet/tree/v5.4
|
||||
.. _MEM: http://docs.midokura.com/docs/latest/manager-guide/content/index.html
|
||||
.. _provided: http://www.midokura.com/mem-eval
|
||||
|
||||
|
||||
Changes in MidoNet plugin |PluginVer|
|
||||
-------------------------------------
|
||||
|
||||
New features:
|
||||
|
||||
* Support 5.4 including all MEM features
|
@ -1,321 +0,0 @@
|
||||
.. raw:: pdf
|
||||
|
||||
MidoNet Fuel Plugin User Guide
|
||||
==============================
|
||||
|
||||
Short Introduction to MidoNet
|
||||
-----------------------------
|
||||
|
||||
MidoNet changes the behaviour of default Neutron deployments, understanding
|
||||
what MidoNet plugin does, especially in regard to external networks, is
|
||||
essential to configure and use MidoNet Fuel plugin properly. MidoNet plugin is
|
||||
compatible with both **Neutron + GRE** and **Neutron + VxLAN** network
|
||||
tunnelling overlays, so let's focus on showing the differences between the
|
||||
Neutron default ML2 deployments first.
|
||||
|
||||
Neutron without MidoNet plugin
|
||||
``````````````````````````````
|
||||
|
||||
Fuel 7.0 reference architecture contains some useful information in
|
||||
`Neutron Network Topologies`_ section. First, let's have an overview of
|
||||
Neutron-default ML2 topolgy:
|
||||
|
||||
.. image:: ../images/fuelml2gre.png
|
||||
:width: 70%
|
||||
:align: center
|
||||
|
||||
In this topology, red, or "North" network represents the Public Internet,
|
||||
including Floating IP subnet assigned to OpenStack cloud. That means API access
|
||||
to services and Virtual Machines' Floating IPs share the same L2/L3 network.
|
||||
This topology overloads the Controllers' traffic, since Neutron L3 agent
|
||||
service is running on the controller, answers all ARP requests coming from
|
||||
"North" traffic that belong to Virtual Machines' Floating IPs, does NAT on all
|
||||
of the traffic destined to Floating IP assigned to Virtual Machines and places
|
||||
the resulting packets in the overlay of the green, "South" network (br-tun).
|
||||
|
||||
Node hosting Neutron Controller has to:
|
||||
|
||||
- Serve the API requests coming from users
|
||||
- Run the data and RPC messaging services (Rabbitmq and MySQL is running on the
|
||||
controllers as well)
|
||||
- Handle all the North-South traffic that comes to and from the Virtual Machines.
|
||||
|
||||
|
||||
Neutron with MidoNet plugin
|
||||
```````````````````````````
|
||||
|
||||
With MidoNet, Neutron separates the control traffic from the data traffic.
|
||||
Even the Floating IPs live in the network overlay. Floating IP subnet is
|
||||
separated from the services API network range (called Public Network on Fuel
|
||||
and represented by the red network below) and MidoNet gateway advertises the
|
||||
routes that belong to Floating Ranges to BGP peers. So MidoNet plugin forces
|
||||
user to define a new Network on its settings, and allocation-range from
|
||||
environment settings get overridden.
|
||||
|
||||
MidoNet deployment topology:
|
||||
|
||||
.. image:: ../images/midonet_fuel.png
|
||||
:width: 75%
|
||||
:align: center
|
||||
|
||||
On this topology diagram:
|
||||
|
||||
- **External Public & API networks** is the red one on the diagram. Only
|
||||
*Controllers* (access to OpenStack APIs and Horizon) and *Gateway* need
|
||||
access to this network. On the external side of this underlay we expect
|
||||
an ISP BGP router(s), ready to learn our OpenStack Floating IP subnet
|
||||
route so it can pass traffic to our virtual machines.
|
||||
|
||||
- **Private network** underlay is the green one on the diagram. All the traffic
|
||||
between virtual machines is tunneled by MidoNet on top of this network.
|
||||
Including traffic to and form floating IP addresses.
|
||||
|
||||
- **Management network** is the blue one. All nodes need to be connected to
|
||||
it, this network is used for access to *NSDB* nodes in order to access
|
||||
virtual networks topology and flow information.
|
||||
|
||||
- **PXE/Admin network** is the gray one. Needed by Fuel master to orchestrate
|
||||
the deployment.
|
||||
|
||||
- **Storage network** is not shown on the diagram, as it is out of scope of
|
||||
this guide (and Neutron & MidoNet itself).
|
||||
|
||||
|
||||
MidoNet gateway in its BGP mode of operation is a native distributed system,
|
||||
one can place as many BGP gateways as necessary, so North-South traffic can be
|
||||
distributed and balanced. Once BGP sessions are established and routes are
|
||||
exchanged between BGP peers, each North-to-South network packet gets routed
|
||||
from the External Public API network to one of the MidoNet gateways.
|
||||
It does not matter which of them gets the packet, they work as if they are a
|
||||
single entity. MidoNet gateway sends the inbound packet directly to the Compute
|
||||
that hosts the target virtual machine.
|
||||
|
||||
In this way controller nodes gets significantly less overloaded, since they
|
||||
only need to answer user requests and they don't handle VM traffic at all.
|
||||
|
||||
Another MidoNet gateway mode of operation is to set up a single static routing
|
||||
gateway, conceptually similar to the simple hardware gareway routers. Although
|
||||
the plugin supports such setup, it would only establish one such gateway,
|
||||
and consequently no redundancy or traffic balancing will be supported. This
|
||||
kind of gateway setup is not recommanded in production and mission-critical
|
||||
deployments, but may be suitable for lab or proof-of-concept deployments.
|
||||
|
||||
Following the learned concepts, we are ready to create a Fuel environment
|
||||
that uses MidoNet.
|
||||
|
||||
|
||||
MidoNet MEM Insights
|
||||
````````````````````
|
||||
The Midokura Enterprise MidoNet (MEM) add-ons offer additional functionalities
|
||||
on top of the core MidoNet features, including Flow Tracing and Big Data
|
||||
Analytics support. These tools provide means to collect system information that
|
||||
can be used by the operator to visualize the network behavior.
|
||||
|
||||
These, as well as many other features are accessible via MidoNet manager,
|
||||
a WEB front-end application that can manage many aspects of MidoNet network
|
||||
topology that are usually not available in OpenStack or Neutron, provide
|
||||
detailed visualization of network usage as well as provide important
|
||||
troubleshooting tool. For more details see
|
||||
`Midokura Enterprise MidoNet (MEM) MidoNet Manager Guide`_ and
|
||||
`Midokura Enterprise MidoNet (MEM) Insights Guide`_
|
||||
|
||||
|
||||
Create Environment
|
||||
------------------
|
||||
|
||||
#. When creating the environment in the Fuel UI wizard, choose **Neutron with
|
||||
MidoNet** on the *Networking Setup* section:
|
||||
|
||||
.. image:: ../images/tunneling.png
|
||||
:width: 75%
|
||||
:align: center
|
||||
|
||||
After that, one will be able to choose between *GRE* or *VXLAN* encapsulation
|
||||
(Fuel WEB interface; Settings, Other section). MidoNet works with both of the
|
||||
encapsulation technologies, but VXLAN may offer better performance,
|
||||
especially for the deployments of a larger scale.
|
||||
|
||||
#. MidoNet plugin does not interact with the rest of the options, so choose
|
||||
whatever your deployment demands on them. Follow instructions from the
|
||||
`official OpenStack Fuel documentation`_ to finish the configuration.
|
||||
|
||||
|
||||
Configure MidoNet Plugin
|
||||
------------------------
|
||||
|
||||
Once the environment is created, open the *Settings* tab of the Fuel Web UI, and
|
||||
go to the *Other* section:
|
||||
|
||||
.. image:: ../images/other.png
|
||||
:width: 75%
|
||||
:align: center
|
||||
|
||||
Install Midokura Enterprise MidoNet (Optional)
|
||||
``````````````````````````````````````````````
|
||||
|
||||
#. Installing Midokura Enterprise MidoNet, you will be able to use some specific
|
||||
features from MidoNet only available on the Enterprise version.
|
||||
|
||||
#. Activate the option **Install Midokura Enterprise MidoNet**. Optionally,
|
||||
activate Insights features if desired. Select the Midokura Enterprise
|
||||
MidoNet (MEM) version (5.2 or 5.4).
|
||||
|
||||
.. image:: ../images/mem.png
|
||||
:width: 75%
|
||||
|
||||
#. Fill the MEM repository **Username** and **Password** fields required for
|
||||
downloading the MEM packages from the repository.
|
||||
|
||||
.. image:: ../images/mem_credentials.png
|
||||
:width: 75%
|
||||
|
||||
|
||||
Choose Tunnel Type
|
||||
``````````````````
|
||||
|
||||
MidoNet tunnelling is compatible with **GRE** and **VXLAN**.
|
||||
|
||||
|
||||
.. image:: ../images/tunnel_type.png
|
||||
:width: 75%
|
||||
|
||||
Both are supported by MidoNet, but VxLAN is recommended for its performance.
|
||||
|
||||
Floating Network Options
|
||||
````````````````````````
|
||||
|
||||
Configure the Floating fields of the plugin options (they are already been
|
||||
filled by default, but you will need to change them for sure):
|
||||
|
||||
|
||||
.. image:: ../images/floating_network.png
|
||||
:width: 75%
|
||||
|
||||
|
||||
Configuring the floating fields in *MidoNet plugin*, you will override most of
|
||||
the options of the *Neutron L3/Floating Network Parameters* section of the
|
||||
*Networks* tab of the environment.
|
||||
|
||||
So this *Floating IP range* (first row) will be completely ignored. This
|
||||
range has to match with the *CIDR* of the *Public Network*, Which only will be
|
||||
used for API-accessible IPs to the OpenStack services but not for Virtual
|
||||
Machine's floating IPs. Please refer to `Neutron with Midonet
|
||||
plugin`_ section of this document if it is not clear enough to you.
|
||||
|
||||
Configure the Gateway
|
||||
`````````````````````
|
||||
|
||||
#. Here we have three options, first of which is to configure the arbitrary number
|
||||
of BGP gateways. For this one needs to fill the BGP attributes properly:
|
||||
|
||||
.. image:: ../images/bgp_params.png
|
||||
:width: 75%
|
||||
|
||||
Special attention needs to be given to a formatting of a **BGP Peers** field.
|
||||
This field can supply a comma-separated list of a BGP pairs, where each pair
|
||||
is defined as:
|
||||
|
||||
::
|
||||
|
||||
<local-peer-IP>/<bit-length-of-the-net-prefix>-<external-peer-IP>-<remote-AS>
|
||||
|
||||
Note that under normal conditions, local BGP peer means "local to MidoNet
|
||||
deployment" and remote BGP peer means external, BGP router peer located at
|
||||
the physical network underlay. In case one needs to set up external BGP peer
|
||||
to test the MidoNet BGP gateway functionality, we provide the simple tutorial
|
||||
at :ref:`Appendix C - Setting up test BGP peer <bgp_peer>`.
|
||||
|
||||
#. Second option is to tell MidoNet Fuel plugin to setup a single static routing
|
||||
gateway, conceptually similar to the simple hardware gareway routers. For this
|
||||
to work one needs to supply routing IP addresses, one for a routing interface
|
||||
on an "external" side (LinuxBridge address on a server that is running MidoNet
|
||||
gateway agent software) and one at "internal" virtual Edge Router. For example:
|
||||
|
||||
.. image:: ../images/static_gw_params.png
|
||||
:width: 85%
|
||||
|
||||
#. Finnaly, last option is to leave gateway configurationto be done completely
|
||||
manually. Such use case may be neccessary for complex deployments with
|
||||
multiple gateways of various types.
|
||||
|
||||
|
||||
Assign Roles to Nodes
|
||||
---------------------
|
||||
|
||||
#. Go to the *Nodes* tab and you will see the **Network State Database** and
|
||||
**MidoNet HA Gateway** roles available to be assigned to roles. Optionally,
|
||||
**MidoNet Analytics Node** as well.
|
||||
|
||||
.. image:: ../images/nodes_to_roles.png
|
||||
:width: 85%
|
||||
|
||||
#. Some general advice to be followed:
|
||||
|
||||
- **Gateway** role should be given to a dedicated node.
|
||||
- **NSDB** role can be combined with any other roles, but note that it needs
|
||||
at least 4GB RAM for itself (dedicated storage hihgly recommended).
|
||||
|
||||
|
||||
Fuel will force you to choose at least one **NSDB** node in your environment (3
|
||||
are recommended).
|
||||
|
||||
|
||||
Finish environment configuration
|
||||
--------------------------------
|
||||
|
||||
We recommend to run a `Connectivity Check`_ before deploy the environment
|
||||
|
||||
Operations and Troubleshooting
|
||||
------------------------------
|
||||
|
||||
A successful deployment done with MidoNet Fuel plugin will produce fully
|
||||
working OpenStack environment, with MidoNet as a Neutron network back-end.
|
||||
MidoNet is fully compatible with Neutron and Nova APIs and most of its
|
||||
aspects can be directly managed by OpenStack Horizon WEB interface, as well
|
||||
as Neutron API.
|
||||
|
||||
Operating MidoNet
|
||||
`````````````````
|
||||
|
||||
For advanced networking features supported by MidoNet please
|
||||
see `MidoNet Operations Guide`_. For general MidoNet troubleshooting, assuming
|
||||
the deployment went fine, please see `MidoNet Troubleshooting Guide`_.
|
||||
|
||||
.. _MidoNet Operations Guide: https://docs.midonet.org/docs/v5.2/en/operations-guide/content/index.html
|
||||
.. _MidoNet Troubleshooting Guide: https://docs.midonet.org/docs/v5.2/en/troubleshooting-guide/content/index.html
|
||||
.. _`Connectivity Check`: http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-user-guide/configure-environment/verify-networks.html
|
||||
|
||||
|
||||
|
||||
Troubleshooting MidoNet Fuel deployment
|
||||
```````````````````````````````````````
|
||||
|
||||
In a case MidoNet Fuel deployment failed for some reason, first thing to
|
||||
do is to make sure that the initiated deployment satisfies the plugin
|
||||
:ref:`Known Limitations<known_limitations>`.
|
||||
|
||||
In a case MidoNet Fuel deployment failed for some other reason, useful thing
|
||||
to be checked are various log outputs available in Fuel WEB UI. Click on the
|
||||
**Logs** tab and observe logging information. Default log displayed in the
|
||||
WEB interface shows "Web backend" logs, which are too general to provide
|
||||
any troubleshooting information, we want to check "Astute" logs, which can be
|
||||
selected by clicking *Source* drop down menu, followed by clicking **Show**
|
||||
button. In case of deployment errors, important messages will be shown in red,
|
||||
identifying which stage of deployment may have failed, and on which node(s).
|
||||
|
||||
Next step is to look into how deployment tasks were executed at target nodes.
|
||||
After identifying nodes in previous step, select "Other servers" in the
|
||||
**Logs** drop-down menu, following by selecting an appropriate node in
|
||||
**Node** and "puppet" in **Source** drop-down menus. Again, important failures
|
||||
should be marked in red. Depending on user's level of understanding of these
|
||||
messages, they should either be included in MidoNet support claims to help
|
||||
to help the troubleshooting or an action can be taken by user to prevent issue
|
||||
from happening on re-deployment.
|
||||
|
||||
|
||||
.. _`Neutron Network Topologies`: https://docs.mirantis.com/openstack/fuel/fuel-7.0/reference-architecture.html#neutron-with-gre-segmentation-and-ovs
|
||||
.. _`official OpenStack Fuel documentation`: http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-user-guide/create-environment/start-create-env.html
|
||||
.. _`Midokura Enterprise MidoNet (MEM) MidoNet Manager Guide`: http://docs.midokura.com/docs/latest-en/manager-guide/content/index.html
|
||||
.. _`Midokura Enterprise MidoNet (MEM) Insights Guide`: http://docs.midokura.com/docs/latest-en/insights-guide/content/index.html
|
||||
|
||||
|
@ -1,22 +0,0 @@
|
||||
|
||||
===========================
|
||||
Guide to the MidoNet Plugin
|
||||
===========================
|
||||
|
||||
.. toctree::
|
||||
|
||||
revisions
|
||||
description
|
||||
terms
|
||||
installation
|
||||
guide
|
||||
appendixes
|
||||
|
||||
|
||||
PageBreak oneColumn
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
|
||||
|
||||
|
@ -1,34 +0,0 @@
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak oneColumn
|
||||
|
||||
.. _installation_guide:
|
||||
|
||||
Installation Guide
|
||||
==================
|
||||
|
||||
Install the Plugin
|
||||
------------------
|
||||
|
||||
To install the MidoNet Fuel plugin:
|
||||
|
||||
#. Download the plugin from the `Partner Community Catalog`_
|
||||
|
||||
#. Log into Fuel Master node and install the plugin using the `Fuel CLI`_:
|
||||
|
||||
::
|
||||
|
||||
# fuel plugins --install midonet-9.2-9.2.0-1.noarch.rpm
|
||||
|
||||
#. Verify that the plugin is installed correctly:
|
||||
::
|
||||
|
||||
# fuel plugins
|
||||
id | name | version | package_version | releases
|
||||
---+---------+---------+-----------------+--------------------
|
||||
1 | midonet | 9.2.0 | 4.0.0 | ubuntu (mitaka-9.0)
|
||||
|
||||
|
||||
.. _`Partner Community Catalog`: https://www.mirantis.com/partners/midokura/
|
||||
.. _`Fuel CLI`: http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-user-guide/cli.html
|
@ -1,77 +0,0 @@
|
||||
|
||||
.. raw:: pdf
|
||||
|
||||
PageBreak oneColumn
|
||||
|
||||
|
||||
Appendix A - licenses
|
||||
=====================
|
||||
|
||||
Third Party Components Used in MidoNet OSS
|
||||
------------------------------------------
|
||||
|
||||
=================== =================================================== ================
|
||||
Name Project Web Site License
|
||||
=================== =================================================== ================
|
||||
akka https://typesafe.com/community/core-projects/akka Apache 2.0
|
||||
Apache Cassandra http://cassandra.apache.org Apache 2.0
|
||||
Apache Commons http://commons.apache.org/ Apache 2.0
|
||||
Apache Server http://httpd.apache.org Apache 2.0
|
||||
Apache Tomcat http://tomcat.apache.org Apache 2.0
|
||||
Apache Zookeeper http://zookeeper.apache.org Apache 2.0
|
||||
AspectJ http://projects.eclipse.org/projects/tools.aspectj EPL 1.0
|
||||
Curator http://curator.apache.org Apache 2.0
|
||||
Disruptor https://github.com/LMAX-Exchange/disruptor Apache 2.0
|
||||
EqualsVerifier https://github.com/jqno/equalsverifier Apache 2.0
|
||||
guava https://github.com/google/guava Apache 2.0
|
||||
Guice https://github.com/google/guice Apache 2.0
|
||||
Hamcrest http://hamcrest.org/ BSD Three Clause
|
||||
Hibernate Validator http://hibernate.org/validator Apache 2.0
|
||||
HttpComponents http://hc.apache.org Apache 2.0
|
||||
infinispan http://infinispan.org/ Apache 2.0
|
||||
Jackson http://jackson.codehaus.org Apache 2.0
|
||||
Java https://www.java.com Oracle Binary Code License Agreement
|
||||
Jcabi Aspects http://aspects.jcabi.com/index.html BSD Three Clause
|
||||
Jetty http://eclipse.org/jetty/ Apache 2.0. and Eclipse 1.0
|
||||
jminix https://code.google.com/p/jminix/ Apache 2.0
|
||||
JMockit http://jmockit.org MIT
|
||||
jna https://github.com/twall/jna LGPL 2.1. v4.0 and later: Apache 2.0.
|
||||
JsonPath https://github.com/jayway/JsonPath Apache 2.0
|
||||
JSch http://www.jcraft.com BSD-style
|
||||
LOGBack http://logback.qos.ch EPL 1.0. and LGPL 2.1
|
||||
Metrics https://dropwizard.github.io/metrics Apache 2.0
|
||||
mockito https://github.com/mockito/mockito MIT
|
||||
netty http://netty.io Apache 2.0
|
||||
NGINX http://nginx.org BSD Two Clause
|
||||
Open vSwitch http://openvswitch.org Apache 2.0
|
||||
powermock https://code.google.com/p/powermock Apache 2.0
|
||||
protobuf https://developers.google.com/protocol-buffers BSD Three Clause
|
||||
RxJava http://reactivex.io Apache 2.0
|
||||
scala http://scala-lang.org BSD Three Clause
|
||||
scala-logging https://github.com/typesafehub/scala-logging Apache 2.0
|
||||
typesafeconf https://github.com/typesafehub/config Apache 2.0
|
||||
ScalaCheck http://scalacheck.org BSD Three Clause
|
||||
ScalaTest http://scalatest.org Apache 2.0
|
||||
Scallop https://github.com/scallop/scallop MIT
|
||||
slf4j http://www.slf4j.org MIT
|
||||
=================== =================================================== ================
|
||||
|
||||
|
||||
Puppet Modules
|
||||
--------------
|
||||
|
||||
=========================== ====================
|
||||
Name License
|
||||
=========================== ====================
|
||||
deric-zookeeper Apache 2.0
|
||||
midonet-cassandra Apache 2.0
|
||||
puppetlabs-java Apache 2.0
|
||||
puppetlabs-tomcat Apache 2.0
|
||||
openstack-midonet Apache 2.0
|
||||
midonet-midonet_openstack Apache 2.0
|
||||
TubeMogul-curator Apache 2.0
|
||||
elasticsearch-elasticsearch Apache 2.0
|
||||
elasticsearch-logstash Apache 2.0
|
||||
electrical-file_concat Apache 2.0
|
||||
richardc-datacat Apache 2.0
|
||||
=========================== ====================
|
@ -1,39 +0,0 @@
|
||||
.. |FuelVer| replace:: 9.0/9.1/9.2
|
||||
.. |PrevPluginVer| replace:: 4.1.0
|
||||
.. |PluginVer| replace:: 9.2.0
|
||||
|
||||
Document purpose
|
||||
================
|
||||
|
||||
This document will guide you through the steps of install, configure and use the
|
||||
MidoNet plugin version |PluginVer| for Fuel |FuelVer|.
|
||||
|
||||
|
||||
Revision history
|
||||
----------------
|
||||
|
||||
========= =============== ========================== =========================
|
||||
Version Revision date Editor Comment
|
||||
========= =============== ========================== =========================
|
||||
0.1 15.01.2016 Carmela Rubinos Initial release
|
||||
|
||||
(carmela@midokura.com)
|
||||
0.2 29.02.2016 Samir Ibradzic Version 3.0.1 changes
|
||||
|
||||
(samir@midokura.com)
|
||||
0.3 07.03.2016 Samir Ibradzic Added release notes
|
||||
and troubleshooting
|
||||
(samir@midokura.com)
|
||||
4.0 24.03.2016 Jaume Devesa Adapt to Fuel 8
|
||||
|
||||
(jaume@midokura.com)
|
||||
4.1 09.05.2016 Samir Ibradzic Formatting changes
|
||||
|
||||
(samir@midokura.com)
|
||||
4.2 11.11.2016 Samir Ibradzic Adapt to Fuel 9
|
||||
|
||||
(samir@midokura.com)
|
||||
9.2 19.01.2017 Alex Ruiz Estradera Adapt for Midonet 5.4
|
||||
|
||||
(alex.ruiz@midokura.com)
|
||||
========= =============== ========================== =========================
|
@ -1,204 +0,0 @@
|
||||
attributes:
|
||||
metadata:
|
||||
restrictions:
|
||||
- condition: cluster:net_provider != 'neutron'
|
||||
action: hide
|
||||
|
||||
gateway_type:
|
||||
type: "select"
|
||||
weight: 5
|
||||
value: "bgp"
|
||||
label: "Gateway Type"
|
||||
description: "Choose which technology MidoNet will use to encapsulate data between hosts"
|
||||
values:
|
||||
- data: "bgp"
|
||||
label: "BGP gateway"
|
||||
- data: "static"
|
||||
label: "Static Gateway"
|
||||
- data: "none"
|
||||
label: "I want to configure gateway manually"
|
||||
|
||||
mem:
|
||||
value: false
|
||||
label: "Midokura Enterprise MidoNet (MEM)"
|
||||
description: "If selected, Midokura Enterprise MidoNet (MEM) will be installed. If MEM is installed, you have to access Horizon at /horizon"
|
||||
weight: 6
|
||||
type: "checkbox"
|
||||
|
||||
mem_insights:
|
||||
value: false
|
||||
label: "Midokura Enterprise MidoNet Insights"
|
||||
description: "If selected, Midokura Enterprise MidoNet Insights (MEM) will be installed."
|
||||
weight: 7
|
||||
type: "checkbox"
|
||||
restrictions:
|
||||
- condition: "settings:midonet.mem.value == false"
|
||||
strict: false
|
||||
message: "Midokura Enterprise MidoNet (MEM) must be enabled"
|
||||
|
||||
vm_install:
|
||||
value: false
|
||||
label: "Are you installing the Analytics nodes on VM's?"
|
||||
description: "If selected, it will install haveged package for entropy. DONT CHECK IF USING BARE-METAL SERVERS"
|
||||
weight: 8
|
||||
type: "checkbox"
|
||||
restrictions:
|
||||
- condition: "settings:midonet.mem_insights.value == false or settings:midonet.midonet_version == '5.2'"
|
||||
message: "Midokura Enterprise MidoNet (MEM) must be enabled"
|
||||
action: hide
|
||||
|
||||
midonet_version:
|
||||
value: "5.4"
|
||||
label: "MidoNet release version"
|
||||
description: "Choose the MidoNet release version"
|
||||
type: "select"
|
||||
weight: 9
|
||||
values:
|
||||
- data: "5.2"
|
||||
label: "5.2"
|
||||
- data: "5.4"
|
||||
label: "5.4"
|
||||
|
||||
mem_repo_user:
|
||||
value: ''
|
||||
label: "MEM repository username"
|
||||
description: "Username for Midokura Enterprise MidoNet (MEM) repository"
|
||||
type: "text"
|
||||
weight: 10
|
||||
restrictions:
|
||||
- condition: "settings:midonet.mem.value == false"
|
||||
strict: false
|
||||
message: "Midokura Enterprise MidoNet (MEM) must be enabled"
|
||||
|
||||
mem_repo_password:
|
||||
value: ''
|
||||
label: "MEM repository password"
|
||||
description: "Password for Midokura Enterprise MidoNet (MEM) repository"
|
||||
type: "password"
|
||||
weight: 11
|
||||
restrictions:
|
||||
- condition: "settings:midonet.mem.value == false"
|
||||
strict: false
|
||||
message: "Midokura Enterprise MidoNet (MEM) must be enabled"
|
||||
|
||||
tunnel_type:
|
||||
type: "select"
|
||||
weight: 12
|
||||
value: "gre"
|
||||
label: "Tunnel Type"
|
||||
description: "Choose which technology MidoNet will use to encapsulate data between hosts"
|
||||
values:
|
||||
- data: "gre"
|
||||
label: "GRE tunnels"
|
||||
- data: "vxlan"
|
||||
label: "VXLAN tunnels"
|
||||
restrictions:
|
||||
- condition: "settings:public_network_assignment.assign_to_all_nodes == false"
|
||||
action: "hide"
|
||||
|
||||
# Floating IP range #
|
||||
floating_cidr:
|
||||
value: '200.200.200.0/24'
|
||||
label: 'Floating Network subnet'
|
||||
description: 'CIDR of the Floating Network. Will override the default settings'
|
||||
weight: 30
|
||||
type: "text"
|
||||
regex:
|
||||
source: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/(3[012]|[12]?[0-9])$'
|
||||
error: 'Floating Network must be a CIDR'
|
||||
|
||||
gateway:
|
||||
value: '200.200.200.1'
|
||||
label: 'Floating Network Gateway IP'
|
||||
description: 'Gateway of the Floating Network. Will override the default settings'
|
||||
weight: 31
|
||||
type: "text"
|
||||
regex:
|
||||
source: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'
|
||||
error: 'Floating Network gateway must be an IP address'
|
||||
|
||||
floating_ip_range_start:
|
||||
value: '200.200.200.100'
|
||||
label: 'Floating Network range start'
|
||||
description: 'First IP address of the Floating Network range. Will override the default settings'
|
||||
weight: 32
|
||||
type: "text"
|
||||
regex:
|
||||
source: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'
|
||||
error: 'Floating Network range start value must be an IP address'
|
||||
|
||||
floating_ip_range_end:
|
||||
value: '200.200.200.200'
|
||||
label: 'Floating Network range end'
|
||||
description: 'Last IP address of the Floating Network range. Will override the default settings'
|
||||
weight: 33
|
||||
type: "text"
|
||||
regex:
|
||||
source: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'
|
||||
error: 'Floating Network range last value must be an IP address'
|
||||
|
||||
## BGP Options ###
|
||||
|
||||
bgp_local_as:
|
||||
value: '12345'
|
||||
label: 'BGP local AS'
|
||||
description: 'BGP local autonomous system number'
|
||||
weight: 34
|
||||
type: "text"
|
||||
regex:
|
||||
source: '^([0-9]){5}$'
|
||||
error: 'Local AS must be 5 digits.'
|
||||
restrictions:
|
||||
- condition: "settings:midonet.gateway_type.value != 'bgp'"
|
||||
action: "hide"
|
||||
|
||||
bgp_neighbors:
|
||||
value: '10.88.88.2/30-10.88.88.1-65535'
|
||||
label: 'BGP Peers'
|
||||
description: 'List of BGP peers. In the form of <ip>/<netlength>-<remote_ip>-<remote-as> . If more than one peer, comma separate them like 1.1.1.1/24-1.1.1.2-11111,2.2.2.2/24-2.2.2.3-11111'
|
||||
weight: 35
|
||||
type: "text"
|
||||
regex:
|
||||
source: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/(3[012]|[12]?[0-9])-(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])-([0-9]){5}(,(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/(3[012]|[12]?[0-9])-(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])-([0-9]){5})*$'
|
||||
error: 'BGP peers must be in the form <ip>/<netlength>-<remote_ip>-<remote-as>,<ip>/<netlength>-<remote_ip>-<remote-as>'
|
||||
restrictions:
|
||||
- condition: "settings:midonet.gateway_type.value != 'bgp'"
|
||||
action: "hide"
|
||||
|
||||
## Static GW options ##
|
||||
|
||||
static_linux_bridge_address:
|
||||
value: '172.19.0.1/30'
|
||||
label: 'Static LinuxBridge Address'
|
||||
description: "IP address assigned to the virtual ethernet interface connected to the fake uplink linux bridge. It should be in 'IP/Prefix_Length' notation ('192.0.2.1/24')"
|
||||
weight: 36
|
||||
type: "text"
|
||||
regex:
|
||||
source: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/(3[012]|[12]?[0-9])$'
|
||||
error: 'Static LinuxBridge Address'
|
||||
restrictions:
|
||||
- condition: "settings:midonet.gateway_type.value != 'static'"
|
||||
action: "hide"
|
||||
|
||||
static_fake_edge_router_address:
|
||||
value: '172.19.0.2/30'
|
||||
label: 'Static Edge Router Address'
|
||||
description: "IP address assigned to the virtual ethernet interface connected to the MidoNet Edge Router. It should be in 'IP/Prefix_Length' notation ('192.0.2.1/24')"
|
||||
weight: 37
|
||||
type: "text"
|
||||
regex:
|
||||
source: '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/(3[012]|[12]?[0-9])$'
|
||||
error: 'Static Edge Router Address'
|
||||
restrictions:
|
||||
- condition: "settings:midonet.gateway_type.value != 'static'"
|
||||
action: "hide"
|
||||
|
||||
static_use_masquerade:
|
||||
value: true
|
||||
label: "Create Masquerading"
|
||||
description: "Whether to enable masquerading or not. Enable when you don't have an upstream router routing floating IP network to the gateway node. Disable when you do have an upstream router routing floating IP network to the gateway node"
|
||||
type: "checkbox"
|
||||
weight: 38
|
||||
restrictions:
|
||||
- condition: "settings:midonet.gateway_type.value != 'static'"
|
||||
action: "hide"
|
@ -1,22 +0,0 @@
|
||||
name: midonet
|
||||
title: Neutron Midonet Plugin
|
||||
version: 9.2.0
|
||||
description: Enable to use plugin Midonet for Neutron
|
||||
fuel_version: ['9.0','9.1','9.2']
|
||||
is_hotpluggable: false
|
||||
|
||||
releases:
|
||||
- os: ubuntu
|
||||
version: mitaka-9.0
|
||||
mode: ['ha', 'multinode']
|
||||
deployment_scripts_path: deployment_scripts/
|
||||
repository_path: repositories/ubuntu
|
||||
|
||||
package_version: '4.0.0'
|
||||
licenses: ['Apache 2.0']
|
||||
authors: ['Lucas Eznarriaga <lucas@midokura.com>, Midokura',
|
||||
'Jaume Devesa <jaume@midokura.com>, Midokura',
|
||||
'Alex Ruiz <alex.ruiz@midokura.com>, Midokura',
|
||||
'Samir Ibradzic <samir@midokura.com>, Midokura']
|
||||
homepage: 'https://github.com/openstack/fuel-plugin-midonet'
|
||||
groups: ['network']
|
@ -1,33 +0,0 @@
|
||||
nsdb:
|
||||
name: Network State Database for MidoNet
|
||||
description: MidoNet Synchronization Services
|
||||
has_primary: false
|
||||
public_ip_required: false
|
||||
weight: 100
|
||||
limits:
|
||||
min: 1
|
||||
recommended: 3
|
||||
|
||||
midonet-gw:
|
||||
name: MidoNet HA Gateway
|
||||
description: OpenStack node Gateway using MidoNet BGP
|
||||
has_primary: false
|
||||
public_ip_required: true
|
||||
weight: 100
|
||||
conflicts:
|
||||
- controller
|
||||
limits:
|
||||
max: 1
|
||||
min: 1
|
||||
|
||||
midonet-analytics:
|
||||
name: MidoNet Analytics Node
|
||||
description: Analytics Node for Midonet MEM
|
||||
has_primary: false
|
||||
public_ip_required: false
|
||||
weight: 200
|
||||
conflicts:
|
||||
- controller
|
||||
- midonet-gw
|
||||
- nsdb
|
||||
- compute
|
@ -1,6 +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.
|
||||
#!/bin/bash
|