Merge "added changes for mem and insights integration"

This commit is contained in:
Jenkins 2016-09-19 06:51:03 +00:00 committed by Gerrit Code Review
commit 5ad0fae804
7 changed files with 53 additions and 75 deletions

View File

@ -101,6 +101,8 @@ class midonet::cluster (
$heap_newsize = undef,
$is_mem = undef,
$is_insights = undef,
$insights_ssl = undef,
$analytics_ip = undef,
) {
class { 'midonet::cluster::install':
@ -128,8 +130,9 @@ class midonet::cluster (
keystone_tenant_name => $keystone_tenant_name,
keystone_protocol => $keystone_protocol,
is_insights => $is_insights,
insights_ssl => $insights_ssl,
analytics_ip => $analytics_ip,
require => Class['midonet::cluster::install']
}
contain 'midonet::cluster::install'
}

View File

@ -46,6 +46,9 @@ class midonet::cluster::run (
$jmxscraper_target_udp_endpoint = undef,
$flow_tracing_service_ws_port = undef,
$agent_flow_history_udp_endpoint = undef,
$calliope_service_ws_port = undef,
$insights_ssl = undef,
$analytics_ip = undef,
) {
file { '/tmp/mn-cluster_config.sh':

View File

@ -112,7 +112,7 @@ class midonet::mem(
$mem_api_token = $::midonet::params::mem_api_token,
$mem_api_host = "http://${cluster_ip}:8181",
$mem_agent_config_api_namespace = $::midonet::params::mem_agent_config_api_namespace,
$mem_analytics_ws_api_url = "wss://${cluster_ip}:8080/${mem_analytics_namespace}",
$mem_analytics_ws_api_url = "ws://${analytics_ip}:8080/${mem_analytics_namespace}",
$mem_subscriptions_ws_api_url = "wss://${cluster_ip}:8007/subscription",
$mem_fabric_ws_api_url = "wss://${cluster_ip}:8009/fabric",
$mem_poll_enabled = $::midonet::params::mem_poll_enabled,
@ -125,8 +125,11 @@ class midonet::mem(
$is_ssl = false,
$ssl_cert = '',
$ssl_key = '',
$insights_ssl = undef,
) inherits midonet::params {
$mem_ws = $insights_ssl? {true => 'wss://' , default => 'ws://'}
include midonet::repository
validate_string($mem_package)
@ -175,24 +178,10 @@ class midonet::mem(
mem_analytics_namespace => $mem_analytics_namespace,
mem_proxy_preserve_host => $mem_proxy_preserve_host,
mem_apache_port => $mem_apache_port,
mem_ws => $mem_ws,
is_ssl => $is_ssl,
ssl_cert => $ssl_cert,
ssl_key => $ssl_key,
}
}
else {
class {'midonet::mem::vhost':
cluster_ip => $cluster_ip,
analytics_ip => $analytics_ip,
is_insights => $is_insights,
mem_apache_servername => $mem_apache_servername,
mem_apache_docroot => $mem_apache_docroot,
mem_api_namespace => $mem_api_namespace,
mem_trace_namespace => $mem_trace_namespace,
mem_analytics_namespace => $mem_analytics_namespace,
mem_proxy_preserve_host => $mem_proxy_preserve_host,
mem_apache_port => $mem_apache_port,
is_ssl => $is_ssl,
}
}
}

View File

@ -52,6 +52,7 @@ class midonet::mem::vhost (
$mem_analytics_namespace = $::midonet::params::mem_analytics_namespace,
$mem_proxy_preserve_host = $::midonet::params::mem_proxy_preserve_host,
$mem_apache_port = $::midonet::params::mem_apache_port,
$mem_ws = undef,
$is_ssl = undef,
$ssl_cert = undef,
$ssl_key = undef,
@ -76,15 +77,15 @@ class midonet::mem::vhost (
$proxy_pass = [
{
'path' => "/${mem_api_namespace}",
'url' => "http://${cluster_ip}:8181/midonet-api",
'url' => "http://${cluster_ip}:8181/${mem_api_namespace}",
},
{
'path' => "/${mem_trace_namespace}",
'url' => "wss://${cluster_ip}:8460/trace",
'url' => "wss://${cluster_ip}:8460/${mem_trace_namespace}",
},
{
'path' => "/${mem_analytics_namespace}",
'url' => "wss://${analytics_ip}:8080/analytics",
'url' => "${mem_ws}${analytics_ip}:8080/${mem_analytics_namespace}",
},
]
}
@ -93,11 +94,11 @@ class midonet::mem::vhost (
$proxy_pass = [
{
'path' => "/${mem_api_namespace}",
'url' => "http://${cluster_ip}:8181/midonet-api",
'url' => "http://${cluster_ip}:8181/${mem_api_namespace}",
},
{
'path' => "/${mem_trace_namespace}",
'url' => "wss://${cluster_ip}:8460/trace",
'url' => "wss://${cluster_ip}:8460/${mem_trace_namespace}",
},
]
}

View File

@ -25,7 +25,7 @@ class midonet::params {
# MEM Manager config.js parameters
$mem_agent_config_api_namespace = 'conf'
$mem_api_token = false
$mem_api_version = '5.0'
$mem_api_version = '5.2'
$mem_poll_enabled = true
$mem_login_animation_enabled = true
$mem_config_file = "${mem_install_path}/config/client.js"

View File

@ -1,48 +1,22 @@
{
"clio.enabled": true,
"clio.service.udp_port": <% if !@clio_service_udp_port %>5001<% else %><%= @clio_service_udp_port %><% end %>,
"clio.service.encoding": "binary",
"clio.target.udp_endpoint": "<%= @ipaddress %>:<% if !@clio_target_udp_port %>5000<% else %><%= @clio_target_udp_port %><% end %>",
"clio.data.fields": [
"cookie",
"devices",
"host_uuid",
"in_port",
"in_tenant",
"out_ports",
"out_tenant",
"match_eth_src",
"match_eth_dst",
"match_ethertype",
"match_network_dst",
"match_network_src",
"match_network_proto",
"match_src_port",
"match_dst_port",
"action_drop",
"action_arp_sip",
"action_arp_tip",
"action_arp_op",
"rules",
"sim_result",
"final_eth_src",
"final_eth_dst",
"final_net_src",
"final_net_dst",
"final_transport_src",
"final_transport_dst",
"timestamp",
"type"
],
"jmxscraper.target.udp_endpoint": "<%= @ipaddress %>:<% if !@jmxscraper_target_udp_endpoint %>5000<% else %><%= @jmxscraper_target_udp_endpoint %><% end %>",
"mem_cluster.flow_tracing.enabled": true,
"mem_cluster.flow_tracing.service.ws_port": <% if !@flow_tracing_service_ws_port %>8460<% else %><%= @flow_tracing_service_ws_port %><% end %>,
"mem_cluster.flow_tracing.auth.ssl.enabled": true,
"agent.flow_history": {
"enabled": true,
"encoding": "binary",
"udp_endpoint": "<%= @ipaddress %>: <% if !@agent_flow_history_udp_endpoint %>5001<% else %><%= @agent_flow_history_udp_endpoint %><% end %>"
}
}
clio.enabled : true
clio.service.udp_port : <% if !@clio_service_udp_port %>5001<% else %><%= @clio_service_udp_port %><% end %>,
clio.service.encoding : "binary"
clio.target.udp_endpoint : "<%= @analytics_ip %>:<% if !@clio_target_udp_port %>5000<% else %><%= @clio_target_udp_port %><% end %>",
clio.data.fields : [ "cookie", "devices", "host_uuid", "in_port", "in_tenant", "out_ports", "out_tenant", "match_eth_src", "match_eth_dst", "match_ethertype", "match_network_dst", "match_network_src", "match_network_proto", "match_src_port", "match_dst_port", "action_drop", "action_arp_sip", "action_arp_tip", "action_arp_op", "rules", "sim_result", "final_eth_src", "final_eth_dst", "final_net_src", "final_net_dst", "final_transport_src", "final_transport_dst", "timestamp", "type" ]
calliope.enabled : true
calliope.service.ws_port : <% if !@calliope_service_ws_port %>8080<% else %><%= @calliope_service_ws_port %><% end %>
calliope.auth.ssl.enabled : <% if !@insights_ssl %>false<% else %><%= @insights_ssl %><% end %>
jmxscraper.enabled : true
jmxscraper.target.udp_endpoint : "<%= @analytics_ip %>:<% if !@jmxscraper_target_udp_endpoint %>5000<% else %><%= @jmxscraper_target_udp_endpoint %><% end %>"
mem_cluster.flow_tracing.enabled : true
mem_cluster.flow_tracing.service.ws_port : <% if !@flow_tracing_service_ws_port %>8460<% else %><%= @flow_tracing_service_ws_port %><% end %>
mem_cluster.flow_tracing.auth.ssl.enabled : <% if !@insights_ssl %>false<% else %><%= @insights_ssl %><% end %>
mem_cluster.subscription.service.port : <% if !@cluster_subscription_service_port %>8007<% else %><%= @cluster_subscription_service_port %><% end %>
mem_cluster.subscription.auth.ssl.enabled : <% if !@insights_ssl %>false<% else %><%= @insights_ssl %><% end %>
mem_cluster.fabric.enabled : true
mem_cluster.fabric.api.auth.ssl.enabled : <% if !@insights_ssl %>false<% else %><%= @insights_ssl %><% end %>
mem_cluster.fabric.api.port : <% if !@cluster_fabric_api_port %>8009<% else %><%= @cluster_fabric_api_port %><% end %>
mem_cluster.fabric.mfc.port : <% if !@cluster_fabric_mfc_port %>8005<% else %><%= @cluster_fabric_mfc_port %><% end %>
agent.flow_history.enabled : true
agent.flow_history.encoding : "binary"
agent.flow_history.udp_endpoint : "<%= @analytics_ip %>:<% if !@agent_flow_history_udp_endpoint %>5001<% else %><%= @agent_flow_history_udp_endpoint %><% end %>"

View File

@ -2,7 +2,11 @@
"api_host": "<%= @mem_api_host %>",
"login_host": "<%= @mem_login_host %>",
"trace_api_host": "<%= @mem_trace_api_host %>",
"traces_ws_url": "<%= @mem_traces_ws_url %>",
<% if !@mem_trace_namespace %>
"traces_ws_url": "<%= @mem_ws %><%= @cluster_ip %>:8460/trace",
<% else %>
"traces_ws_url": "<%= @mem_ws %><%= @cluster_ip %>:8460/<%=@mem_trace_namespace%>",
<% end %>
<% if !@mem_api_namespace %>
"api_namespace": "midonet-api",
<% else %>
@ -15,10 +19,14 @@
"api_token": <%= @mem_api_token %>,
<% end %>
"agent_config_api_namespace": "<%= @mem_agent_config_api_namespace %>",
"analytics_ws_api_url": "<%= @mem_analytics_ws_api_url %>",
<% if !@mem_analytics_namespace %>
"analytics_ws_api_url": "<%= @mem_ws %><%= @analytics_ip %>:8080/analytics",
<% else %>
"analytics_ws_api_url": "<%= @mem_ws %><%= @analytics_ip %>:8080/<%=@mem_analytics_namespace%>",
<% end %>
"poll_enabled": <%= @mem_poll_enabled %>,
"login_animation_enabled": <%= @mem_login_animation_enabled %>,
"subscriptions_ws_api_url": "<%= @mem_subscriptions_ws_api_url %>",
"fabric_ws_api_url": "<%= @mem_fabric_ws_api_url %>"
"subscriptions_ws_api_url": "<%= @mem_ws %><%= @cluster_ip %>:8007/subscription",
"fabric_ws_api_url": "<%= @mem_ws %><%= @cluster_ip %>:8009/fabric"
}