Switch to fuel plugin framework v4.0
Register OpenDaylight as a network component, it will be available in environment creation wizard. Add task which will register DLUX dashboard inside Fuel Web UI. Move ODL credentials and jetty port number from puppet manifests to hiera. Signed-off-by: Michal Skalski <mskalski@mirantis.com> Change-Id: I6f347aec73435886d72d734fb7d0deecc065b618
This commit is contained in:
parent
9b37cb9300
commit
d5049320c3
@ -96,10 +96,6 @@ openjdk-8. JAVA8_URL variable points to the localization of openjdk-8 deb packag
|
||||
Testing
|
||||
-------
|
||||
|
||||
Use the same IP address as for OpenStack Horizon panel and port 8181 to reach dlux web ui and apidoc explorer:
|
||||
|
||||
* DLUX: http://horizon_ip:8181/index.html
|
||||
|
||||
OpenDaylight files are stored on node with 'OpenDaylight' role assigned inside */opt/opendaylight* directory.
|
||||
|
||||
To log in to OpenDayligt shell run */opt/opendaylight/bin/client -u karaf*
|
||||
@ -138,4 +134,4 @@ system.
|
||||
Contributors
|
||||
------------
|
||||
|
||||
* Michal Skalski <mskalski@mirantis.com>
|
||||
* https://github.com/openstack/fuel-plugin-opendaylight/graphs/contributors
|
||||
|
18
components.yaml
Normal file
18
components.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
- name: 'network:neutron:opendaylight:tun'
|
||||
label: 'OpenDaylight with tunneling segmentation'
|
||||
description: 'Use Neutron with networking-odl driver'
|
||||
bind: !!pairs
|
||||
- "cluster:net_provider": "neutron"
|
||||
- "cluster:net_segment_type": "tun"
|
||||
compatible:
|
||||
- name: 'hypervisor:kvm'
|
||||
- name: 'hypervisor:qemu'
|
||||
- name: 'network:neutron:opendaylight:vlan'
|
||||
label: 'OpenDaylight with vlan segmentation'
|
||||
description: 'Use Neutron with networking-odl driver'
|
||||
bind: !!pairs
|
||||
- "cluster:net_provider": "neutron"
|
||||
- "cluster:net_segment_type": "vlan"
|
||||
compatible:
|
||||
- name: 'hypervisor:kvm'
|
||||
- name: 'hypervisor:qemu'
|
26
deployment_scripts/puppet/manifests/odl-dashboard.pp
Normal file
26
deployment_scripts/puppet/manifests/odl-dashboard.pp
Normal file
@ -0,0 +1,26 @@
|
||||
notice('MODULAR: odl-dashboard.pp')
|
||||
|
||||
$cluster_id = hiera('deployment_id')
|
||||
$master_ip = hiera('master_ip')
|
||||
$network_metadata = hiera_hash('network_metadata', {})
|
||||
$os_public_vip = $network_metadata['vips']['public']['ipaddr']
|
||||
$odl = hiera('opendaylight')
|
||||
$port = $odl['metadata']['jetty_port']
|
||||
$user = $odl['metadata']['default_credentials']['user']
|
||||
$password = $odl['metadata']['default_credentials']['password']
|
||||
|
||||
$dashboard_name = 'OpenDaylight Dashboard'
|
||||
$dashboard_desc = "OpenDaylight DLUX user interface. Default credentials are ${user}/${password}"
|
||||
$dashboard_link = "http://${os_public_vip}:${port}/index.html"
|
||||
|
||||
$json_hash = { title => $dashboard_name,
|
||||
description => $dashboard_desc,
|
||||
url => $dashboard_link, }
|
||||
|
||||
$json_message = inline_template('<%= require "json"; JSON.dump(@json_hash) %>')
|
||||
|
||||
exec { 'create_dashboard_link':
|
||||
command => "/usr/bin/curl -H 'Content-Type: application/json' -X POST \
|
||||
-d '${json_message}' \
|
||||
http://${master_ip}:8000/api/clusters/${cluster_id}/plugin_links",
|
||||
}
|
@ -19,6 +19,7 @@ class opendaylight::ha::haproxy {
|
||||
$management_vip = hiera('management_vip')
|
||||
$odl = hiera('opendaylight')
|
||||
$api_port = $odl['rest_api_port']
|
||||
$jetty_port = $odl['metadata']['jetty_port']
|
||||
|
||||
# defaults for any haproxy_service within this class
|
||||
Openstack::Ha::Haproxy_service {
|
||||
@ -32,7 +33,7 @@ class opendaylight::ha::haproxy {
|
||||
|
||||
openstack::ha::haproxy_service { 'odl-jetty':
|
||||
order => '216',
|
||||
listen_port => '8181',
|
||||
listen_port => $jetty_port,
|
||||
haproxy_config_options => {
|
||||
'option' => ['httpchk /index.html', 'httplog'],
|
||||
'timeout client' => '3h',
|
||||
|
@ -3,6 +3,7 @@ class opendaylight {
|
||||
$network_metadata = hiera_hash('network_metadata')
|
||||
$node_uid = hiera('uid')
|
||||
$rest_api_port = $odl_settings['rest_api_port']
|
||||
$jetty_port = $odl_settings['metadata']['jetty_port']
|
||||
$odl_nodes_hash = get_nodes_hash_by_roles($network_metadata, ['opendaylight'])
|
||||
$odl_mgmt_ips_hash = get_node_to_ipaddr_map_by_network_role($odl_nodes_hash, 'management')
|
||||
$odl_mgmt_ips = values($odl_mgmt_ips_hash)
|
||||
|
@ -6,6 +6,7 @@ class opendaylight::install (
|
||||
$management_vip = hiera('management_vip')
|
||||
$odl = hiera('opendaylight')
|
||||
$conf_dir = '/opt/opendaylight/etc'
|
||||
$jetty_port = $opendaylight::jetty_port
|
||||
|
||||
if $odl['enable_l3_odl'] {
|
||||
$manage_l3_traffic = 'yes'
|
||||
@ -22,7 +23,7 @@ class opendaylight::install (
|
||||
}
|
||||
|
||||
firewall {'215 odl':
|
||||
port => [ $opendaylight::rest_api_port, 6633, 6640, 6653, 8181, 8101],
|
||||
port => [ $opendaylight::rest_api_port, 6633, 6640, 6653, $jetty_port, 8101],
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
}
|
||||
|
@ -3,6 +3,9 @@ class opendaylight::service {
|
||||
include opendaylight::ha::haproxy
|
||||
$management_vip = hiera('management_vip')
|
||||
$odl = hiera('opendaylight')
|
||||
$user = $odl['metadata']['default_credentials']['user']
|
||||
$password = $odl['metadata']['default_credentials']['password']
|
||||
|
||||
$rest_port = $odl['rest_api_port']
|
||||
|
||||
if $odl['enable_bgpvpn'] {
|
||||
@ -12,7 +15,7 @@ class opendaylight::service {
|
||||
}
|
||||
if roles_include(['primary-controller']) {
|
||||
exec { 'wait-until-odl-ready':
|
||||
command => "curl -o /dev/null --fail --silent --head -u admin:admin http://${management_vip}:${rest_port}/restconf/operational/network-topology:network-topology/topology/${odl_up_testing_site}",
|
||||
command => "curl -o /dev/null --fail --silent --head -u ${user}:${password} http://${management_vip}:${rest_port}/restconf/operational/network-topology:network-topology/topology/${odl_up_testing_site}",
|
||||
path => '/bin:/usr/bin',
|
||||
tries => 60,
|
||||
try_sleep => 20,
|
||||
|
@ -37,7 +37,7 @@ DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
|
||||
<Property name="jetty.host" <% if @bind_address %> default="<%= @bind_address %>" <% end %> />
|
||||
</Set>
|
||||
<Set name="port">
|
||||
<Property name="jetty.port" default="8181" />
|
||||
<Property name="jetty.port" default="<%= @jetty_port %>"/>
|
||||
</Set>
|
||||
<Set name="maxIdleTime">300000</Set>
|
||||
<Set name="Acceptors">2</Set>
|
||||
|
@ -218,9 +218,8 @@ def main():
|
||||
local_port = 'phy0'
|
||||
of_port = '6633'
|
||||
|
||||
# FIXME: That should come from fuel at some point in time
|
||||
odl_user = 'admin'
|
||||
odl_passw = 'admin'
|
||||
odl_user = ASTUTE['opendaylight']['metadata']['default_credentials']['user']
|
||||
odl_passw = ASTUTE['opendaylight']['metadata']['default_credentials']['password']
|
||||
|
||||
odl_ha_ip = ASTUTE['network_metadata']['vips']['management']['ipaddr']
|
||||
odl_rest_api_port = ASTUTE['opendaylight']['rest_api_port']
|
||||
|
@ -176,3 +176,15 @@
|
||||
puppet_manifest: puppet/manifests/odl-nol3-configure_default_route.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 3600
|
||||
|
||||
|
||||
# POST DEPLOYMENT
|
||||
- id: odl_dashboard_registration
|
||||
type: puppet
|
||||
role: [primary-controller]
|
||||
required_for: [post_deployment_end]
|
||||
requires: [post_deployment_start]
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/odl-dashboard.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 180
|
||||
|
@ -92,6 +92,10 @@ attributes:
|
||||
- odl-sfcofl2
|
||||
vpn:
|
||||
- odl-vpnservice-openstack
|
||||
default_credentials:
|
||||
user: admin
|
||||
password: admin
|
||||
jetty_port: 8181
|
||||
rest_api_port:
|
||||
value: '8282'
|
||||
label: 'Port number'
|
||||
|
@ -3,11 +3,9 @@ name: opendaylight
|
||||
# Human-readable name for your plugin
|
||||
title: OpenDaylight plugin
|
||||
# Plugin version
|
||||
version: '0.8.1'
|
||||
version: '0.8.2'
|
||||
# Description
|
||||
description: 'This plugin provides OpenDaylight as a backend for neutron.
|
||||
Use the same IP address as for OpenStack Horizon and port 8181 to reach dlux web ui.
|
||||
DLUX: http://<HORIZON_IP>:8181/index.html'
|
||||
description: 'This plugin provides OpenDaylight as a backend for neutron.'
|
||||
# Required fuel version
|
||||
fuel_version: ['8.0']
|
||||
# Specify license of your plugin
|
||||
@ -29,4 +27,6 @@ releases:
|
||||
repository_path: repositories/ubuntu
|
||||
|
||||
# Version of plugin package
|
||||
package_version: '3.0.0'
|
||||
package_version: '4.0.0'
|
||||
|
||||
is_hotpluggable: false
|
||||
|
1
tasks.yaml
Normal file
1
tasks.yaml
Normal file
@ -0,0 +1 @@
|
||||
[]
|
Loading…
Reference in New Issue
Block a user