SlideShare uma empresa Scribd logo
1 de 19
Baixar para ler offline
Hacking on
OpenStack’s
Nova Source Code

2012-01-08




Luo, Zhongyue
zhongyue@staff.sina.com.cn
TODO
 Intro
 The source code structure of Nova
     File structure
     Component architecture
 An example
 Contributing
 Conclusion


                                     2
Intro


        What is OpenStack? and Nova?

 WHY shoud I listen to this?
   Can we actually hack the code in 30min?

         Why should I trust this guy?


                                             3
Source code structure of Nova


         Macro vs Micro(DIY)
               File structure

         Component architecture

  File structure ↔ Component architecture


                                            4
But first...terminologies
  Service
  Topic
  Nova component → Service.create(Topic)
  Manager (abst) ⊂ Nova component
  Drivers (impl) ⊂ Manager
      ex) lvm, qemu, xen, hyperV
  Lazy plugging → Value based module loading
  AMQP → Advanced Message Queue Protocol
  API → REST & Inner                           5
File structure
                  ”start”
                ”configs”
                ”helpers”
       ”REST”               ”is a topic”



                            ”is a topic”



                            ”is a topic”



                            ”is a topic”




                                           6
Component architecture
   Tenant
            http://nova.openstack.org/nova.concepts.html




                                                           7
Component architecture    ”/etc/nova/nova.conf”




         ”ec2”, ”osapi”




                                            8
”network”


?

?



                9
Component structure
                  ”network”
                           Network service
                                      Periodic    Topic: network
                                      task

                      Manager


                                                 Driver: linux_net



                                  Reads message from Queue
                                  Returns results back to DB or queue
                                  Calls inner APIs
        Network API
                            Looks up DB
                            Sends message to Service via queue
                            - Cast: Send and forget
                            - Call: Send and wait                    10
Component architecture revisited



                         DB


       API

             API
                                    Queue
                   API

                              API

    WSGI


                                            11
An example


Let’s allocate a
floating-ip to an
instance with a fixed-ip
                                   DB

   ”compute API”
                 API
             1         API
                                                         Queue
                             API
                                   Allocate 10.2.3.11 to a-fake-uuid?
                                        API
                                       Do you have permission?
           WSGI                     I wonder if a-fake-uuid exists...
                                          I’ll ask compute API.

POST /v2/a-fake-tenant/servers/a-fake-uuid/action                       12
An example


     Yup, a-fake-uuid is valid.
Oh, and its fixed-ip is 192.168.0.8.
 Take it from here network API!

                                       2         DB

    ”compute API”
                   API

                         3   API
                                                            Queue
                     ”network API”         API

                                                      API

              WSGI


                                                                    13
An example
                                                          ”nova-network”


So translate 192.168.0.8 to 10.2.3.11?                                 Go and get your mail.
      I’ll tell nova-network to run
         ”associate_floating_ip”.
          Ok, my casting is done.
                                           DB                       I got a message!
                                                              Dear manager,
   ”compute API”                                                 ”associate_floating_ip”
                  API                                     5
                            API                       4        Queue
                    ”network API”    API

                                                API

             WSGI


                                                                                           14
An example
                                                     ”nova network”

                                                                   7   iptables


                                           6
                                      DB                 192.168.0.8 ↔ 10.2.3.11
                                                            DB update...Done.
”compute API”                                          Running iptables-save...Done.
            API

                       API
                                                        Queue
                ”network API”   API

                                               API

        WSGI


                                                                                  15
An example
                                                             ”nova network”




Did the allocation
                             a-fake-uuid: 192.168.0.8 ↔ 10.2.3.11
finish?
                                   2         DB

   ”compute API”
                 API    3
             1              API
                                                                Queue
                   ”network API”       API                Here’s the details of a-fake-uuid.
               4                                  API
                                   You want to see if the allocation was a success?
           WSGI
                                           I’ll check with compute API...

