Launch an instance

版权声明:未经作者允许,禁止转载本文任何内容。如需转载请留言。 https://blog.csdn.net/liyuenan93/article/details/82121356

作者:Maxwell Li
日期:2018/08/17
未经作者允许,禁止转载本文任何内容。如需转载请留言。


创建实例步骤

201806161742.png

  1. dashboard 或者 CLI 获取用户的登录信息,调用 keystone 的 REST API 进行用户身份验证。
  2. keystone 对用户登录信息进行校验,然后产生验证 token 并发回。它会被用于后续 REST 调用请求。
  3. dashboard 或者 CLI 将 REST API 请求中的 ‘launch instance’ 或 ‘nova-boot’ 部分转换成创建实例请求,并发送给 nova-api。
  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、CPU、RAM、Disk 等。
  15. nova-conductor 从 queue 中获取到请求。
  16. nova-conductor 和 nova-database 交互。
  17. nova-database 向 nova-conductor 返回实例的信息。
  18. 实例信息通过 queue,从 nova-conductor 发送给 nova-compute。
  19. nova-compute 通过 REST API 将 auth-token 传入 glance-api,根据 image ID 获取镜像 URI,并从镜像存储中下载镜像。
  20. glance-api 向 keystone 校验 auth-token。
  21. nova-compute 获取 image metadata。
  22. nova-compute 通过 REST API 将 auth-token 传入 Network API 来配置网络,例如实例的 IP 地址。
  23. neutron-server 通过 keystone 校验 auth-token。
  24. nova-compute 获得网络信息。
  25. nova-compute 通过 REST API 将 auth-token 传入 Volume API,将 volume 挂载到实例。
  26. cinder-api 通过 keystone 校验 auth-token。
  27. nova-compute 获得 block storage 信息。
  28. nova-compute 为 hypervisor driver 产生数据,并调用 hypersior 执行请求(通过 libvirt 或者 api)。

参考链接:https://ilearnstack.com/2013/04/26/request-flow-for-provisioning-instance-in-openstack/

猜你喜欢

转载自blog.csdn.net/liyuenan93/article/details/82121356