Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3679759
  • 博文数量: 880
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 6155
  • 用 户 组: 普通用户
  • 注册时间: 2016-11-11 09:12
个人简介

To be a better coder

文章分类

全部博文(880)

文章存档

2022年(5)

2021年(60)

2020年(175)

2019年(207)

2018年(210)

2017年(142)

2016年(81)

分类: LINUX

2020-06-28 10:30:16


创建虚机的请求流如下:

  1. Dashboard 或者 CLI 获取用户的登录信息,调用 Keystone 的 REST API 去做用户身份验证。
  2. Keystone 对用户登录信息进行校验,然后产生验证token并发回。它会被用于后续 REST 调用请求。
  3. Dashboard 或者 CLI 将创建虚机的 REST请求中的‘launch instance’ 或‘nova-boot’ 部分进行转换,然后调用 nova-api 的 REST 接口。
  4. nova-api 接到请求,向 keystone 发送 auth-token 校验和权限认证请求。
  5. Keystone 校验 token,并将 auth headers 发回,它包括了 roles 和 permissions。
  6. nova-api 和 nova-database 进行交互。
  7. nova-database 为新实例创建一个数据库条目。
  8. nova-api 向 nova-scheduler 发送  rpc.call 请求,期望它能通过附带的 host ID 获取到数据库条目。
  9. nova-scheduler 从 queue 中获取到请求。
  10. nova-scheduler 和 nova-database 交互,获取集群中计算节点的信息和状态。
  11. nova-scheuler 通过过滤(filtering)和称重(weighting)找到一个合适的计算节点(host)。
  12. nova-scheduler 向找到的那个host上的 nova-compute 发送 rpc.cast 请求去启动虚机。
  13. 目标 host 上的 nova-compute 从 queue 中获取到请求。
  14. nova-compute 向 nova-condutor 发送 rpc.call 请求去获取待创建虚机的信息比如 host ID 和 flavor 等。
  15. nova-conductor 从queue 中获取到请求。
  16. nova-conductor 和 nova-database 交互。
  17. nova-database 向 nova-conductor 返回虚机的信息。
  18. nova-conductor 向 nova-compute 发送 rpc.call,附带所请求的信息。图中应该是遗漏了一个步骤,就是 nova-compute 从queue 中获取返回的数据。
  19. nova-compute 调用 glance-api 的 REST API,传入 auth-token,去根据镜像 ID 获取镜像 URI,从镜像存储中下载(原文为upload)镜像。
  20. glance-api 向 keystone 校验 auth-token。
  21. nova-compute 获取 image 的元数据。
  22. nova-compute 调用 Neutron API ,传入 auth-token,去分配和配置网络,比如虚机的IP地址。
  23. neutron-server 通过 keystone 校验 auth-token。
  24. nova-compute 获得网络信息。
  25. nova-compute 调用 Cinder API,传入 auth-token,去将 volume 挂接到实例。
  26. cinder-api 通过 keystone 校验 auth-token。
  27. nova-compute 获得块存储信息。
  28. nova-compute 为 hypervisor driver 产生数据,并调用 Hypersior 执行请求(通过 libvirt 或者 api)。
阅读(5405) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~