GET /v2/a-fake-tenant/servers/a-fake-uuid                                                  16
OpenStack Nova architecture
                                                      ”nova network”



                      ”nova volume”
                                                                  ”nova compute”


                                     DB

 ”compute API”
            API

                      API
                                ”scheduler API”           Queue
               ”network API”   API                                 ”nova scheduler”
                                          API

        WSGI                               ”volume API”


                                                                                17
Contributing
 LaunchPad
     http://launchpad.net/~openstack
     Join mailing lists
 Documents
     http://docs.openstack.org/
 More info
     http://wiki.openstack.org/HowToContribute



                                                 18
Conclusion

 Structure of code and components of Nova

               An example

            How to get involved

 http://github.com/lzyeval/talk-COSUG-2012

      http://launchpad.net/~lzyeval

                                             19

Mais conteúdo relacionado

Mais procurados

RTP NPUG: Ansible Intro and Integration with ACI
RTP NPUG: Ansible Intro and Integration with ACIRTP NPUG: Ansible Intro and Integration with ACI
RTP NPUG: Ansible Intro and Integration with ACIJoel W. King
 
Kubernetes operator for MySQL
Kubernetes operator for MySQLKubernetes operator for MySQL
Kubernetes operator for MySQLMydbops
 
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub ServiceOracle Korea
 
8 Lessons Learned from Using Kafka in 1000 Scala microservices - Scale by the...
8 Lessons Learned from Using Kafka in 1000 Scala microservices - Scale by the...8 Lessons Learned from Using Kafka in 1000 Scala microservices - Scale by the...
8 Lessons Learned from Using Kafka in 1000 Scala microservices - Scale by the...Natan Silnitsky
 
How Splunk Is Using Pulsar IO
How Splunk Is Using Pulsar IOHow Splunk Is Using Pulsar IO
How Splunk Is Using Pulsar IOStreamNative
 
One tool, two fabrics: Ansible and Nexus 9000
One tool, two fabrics: Ansible and Nexus 9000One tool, two fabrics: Ansible and Nexus 9000
One tool, two fabrics: Ansible and Nexus 9000Joel W. King
 
Introducing envoy-based service mesh at Booking.com
Introducing envoy-based service mesh at Booking.comIntroducing envoy-based service mesh at Booking.com
Introducing envoy-based service mesh at Booking.comIvan Kruglov
 
Configuration Management Tools on NX-OS
Configuration Management Tools on NX-OSConfiguration Management Tools on NX-OS
Configuration Management Tools on NX-OSCisco DevNet
 
Implementing an IPv6 Enabled Environment for a Public Cloud Tenant
Implementing an IPv6 Enabled Environment for a Public Cloud TenantImplementing an IPv6 Enabled Environment for a Public Cloud Tenant
Implementing an IPv6 Enabled Environment for a Public Cloud TenantShixiong Shang
 
Service Discovery using etcd, Consul and Kubernetes
Service Discovery using etcd, Consul and KubernetesService Discovery using etcd, Consul and Kubernetes
Service Discovery using etcd, Consul and KubernetesSreenivas Makam
 
Re-envisioning the Lambda Architecture : Web Services & Real-time Analytics ...
Re-envisioning the Lambda Architecture : Web Services & Real-time Analytics ...Re-envisioning the Lambda Architecture : Web Services & Real-time Analytics ...
Re-envisioning the Lambda Architecture : Web Services & Real-time Analytics ...Brian O'Neill
 
Using Apache Kafka from Go
Using Apache Kafka from GoUsing Apache Kafka from Go
Using Apache Kafka from GoNikolay Stoitsev
 
FIWARE Data Management in High Availability
FIWARE Data Management in High AvailabilityFIWARE Data Management in High Availability
FIWARE Data Management in High AvailabilityFederico Michele Facca
 
Flight recordings and mission control through thick clouds
Flight recordings and mission control through thick cloudsFlight recordings and mission control through thick clouds
Flight recordings and mission control through thick cloudsMartin (高馬丁) Skarsaune
 
Azure Signalr Service
Azure Signalr ServiceAzure Signalr Service
Azure Signalr ServiceAndrea Tosato
 
