目录

逻辑架构

部署架构

前提条件

官方文档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. DataTable To List<T> DataTable Linq学习笔记

    LINQ 查询适用于实现的数据源 IEnumerable<T>接口或System.Query.IQueryable接口. DataTable类默认是没有实现以上接口的. 所以要在DataT ...

  2. Redis08-击穿&穿透&雪崩&spring data redis

    一.常见概念 击穿: 概念:redis作为缓存,设置了key的过期时间,key在过期的时候刚好出现并发访问,直接击穿redis,访问数据库 解决方案:使用setnx() ->相当于一把锁,设置的 ...

  3. block missing问题排查流程

    当集群出现block missing异常时,一般的排查流程如下: 首先检查是否有datanode处于dead或Decommissioned状态,如果是,尝试恢复datanode,一般block mis ...

  4. 初识LVS和LVS_NAT

    如果一台服务器承受过多的压力,那么服务可能会崩溃,所以,我们应该让一台服务器承受的压力在合理范围内,但是如果服务端必须要承受较大的压力,那么一台服务器可能无法满足我们的要求,所以我们可以使用多台服务器 ...

  5. 使用CreateWindowEx创建子窗口的注意事项

    比如: 使用 HWND child = CreateWindowEx(0,L"childclass",NULL,WS_CHILD | WS_VISIBLE | WS_CLIPSIB ...

  6. New!Devexpress WinForms各版本支持Visual Studo和SQL Server版本对应图

    点击获取DevExpress v19.2.3最新完整版试用下载 本文主要为大家介绍DevExpress WinForms各大版本支持的VS版本和支持的.Net版本图,Devexpress WinFor ...

  7. 【转】用win7(64位)远程桌面连接linux(Ubuntu14.04)详细教程

    转自:http://blog.csdn.net/qq754438390/article/details/50042511 亲测,确实是可以.非常感谢原博. 用win7(64位)远程桌面连接linux( ...

  8. ipvsadm命令用法

    ipvsadm命令选项 -A                         添加虚拟服务器 -E                         修改虚拟服务器 -D                 ...

  9. HTML5测试题整理Ⅰ

    1.在 HTML5 中,哪个元素用于组合标题元素? 答案:<hgroup>   2.HTML5 中不再支持哪个元素? 答案:<font>,<acronym>,< ...

  10. include和require的区别(PHP版本7)

    亲自测试了一下,发现include有条件包含require无条件包含这个区别在PHP7版本中(据说PHP5以后)是不存在的了,也就是在if(false){ } 中都不会执行:还有一个返回值的问题,测试 ...