OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

36
OpenStack and OpenContrail on FreeBSD pla4orm Michał Dubiel EuroBSDCon 2014, Sofia, Bulgaria

Transcript of OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

Page 1: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

OpenStack  and  OpenContrail  on  FreeBSD  pla4orm  

Michał  Dubiel  EuroBSDCon  2014,  Sofia,  Bulgaria  

Page 2: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

Outline  

•  OpenStack  –  IntroducDon  – Nova  Compute  driver  – Nova  Network  driver  

•  OpenContrail  – Why?  – Overlay  networks  vs  vlans  – SoLware  architecture  

•  Status,  next  steps  

Page 3: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

Machines  in  a  datacenter  

VM  VM  VM  VM  

hypervisor  

VM  VM  VM  VM  

hypervisor  

MIGRATIONS  

VM  VM  VM  VM  

hypervisor  

VM  VM  VM  VM  

hypervisor  

Storage  appliance  

Page 4: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

Cloud  operaDng  system  

source:  openstack.org  

Page 5: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

OpenStack  introducDon  

•  “Massively  scalable  cloud  operaDng  system”  •  Aims  to  manage  – Compute  – Storage  – Network  

•  Major  components  – Compute  (Nova)  – Storage  (SwiL,  Cinder)  – Networking  (Neutron)  

 

Page 6: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

OpenStack  components  •  There  is  a  lot  of  soLware  components  – Nova  (compute  manager,  networking  manager,  scheduler,  etc.)  

– Neutron  (controller,  agents)  – Glance  (image  service)  – API  servers  – Message  queues  –  Etc.  

•  FreeBSD  support  is  about  the  compute  node  – Depended  on  underlying  OS  pla4orm  – Another  hypervisor  (bhyve)  

Page 7: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

Networking  service  -­‐  OpenContrail  

source:  openstack.org  

Page 8: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

Compute  node  Nova  

Scheduler  Nova  network  

server  

Nova  network  

bhyve  

VM   VM   VM  

Bridge  Kernel  space  

Nova  compute  

Libvirt  

Page 9: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

OpenStack  compute  node  

•  nova-compute:  manages  compuDng  instances  on  host  machines  –  Run/terminate/reboot  instances  – Aaach/detach  volumes  –  Console  output  

•  nova-network:  manages  networking  resources!–  Responsible  for  sebng  up  networking  between  VMs  –  Simple  soluDons  (bridges,  vlans,  etc.)  

Page 10: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

Spawning  a  VM  •  Nova  scheduler  choses  a  compute  node  for  a  VM  •  The  nova-­‐compute  fetches  the  VM  image  from  glance  service  

•  The  nova-­‐compute  builds  a  libvirt  XML  definiDon  for  the  VM  

•  The  nova-­‐network  configures  bridge  for  VM  networking  

•  The  nova-­‐compute  invokes  libvirt  and  spawns  the  VM  –  Libvirt  adds  tap  device  to  the  bridge  connecDng  that  way  the  VM  to  the  virtual  network  

Page 11: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

FreeBSD  Development  

•  Libvirt  support  for  bhyve    – Work  of  Roman  Bogorodskiy  –  Few  new  features  and  fixes!

•  nova-compute  adjustments  for  new  hypervisor  type  –  bhyve  

•  nova-­‐network  support  for  FreeBSD    –  ifconfig  vs.  brctl,  ip  tool  –  dnsmasq    

•  Devstack  support  for  FreeBSD  

Page 12: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

Networking  service  -­‐  OpenContrail  

source:  openstack.org  

Page 13: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

Rack,  servers,  VMs  

VM  VM  VM  VM  

hypervisor  

VM  VM  VM  VM  

hypervisor  

VM  VM  VM  VM  

hypervisor  

Server  rack  

To  spine  switch  

Page 14: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

Datacenter  architecture  Clos  network  

Page 15: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

ObservaDons  

•  Majority  of  network  endpoints  are  virtual  

•  Network  isolaDon  between  them  has  to  be  available  

• While  using  the  same  physical  network  

•  Endpoint  may  migrate  from  one  physical  host  to  another  

Page 16: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

SoluDons  

•  Bridges  +  vlans  – What  nova-­‐network  provides  – Limited,  not  flexible  

•  Overlay  networking  (OpenContrail)  – Available  as  a  Neutron  plugin  – Flexible  – Scalable  

Page 17: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

VLANs  

•  VM’s  interfaces  placed  on  bridges  – Each  bridge  for  a  virtual  network  

•  4096  VLAN  tags  limit  – Can  be  extended  using  Shortest  Path  Bridging  

