openUBMC品牌包定制指南
本指南旨在指导如何进行品牌包配置及制作
品牌包简介
品牌包本质就是一个hpm包,通过固件升级的方式来实现定制化能力
可以定制的内容主要包括以下几个部分:图片定制,网页风格定制,配置定制
序号 | 定制类别 | 定制项 | 文件 | 属性 |
---|---|---|---|---|
1 | 图片定制 | 浏览器ICO | favicon.ico | / |
2 | 图片定制 | 二维码 | code1.png | / |
3 | 图片定制 | 登录界面背景 | login.png | / |
4 | 图片定制 | 登录界面图标 | login_logo.png | / |
5 | 图片定制 | 主界面机型展示图片 | img_01.png/img_02.png/img_03.png | / |
6 | 图片定制 | 主界面左上角图片 | header_logo.png | / |
7 | 风格定制 | 主界面左上角图片 | style_config.json | pageStyle |
8 | 配置定制 | 产品联系人 | web_custom.xml | sysContact |
9 | 配置定制 | 默认安全公告 | web_custom.xml | dBannerContent |
10 | 配置定制 | 预置证书Common Name | web_custom.xml | PreSSLSeverCommonName |
11 | 配置定制 | 预置证书Organization Name | web_custom.xml | PreSSLSeverOrgName |
12 | 配置定制 | 预置证书Country | web_custom.xml | PreSSLSeverCountry |
13 | 配置定制 | 官网 | web_custom.xml | OfficalWeb |
14 | 配置定制 | 版权信息 | web_custom.xml | Copyright |
15 | 配置定制 | 技术支持网址 | web_custom.xml | SupportWeb |
16 | 配置定制 | 邮箱 | web_custom.xml | |
17 | 配置定制 | 邮箱 | web_custom.xml | Phone |
18 | 配置定制 | 独立KVM | web_custom.xml | DownloadKVMLink |
19 | 配置定制 | 二维码显示标志位(是否显示) | web_custom.xml | DocSupportFlag |
20 | 配置定制 | BMC软件名称 | web_custom.xml | SoftwareName |
21 | 配置定制 | 告警、事件描述 | web_custom.xml | CustomAlarmName |
22 | 配置定制 | 操作、运行、安全日志(BMA名称定制) | web_custom.xml | CustomLogIbmaName |
23 | 配置定制 | CLI界面命令提示符、日志(BMC名称定制) | web_custom.xml | CustomLogIbmcName |
24 | 配置定制 | redfish OEM厂商 | web_custom.xml | CustomManufacturer |
25 | 配置定制 | 语言 | web_custom.xml | LanguageSet |
26 | 配置定制 | 追加语言 | web_custom.xml | LanguageSetAppend |
27 | 配置定制 | BMC主机名称 | web_custom.xml | HostName |
28 | 配置定制 | 客户名称(用于生效指定客户定制的特性) | web_custom.xml | Customer |
如何定制一个品牌包
1.新建一个仓用户存放品牌定制文件
品牌定制文件包括各种定制图片、配置文件web_custom.xml以及filelist.conf,定制图片名称需要与上述表格展示的文件名一致
2.配置filelist.conf
需要正确配置文件数量、文件名称和文件路径。其中文件路径和文件名称是固定的,不允许进行变更,FileNum的值需要与下列配置File的个数一致,具体配置参考下面示例
[Basic]
Version=2.00
[Filelist]
FileNum=9
[File0]
Name=code1.png
Path=/data/opt/pme/web/htdocs/theme/custom/img
[File1]
Name=favicon.ico
Path=/data/opt/pme/web/htdocs
[File2]
Name=web_custom.xml
Path=/data/opt/pme/web/conf
[File3]
Name=header_logo.png
Path=/data/opt/pme/web/custom
[File4]
Name=login.png
Path=/data/opt/pme/web/custom
[File5]
Name=login_logo.png
Path=/data/opt/pme/web/custom
[File6]
Name=img_01.png
Path=/data/opt/pme/web/custom
[File7]
Name=img_02.png
Path=/data/opt/pme/web/custom
[File8]
Name=img_03.png
Path=/data/opt/pme/web/custom
3.配置web_custom.xml
web_custom.xml负责配置各种属性,配置项含义如下,其中VALUE的内容需要替换为定制内容,不需要的配置项可以删除
<?xml version="1.0" encoding="UTF-8"?>
<!-- 描述:目前官网、版权信息、独立KVM下载链接信息、文档二维码显示标志位在web中有使用 -->
<CUSTOM_CONFIG>
<!-- 系统联系人 -->
<SysContact VALUE="CustomSysContact" />
<!-- SSL证书预置信息,当前安装的SSL证书的签发者信息和预置信息一致时,认为当前SSL证书是预置证书,web会提醒用户安装新证书 -->
<PreSSLSeverCommonName VALUE="CustomCommonName"/>
<PreSSLSeverOrgName VALUE="CustomOrgName"/>
<PreSSLSeverCountry VALUE="Country"/>
<!-- 官方网站 -->
<OfficalWeb VALUE="CustomOfficalWeb"/>
<!-- 版权 -->
<Copyright VALUE="CustomCopyright"/>
<!-- 支撑网站 -->
<SupportWeb VALUE="CustomSupportWeb"/>
<!-- 邮件 -->
<Email VALUE="CustomEmail"/>
<!-- 电话 -->
<Phone VALUE="CustomPhone"/>
<!-- 独立KVM客户端下载链接 -->
<DownloadKVMLink VALUE="CustomDownloadKVMLink"/>
<!-- 是否支持显示二维码 -->
<DocSupportFlag VALUE="CustomDocSupportFlag"/>
<!-- 软件名称,用于自定义日志BMC名称和CLP提示符 -->
<SoftwareName VALUE="CustomSoftwareName"/>
<!-- 自定义BMA名称 -->
<CustomLogIbmaName VALUE="CustomLogIbmaName"/>
<!-- 与软件名称SoftwareName功能相同 -->
<CustomLogIbmcName VALUE="CustomLogIbmcName"/>
<!-- 主机名 -->
<HostName VALUE="CustomHostName"/>
<!-- 安全公告 -->
<dBannerContent VALUE="CustomdBannerContent"/>
<Customer VALUE="CustomerName"/>
</CUSTOM_CONFIG>
4.配置manifest仓中产品对应的manifest.yml
(1)新建编码,如WBD
(2)确定好包名package_name,如wbd/wbd_output.zip
(3)确定好构建类型build_type,如release
(4)开始配置品牌包相关配置,配置格式如下示例
manufacture:
WBD:
# package_name为品牌包存放路径与品牌包名称
pack_age_name: wbd/wbd_output.zip
build_type: release
wbd_hpms:
# repo为存放品牌包定制文件的仓库地址,需要填写https下载的地址
- repo: https://test.git
# tag为存放定制文件的分支tag号
tag: 0.0.0
files:
# 根据品牌定制文件存放路径修改file的路径,但是dst路径不可修改,均为"wbd_up_file/文件名"的格式,如下示例
- file: customization/Server/Kunpeng/TaiShan200_2280v2/WBD/favicon.ico
dst: wbd_up_file/favicon.ico
- file: customization/Server/Kunpeng/TaiShan200_2280v2/WBD/login_logo.png
dst: wbd_up_file/login_logo.png
- file: customization/Server/Kunpeng/TaiShan200_2280v2/WBD/header_logo.png
dst: wbd_up_file/header_logo.png
- file: customization/Server/Kunpeng/TaiShan200_2280v2/WBD/filelist.conf
dst: wbd_up_file/filelist.conf
- file: customization/Server/Kunpeng/TaiShan200_2280v2/WBD/web_custom.xml
dst: wbd_up_file/web_custom.xml
# 下列文件都是制作品牌包必须文件,路径固定,不可删除
- file: /usr/share/bmcgo/wbd-packet/beforeaction.sh
- file: /usr/share/bmcgo/wbd-packet/afteraction_remove_busctl.sh
dst: afteraction.sh
- file: /usr/share/bmcgo/wbd-packet/CfgFileList.conf
- file: /usr/share/bmcgo/wbd-packet/firstboot.sh
- file: /usr/share/bmcgo/wbd-packet/hpm_wbd.config
- file: /usr/share/bmcgo/wbd-packet/packetwbd.sh
- file: /usr/share/bmcgo/wbd-packet/update.cfg
# dst为最后制作出来的品牌包名称
files:
- file: ${work_out}/wbd_hpm1.hpm
dst: WBD-image.hpm
verify:
- pss
(5)确认manifest配置的品牌定制文件个数与filelist.conf中文件个数一致,不一致会导致升级品牌包失败
5.在manifest仓的build目录执行构建命令
bmcgo publish -z WBD -b TaiShan200_2280v2
其中-z的参数为品牌包的编码,-b的参数为机型
取包地址: manifest/output/packet/wbd/wbd_output.zip
6.升级品牌包
进入固件升级->固件更新->升级文件,进行品牌包升级,如果配置了Customer字段则在升级完成后会自动重启,其他场景无需重启即可生效