目录

逻辑架构

部署架构

前提条件

官方文档https://docs.openstack.org/ironic/latest/user/index.html

  • Dependent packages to be configured on the Bare Metal service node(s) where ironic-conductor is running like tftp-server, ipmi, syslinux etc for bare metal provisioning.
  • Nova must be configured to make use of the bare metal service endpoint and compute driver should be configured to use ironic driver on the Nova compute node(s).
  • Flavors to be created for the available hardware. Nova must know the flavor to boot from.
  • Images to be made available in Glance. Listed below are some image types required for successful bare metal deployment:
    • bm-deploy-kernel
    • bm-deploy-ramdisk
    • user-image
    • user-image-vmlinuz
    • user-image-initrd
  • Hardware to be enrolled(注册) via Ironic RESTful API service.

部署流程

  1. A boot instance request comes in via the Nova API, through the message queue to the Nova scheduler.
  2. Nova scheduler applies filters and finds the eligible hypervisor. The nova scheduler also uses the flavor’s extra_specs, such as cpu_arch, to match the target physical node.
  3. Nova compute manager claims the resources of the selected hypervisor.
  4. Nova compute manager creates (unbound) tenant virtual interfaces (VIFs) in the Networking service according to the network interfaces requested in the nova boot request. A caveat here is, the MACs of the ports are going to be randomly generated, and will be updated when the VIF is attached to some node to correspond to the node network interface card’s (or bond’s) MAC.
  5. A spawn task is created by the nova compute which contains all the information such as which image to boot from etc. It invokes the driver.spawn from the virt layer of Nova compute. During the spawn process, the virt driver does the following:
    • Updates the target ironic node with the information about deploy image, instance UUID, requested capabilities and various flavor properties.
    • Validates node’s power and deploy interfaces, by calling the ironic API.
    • Attaches the previously created VIFs to the node. Each neutron port can be attached to any ironic port or port group, with port groups having higher priority than ports. On ironic side, this work is done by the network interface. Attachment here means saving the VIF identifier into ironic port or port group and updating VIF MAC to match the port’s or port group’s MAC, as described in bullet point 4.
    • Generates config drive, if requested.
  6. Nova’s ironic virt driver issues a deploy request via the Ironic API to the Ironic conductor servicing the bare metal node.
  7. Virtual interfaces are plugged in and Neutron API updates DHCP port to set PXE/TFTP options. In case of using neutron network interface, ironic creates separate provisioning ports in the Networking service, while in case of flat network interface, the ports created by nova are used both for provisioning and for deployed instance networking.
  8. The ironic node’s boot interface prepares (i)PXE configuration and caches deploy kernel and ramdisk.
  9. The ironic node’s management interface issues commands to enable network boot of a node.
  10. The ironic node’s deploy interface caches the instance image (in case of iscsi deploy interface), and kernel and ramdisk if needed (it is needed in case of netboot for example).
  11. The ironic node’s power interface instructs the node to power on.
  12. The node boots the deploy ramdisk.
  13. Depending on the exact driver used, either the conductor copies the image over iSCSI to the physical node (iSCSI deploy) or the deploy ramdisk downloads the image from a temporary URL (Direct deploy). The temporary URL can be generated by Swift API-compatible object stores, for example Swift itself or RadosGW. The image deployment is done.
  14. The node’s boot interface switches pxe config to refer to instance images (or, in case of local boot, sets boot device to disk), and asks the ramdisk agent to soft power off the node. If the soft power off by the ramdisk agent fails, the bare metal node is powered off via IPMI/BMC call.
  15. The deploy interface triggers the network interface to remove provisioning ports if they were created, and binds the tenant ports to the node if not already bound. Then the node is powered on.
  16. The bare metal node’s provisioning state is updated to active.

iSCSI Deploy UML

With iscsi deploy interface, the deploy ramdisk publishes the node’s hard drive as an iSCSI share. The ironic-conductor then copies the image to this share. This interface is used by default.