•  Difficult  to  manage  •  Physical  switches  has  to  contain  the  VN  state  

Page 18: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

VM  migraDon  example  

VM1   VM2  

Server  1  

VM3  

VM4   VM5  

Server  2  

VM6  

VM7   VM8  

Server  3  

VM9  

Physical  switch  

Virtual  networks:  

1   2  

3  

Page 19: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

VM  migraDon  example  

VM1   VM2  

Server  1  

VM3  

VM4   VM5  

Server  2  

VM6  

VM7   VM8  

Server  3  

VM9  

Physical  switch  

Virtual  networks:  

1   2  

3  

VM9   Payload  

Eth  +  VLAN  tag  +  IP  

Page 20: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

VM  migraDon  example  

VM1   VM2  

Server  1  

VM3  

VM4   VM5  

Server  2  

VM6  

VM7   VM8  

Server  3  

VM9  Physical  switch  

Virtual  networks:  

1   2  

3  

VM9   Payload  

Eth  +  VLAN  tag  +  IP  

Page 21: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

Overlay  networking  

•  “Old”  technology,  relaDvely  new  for  data-­‐centers  

•  Physical  underlay  network  –  IP  fabric  – No  tenant  state  

•  Virtual  overlay  network  – Tenant  state  – Dynamic  tunnels  (MPLSoGRE,  VXLAN,  etc.)  

Page 22: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

VM  migraDon  example  

VM1   VM2  

Server  1  

VM3  

VM4   VM5  

Server  2  

VM6  

VM7   VM8  

Server  3  

VM9  

Physical  switch  

Virtual  networks:  

1   2  

3  

S3   VM9   Payload   Physical  network:  

Eth  +  IP  

Page 23: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

VM  migraDon  example  

VM1   VM2  

Server  1  

VM3  

VM4   VM5  

Server  2  

VM6  

VM7   VM8  

Server  3  

VM9  Physical  switch  

Virtual  networks:  

1   2  

3  

S2   VM9   Payload   Physical  network:  

Eth  +  IP  

Page 24: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

Advantages  

•  “Knowledge”  about  network  only  in  the  soLware  (Controllers,  compute  nodes)  

•  Any  switch  works  for  IP  fabric  network  – No  configuraDon  – Only  speed  maaers  – Lower  price  

•  In  case  of  OpenContrail  standards-­‐based  (MPLS,  BGP,  VXLAN,  etc.)  

Page 25: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

SDN  in  cloud  orchestraDon  

Source:  www.opencontrail.org  

Page 26: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

Architecture  overview  

Source:  www.opencontrail.org  

Page 27: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

ConfiguraDon  node  

Source:  www.opencontrail.org  

Page 28: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

Controller  node  

Source:  www.opencontrail.org  

Page 29: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

Compute  node  Nova  

Scheduler  Contrail  Control  

node  

Nova  vif  driver  

bhyve  

VM   VM   VM  

Contrail  Agent  

Contrail  vRouter  

Kernel  space  

Nova  compute  

Libvirt  

NetLink  /dev/flow  pkt  

TCP  

Page 30: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

vRouter  forwarding  plane  

Source:  www.opencontrail.org  

Page 31: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

MPLSoGRE  example  

Source:  www.opencontrail.org  

Page 32: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

OpenContrail  summary  

•  High-­‐level  descripDon  of  networks  – allow    any    src-­‐vn  -­‐>  dst-­‐vn    svc-­‐1,  svc-­‐2  

•  Horizontally  scalable  •  Fault  tolerant  •  Works  with  exisDng  equipment  •  Open  sourced  (FreeBSD  support  included  in  official  repos)  

Page 33: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

AnalyDcs  node  

Source:  www.opencontrail.org  

Page 34: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

FreeBSD  development  

•  vRouter  kernel  module  – New  module  – Common  parts  OS  agnosDc  (/dp-core) – FreeBSD  related  code  (/freebsd)  

•  Agent  support  for  FreeBSD  –  Ioctls,  tap  devices  – Shared  memory  (/dev/flow)  – Listener  – Lots  of  refactoring  done  

Page 35: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

TODOs  •  Libvirt  improvements  •  OpenStack  improvements  –  Support  limited  by  libvirt  capabiliDes  on  FreeBSD  –  Firewal  (pf,  ipfw,  ipfilter)  –  Currently  a  fork  of  nova  is  required  

•  Different  OpenContrail  operaDon  modes  – MPLSoUDP,  VXLAN,  etc.  

•  AutomaDc  provisioning  –  Contrail-­‐installer  scripts    – Devstack  

Page 36: OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel

     

Any  quesDons?