Strata London 2018: Multi-everything with Apache Pulsar
Strata London 2018:  Multi-everything with Apache PulsarStrata London 2018:  Multi-everything with Apache Pulsar
Strata London 2018: Multi-everything with Apache PulsarStreamlio
 
The Cloud Foundry bootcamp talk from SpringOne On The Road - Europe
The Cloud Foundry bootcamp talk from SpringOne On The Road - EuropeThe Cloud Foundry bootcamp talk from SpringOne On The Road - Europe
The Cloud Foundry bootcamp talk from SpringOne On The Road - EuropeJoshua Long
 
No Surprises Geo Replication - Pulsar Virtual Summit Europe 2021
No Surprises Geo Replication - Pulsar Virtual Summit Europe 2021No Surprises Geo Replication - Pulsar Virtual Summit Europe 2021
No Surprises Geo Replication - Pulsar Virtual Summit Europe 2021StreamNative
 

Mais procurados (18)

RTP NPUG: Ansible Intro and Integration with ACI
RTP NPUG: Ansible Intro and Integration with ACIRTP NPUG: Ansible Intro and Integration with ACI
RTP NPUG: Ansible Intro and Integration with ACI
 
Kubernetes operator for MySQL
Kubernetes operator for MySQLKubernetes operator for MySQL
Kubernetes operator for MySQL
 
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
 
8 Lessons Learned from Using Kafka in 1000 Scala microservices - Scale by the...
8 Lessons Learned from Using Kafka in 1000 Scala microservices - Scale by the...8 Lessons Learned from Using Kafka in 1000 Scala microservices - Scale by the...
8 Lessons Learned from Using Kafka in 1000 Scala microservices - Scale by the...
 
How Splunk Is Using Pulsar IO
How Splunk Is Using Pulsar IOHow Splunk Is Using Pulsar IO
How Splunk Is Using Pulsar IO
 
One tool, two fabrics: Ansible and Nexus 9000
One tool, two fabrics: Ansible and Nexus 9000One tool, two fabrics: Ansible and Nexus 9000
One tool, two fabrics: Ansible and Nexus 9000
 
Introducing envoy-based service mesh at Booking.com
Introducing envoy-based service mesh at Booking.comIntroducing envoy-based service mesh at Booking.com
Introducing envoy-based service mesh at Booking.com
 
Configuration Management Tools on NX-OS
Configuration Management Tools on NX-OSConfiguration Management Tools on NX-OS
Configuration Management Tools on NX-OS
 
Implementing an IPv6 Enabled Environment for a Public Cloud Tenant
Implementing an IPv6 Enabled Environment for a Public Cloud TenantImplementing an IPv6 Enabled Environment for a Public Cloud Tenant
Implementing an IPv6 Enabled Environment for a Public Cloud Tenant
 
Service Discovery using etcd, Consul and Kubernetes
Service Discovery using etcd, Consul and KubernetesService Discovery using etcd, Consul and Kubernetes
Service Discovery using etcd, Consul and Kubernetes
 
Re-envisioning the Lambda Architecture : Web Services & Real-time Analytics ...
Re-envisioning the Lambda Architecture : Web Services & Real-time Analytics ...Re-envisioning the Lambda Architecture : Web Services & Real-time Analytics ...
Re-envisioning the Lambda Architecture : Web Services & Real-time Analytics ...
 
Using Apache Kafka from Go
Using Apache Kafka from GoUsing Apache Kafka from Go
Using Apache Kafka from Go
 
FIWARE Data Management in High Availability
FIWARE Data Management in High AvailabilityFIWARE Data Management in High Availability
FIWARE Data Management in High Availability
 
Flight recordings and mission control through thick clouds
Flight recordings and mission control through thick cloudsFlight recordings and mission control through thick clouds
Flight recordings and mission control through thick clouds
 
Azure Signalr Service
Azure Signalr ServiceAzure Signalr Service
Azure Signalr Service
 
