Tacker VNF plugin for Fuel
This plugin install custom version of tacker which support SFC through OpenDaylight controller. Both tacker code and puppet module for installing tacker are fetch from repositories defined inside pre_build_hook file. For now it is possible to deploy one instance of tacker-server managed by upstart script. Signed-off-by: Michal Skalski <mskalski@mirantis.com>
This commit is contained in:
commit
60acf33d28
|
@ -0,0 +1,6 @@
|
|||
.tox
|
||||
.build
|
||||
*.pyc
|
||||
*.deb
|
||||
*.rpm
|
||||
deployment_scripts/puppet/modules/tacker/
|
|
@ -0,0 +1,202 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
Tacker plugin for Fuel
|
||||
============
|
||||
|
||||
This plugin install Tacker VNF manager which support SFC through OpenDaylight controller.
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
Below plugins needs to be also installed:
|
||||
|
||||
* [OpenDaylight](https://github.com/openstack/fuel-plugin-opendaylight)
|
||||
* [OVS with NSH support](https://github.com/openstack/fuel-plugin-ovs)
|
|
@ -0,0 +1,49 @@
|
|||
notice('MODULAR: tacker/db.pp')
|
||||
|
||||
$plugin_hash = hiera_hash('tacker', {})
|
||||
$tacker_hash = $plugin_hash['metadata']
|
||||
$mysql_hash = hiera_hash('mysql', {})
|
||||
$management_vip = hiera('management_vip')
|
||||
$database_vip = hiera('database_vip')
|
||||
|
||||
$mysql_root_user = pick($mysql_hash['root_user'], 'root')
|
||||
$mysql_root_password = $mysql_hash['root_password']
|
||||
|
||||
$db_user = pick($tacker_hash['user'], 'tacker')
|
||||
$db_name = pick($tacker_hash['db_name'], 'tacker')
|
||||
$db_password = pick($tacker_hash['db_password'], $mysql_root_password)
|
||||
|
||||
$db_host = $database_vip
|
||||
$db_root_user = $mysql_root_user
|
||||
$db_root_password = $mysql_root_password
|
||||
|
||||
$allowed_hosts = [ 'localhost', '127.0.0.1', '%' ]
|
||||
|
||||
validate_string($mysql_root_user)
|
||||
validate_string($database_vip)
|
||||
|
||||
class { 'galera::client':
|
||||
custom_setup_class => hiera('mysql_custom_setup_class', 'galera'),
|
||||
}
|
||||
|
||||
class { 'tacker::db::mysql':
|
||||
user => $db_user,
|
||||
password => $db_password,
|
||||
dbname => $db_name,
|
||||
allowed_hosts => $allowed_hosts,
|
||||
}
|
||||
|
||||
class { 'osnailyfacter::mysql_access':
|
||||
db_host => $db_host,
|
||||
db_user => $db_root_user,
|
||||
db_password => $db_root_password,
|
||||
}
|
||||
|
||||
Class['galera::client'] ->
|
||||
Class['osnailyfacter::mysql_access'] ->
|
||||
Class['tacker::db::mysql']
|
||||
|
||||
class mysql::config {}
|
||||
include mysql::config
|
||||
class mysql::server {}
|
||||
include mysql::server
|
|
@ -0,0 +1,46 @@
|
|||
notice('MODULAR: tacker/haproxy.pp')
|
||||
|
||||
$plugin_hash = hiera_hash('tacker', {})
|
||||
$tacker_hash = $plugin_hash['metadata']
|
||||
$tacker_port = $tacker_hash['port']
|
||||
|
||||
$network_metadata = hiera_hash('network_metadata')
|
||||
$tacker_address_map = get_node_to_ipaddr_map_by_network_role(get_nodes_hash_by_roles($network_metadata, ['tacker']), 'management')
|
||||
|
||||
$public_ssl_hash = hiera('public_ssl')
|
||||
$ssl_hash = hiera_hash('use_ssl', {})
|
||||
|
||||
$public_ssl = get_ssl_property($ssl_hash, $public_ssl_hash, 'tacker', 'public', 'usage', false)
|
||||
$public_ssl_path = get_ssl_property($ssl_hash, $public_ssl_hash, 'tacker', 'public', 'path', [''])
|
||||
|
||||
$internal_ssl = get_ssl_property($ssl_hash, {}, 'tacker', 'internal', 'usage', false)
|
||||
$internal_ssl_path = get_ssl_property($ssl_hash, {}, 'tacker', 'internal', 'path', [''])
|
||||
|
||||
firewall {'220 tacker':
|
||||
port => [$tacker_port],
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
}
|
||||
|
||||
Openstack::Ha::Haproxy_service {
|
||||
internal_virtual_ip => hiera('management_vip'),
|
||||
ipaddresses => values($tacker_address_map),
|
||||
public_virtual_ip => hiera('public_vip'),
|
||||
server_names => keys($tacker_address_map),
|
||||
}
|
||||
|
||||
openstack::ha::haproxy_service { 'tacker':
|
||||
order => '220',
|
||||
listen_port => $tacker_port,
|
||||
public => true,
|
||||
public_ssl => $public_ssl,
|
||||
public_ssl_path => $public_ssl_path,
|
||||
internal_ssl => $internal_ssl,
|
||||
internal_ssl_path => $internal_ssl_path,
|
||||
haproxy_config_options => {
|
||||
'option' => ['httpchk /', 'httplog', 'httpclose'],
|
||||
'http-request' => 'set-header X-Forwarded-Proto https if { ssl_fc }',
|
||||
'timeout server' => '11m',
|
||||
},
|
||||
balancermember_options => 'check inter 10s fastinter 2s downinter 3s rise 3 fall 3',
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
notice('MODULAR: tacker/keystone.pp')
|
||||
|
||||
$plugin_hash = hiera_hash('tacker', {})
|
||||
$tacker_hash = $plugin_hash['metadata']
|
||||
$port = $tacker_hash['port']
|
||||
|
||||
$public_vip = hiera('public_vip')
|
||||
$public_ssl_hash = hiera_hash('public_ssl')
|
||||
$management_vip = hiera('management_vip')
|
||||
$region = pick($tacker_hash['region'], hiera('region', 'RegionOne'))
|
||||
$password = $tacker_hash['user_password']
|
||||
$auth_name = pick($tacker_hash['auth_name'], 'tacker')
|
||||
$configure_endpoint = pick($tacker_hash['configure_endpoint'], true)
|
||||
$configure_user = pick($tacker_hash['configure_user'], true)
|
||||
$configure_user_role = pick($tacker_hash['configure_user_role'], true)
|
||||
$service_name = pick($tacker_hash['service_name'], 'tacker')
|
||||
$tenant = pick($tacker_hash['tenant'], 'services')
|
||||
$ssl_hash = hiera_hash('use_ssl', {})
|
||||
|
||||
Class['::osnailyfacter::wait_for_keystone_backends'] -> Class['::tacker::keystone::auth']
|
||||
|
||||
$public_protocol = get_ssl_property($ssl_hash, $public_ssl_hash, 'tacker', 'public', 'protocol', 'http')
|
||||
$public_address = get_ssl_property($ssl_hash, $public_ssl_hash, 'tacker', 'public', 'hostname', [$public_vip])
|
||||
$internal_protocol = get_ssl_property($ssl_hash, {}, 'tacker', 'internal', 'protocol', 'http')
|
||||
$internal_address = get_ssl_property($ssl_hash, {}, 'tacker', 'internal', 'hostname', [$management_vip])
|
||||
$admin_protocol = get_ssl_property($ssl_hash, {}, 'tacker', 'admin', 'protocol', 'http')
|
||||
$admin_address = get_ssl_property($ssl_hash, {}, 'tacker', 'admin', 'hostname', [$management_vip])
|
||||
|
||||
$public_url = "${public_protocol}://${public_address}:${port}"
|
||||
$internal_url = "${internal_protocol}://${internal_address}:${port}"
|
||||
$admin_url = "${admin_protocol}://${admin_address}:${port}"
|
||||
|
||||
validate_string($public_address)
|
||||
validate_string($password)
|
||||
|
||||
class {'::osnailyfacter::wait_for_keystone_backends':}
|
||||
|
||||
class { 'tacker::keystone::auth':
|
||||
auth_name => $auth_name,
|
||||
password => $password,
|
||||
tenant => $tenant,
|
||||
admin_url => $admin_url,
|
||||
internal_url => $internal_url,
|
||||
public_url => $public_url,
|
||||
region => $region,
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
notice('MODULAR: tacker.pp')
|
||||
|
||||
$management_vip = hiera('management_vip')
|
||||
$network_scheme = hiera_hash('network_scheme', {})
|
||||
prepare_network_config($network_scheme)
|
||||
|
||||
$plugin_hash = hiera_hash('tacker', {})
|
||||
$debug = $plugin_hash['debug']
|
||||
$tacker_hash = $plugin_hash['metadata']
|
||||
$odl = hiera_hash('opendaylight', {})
|
||||
$odl_port = $odl['rest_api_port']
|
||||
|
||||
$bind_port = $tacker_hash['port']
|
||||
$bind_host = get_network_role_property('management', 'ipaddr')
|
||||
$service_name = pick($tacker_hash['service'], 'tacker-server')
|
||||
|
||||
$tacker_tenant = pick($tacker_hash['tenant'], 'services')
|
||||
$tacker_user = pick($tacker_hash['user'], 'tacker')
|
||||
$tacker_user_password = $tacker_hash['user_password']
|
||||
|
||||
$ssl_hash = hiera_hash('use_ssl', {})
|
||||
$internal_auth_protocol = get_ssl_property($ssl_hash, {}, 'keystone', 'internal', 'protocol', 'http')
|
||||
$internal_auth_address = get_ssl_property($ssl_hash, {}, 'keystone', 'internal', 'hostname', [hiera('service_endpoint', ''), $management_vip])
|
||||
$admin_auth_protocol = get_ssl_property($ssl_hash, {}, 'keystone', 'admin', 'protocol', 'http')
|
||||
$admin_auth_address = get_ssl_property($ssl_hash, {}, 'keystone', 'admin', 'hostname', [hiera('service_endpoint', ''), $management_vip])
|
||||
|
||||
$auth_uri = "${internal_auth_protocol}://${internal_auth_address}:5000/"
|
||||
$identity_uri = "${admin_auth_protocol}://${admin_auth_address}:35357/"
|
||||
|
||||
$database_vip = hiera('database_vip', undef)
|
||||
$db_type = 'mysql'
|
||||
$db_host = pick($tacker_hash['db_host'], $database_vip)
|
||||
$db_user = pick($tacker_hash['username'], 'tacker')
|
||||
$db_password = $tacker_hash['db_password']
|
||||
$db_name = pick($tacker_hash['db_name'], 'tacker')
|
||||
|
||||
$db_connection = os_database_connection({
|
||||
'dialect' => $db_type,
|
||||
'host' => $db_host,
|
||||
'database' => $db_name,
|
||||
'username' => $db_user,
|
||||
'password' => $db_password,
|
||||
'charset' => 'utf8'
|
||||
})
|
||||
|
||||
$rabbit_hash = hiera_hash('rabbit_hash', {})
|
||||
$rabbit_hosts = split(hiera('amqp_hosts',''), ',')
|
||||
$rabbit_password = $rabbit_hash['password']
|
||||
$rabbit_userid = $rabbit_hash['user']
|
||||
|
||||
class { 'tacker':
|
||||
keystone_password => $tacker_user_password,
|
||||
keystone_tenant => $tacker_tenant,
|
||||
keystone_user => $tacker_user,
|
||||
auth_uri => $auth_uri,
|
||||
identity_uri => $identity_uri,
|
||||
database_connection => $db_connection,
|
||||
rabbit_hosts => $rabbit_hosts,
|
||||
rabbit_password => $rabbit_password,
|
||||
rabbit_userid => $rabbit_userid,
|
||||
bind_port => $bind_port,
|
||||
bind_host => $bind_host,
|
||||
service_name => $service_name,
|
||||
debug => $debug,
|
||||
opendaylight_host => $management_vip,
|
||||
opendaylight_port => $odl_port,
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
- id: tacker
|
||||
type: group
|
||||
role: [tacker]
|
||||
requires: [deploy_start, primary-controller]
|
||||
required_for: [deploy_end]
|
||||
tasks: [hiera, globals, tools, logging, netconfig, hosts, deploy_start]
|
||||
parameters:
|
||||
strategy:
|
||||
type: parallel
|
||||
- id: tacker-install
|
||||
type: puppet
|
||||
version: 2.0.0
|
||||
groups: [tacker]
|
||||
required_for: [deploy_end]
|
||||
requires: [openstack-haproxy, primary-database, primary-controller]
|
||||
cross-depends:
|
||||
- name: tacker-db
|
||||
- name: tacker-keystone
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/tacker.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 3600
|
||||
- id: tacker-db
|
||||
type: puppet
|
||||
version: 2.0.0
|
||||
groups: [primary-controller]
|
||||
required_for: [tacker-install]
|
||||
requires: [primary-database, database]
|
||||
cross-depends:
|
||||
- name: /(primary-)?database/
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/db.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 1800
|
||||
- id: tacker-keystone
|
||||
type: puppet
|
||||
version: 2.0.0
|
||||
groups: [primary-controller]
|
||||
required_for: [tacker-install]
|
||||
requires: [primary-keystone, keystone]
|
||||
cross-depends:
|
||||
- name: keystone
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/keystone.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 1800
|
||||
- id: haproxy-tacker
|
||||
type: puppet
|
||||
version: 2.0.0
|
||||
groups: [primary-controller, controller]
|
||||
required_for: [deploy_end]
|
||||
requires: [deploy_start, primary-cluster-haproxy, cluster-haproxy]
|
||||
cross-depends:
|
||||
- name: /(primary-)?cluster-haproxy/
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/haproxy.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 300
|
|
@ -0,0 +1,23 @@
|
|||
attributes:
|
||||
metadata:
|
||||
group: 'openstack_services'
|
||||
db_password:
|
||||
generator: 'password'
|
||||
user_password:
|
||||
generator: 'password'
|
||||
user: 'tacker'
|
||||
port: 8889
|
||||
service: 'tacker-server'
|
||||
restrictions:
|
||||
- condition: "settings:opendaylight == null or settings:opendaylight.metadata.enabled == false or settings:opendaylight.enable_sfc.value == false"
|
||||
strict: false
|
||||
message: "Please install OpenDaylight Plugin with SFC features enabled"
|
||||
- condition: "settings:fuel-plugin-ovs == null or settings:fuel-plugin-ovs.metadata.enabled == false"
|
||||
strict: false
|
||||
message: "Please install and enable Openvswitch plugin with NSH support."
|
||||
debug:
|
||||
value: false
|
||||
label: 'Debug logging'
|
||||
description: 'Debug logging mode provides more information, but requires more disk space.'
|
||||
weight: 25
|
||||
type: "checkbox"
|
|
@ -0,0 +1,34 @@
|
|||
# Plugin name
|
||||
name: tacker
|
||||
# Human-readable name for your plugin
|
||||
title: Tacker VNF manager
|
||||
# Plugin version
|
||||
version: '0.1.0'
|
||||
# Description
|
||||
description: Tacker VNF manager
|
||||
# Required fuel version
|
||||
fuel_version: ['8.0']
|
||||
# Specify license of your plugin
|
||||
licenses: ['Apache License Version 2.0']
|
||||
# Specify author or company name
|
||||
authors: ['Michal Skalski, Mirantis']
|
||||
# A link to the plugin's page
|
||||
homepage: 'https://github.com/michalskalski/fuel-plugin-tacker'
|
||||
# Specify a group which your plugin implements, possible options:
|
||||
# network, storage, storage::cinder, storage::glance, hypervisor,
|
||||
# equipment
|
||||
groups: []
|
||||
# Change `false` to `true` if the plugin can be installed in the environment
|
||||
# after the deployment.
|
||||
is_hotpluggable: false
|
||||
|
||||
# The plugin is compatible with releases in the list
|
||||
releases:
|
||||
- os: ubuntu
|
||||
version: liberty-8.0
|
||||
mode: ['ha']
|
||||
deployment_scripts_path: deployment_scripts/
|
||||
repository_path: repositories/ubuntu
|
||||
|
||||
# Version of plugin package
|
||||
package_version: '4.0.0'
|
|
@ -0,0 +1,9 @@
|
|||
tacker:
|
||||
name: "Tacker VNF manager"
|
||||
description: "Install Tacker VNF manager"
|
||||
has_primary: false # whether has primary role or not
|
||||
public_ip_required: false # whether requires public net or not
|
||||
weight: 150 # weight that will be used for ordering on fuel ui
|
||||
limits:
|
||||
max: 1
|
||||
min: 1
|
|
@ -0,0 +1,88 @@
|
|||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
BUILD_FOR=${BUILD_FOR:-ubuntu}
|
||||
|
||||
DIR="$(dirname `readlink -f $0`)"
|
||||
TMP_DIR="${DIR}/tmp"
|
||||
MODULES="${DIR}/deployment_scripts/puppet/modules"
|
||||
|
||||
TOSCA_PARSER=${TOSCA_PARSER:-http://mirrors.kernel.org/ubuntu/pool/universe/p/python-tosca-parser/python-tosca-parser_0.1.0-3_all.deb}
|
||||
#tacker server
|
||||
TACKER_REPO=${TACKER_REPO:-https://github.com/trozet/tacker}
|
||||
TACKER_BRANCH=${TACKER_BRANCH:-SFC_brahmaputra}
|
||||
|
||||
TACKER_CLI_REPO=${TACKER_CLI_REPO:-https://github.com/openstack/python-tackerclient}
|
||||
TACKER_CLI_BRANCH=${TACKER_CLI_BRANCH:-stable/liberty}
|
||||
|
||||
TACKER_HORIZON_REPO=${TACKER_HORIZON_REPO:-https://github.com/openstack/tacker-horizon}
|
||||
TACKER_HORIZON_BRANCH=${TACKER_HORIZON_BRANCH:-stable/liberty}
|
||||
|
||||
TACKER_PUPPET_REPO=${TACKER_PUPPET_REPO:-https://github.com/radez/puppet-tacker}
|
||||
TACKER_PUPPET_BRANCH=${TACKER_PUPPET_BRANCH:-master}
|
||||
|
||||
function cleanup {
|
||||
rm -rf "${TMP_DIR}"
|
||||
}
|
||||
|
||||
function download {
|
||||
wget "$1" -qO $2
|
||||
}
|
||||
|
||||
function build_pkg {
|
||||
case $1 in
|
||||
centos)
|
||||
pushd "${DIR}/repositories/${1}/"
|
||||
popd
|
||||
;;
|
||||
ubuntu)
|
||||
pushd "${DIR}/repositories/${1}/"
|
||||
download $TOSCA_PARSER python-tosca-parser_0.1.0-3_all.deb
|
||||
fpm --force -s python -t deb -m 'mskalski@mirantis.com' --deb-upstart "${DIR}/tacker_package/tacker-server" --after-install "${DIR}/tacker_package/tacker-post" --no-python-fix-name --python-install-bin /usr/bin --python-install-lib /usr/lib/python2.7/dist-packages ${TMP_DIR}/tacker/setup.py
|
||||
fpm --force -s python -t deb -m 'mskalski@mirantis.com' --python-install-lib /usr/lib/python2.7/dist-packages ${TMP_DIR}/tacker-horizon/setup.py
|
||||
fpm --force -s python -t deb -m 'mskalski@mirantis.com' --python-install-lib /usr/lib/python2.7/dist-packages ${TMP_DIR}/python-tackerclient/setup.py
|
||||
popd
|
||||
;;
|
||||
*) echo "Not supported system"; exit 1;;
|
||||
esac
|
||||
}
|
||||
|
||||
command -v fpm >/dev/null 2>&1 || { echo >&2 "fpm ruby gem required but it's not installed. Aborting."; exit 1; }
|
||||
|
||||
cleanup
|
||||
|
||||
pushd $MODULES
|
||||
rm -rf tacker
|
||||
git clone $TACKER_PUPPET_REPO tacker
|
||||
pushd tacker
|
||||
git checkout $TACKER_PUPPET_BRANCH
|
||||
popd
|
||||
popd
|
||||
|
||||
mkdir -p "${TMP_DIR}"
|
||||
|
||||
pushd $TMP_DIR
|
||||
|
||||
git clone $TACKER_REPO tacker
|
||||
pushd tacker
|
||||
git checkout $TACKER_BRANCH
|
||||
#include changes which fix dependencies for liberty
|
||||
git am < ${DIR}/tacker_package/requirements-liberty.patch
|
||||
popd
|
||||
|
||||
git clone $TACKER_CLI_REPO python-tackerclient
|
||||
pushd python-tackerclient
|
||||
git checkout $TACKER_CLI_BRANCH
|
||||
popd
|
||||
|
||||
git clone $TACKER_HORIZON_REPO tacker-horizon
|
||||
pushd tacker-horizon
|
||||
git checkout $TACKER_HORIZON_BRANCH
|
||||
popd
|
||||
|
||||
for system in $BUILD_FOR
|
||||
do
|
||||
build_pkg $system
|
||||
done
|
||||
|
||||
cleanup
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
adduser --quiet --system --group --no-create-home --home /var/lib/tacker tacker
|
||||
mv /usr/local/etc/tacker /etc/
|
||||
chown -R tacker:tacker /etc/tacker
|
|
@ -0,0 +1,26 @@
|
|||
description "Tacker VNF Manager"
|
||||
author "Michal Skalski <mskalski@mirantis.com>"
|
||||
|
||||
start on runlevel [2345]
|
||||
stop on runlevel [!2345]
|
||||
|
||||
chdir /var/run
|
||||
|
||||
respawn
|
||||
respawn limit 20 5
|
||||
limit nofile 65535 65535
|
||||
|
||||
pre-start script
|
||||
for dir in run log lib cache ; do
|
||||
mkdir -p /var/${dir}/tacker
|
||||
chown tacker /var/${dir}/tacker
|
||||
done
|
||||
end script
|
||||
|
||||
script
|
||||
[ -x "/usr/bin/tacker-server" ] || exit 0
|
||||
DAEMON_ARGS="--verbose --log-file=/var/log/tacker/tacker-server.log"
|
||||
exec start-stop-daemon --start --chdir /var/lib/tacker \
|
||||
--chuid tacker:tacker --make-pidfile --pidfile /var/run/tacker/tacker-server.pid \
|
||||
--exec /usr/bin/tacker-server -- --config-file=/etc/tacker/tacker.conf ${DAEMON_ARGS}
|
||||
end script
|
|
@ -0,0 +1 @@
|
|||
[]
|
|
@ -0,0 +1,6 @@
|
|||
# Set here new volumes for your role
|
||||
volumes: []
|
||||
volumes_roles_mapping:
|
||||
tacker:
|
||||
# Default role mapping
|
||||
- {allocate_size: "min", id: "os"}
|
Loading…
Reference in New Issue