openstack baremetal node create --driver ipmi --deploy-interface iscsi
openstack baremetal node set <NODE> --deploy-interface iscsi

  1. 通过 Nova API 发起裸金属实例部署请求。
  2. Nova Scheduler 根据请求中的参数信息(e.g. 硬件模板、镜像等)筛选合适的 ironic node。例如:调度因子通常包含在 Flavor 的 extra_spec 属性中(e.g. cpu_arch、baremetal:deploy_kerner_id、baremmetal:deploy_ramdisk_id)。
  3. Nova Compute 将部署裸机所需要的信息都整理好,然后 Spawn 一个 Build 任务,主要是调用并传递参数到 Ironic API 实际执行,Ironic 将此任务中所需要的硬件资源信息持久化到数据库中。
  4. Ironic 与 OpenStack 的其他服务交互,从 Glance 服务获取 Images(Deploy Images & User Images),调用 Neutron 服务为裸机创建端口,调用 Cinder 服务获取Volumes 等。
  5. Ironic 开始执行真正的裸机部署,PXE Driver 准备好 TFTP 和 Bootloader,IPMI Driver 设置裸机启动模式为 PXE 并起电。
  6. 裸机启电后,通过 DHCP 获得 Ironic Conductor 的地址并尝试通过 TFTP 从 Conductor 获取 Deploy Images,Conductor 部署好 RAMDisk 之后,IPA 就可以通过 iSCSI 协议将裸机的硬盘暴露出来,Conductor 随后注入 User Images 到裸机磁盘作为根磁盘。
  7. 根磁盘部署完成后,IPMI Driver 调整裸机引导顺序,完成部署。

PXE Deploy Driver

Direct Deploy UML

*With direct deploy interface, the deploy ramdisk fetches the image from an HTTP location. It can be an object storage (swift or RadosGW) temporary URL or a user-provided HTTP URL. The deploy ramdisk then copies the image to the target disk. *

openstack baremetal node create --driver ipmi --deploy-interface direct
openstack baremetal node set <NODE> --deploy-interface direct





  1. 加入 Provision Network。
  2. 重启裸机。
  3. IPA 通过 lookup 从 Ironic Conductor 取得它对应的 ironic_node_uuid。
  4. IPA 通过 Heartbeat 与 Ironic 通信,驱动部署流程触发 ironic-conductor 发送 prepare_image 命令到 IPA,让 IPA 直接**(Direct)**下载并注入用户镜像到本地磁盘。写镜像是一个耗时较长的动作,通常 300GB 大小的镜像需要十分钟左右。
  5. ironic-conductor 收到 Heartbeat 消息后(从 ironic-api 过来的 RPC 消息),根据当前状态的不同有相应的处理。第一个 Heartbeat 消息会触发 ironic-conductor 下发 prepare_image 到 IPA,以后的 Heartbeat 消息会触发 ironic-conductor 查询 IPA 上的 command status,它的目的是要监控 prepare_image 等 command 是否还在运行中。一旦 command status 显示命令结束。就会继续下一步部署操作,包括设置物理服务器从磁盘启动、关机、切换网络、开机。知道部署流程结束。

IPA Deploy Driver