Strata London 2018: Multi-everything with Apache Pulsar
Strata London 2018:  Multi-everything with Apache PulsarStrata London 2018:  Multi-everything with Apache Pulsar
Strata London 2018: Multi-everything with Apache Pulsar
 
The Cloud Foundry bootcamp talk from SpringOne On The Road - Europe
The Cloud Foundry bootcamp talk from SpringOne On The Road - EuropeThe Cloud Foundry bootcamp talk from SpringOne On The Road - Europe
The Cloud Foundry bootcamp talk from SpringOne On The Road - Europe
 
No Surprises Geo Replication - Pulsar Virtual Summit Europe 2021
No Surprises Geo Replication - Pulsar Virtual Summit Europe 2021No Surprises Geo Replication - Pulsar Virtual Summit Europe 2021
No Surprises Geo Replication - Pulsar Virtual Summit Europe 2021
 

Destaque

My life
My lifeMy life
My lifedcbabb
 
06 enterprise resource planning
06 enterprise resource planning06 enterprise resource planning
06 enterprise resource planningArip Doanx
 
Doublerbuxtutorial
DoublerbuxtutorialDoublerbuxtutorial
Doublerbuxtutorialcutiekate78
 
Empacotamento e backport de aplicações em debian
Empacotamento e backport de aplicações em debianEmpacotamento e backport de aplicações em debian
Empacotamento e backport de aplicações em debianAndre Ferraz
 
Lecture ready class 5
Lecture ready class 5Lecture ready class 5
Lecture ready class 5Les Davy
 
Goede leiders zijn goede verhalenvertellers - Hans Donckers - Beanmachine
Goede leiders zijn goede verhalenvertellers - Hans Donckers - BeanmachineGoede leiders zijn goede verhalenvertellers - Hans Donckers - Beanmachine
Goede leiders zijn goede verhalenvertellers - Hans Donckers - BeanmachineAntwerp Management School
 
Walking the talk - 3 insights from Behavior Design
Walking the talk - 3 insights from Behavior DesignWalking the talk - 3 insights from Behavior Design
Walking the talk - 3 insights from Behavior DesignAngad Singh
 
Vesterinen: Etsivä nuorisotyö, ammattina välittäminen
Vesterinen: Etsivä nuorisotyö, ammattina välittäminenVesterinen: Etsivä nuorisotyö, ammattina välittäminen
Vesterinen: Etsivä nuorisotyö, ammattina välittäminenKouluterveyskysely
 
Elements, Compounds & Mixtures Day 3
Elements, Compounds & Mixtures Day 3Elements, Compounds & Mixtures Day 3
Elements, Compounds & Mixtures Day 3jmori1
 
Notam Sul/Sudeste - 01-mai-16
Notam Sul/Sudeste - 01-mai-16Notam Sul/Sudeste - 01-mai-16
Notam Sul/Sudeste - 01-mai-16Carlos Carvalho
 
Link Building With Twitter
Link Building With TwitterLink Building With Twitter
Link Building With TwitterAman Talwar
 

Destaque (20)

Options for filmingh
Options for filminghOptions for filmingh
Options for filmingh
 
3words pp
3words pp3words pp
3words pp
 
My life
My lifeMy life
My life
 
Kites
KitesKites
Kites
 
06 enterprise resource planning
06 enterprise resource planning06 enterprise resource planning
06 enterprise resource planning
 
Globo
GloboGlobo
Globo
 
Doublerbuxtutorial
DoublerbuxtutorialDoublerbuxtutorial
Doublerbuxtutorial
 
Empacotamento e backport de aplicações em debian
Empacotamento e backport de aplicações em debianEmpacotamento e backport de aplicações em debian
Empacotamento e backport de aplicações em debian
 
Lecture ready class 5
Lecture ready class 5Lecture ready class 5
Lecture ready class 5
 
Goede leiders zijn goede verhalenvertellers - Hans Donckers - Beanmachine
Goede leiders zijn goede verhalenvertellers - Hans Donckers - BeanmachineGoede leiders zijn goede verhalenvertellers - Hans Donckers - Beanmachine
Goede leiders zijn goede verhalenvertellers - Hans Donckers - Beanmachine
 
