55
OpenStack architecture: a highlevel view Lorin Hochstein Nimbis Services [email protected] @lhochstein

Os 7 Openstack Dc Python

Embed Size (px)

DESCRIPTION

Openstack Dc Python

Citation preview

Page 1: Os 7 Openstack Dc Python

OpenStack  architecture:    a  high-­‐level  view  

Lorin  Hochstein  Nimbis  Services  

[email protected]  @lhochstein  

Page 2: Os 7 Openstack Dc Python

Where  we’re  going  today  

•  What  is  OpenStack?  •  What  does  the  architecture  look  like?  •  How  do  I  get  access  to  an  OpenStack  cloud?  •  How  do  I  get  involved  with  the  project?  

Page 3: Os 7 Openstack Dc Python

What  is  OpenStack?  

Page 4: Os 7 Openstack Dc Python

OpenStack  provides  users  access  to  compute,  networking  and  storage  

Page 5: Os 7 Openstack Dc Python

Access  compute  resources  

Start 5 servers, each with:• 2 CPUs• 4 GB of RAM• 20 GB of storage

User Suspend server "X"

Snapshot server "X"

Page 6: Os 7 Openstack Dc Python

Access  networking  resources  

Create private network withsubnet 10.2.12.0/24

User

Attach IP address 203.0.113.19 to server "X"

Allow access to ports 80 and 443 for the

"web" group

Page 7: Os 7 Openstack Dc Python

Access  block  storage  resources,    which  aGach  to  servers  like  disks  

Create a 100 GB data volume and attach it to

server "X"

User

Take a snapshot of volume "Q"

Page 8: Os 7 Openstack Dc Python

Access  object  storage  resources,  which  are  accessed  over  HTTP  

Store file family.png in container "photos"

UserMake file logo.png in

container "acme" visible to everyone

Page 9: Os 7 Openstack Dc Python

OpenStack  includes  a  web-­‐based  Dashboard  service  

Credit:  OpenStack  Compute  Admin  Guide  

Page 10: Os 7 Openstack Dc Python

Users  can  also  make  requests  with  command-­‐line  tools  or  REST  API  

$ nova boot --image precise --flavor m1.small myinstance

Client

HTTP POST/servers

{ "server": { "imageRef": ... "flavorRef": ... "name": "myinstance", }}

Page 11: Os 7 Openstack Dc Python

Also...  Python  APIs!  import novaclient.v1_1.client as nvclientcreds = ...nova = nvclient.Client(**creds)image = nova.images.find(name="precise")flavor = nova.flavors.find(name="m1.small")nova.servers.create(image=image, flavor=flavor, name="myinstance")

Page 12: Os 7 Openstack Dc Python

ECO

SYST

EM S

IZE

(Mem

bers

+ S

pons

ors

+ Su

ppor

ters

)

CUMULATIVE CONTRIBUTORS

AVERAGE MONTHLY CONTRIBUTORS

PATCHESMERGED

998 230 7,260

(Grizzly Release Cycle – Six Months)

209Companies

Members: 24 TotalSponsors: 35 Total

Supporters: 150 Total

TOP 10 Countries 1) United States2) China3) India4) Great Britain5) Australia

9,511 6) France7) Russia8) Canada9) Ireland10) Germany IN

DIVI

DUAL

MEM

BERS

Project  is  very  acRve  with  many  contributors  

Credit:  hGp://www.openstack.org/assets/markeRng/presentaRons/GenericPlaTormDeckMay-­‐23-­‐2013.pptx  

Data  from  May  2013  

Page 13: Os 7 Openstack Dc Python

Large  industry  players  among  OpenStack  plaRnum  &  gold  members  

8

Credit:  hGp://www.openstack.org/assets/markeRng/presentaRons/GenericPlaTormDeckMay-­‐23-­‐2013.pptx  

Page 14: Os 7 Openstack Dc Python

No  single  company  dominates  the  project  

Credit:  stackalyRcs.com  

Metric:  lines  of  code  Release:  Havana  Projects:  all  

Page 15: Os 7 Openstack Dc Python

What  does  the  architecture  look  like?  

Page 16: Os 7 Openstack Dc Python

System  is  implemented  as  a  collecRon  of  RESTful  web  services  

Credit:  hGp://www.solinea.com/2013/06/15/  openstack-­‐grizzly-­‐architecture-­‐revisited/  

Page 17: Os 7 Openstack Dc Python

Compute  service  manages  virtual  machines  on  compute  nodes  

Page 18: Os 7 Openstack Dc Python

Image  service  provides  a  catalog  of  virtual  machine  images  

Page 19: Os 7 Openstack Dc Python

IdenRty  service  handles  authenRcaRon  and  maintains  a  catalog  of  all  services  

Page 20: Os 7 Openstack Dc Python

Network  service  manages  network  connecRvity  for  virtual  machines  

Page 21: Os 7 Openstack Dc Python

Block  storage  service  manages  block  devices  that  aGach  to  virtual  machines  

Page 22: Os 7 Openstack Dc Python

Object  storage  service  manages  binary  objects  (files)  accessed  via  HTTP  

Page 23: Os 7 Openstack Dc Python

Dashboard  service  provides  web  interface  for  end-­‐users  &  admins  

Page 24: Os 7 Openstack Dc Python

Let’s  look  at  an  example  

Page 25: Os 7 Openstack Dc Python

