Skip to content

Commit 1f16436

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.
1 parent e18adc6 commit 1f16436

File tree

8 files changed

+57
-30
lines changed

8 files changed

+57
-30
lines changed

chef/cookbooks/neutron/recipes/cisco_apic_agents.rb

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

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

chef/cookbooks/neutron/recipes/cisco_apic_support.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
end
4242

4343
aciswitches = node[:neutron][:apic][:apic_switches].to_hash
44+
acivmms = node[:neutron][:apic][:apic_vmms]
4445

4546
template node[:neutron][:ml2_cisco_apic_config_file] do
4647
cookbook "neutron"
@@ -51,6 +52,9 @@
5152
variables(
5253
vpc_pairs: node[:neutron][:apic][:vpc_pairs],
5354
apic_switches: aciswitches,
55+
optimized_dhcp: node[:neutron][:apic][:optimized_dhcp],
56+
optimized_metadata: node[:neutron][:apic][:optimized_metadata],
57+
apic_vmms: acivmms,
5458
ml2_mechanism_drivers: node[:neutron][:ml2_mechanism_drivers],
5559
policy_drivers: "implicit_policy,apic",
5660
default_ip_pool: "192.168.0.0/16"

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/308_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
@@ -63,6 +63,7 @@
6363
"nodes" : [],
6464
"peer_ip": "",
6565
"peer_port": 8009,
66+
"ssl_mode": "encrypted",
6667
"encap": "vxlan",
6768
"integration_bridge": "br-int",
6869
"access_bridge": "br-fabric",
@@ -98,7 +99,17 @@
9899
}
99100
}
100101
}
101-
}
102+
},
103+
"apic_vmms": [{
104+
"vmm_name": "soc_kvm_domain",
105+
"vmm_type": "openstack",
106+
"vlan_ranges": ""
107+
},
108+
{
109+
"vmm_name": "soc_vm_domain",
110+
"vmm_type": "vmware",
111+
"vlan_ranges": ""
112+
}]
102113
},
103114
"allow_overlapping_ips": true,
104115
"use_syslog": false,

chef/data_bags/crowbar/template-neutron.schema

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

0 commit comments

Comments
 (0)