Walking the talk - 3 insights from Behavior Design
Walking the talk - 3 insights from Behavior DesignWalking the talk - 3 insights from Behavior Design
Walking the talk - 3 insights from Behavior Design
 
Model answers
Model answers Model answers
Model answers
 
Privatsparande
PrivatsparandePrivatsparande
Privatsparande
 
Vesterinen: Etsivä nuorisotyö, ammattina välittäminen
Vesterinen: Etsivä nuorisotyö, ammattina välittäminenVesterinen: Etsivä nuorisotyö, ammattina välittäminen
Vesterinen: Etsivä nuorisotyö, ammattina välittäminen
 
Infográfico Pessoal
Infográfico PessoalInfográfico Pessoal
Infográfico Pessoal
 
Elements, Compounds & Mixtures Day 3
Elements, Compounds & Mixtures Day 3Elements, Compounds & Mixtures Day 3
Elements, Compounds & Mixtures Day 3
 
Slide share test 110727
Slide share test 110727Slide share test 110727
Slide share test 110727
 
Notam Sul/Sudeste - 01-mai-16
Notam Sul/Sudeste - 01-mai-16Notam Sul/Sudeste - 01-mai-16
Notam Sul/Sudeste - 01-mai-16
 
Linkedin
LinkedinLinkedin
Linkedin
 
Link Building With Twitter
Link Building With TwitterLink Building With Twitter
Link Building With Twitter
 

Semelhante a Cosug 2012-lzy

Openstack Quantum yahoo meetup 1 23-13
Openstack Quantum yahoo meetup 1 23-13Openstack Quantum yahoo meetup 1 23-13
Openstack Quantum yahoo meetup 1 23-13Dan Wendlandt
 
OpenStack 101 Technical Overview
OpenStack 101 Technical OverviewOpenStack 101 Technical Overview
OpenStack 101 Technical OverviewOpen Stack
 
Blue host openstacksummit_2013
Blue host openstacksummit_2013Blue host openstacksummit_2013
Blue host openstacksummit_2013Jun Park
 
Blue host using openstack in a traditional hosting environment
Blue host using openstack in a traditional hosting environmentBlue host using openstack in a traditional hosting environment
Blue host using openstack in a traditional hosting environmentOpenStack Foundation
 
2003 scalable networking - unknown
2003 scalable networking - unknown2003 scalable networking - unknown
2003 scalable networking - unknownGeorge Ang
 
Am 04 track1--salvatore orlando--openstack-apac-2012-final
Am 04 track1--salvatore orlando--openstack-apac-2012-finalAm 04 track1--salvatore orlando--openstack-apac-2012-final
Am 04 track1--salvatore orlando--openstack-apac-2012-finalOpenCity Community
 
A Tale of a Server Architecture (Frozen Rails 2012)
A Tale of a Server Architecture (Frozen Rails 2012)A Tale of a Server Architecture (Frozen Rails 2012)
A Tale of a Server Architecture (Frozen Rails 2012)Flowdock
 
Quantum grizzly summit
Quantum   grizzly summitQuantum   grizzly summit
Quantum grizzly summitDan Wendlandt
 
Quantum PTL Update - Grizzly Summit.pptx
Quantum PTL Update - Grizzly Summit.pptxQuantum PTL Update - Grizzly Summit.pptx
Quantum PTL Update - Grizzly Summit.pptxOpenStack Foundation
 
Scalable Networking
Scalable NetworkingScalable Networking
Scalable Networkingl xf
 
Building Fault Tolerant, Highly Available and Secured Architectures - Simon E...
Building Fault Tolerant, Highly Available and Secured Architectures - Simon E...Building Fault Tolerant, Highly Available and Secured Architectures - Simon E...
Building Fault Tolerant, Highly Available and Secured Architectures - Simon E...Amazon Web Services
 
