Skip to content

Commit dacd4ee

Browse files
Varadhan Veerapurammmnelemane
authored andcommitted
[neutron][Cisco ACI] Multi-VMM domain support (SOC - 10471)
A Single ACI fabric can support multiple VMM domains. Each VMM domain can be governed by a different controller (Eg: VMWare vCenter or OpenStack or MicroSoft SCVMM). Several production data centers tend to use multiple VMM domains and expect to be able to monitor and control network policies from a single ACI fabric. Integration of OpenStack with such a setup requires crowbar to provide parameters specific to each VMM domain. This commit adds the additional parameters and logic to validate and send these to the correct config location. The changes now allow to provide "Vmware" or "OpenStack" as the VMM type. Multiple entries of either types are possible. - Also added "ssl_mode" as a configurable parameter which is needed to be in "encrypted" mode if ESXi is used as compute. Other use-cases may need to change it as required and hence included it as a configurable parameter within the opflex node structure. (cherry picked from commit 1f16436)
1 parent 914b93c commit dacd4ee

File tree

9 files changed

+61
-33
lines changed

9 files changed

+61
-33
lines changed

chef/cookbooks/neutron/recipes/cisco_apic_agents.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
socketgroup: neutron[:neutron][:platform][:group],
110110
opflex_peer_ip: opflex[:peer_ip],
111111
opflex_peer_port: opflex[:peer_port],
112+
opflex_ssl_mode: opflex[:ssl_mode],
112113
opflex_int_bridge: opflex[:integration_bridge],
113114
opflex_access_bridge: opflex[:access_bridge],
114115
opflex_vxlan_encap_iface: opflex[:vxlan][:encap_iface],
@@ -133,8 +134,8 @@
133134
end
134135
utils_systemd_service_restart "neutron-opflex-agent"
135136

136-
service "agent-ovs" do
137+
service "opflex-agent" do
137138
action [:enable, :start]
138-
subscribes :restart, resources("template[#{opflex_agent_conf}]")
139+
subscribes :restart, resources("template[#{node[:neutron][:opflex_config_file]}]")
139140
end
140-
utils_systemd_service_restart "agent-ovs"
141+
utils_systemd_service_restart "opflex-agent"

chef/cookbooks/neutron/recipes/cisco_apic_support.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
end
2222