Alice  is  a  web  dev  who  needs  an  Ubuntu  server  to  deploy  her  app  for  tesRng  

Page 26: Os 7 Openstack Dc Python

Start  a  server  using  the  ‘ubuntu12.04’  image    and  a8ach  it  to  network  ‘mynet’  

Page 27: Os 7 Openstack Dc Python

1.  Get  the  compute  endpoint  and  an  authenRcaRon  token  

Page 28: Os 7 Openstack Dc Python

2.  Start  a  new  compute  server  

Page 29: Os 7 Openstack Dc Python

3.  Download  the  ubuntu12.04  image  

Page 30: Os 7 Openstack Dc Python

4.  Retrieve  the  image  from  the  object  store  

Page 31: Os 7 Openstack Dc Python

5.  Get  info  to  determine  how  to  connect  the  virtual  machine  to  the  ‘mynet’  network  

Page 32: Os 7 Openstack Dc Python

6.  Start  the  virtual  machine  

Page 33: Os 7 Openstack Dc Python

Alice  sees  that  her  server  is  now  running  and  connects  to  it  via  ssh.  

Page 34: Os 7 Openstack Dc Python

Each  OpenStack  service  is  implemented  as  Linux  daemons    

Example:    Compute  Service  

Page 35: Os 7 Openstack Dc Python

Daemons  use  non-­‐blocking  I/O  with  eventlet  to  handle  mulRple  requests  

OpenStackdaemon

Eventlet

Page 36: Os 7 Openstack Dc Python

Daemons  maintain  persistent  state  using  an  SQL  database  via  SQLAlchemy  

OpenStackdaemon

SQLAlchemy

Page 37: Os 7 Openstack Dc Python

Daemons  communicate  using  remote  procedure  call  over  message  queue  

OpenStackdaemon

kombu

eventlet.green.zmq

qpidmessage

queue

Page 38: Os 7 Openstack Dc Python

Let’s  go  back  to  the  earlier  example,  and  zoom  in  on  the  Compute  service  

Credit:  hGp://www.solinea.com/2013/06/  15/openstack-­‐grizzly-­‐architecture-­‐revisited/  

Page 39: Os 7 Openstack Dc Python

“Start  a  new  compute  server”  request  comes  in  to  the  nova-­‐api  daemon  

Page 40: Os 7 Openstack Dc Python

Ask  nova-­‐scheduler  to  find  a  compute  node  that  can  fulfill  the  request  

Page 41: Os 7 Openstack Dc Python

Dispatch  the  request  to  nova-­‐compute  on  a  node  that  has  enough  resources  

Page 42: Os 7 Openstack Dc Python

Download  the  image  from  the  Image  service  

Page 43: Os 7 Openstack Dc Python

Get  network  connecRon  info  from  Networking  service  

Page 44: Os 7 Openstack Dc Python

Ask  the  hypervisor  to  start  the  virtual  machine  

Page 45: Os 7 Openstack Dc Python

OpenStack  is  a  toolkit  for  building  clouds  using  third-­‐party  technologies  

Compute  

Storage   Network  

Page 46: Os 7 Openstack Dc Python

OpenStack  uses  driver-­‐based  architecture  to  support  different  techs  

compute_driver=xenapi.XenAPIDriver

volume_driver=cinder.volume.drivers.glusterfs. GlusterfsDriver

core_plugin=neutron.plugins.ryu. ryu_neutron_plugin. RyuNeutronPluginV2

Compute  service:  Xen  driver  

Block  storage  service:  Gluster  driver  

Networking  service:  Ryu  plugin  

Page 47: Os 7 Openstack Dc Python

How  do  I  get  access  to  an  OpenStack  cloud?  

Page 48: Os 7 Openstack Dc Python

There  are  several  public  clouds  built  on  OpenStack  

Page 49: Os 7 Openstack Dc Python

TryStack.org  is  a  free  OpenStack  sandbox  for  community  use  

Page 50: Os 7 Openstack Dc Python

DevStack:  shell  scripts  to  deploy  OpenStack  on  a  single  node  

Page 51: Os 7 Openstack Dc Python

How  do  I  get  involved  with  the  project?  

Page 52: Os 7 Openstack Dc Python

Community  help  is  available  via    web,  email  &  IRC  

•  DocumentaRon:  hGp://docs.openstack.org  

•  Mailing  lists:  hGp://lists.openstack.org  – [email protected]    – openstack-­‐[email protected]    

•  QA  site:  hGp://ask.openstack.org  

•  IRC:  #openstack  on  irc.freenode.net    

Page 53: Os 7 Openstack Dc Python

Project  is  very  open  to  new  contributors  

•  hGps://wiki.openstack.org/wiki/How_To_Contribute  

•  #openstack-­‐101  on  irc.freenode.net:    help  for  new  contributors  

•  Developer  mailing  list:  – openstack-­‐[email protected]  – hGp://lists.openstack.org/cgi-­‐bin/mailman/lisRnfo/openstack-­‐dev  

Page 54: Os 7 Openstack Dc Python

Q:  Where  do  I  start?  

A:  Log  a  bug  against  the  documentaRon  when  you  find  something  unclear  or  incorrect    1.  Create  an  account  on  launchpad.net  2.  Go  to  hGps://bugs.launchpad.net/  

                     openstack-­‐manuals/+bugs  3.  Click  on  “Report  a  bug”  in  the  top-­‐right  

Page 55: Os 7 Openstack Dc Python

Fin