Load Balancing in the Cloud using Nginx & Kubernetes
Load Balancing in the Cloud using Nginx & KubernetesLoad Balancing in the Cloud using Nginx & Kubernetes
Load Balancing in the Cloud using Nginx & KubernetesLee Calcote
 
OSGi Service Platform 4.2
OSGi Service Platform 4.2OSGi Service Platform 4.2
OSGi Service Platform 4.2Ilya Katsov
 
Mastering Kubernetes on AWS (CON301-R1) - AWS re:Invent 2018
Mastering Kubernetes on AWS (CON301-R1) - AWS re:Invent 2018Mastering Kubernetes on AWS (CON301-R1) - AWS re:Invent 2018
Mastering Kubernetes on AWS (CON301-R1) - AWS re:Invent 2018Amazon Web Services
 
Using OSGi for script deployment in Apache Sling
Using OSGi for script deployment in Apache SlingUsing OSGi for script deployment in Apache Sling
Using OSGi for script deployment in Apache SlingRadu Cotescu
 
RunningQuantumOnQuantumAtNicira.pdf
RunningQuantumOnQuantumAtNicira.pdfRunningQuantumOnQuantumAtNicira.pdf
RunningQuantumOnQuantumAtNicira.pdfOpenStack Foundation
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop OverviewShubhra Kar
 
Meetup open stack_grizzly
Meetup open stack_grizzlyMeetup open stack_grizzly
Meetup open stack_grizzlyeNovance
 
Windows Server 2008 Web Workload Overview
Windows Server 2008 Web Workload OverviewWindows Server 2008 Web Workload Overview
Windows Server 2008 Web Workload OverviewDavid Chou
 

Semelhante a Cosug 2012-lzy (20)

Openstack Quantum yahoo meetup 1 23-13
Openstack Quantum yahoo meetup 1 23-13Openstack Quantum yahoo meetup 1 23-13
Openstack Quantum yahoo meetup 1 23-13
 
Crx 2.2 Deep-Dive
Crx 2.2 Deep-DiveCrx 2.2 Deep-Dive
Crx 2.2 Deep-Dive
 
OpenStack 101 Technical Overview
OpenStack 101 Technical OverviewOpenStack 101 Technical Overview
OpenStack 101 Technical Overview
 
Blue host openstacksummit_2013
Blue host openstacksummit_2013Blue host openstacksummit_2013
Blue host openstacksummit_2013
 
Blue host using openstack in a traditional hosting environment
Blue host using openstack in a traditional hosting environmentBlue host using openstack in a traditional hosting environment
Blue host using openstack in a traditional hosting environment
 
2003 scalable networking - unknown
2003 scalable networking - unknown2003 scalable networking - unknown
2003 scalable networking - unknown
 
Am 04 track1--salvatore orlando--openstack-apac-2012-final
Am 04 track1--salvatore orlando--openstack-apac-2012-finalAm 04 track1--salvatore orlando--openstack-apac-2012-final
Am 04 track1--salvatore orlando--openstack-apac-2012-final
 
A Tale of a Server Architecture (Frozen Rails 2012)
A Tale of a Server Architecture (Frozen Rails 2012)A Tale of a Server Architecture (Frozen Rails 2012)
A Tale of a Server Architecture (Frozen Rails 2012)
 
Quantum grizzly summit
Quantum   grizzly summitQuantum   grizzly summit
Quantum grizzly summit
 
Quantum PTL Update - Grizzly Summit.pptx
Quantum PTL Update - Grizzly Summit.pptxQuantum PTL Update - Grizzly Summit.pptx
Quantum PTL Update - Grizzly Summit.pptx
 
Scalable Networking
Scalable NetworkingScalable Networking
Scalable Networking
 
Building Fault Tolerant, Highly Available and Secured Architectures - Simon E...
Building Fault Tolerant, Highly Available and Secured Architectures - Simon E...Building Fault Tolerant, Highly Available and Secured Architectures - Simon E...
Building Fault Tolerant, Highly Available and Secured Architectures - Simon E...
 