2323
aciswitches = node[:neutron][:apic][:apic_switches].to_hash
24-
template "/etc/neutron/neutron-server.conf.d/100-ml2_conf_cisco_apic.ini.conf" do
24+
acivmms = node[:neutron][:apic][:apic_vmms]
25+
26+
template node[:neutron][:ml2_cisco_apic_config_file] do
2527
cookbook "neutron"
2628
source "ml2_conf_cisco_apic.ini.erb"
2729
mode "0640"
@@ -30,6 +32,9 @@
3032
variables(
3133
vpc_pairs: node[:neutron][:apic][:vpc_pairs],
3234
apic_switches: aciswitches,
35+
optimized_dhcp: node[:neutron][:apic][:optimized_dhcp],
36+
optimized_metadata: node[:neutron][:apic][:optimized_metadata],
37+
apic_vmms: acivmms,
3338
ml2_mechanism_drivers: node[:neutron][:ml2_mechanism_drivers],
3439
policy_drivers: "implicit_policy,apic",
3540
default_ip_pool: "192.168.0.0/16"

chef/cookbooks/neutron/recipes/server.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
else
8686
cisco_nexus_link_action = "delete"
8787
end
88-
link "/etc/neutron/neutron-server.conf.d/100-ml2_conf_cisco.ini.conf" do
88+
link "#{node[:neutron][:platform][:ml2_cisco_config_file]}" do
8989
to "/etc/neutron/plugins/ml2/ml2_conf_cisco.ini"
9090
action cisco_nexus_link_action
9191
notifies :restart, "service[#{node[:neutron][:platform][:service_name]}]"
@@ -99,7 +99,7 @@
9999
else
100100
cisco_apic_link_action = "delete"
101101
end
102-
link "/etc/neutron/neutron-server.conf.d/100-ml2_conf_cisco_apic.ini.conf" do
102+
link "#{node[:neutron][:platform][:ml2_cisco_apic_config_file]}" do
103103
to "/etc/neutron/plugins/ml2/ml2_conf_cisco_apic.ini"
104104
action cisco_apic_link_action
105105
notifies :restart, "service[#{node[:neutron][:platform][:service_name]}]"

chef/cookbooks/neutron/templates/default/ml2_conf_cisco_apic.ini.erb

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apic_system_id=<%= node[:neutron][:apic][:system_id] %>
33
[opflex]
44
networks = *
5-
[ml2_cisco_apic]
5+
[apic]
66
apic_hosts=<%= node[:neutron][:apic][:hosts] %>
77
apic_username=<%= node[:neutron][:apic][:username] %>
88
apic_password=<%= node[:neutron][:apic][:password] %>
@@ -11,8 +11,8 @@ apic_name_mapping = use_name
1111
apic_clear_node_profiles = True
1212
enable_aci_routing = True
1313
apic_arp_flooding = True
14-
enable_optimized_metadata = <%= node[:neutron][:apic][:optimized_metadata] %>
15-
enable_optimized_dhcp = <%= node[:neutron][:apic][:optimized_dhcp] %>
14+
enable_optimized_metadata = <%= @optimized_metadata %>
15+
enable_optimized_dhcp = <%= @optimized_dhcp %>
1616
apic_provision_infra = True
1717
apic_provision_hostlinks = True
1818
<% unless @vpc_pairs.nil? -%>
@@ -41,3 +41,12 @@ enable_nat = <%= node[:neutron][:apic][:ext_net][:nat_enabled] %>
4141
<% end -%>
4242
external_epg = <%= node[:neutron][:apic][:ext_net][:ext_epg] %>
4343
host_pool_cidr = <%= node[:neutron][:apic][:ext_net][:host_pool_cidr] %>
44+
45+
<% @apic_vmms.each do |vmm_domain| -%>
46+
[apic_vmdom:<%= vmm_domain[:vmm_name]%>]
47+
vmm_type = <%= vmm_domain[:vmm_type]%>
48+
<% if vmm_domain[:vlan_ranges] -%>
49+
vlan_ranges = <%= vmm_domain[:vlan_ranges] %>
50+
<% end -%>
51+
<% end -%>
52+

chef/cookbooks/neutron/templates/default/opflex-agent-ovs.conf.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{"hostname": "<%= @opflex_peer_ip %>", "port": "<%= @opflex_peer_port %>"}
1111
],
1212
"ssl": {
13-
"mode": "enabled",
13+
"mode": "<%= @opflex_ssl_mode %>",
1414
"ca-store": "/etc/ssl/certs/"
1515
},
1616
"inspector": {
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
def upgrade(tattr, tdep, attr, dep)
2+
unless attr["apic"].key?("apic_vmms")
3+
attr["apic"]["apic_vmms"] = tattr["apic"]["apic_vmms"]
4+
end
5+
6+
return attr, dep
7+
end
8+
9+
def downgrade(tattr, tdep, attr, dep)
10+
unless tattr["apic"].key?("apic_vmms")
11+
attr["apic"].delete("apic_vmms") if attr.key?("apic_vmms")
12+
end
13+
14+
return attr, dep
15+
end

chef/data_bags/crowbar/migrate/neutron/125_add_opflex_access_integration_bridge.rb

Lines changed: 0 additions & 21 deletions
This file was deleted.

chef/data_bags/crowbar/template-neutron.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"nodes" : [],
6565
"peer_ip": "",
6666
"peer_port": 8009,
67+
"ssl_mode": "encrypted",
6768
"encap": "vxlan",
6869
"integration_bridge": "br-int",
6970
"access_bridge": "br-fabric",
@@ -99,7 +100,17 @@
99100
}
100101
}
101102
}
102-
}
103+
},
104+
"apic_vmms": [{
105+
"vmm_name": "soc_kvm_domain",
106+
"vmm_type": "openstack",
107+
"vlan_ranges": ""
108+
},
109+
{
110+
"vmm_name": "soc_vm_domain",
111+
"vmm_type": "vmware",
112+
"vlan_ranges": ""
113+
}]
103114
},
104115
"allow_overlapping_ips": true,
105116
"use_syslog": false,

chef/data_bags/crowbar/template-neutron.schema

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
"nodes": { "type" : "seq", "required" : true, "sequence": [ { "type": "str" } ] },
7373
"peer_ip": { "type": "str", "required" : true },
7474
"peer_port": { "type": "int", "required" : true },
75+
"ssl_mode": { "type": "str", "required": true },
7576
"encap": { "type": "str", "required": true },
7677
"integration_bridge": { "type": "str", "required": true },
7778
"access_bridge": { "type": "str", "required": true },
@@ -95,7 +96,14 @@
9596
}}
9697
}}
9798
}}
98-
}
99+
},
100+
"apic_vmms": { "type" : "seq", "required" : true, "sequence" : [ {
101+
"type" : "map", "required" : true, "mapping" : {
102+
"vmm_name": { "type": "str", "required": true },
103+
"vmm_type": { "type": "str", "required": true },
104+
"vlan_ranges": { "type": "str", "required": true }
105+
}
106+
} ] }
99107
}},
100108
"allow_overlapping_ips": { "type": "bool", "required": true },
101109
"cisco_switches": {

0 commit comments

Comments
 (0)