Ironic 裸金属实例的部署流程的更多相关文章

  1. 注册 Ironic 裸金属节点并部署裸金属实例

    目录 文章目录 目录 前文列表 注册(Enrollment)裸机 创建裸金属实例的 Flavor 部署裸金属实例 日志分析 问题:Failed to create neutron ports for ...

  2. Ironic 裸金属管理服务的网络模型

    目录 文章目录 目录 Bare-Metal networking in Neutron 核心网络类型 网络拓扑 抽象网络拓扑图 Neutron Implementation Neutron 了解裸金属 ...

  3. Ironic 裸金属管理服务

    目录 文章目录 目录 Ironic 软件架构设计 资源模型设计 全生命周期的状态机设计 Inspection 裸金属上架自检阶段 Provision 裸金属部署阶段 Clean 裸金属回收阶段 快速体 ...

  4. OpenStack Newton:集虚拟化,裸金属和容器部署的统一云平台(转载)

    2016-10-08木屐大数据在线 国庆长假第六天,OpenStack第十四版本Newton(牛顿?)发布,官方介绍中强调这是一个集虚拟化.裸金属和容器技术的一体化平台,可通过一套API来管理裸金属. ...

  5. 手动集成 Ironic 裸金属管理服务(Rocky)

    目录 文章目录 目录 前文列表 横向扩展裸金属管理服务节点 配置基础设施 安装 Ironic(BareMetal) 安装 Nova Compute(BareMetal) 配置 Neutron 提供 P ...

  6. Ironic 裸金属管理服务的底层技术支撑

    目录 文章目录 目录 底层技术支撑 DHCP NBP TFTP IPMI PXE & iPXE Cloud Init Linux 操作系统启动引导过程 底层技术支撑 PXE:预启动执行环境,支 ...

  7. 使用disk-image-builder(DIB)制作Ironic 裸金属镜像

    export DIB_DEV_USER_USERNAME=centos export DIB_DEV_USER_PASSWORD= export DIB_DEV_USER_PWDLESS_SUDO=Y ...

  8. OpenStack-Ironic裸金属简介

    一,Ironic简述 简而言之,OpenStack Ironic就是一个进行裸机部署安装的项目.    所谓裸机,就是指没有配置操作系统的计算机.从裸机到应用还需要进行以下操作:  (1)硬盘RAID ...

  9. 金融云原生漫谈(三)|银行云原生基础设施构建:裸金属VS虚拟机

    在金融行业数字化转型的驱动下,国有银行.股份制银行和各级商业银行也纷纷步入容器化的进程.   如果以容器云上生产为目标,那么整个容器云平台的设计.建设和优化对于银行来说是一个巨大的挑战.如何更好地利用 ...

随机推荐

  1. C++ 新特性 笔记 2 右值引用

    C ++ Rvalue引用说明 以下内容,主要是上述链接的摘要 介绍 Rvalue引用是C ++的一个特性,它是随C ++ 11标准添加的.使右值参考有点难以理解的是,当你第一次看到它们时,不清楚它们 ...

  2. CPU排行

    早期的时候,在某个网站上面收录下来的关于CPU排行的信息,发出来让更多的人看到,希望能够帮助到一些人!

  3. 很有用的shell脚本

    基础知识 expect基础知识 exp_continue是匹配一行后,从当前expect块第一行开始匹配 expect块的每一行匹配后,直接退出当前expect块,往下一个expect块开始匹配 ex ...

  4. 第十五届四川省省赛 SCU - 4439 Vertex Cover

    给你一个一般图 保证每条边的一端下标不大于30 问最小覆盖集的大小为多少 爆搜:枚举前30个点是否在覆盖集内 剪枝1:如果不在的话 那么他所连的下标大于30的点都必须选 剪纸2:最优解剪枝 #incl ...

  5. thinkphp方法success和error跳转时间以及返回ajax

    Action类的success和error方法第三个参数为数字时候,表示指定页面跳转时间,例如: $,); $,); 如果是ajax跳转 必须用true: $this->success('操作成 ...

  6. SpringBoot 如何实现自动配置

    SpringMVC 和 SpringBoot 都是基于Spring的,两者推出的时间相差不大,只不过是SpringMVC推出早点. 关于两者,最近看到一个比较通俗的讲法: Spring 最初利用“工厂 ...

  7. Zabbix Server设置主机监控

  8. 内置对象-Math

    1.随机数 Math.random() 1)获得0-1之间的随机数 2)0到100:Math.round(Math.random()*100) 2.max:求最大值 ,,,) console.log( ...

  9. 决策树--CART树详解

    1.CART简介 CART是一棵二叉树,每一次分裂会产生两个子节点.CART树分为分类树和回归树. 分类树主要针对目标标量为分类变量,比如预测一个动物是否是哺乳动物. 回归树针对目标变量为连续值的情况 ...

  10. swoole table

    swoole_table #在内存中建立一张表,用来存放进程交互过程中使用的数据,与memocache似有异曲同工之妙#用法 <?php$table = new swoole_table(204 ...