Load Balancing in the Cloud using Nginx & Kubernetes
Load Balancing in the Cloud using Nginx & KubernetesLoad Balancing in the Cloud using Nginx & Kubernetes
Load Balancing in the Cloud using Nginx & Kubernetes
 
OSGi Service Platform 4.2
OSGi Service Platform 4.2OSGi Service Platform 4.2
OSGi Service Platform 4.2
 
Mastering Kubernetes on AWS (CON301-R1) - AWS re:Invent 2018
Mastering Kubernetes on AWS (CON301-R1) - AWS re:Invent 2018Mastering Kubernetes on AWS (CON301-R1) - AWS re:Invent 2018
Mastering Kubernetes on AWS (CON301-R1) - AWS re:Invent 2018
 
Using OSGi for script deployment in Apache Sling
Using OSGi for script deployment in Apache SlingUsing OSGi for script deployment in Apache Sling
Using OSGi for script deployment in Apache Sling
 
RunningQuantumOnQuantumAtNicira.pdf
RunningQuantumOnQuantumAtNicira.pdfRunningQuantumOnQuantumAtNicira.pdf
RunningQuantumOnQuantumAtNicira.pdf
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
 
Meetup open stack_grizzly
Meetup open stack_grizzlyMeetup open stack_grizzly
Meetup open stack_grizzly
 
Windows Server 2008 Web Workload Overview
Windows Server 2008 Web Workload OverviewWindows Server 2008 Web Workload Overview
Windows Server 2008 Web Workload Overview
 

Mais de OpenCity Community

Mais de OpenCity Community (20)

开源讲义.pdf
开源讲义.pdf开源讲义.pdf
开源讲义.pdf
 
物联网操作系统漫谈-GIAC大会.pdf
物联网操作系统漫谈-GIAC大会.pdf物联网操作系统漫谈-GIAC大会.pdf
物联网操作系统漫谈-GIAC大会.pdf
 
2017开源年会-企业开源那些事儿-更新.pdf
2017开源年会-企业开源那些事儿-更新.pdf2017开源年会-企业开源那些事儿-更新.pdf
2017开源年会-企业开源那些事儿-更新.pdf
 
社会化研发
社会化研发社会化研发
社会化研发
 
Containers & CaaS
Containers & CaaSContainers & CaaS
Containers & CaaS
 
OaaS:Open as a Strategy
OaaS:Open as a StrategyOaaS:Open as a Strategy
OaaS:Open as a Strategy
 
Hello openstack 2014
Hello openstack 2014Hello openstack 2014
Hello openstack 2014
 
Docker openstack-2014
Docker openstack-2014Docker openstack-2014
Docker openstack-2014
 
Learn OpenStack from trystack.cn
Learn OpenStack from trystack.cnLearn OpenStack from trystack.cn
Learn OpenStack from trystack.cn
 
OpenStack系列公开课2 -20130508
OpenStack系列公开课2 -20130508OpenStack系列公开课2 -20130508
OpenStack系列公开课2 -20130508
 
OpenStack ecosystem
OpenStack ecosystemOpenStack ecosystem
OpenStack ecosystem
 
How to master OpenStack in 2 hours
How to master OpenStack in 2 hoursHow to master OpenStack in 2 hours
How to master OpenStack in 2 hours
 
Learn OpenStack from trystack.cn ——Folsom in practice
Learn OpenStack from trystack.cn  ——Folsom in practiceLearn OpenStack from trystack.cn  ——Folsom in practice
Learn OpenStack from trystack.cn ——Folsom in practice
 
Quantum Networks
Quantum NetworksQuantum Networks
Quantum Networks
 
云计算思考
云计算思考云计算思考
云计算思考
 
Openstorage Openstack
Openstorage OpenstackOpenstorage Openstack
Openstorage Openstack
 
Openstack的研究与实践
Openstack的研究与实践Openstack的研究与实践
Openstack的研究与实践
 
Open Stack Cheng Du Swift Alex Yang
Open Stack Cheng Du Swift Alex YangOpen Stack Cheng Du Swift Alex Yang
Open Stack Cheng Du Swift Alex Yang
 
