Add OpenFlow/SDN support for VXLAN mesh-topology networks
Change-Id: I81c09c98fd5f19b69bd1357c85d8a3117092ed34
This commit is contained in:
parent
ecc2a44429
commit
1f964175f7
@ -30,6 +30,7 @@ def main():
|
|||||||
CONF.parallel,
|
CONF.parallel,
|
||||||
CONF.chef_repo,
|
CONF.chef_repo,
|
||||||
CONF.chef_repo_branch,
|
CONF.chef_repo_branch,
|
||||||
|
CONF.sdn,
|
||||||
CONF.ssh_keyfile,
|
CONF.ssh_keyfile,
|
||||||
CONF.pool,
|
CONF.pool,
|
||||||
CONF.user,
|
CONF.user,
|
||||||
|
@ -73,6 +73,10 @@ orchestrator_opts = [
|
|||||||
cfg.StrOpt('chef_repo_branch',
|
cfg.StrOpt('chef_repo_branch',
|
||||||
default='master',
|
default='master',
|
||||||
help='name of branch of Chef repo to use'),
|
help='name of branch of Chef repo to use'),
|
||||||
|
cfg.BoolOpt('sdn',
|
||||||
|
default=False,
|
||||||
|
help='whether use SDN/OpenFlow and a full-mesh topology, or a '
|
||||||
|
'star toplogy with conventioanl L2/L3 network'),
|
||||||
cfg.StrOpt('ssh_keyfile',
|
cfg.StrOpt('ssh_keyfile',
|
||||||
default=None,
|
default=None,
|
||||||
help='path of extra public key(s) for node access via ssh'),
|
help='path of extra public key(s) for node access via ssh'),
|
||||||
@ -150,6 +154,7 @@ class Orchestrator(object):
|
|||||||
parallel,
|
parallel,
|
||||||
chef_repo,
|
chef_repo,
|
||||||
chef_repo_branch,
|
chef_repo_branch,
|
||||||
|
sdn,
|
||||||
ssh_keyfile,
|
ssh_keyfile,
|
||||||
pool,
|
pool,
|
||||||
user,
|
user,
|
||||||
@ -181,6 +186,7 @@ class Orchestrator(object):
|
|||||||
self.parallel = parallel
|
self.parallel = parallel
|
||||||
self.chef_repo = chef_repo
|
self.chef_repo = chef_repo
|
||||||
self.chef_repo_branch = chef_repo_branch
|
self.chef_repo_branch = chef_repo_branch
|
||||||
|
self.sdn = sdn
|
||||||
self.ssh_keyfile = ssh_keyfile
|
self.ssh_keyfile = ssh_keyfile
|
||||||
self.pool = pool
|
self.pool = pool
|
||||||
self.user = user
|
self.user = user
|
||||||
@ -423,10 +429,24 @@ class Orchestrator(object):
|
|||||||
"""
|
"""
|
||||||
hostnames = ([self._chefserver_name, self._gateway_name,
|
hostnames = ([self._chefserver_name, self._gateway_name,
|
||||||
self._controller_name] + self._worker_names)
|
self._controller_name] + self._worker_names)
|
||||||
self._add_run_list(hostnames, 'recipe[openvswitch::network-vxlan]')
|
|
||||||
ipaddrs = ([self._chefserver_ip, self._gateway_ip,
|
ipaddrs = ([self._chefserver_ip, self._gateway_ip,
|
||||||
self._controller_ip] + self._worker_ips)
|
self._controller_ip] + self._worker_ips)
|
||||||
self._run_chef_client(ipaddrs)
|
if self.sdn:
|
||||||
|
self._add_run_list(hostnames,
|
||||||
|
'recipe[openvswitch::network-vxlan-mesh]')
|
||||||
|
self._run_chef_client(ipaddrs)
|
||||||
|
self._add_run_list(hostnames,
|
||||||
|
'recipe[openvswitch::openflow-apply]')
|
||||||
|
self._run_chef_client(ipaddrs)
|
||||||
|
self._add_run_list([self._controller_name],
|
||||||
|
'recipe[openvswitch::sdn-controller]')
|
||||||
|
self._run_chef_client([self._controller_ip])
|
||||||
|
# sleep some time to let nodes connect to SDN controller
|
||||||
|
time.sleep(5)
|
||||||
|
else:
|
||||||
|
self._add_run_list(hostnames,
|
||||||
|
'recipe[openvswitch::network-vxlan-star]')
|
||||||
|
self._run_chef_client(ipaddrs)
|
||||||
|
|
||||||
def _deploy_dnsmasq(self):
|
def _deploy_dnsmasq(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user