Nova与虚拟机管理
Nova与虚拟机管理Nova与虚拟机管理
Nova与虚拟机管理
 
Look Into Libvirt Osier Yang
Look Into Libvirt Osier YangLook Into Libvirt Osier Yang
Look Into Libvirt Osier Yang
 

Último

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 

Último (20)

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 

Cosug 2012-lzy

  • 1. Hacking on OpenStack’s Nova Source Code 2012-01-08 Luo, Zhongyue zhongyue@staff.sina.com.cn
  • 2. TODO Intro The source code structure of Nova File structure Component architecture An example Contributing Conclusion 2
  • 3. Intro What is OpenStack? and Nova? WHY shoud I listen to this? Can we actually hack the code in 30min? Why should I trust this guy? 3
  • 4. Source code structure of Nova Macro vs Micro(DIY) File structure Component architecture File structure ↔ Component architecture 4
  • 5. But first...terminologies Service Topic Nova component → Service.create(Topic) Manager (abst) ⊂ Nova component Drivers (impl) ⊂ Manager ex) lvm, qemu, xen, hyperV Lazy plugging → Value based module loading AMQP → Advanced Message Queue Protocol API → REST & Inner 5
  • 6. File structure ”start” ”configs” ”helpers” ”REST” ”is a topic” ”is a topic” ”is a topic” ”is a topic” 6
  • 7. Component architecture Tenant http://nova.openstack.org/nova.concepts.html 7
  • 8. Component architecture ”/etc/nova/nova.conf” ”ec2”, ”osapi” 8
  • 10. Component structure ”network” Network service Periodic Topic: network task Manager Driver: linux_net Reads message from Queue Returns results back to DB or queue Calls inner APIs Network API Looks up DB Sends message to Service via queue - Cast: Send and forget - Call: Send and wait 10
  • 11. Component architecture revisited DB API API Queue API API WSGI 11
  • 12. An example Let’s allocate a floating-ip to an instance with a fixed-ip DB ”compute API” API 1 API Queue API Allocate 10.2.3.11 to a-fake-uuid? API Do you have permission? WSGI I wonder if a-fake-uuid exists... I’ll ask compute API. POST /v2/a-fake-tenant/servers/a-fake-uuid/action 12
  • 13. An example Yup, a-fake-uuid is valid. Oh, and its fixed-ip is 192.168.0.8. Take it from here network API! 2 DB ”compute API” API 3 API Queue ”network API” API API WSGI 13
  • 14. An example ”nova-network” So translate 192.168.0.8 to 10.2.3.11? Go and get your mail. I’ll tell nova-network to run ”associate_floating_ip”. Ok, my casting is done. DB I got a message! Dear manager, ”compute API” ”associate_floating_ip” API 5 API 4 Queue ”network API” API API WSGI 14
  • 15. An example ”nova network” 7 iptables 6 DB 192.168.0.8 ↔ 10.2.3.11 DB update...Done. ”compute API” Running iptables-save...Done. API API Queue ”network API” API API WSGI 15
  • 16. An example ”nova network” Did the allocation a-fake-uuid: 192.168.0.8 ↔ 10.2.3.11 finish? 2 DB ”compute API” API 3 1 API Queue ”network API” API Here’s the details of a-fake-uuid. 4 API You want to see if the allocation was a success? WSGI I’ll check with compute API... GET /v2/a-fake-tenant/servers/a-fake-uuid 16
  • 17. OpenStack Nova architecture ”nova network” ”nova volume” ”nova compute” DB ”compute API” API API ”scheduler API” Queue ”network API” API ”nova scheduler” API WSGI ”volume API” 17
  • 18. Contributing LaunchPad http://launchpad.net/~openstack Join mailing lists Documents http://docs.openstack.org/ More info http://wiki.openstack.org/HowToContribute 18
  • 19. Conclusion Structure of code and components of Nova An example How to get involved http://github.com/lzyeval/talk-COSUG-2012 http://launchpad.net/~lzyeval 19