映像构建和管理

1. 映像构建概述

SUSE Multi-Linux Manager 允许系统管理员构建容器和操作系统映像,并将结果推送到映像存储区。

过程:构建和推送映像
  1. 定义映像存储区。

  2. 定义一个映像配置文件并将其与源(git 储存库或目录)相关联。

  3. 构建映像。

  4. 将映像推送到映像存储区。

SUSE Multi-Linux Manager 支持两种构建类型:Dockerfile 和 Kiwi。Kiwi 构建类型用于构建系统映像、虚拟映像和其他映像。

The image store for the Kiwi build type is pre-defined as a file system directory in the srv-www volume.

The image files can be downloaded from https://MANAGER-HOST/os-images/ORGANIZATION-ID/FILE-NAME. The exact location can be determined from the image details page.

2. 容器映像

2.1. 要求

容器功能适用于运行 SUSE Linux Enterprise Server 12 或更高版本的 Salt 客户端。在开始之前,请确保您的环境满足以下要求:

  • 一个包含 Dockerfile 和配置脚本的已发布 git 储存库。该储存库可以是公用或专用的,应托管在 GitHub、GitLab 或 BitBucket 上。

  • 一个正确配置的映像存储区,例如 Docker 仓库。

有关容器的详细信息,请参见 https://documentation.suse.com/container/all/html/Container-guide/

2.2. 创建构建主机

要使用 SUSE Multi-Linux Manager 构建映像,您需要创建并配置一个构建主机。容器构建主机是运行 SUSE Linux Enterprise 12 或更高版本的 Salt 客户端。本节将指导您完成构建主机的初始配置。

构建主机上的操作系统必须与目标映像上的操作系统匹配。

例如,在运行 SUSE Linux Enterprise Server 15(SP2 或更高版本)操作系统版本的构建主机上构建基于 SUSE Linux Enterprise Server 15 的映像。在运行 SUSE Linux Enterprise Server 12 SP5 或 SUSE Linux Enterprise Server 12 SP4 操作系统版本的构建主机上构建基于 SUSE Linux Enterprise Server 12 的映像。

不支持跨体系结构构建。

在 SUSE Multi-Linux Manager Web UI 中,执行以下步骤以配置构建主机:

过程:构建主机
  1. 系统  系统概览页面中选择要指定为构建主机的 Salt 客户端。

  2. From the System Details page of the selected client assign the containers modules. Navigate to Software  Software Channels and enable the containers module (for example, SLE-Module-Containers15-Pool and SLE-Module-Containers15-Updates). Continue with Next.

  3. Schedule the ` Software Channel Change`, and click Confirm.

  4. From the System Details tab select Properties page, and enable Container Build Host from the Add-on System Types list. Confirm by clicking Update Properties.

  5. Install all required packages by applying Highstate. From the system details tab select States  Highstate, and click Apply Highstate. Alternatively, apply Highstate from the SUSE Multi-Linux Manager Server command line:

    salt '$your_client' state.highstate

2.3. 为容器创建激活密钥

通过 SUSE Multi-Linux Manager 构建的容器使用在构建映像时作为储存库关联到激活密钥的通道。本节将指导您为此目的创建一个临时激活密钥。

要构建容器,需要一个与通道关联的激活密钥,但该通道不能是 SUSE Manager Default

过程:创建激活密钥
  1. 选择系统  激活密钥

  2. 单击 创建密钥

  3. Enter a Description and a Key name. Use the drop-down menu to select the Base Channel to associate with this key.

  4. 单击 创建激活密钥 确认。

有关详细信息,请参见 激活密钥

2.4. 创建映像存储区

构建的所有映像都会推送到映像存储区。本节包含有关创建映像存储区的信息。映像存储区通常称为仓库。

过程:创建映像存储区
  1. 选择映像  存储区

  2. Click Create to create a new store.

  3. From the Store Type select the correct type.

  4. Define a name for the image store in the Label field.

  5. Provide the path to your image registry by filling in the URI field, as a fully qualified domain name (FQDN) for the container registry host (whether internal or external).

    registry.example.com

    仓库 URI 还可用于指定已被使用的仓库中的映像存储区。

    registry.example.com:5000/myregistry/myproject
  6. 单击 创建 以添加新的映像存储区。

2.5. 创建映像配置文件

所有容器映像都是使用包含构建说明的映像配置文件构建的。本节包含有关使用 SUSE Multi-Linux Manager Web UI 创建映像配置文件的信息。

过程:创建映像配置文件
  1. 要创建映像配置文件,请选择映像  配置文件,然后单击 创建

  2. Provide a name for the image profile by filling in the Label field.

    如果您的容器映像标记采用类似于 myproject/myimage 的格式,请确保您的映像存储区仓库 URI 包含 /myproject 后缀。

  3. Use Dockerfile as the Image Type.

  4. Use the drop-down menu to select your registry from the Target Image Store field.

  5. In the Path field, type a GitHub, GitLab, or BitBucket repository URL. The path can also be a local directory on the build host. The URL should be http, https, or a token authentication URL. For GitHub or GitLab, use one of these formats:

    GitHub 路径选项
    • GitHub 单用户项目储存库

      https://github.com/USER/project.git#branchname:folder
    • GitHub 组织项目储存库

      https://github.com/ORG/project.git#branchname:folder
    • GitHub 令牌身份验证

      如果您的 git 储存库是专用的,请修改配置文件的 URL 以包含身份验证。使用以下 URL 格式通过 GitHub 令牌进行身份验证:

      https://USER:<身份验证令牌>@github.com/USER/project.git#master:/container/
    • GitLab 单用户项目储存库

      https://gitlab.example.com/USER/project.git#master:/container/
    • GitLab 组项目储存库

      https://gitlab.example.com/GROUP/project.git#master:/container/
    • GitLab 令牌身份验证

      如果您的 git 储存库是专用的且不可公开访问,则需要修改配置文件的 git URL 以包含身份验证。使用以下 URL 格式通过 GitLab 令牌进行身份验证:

      https://gitlab-ci-token:<身份验证令牌>@gitlab.example.com/USER/project.git#master:/container/

    如果您未指定 git 分支,则默认会使用 master 分支。如果未指定 folder,则映像源(Dockerfile 源)预期位于 GitHub 或 GitLab checkout 分支的根目录中。

  6. 选择一个激活密钥。激活密钥可确保将使用配置文件的映像指派到正确的通道和软件包。

    将激活密钥与映像配置文件关联后,可以确保使用该配置文件的任何映像都会使用正确的软件通道以及该通道中的任何软件包。

  7. 单击 创建 按钮。

2.5.1. 示例 Dockerfile 源

https://github.com/SUSE/manager-build-profiles 上发布了可重复使用的映像配置文件。

The ARG parameters ensure that the built image is associated with the desired repository served by SUSE Multi-Linux Manager. The ARG parameters also allow you to build image versions of SUSE Linux Enterprise Server which may differ from the version of SUSE Linux Enterprise Server used by the build host itself.

For example: The ARG repo parameter and the echo command pointing to the repository file, creates and then injects the correct path into the repository file for the desired channel version.

储存库由您指派到映像配置文件的激活密钥决定。

FROM registry.example.com/sles12sp2
MAINTAINER Tux Administrator "tux@example.com"

### 开始:与 {productname} 配合使用时需要这些行

ARG repo
ARG cert

# 添加正确的证书
RUN echo "$cert" > /etc/pki/trust/anchors/RHN-ORG-TRUSTED-SSL-CERT.pem

# 更新证书信任存储
RUN update-ca-certificates

# 将储存库路径添加到映像
RUN echo "$repo" > /etc/zypp/repos.d/susemanager:dockerbuild.repo

### 结束:与 {productname} 配合使用时需要这些行

# 添加打包脚本
ADD add_packages.sh /root/add_packages.sh

# 运行打包脚本
RUN /root/add_packages.sh

# 构建后从映像中去除储存库路径
RUN rm -f /etc/zypp/repos.d/susemanager:dockerbuild.repo

2.5.2. 使用自定义信息键值对作为 Docker buildargs

您可以指派自定义信息键值对,以将信息关联到映像配置文件。此外,这些键值对将作为 buildargs 传递给 Docker 构建命令。

有关可用自定义信息键和创建其他信息键的详细信息,请参见 自定义系统信息

2.6. 构建映像

可通过两种方式构建映像。第一种方式是从头开始创建。具体方法为:在左侧导航栏中选择映像  构建,或单击映像  配置文件列表中的构建图标,然后按照流程操作即可。

过程:构建映像
  1. 选择映像  构建

  2. Add a different tag name if you want a version other than the default latest (only relevant to containers).

  3. Select Build Profile and Build Host.

    Notice the Profile Summary to the right of the build fields. When you have selected a build profile, detailed information about the selected profile is displayed in this area.

  4. 要安排构建,请单击 构建 按钮。

2.7. 导入映像

The second way to get an image is to import and inspect arbitrary images. To do that, select Images  Image List from the left navigation bar. Complete the text boxes of the Import dialog. When it has processed, the imported image is listed on the Image List page.

过程:导入映像
  1. From Images  Image list click Import to open the Import Image dialog.

  2. In the Import Image dialog complete these fields:

    映像存储区

    要从中拉取映像进行检查的仓库。

    映像名称

    仓库中映像的名称。

    映像版本

    仓库中映像的版本。

    构建主机

    用于拉取和检查映像的构建主机。

    激活密钥

    激活密钥,它提供用于检查映像的软件通道的路径。

  3. 单击 导入 以确认。

The entry for the image is created in the database, and an Inspect Image action on SUSE Multi-Linux Manager is scheduled.

When it has been processed, you can find the imported image in the Image List. It has a different icon in the Build column, to indicate that the image is imported. The status icon for the imported image can also be seen on the Overview tab for the image.

2.8. 查错

2.8.1. 映像检查

基础容器映像 (BCI) 附带用于运行它的所有软件,但由于 BCI 为轻量级映像,它们可能不会附带您进行检查所需的所有工具和库。

在检查容器映像时,您可能会看到类似如下的错误消息:

libssl.so.1.1: cannot open shared object file: No such file or directory

BCI 适合用于除在容器构建主机上使用 Salt 捆绑包进行检查之外的其他场景,但如果您需要正常执行检查,则必须提前添加全部所需软件。

To avoid such issues you must add libopenssl to the image with Dockerfile and rebuild the image.

The same can happen with libexpat.

2.8.2. 一般问题

下面是处理映像时存在的一些已知问题:

  • 用于访问仓库或 git 储存库的 HTTPS 证书应通过自定义状态文件部署到客户端。

  • 目前不支持使用 Docker 进行 SSH git 访问。

3. 操作系统映像

操作系统映像由 Kiwi 构建系统构建。输出映像可自定义,可以是 PXE、QCOW2、LiveCD 或其他类型的映像。

有关 Kiwi 构建系统的详细信息,请参见 Kiwi 文档

3.1. 要求

The Kiwi image building feature is available for Salt clients running SUSE Linux Enterprise Server 15 and SUSE Linux Enterprise Server 12.

必须可在以下位置之一访问 Kiwi 映像配置文件和配置脚本:

  • Git 储存库

  • HTTP 或 HTTPS 托管的 tar 归档

  • 构建主机上的本地目录

有关 git 提供的完整 Kiwi 储存库的示例,请参见 https://github.com/SUSE/manager-build-profiles/tree/master/OSImage

对于运行使用 Kiwi 构建的操作系统映像的主机,至少需要提供 1 GB RAM。具体所需磁盘空间取决于映像的实际大小。有关详细信息,请参见底层系统的文档。

3.2. Accessing Git repositories via an HTTP/HTTPS proxy when building images

When a build host needs to fetch sources from a git repository that is only reachable through an HTTP/HTTPS proxy, you may see git timeouts during the build because the git client invoked by the Salt state does not always pick up system-wide proxy settings (for example /etc/sysconfig/proxy or environment variables).

To make git use the proxy for non-interactive builds create /etc/gitconfig with an http.proxy entry:

# /etc/gitconfig
[http]
    proxy = http://proxy.example.com:3128
# or for HTTPS
[http]
    proxy = https://proxy.example.com:3128

If the proxy requires authentication, prefer a credential helper or use a credential store instead of embedding credentials in the URL.

3.2.1. Automating with Salt

You can manage /etc/gitconfig on build hosts through Configuration Management, the same way as on any other managed system. Create a Salt state file and assign it to the build host via a config channel, then apply a highstate from the SUSE Multi-Linux Manager UI.

If you want to source the proxy address from a System Custom Info field, use the custom_info: pillar prefix:

/etc/gitconfig:
  file.managed:
    - user: root
    - group: root
    - mode: '0644'
    - contents: |
        [http]
            proxy = {{ salt['pillar.get']('custom_info:build_server:git_proxy', 'http://proxy.example.com:3128') }}

3.3. 基于容器的 Kiwi 映像构建支持

SUSE Multi-Linux Manager 推出了基于容器的 Kiwi 映像构建系统,同时保留现有旧版 Kiwi 工具和 KiwiNG 工具。

3.3.1. 配置和覆盖设置

管理员可通过以下 pillar 或自定义值覆盖默认行为。如需进行相关配置,请在 Web UI 中导航至menu:[系统 > 自定义系统信息],然后创建所需的键。

构建系统的选用取决于底层操作系统或特定 pillar 值:

  • 对于 SLE 11 / SLE 12:旧版 Kiwi v7

  • 对于 SLE 15:KiwiNG(v9 及容器化 Kiwi 10)

管理员可通过以下 pillar 或自定义值覆盖默认行为:

  • use_kiwi_ng: force the use of Kiwi 9,

  • use_kiwi_container: force the use of containerized Kiwi 10. To enable this, set the value to 1.

  • use_bundle_build: upload additional KIWI bundle build artifacts (like .install.tar which contains PXE files, and .raw.xz) to the server. To enable this, set the value to true.

3.3.2. 不同版本的配置

当为 SUSE Linux Enterprise 15 配置文件使用容器化构建主机时,需要进行特定配置。因为 SLES 15 配置文件依赖 Kiwi 9,而容器默认行为使用 Kiwi 10。

To ensure the correct version is used for SLES 15 profiles, you must define the kiwi_image custom info key with the following value:

  • Key: kiwi_image

  • Value: registry.suse.com/bci/kiwi:9

If this key is not set, the system defaults to the latest version (e.g., registry.suse.com/bci/kiwi:10.2), which may result in build issues for SLES 15 profiles.

3.4. 创建构建主机

要使用 SUSE Multi-Linux Manager 构建各种映像,请创建并配置一个构建主机。操作系统映像构建主机是在 SUSE Linux Enterprise Server 15(SP2 或更高版本)或SUSE Linux Enterprise Server 12(SP4 或更高版本)上运行的 Salt 客户端。

此过程将指导您完成构建主机的初始配置。

构建主机上的操作系统必须与目标映像上的操作系统匹配。

例如,在运行 SUSE Linux Enterprise Server 15(SP2 或更高版本)操作系统版本的构建主机上构建基于 SUSE Linux Enterprise Server 15 的映像。在运行 SUSE Linux Enterprise Server 12 SP5 或 SUSE Linux Enterprise Server 12 SP4 操作系统版本的构建主机上构建基于 SUSE Linux Enterprise Server 12 的映像。

无法实现跨体系结构的构建。例如,必须在运行 SUSE Linux Enterprise Server 15 SP3 的 Raspberry PI(aarch64 体系结构)构建主机上构建 Raspberry PI SUSE Linux Enterprise Server 15 SP3 映像。

过程:在 SUSE Multi-Linux Manager Web UI 中配置构建主机
  1. 系统  概览页面中选择要指定为构建主机的客户端。

  2. Navigate to the System Details  Properties tab, and check the Add-on System Type > OS Image Build Host box.

  3. 单击 更新属性 确认。

  4. 导航到系统细节  软件  软件通道,根据构建主机版本启用所需的软件通道。

    • SUSE Linux Enterprise Server 12 build hosts require SUSE Multi-Linux Manager Client tools (SLE-Manager-Tools12-Pool and SLE-Manager-Tools12-Updates).

    • SUSE Linux Enterprise Server 15 build hosts require SUSE Linux Enterprise Server modules SLE-Module-DevTools15-SP4-Pool and SLE-Module-DevTools15-SP4-Updates.

    • 配置日程安排,然后单击 确认

  5. 通过应用 Highstate 安装 Kiwi 和所有必需的软件包。在系统细节页面中选择状态  Highstate,然后单击 应用 Highstate。或者,从 SUSE Multi-Linux Manager Server 命令行应用 Highstate:

    salt '$your_client' state.highstate

3.4.1. SUSE Multi-Linux Manager Web 服务器公共证书 RPM

构建主机置备将 SUSE Multi-Linux Manager 证书 RPM 复制到构建主机。此证书用于访问 SUSE Multi-Linux Manager 提供的储存库。

该证书由 mgr-package-rpm-certificate-osimage 打包脚本打包在 RPM 中。在全新安装 SUSE Multi-Linux Manager 期间会自动调用该打包脚本。

当您升级 spacewalk-certs-tools 软件包时,升级方案会使用默认值调用该打包脚本。但是,如果证书路径已更改或不可用,请在升级过程完成后使用 --ca-cert-full-path <证书路径> 手动调用该打包脚本。

3.4.2. 封装脚本调用示例

/usr/sbin/mgr-package-rpm-certificate-osimage --ca-cert-full-path /root/ssl-build/RHN-ORG-TRUSTED-SSL-CERT

包含证书的 RPM 软件包存储在 Salt 可访问的目录中,例如:

/usr/share/susemanager/salt/images/rhn-org-trusted-ssl-cert-osimage-1.0-1.noarch.rpm

包含证书的 RPM 软件包在本地构建主机储存库中提供:

/var/lib/Kiwi/repo

Specify the RPM package with the SUSE Multi-Linux Manager SSL certificate in the build source, and make sure your Kiwi configuration contains rhn-org-trusted-ssl-cert-osimage as a required package in the bootstrap section.

Listing 1. config.xml
...
  <packages type="bootstrap">
    ...
    <package name="rhn-org-trusted-ssl-cert-osimage" bootinclude="true"/>
  </packages>
...

3.5. 为操作系统映像创建激活密钥

创建与通道(在构建映像时操作系统映像可将其用作储存库)关联的激活密钥。

必须提供激活密钥才能构建操作系统映像。

要构建操作系统映像,需要拥有与通道关联的非默认激活密钥。

过程:创建激活密钥
  1. 在 Web UI 中,选择系统  激活密钥

  2. Click Create Key.

  3. Enter a Description, a Key name, and use the drop-down box to select a Base Channel to associate with the key.

  4. 单击 创建激活密钥 确认。

有关详细信息,请参见 激活密钥

3.6. 创建映像存储区

OS Images can require a significant amount of storage space. By default, the image store is using the srv-www volume.

目前不支持 Kiwi 构建类型的用于构建系统映像、虚拟映像和其他映像的映像存储区。

The image files can be downloaded from https://MANAGER-HOST/os-images/ORGANIZATION-ID/FILE-NAME. The exact location can be determined from the image details page.

3.7. 创建映像配置文件

使用 Web UI 管理映像配置文件。

过程:创建映像配置文件
  1. 要创建映像配置文件,请在映像  配置文件中选择,然后单击 创建

  2. In the Label field, provide a name for the Image Profile.

  3. Use Kiwi as the Image Type.

  4. 系统会自动选择映像存储区。

  5. Enter a Config URL to the directory containing the Kiwi configuration files. For example, a git URI such as https://github.com/SUSE/manager-build-profiles#master:OSImage/SLE-Micro54. Other options are a HTTP or HTTPS hosted tar archive or a local directory on the build host. For more information, see source format options at the end of this section.

  6. Enter Kiwi options if needed. If the Kiwi configuration files specify multiple profiles, use --profile <name> to select the active one. For other options, see Kiwi documentation.

  7. 选择一个激活密钥。激活密钥可确保将使用配置文件的映像指派到正确的通道和软件包。

    将激活密钥与映像配置文件相关联,以确保映像配置文件使用正确的软件通道和任何软件包。

  8. 单击 创建 按钮确认。

源格式选项
  • 指向储存库的 git/HTTP(S) URL

    指向公用或私用 git 储存库的 URL,该储存库包含要构建的映像的源代码。根据储存库的布局,该 URL 可能是:

    https://github.com/SUSE/manager-build-profiles

    可以在 URL 中的 # 字符后面指定一个分支。此示例使用了 master 分支:

    https://github.com/SUSE/manager-build-profiles#master

    可以在 : 字符后面指定包含映像源的目录。此示例使用了 OSImage/POS_Image-JeOS6

    https://github.com/SUSE/manager-build-profiles#master:OSImage/POS_Image-JeOS6
  • 指向 tar 归档的 HTTP(S) URL

    指向托管在 Web 服务器上的 tar 归档(压缩或未压缩)的 URL。

    https://myimagesourceserver.example.org/MyKiwiImage.tar.gz
  • 构建主机上的目录的路径

    输入包含 Kiwi 构建系统源的目录的路径。此目录必须在选定的构建主机上存在。

    /var/lib/Kiwi/MyKiwiImage

3.7.1. Kiwi 源的示例

Kiwi 源至少包含 config.xml。通常其中还有 config.shimages.sh。源还可以包含要安装在 root 子目录下的最终映像中的文件。

有关 Kiwi 构建系统的信息,请参见 Kiwi 文档

SUSE 在 SUSE/manager-build-profiles 公共 GitHub 代码库中提供了功能齐备的映像源的示例。

Listing 2. JeOS config.xml 示例
<?xml version="1.0" encoding="utf-8"?>

<image schemaversion="6.1" name="POS_Image_JeOS6">
    <description type="system">
        <author>Admin User</author>
        <contact>noemail@example.com</contact>
        <specification>SUSE Linux Enterprise 12 SP3 JeOS</specification>
    </description>
    <preferences>
        <version>6.0.0</version>
        <packagemanager>zypper</packagemanager>
        <bootsplash-theme>SLE</bootsplash-theme>
        <bootloader-theme>SLE</bootloader-theme>

        <locale>en_US</locale>
        <keytable>us.map.gz</keytable>
        <timezone>Europe/Berlin</timezone>
        <hwclock>utc</hwclock>

        <rpm-excludedocs>true</rpm-excludedocs>
        <type boot="saltboot/suse-SLES12" bootloader="grub2" checkprebuilt="true" compressed="false" filesystem="ext3" fsmountoptions="acl" fsnocheck="true" image="pxe" kernelcmdline="quiet"></type>
    </preferences>
    <!--    CUSTOM REPOSITORY
    <repository type="rpm-dir">
      <source path="this://repo"/>
    </repository>
    -->
    <packages type="image">
        <package name="patterns-sles-Minimal"/>
        <package name="aaa_base-extras"/> <!-- wouldn't be SUSE without that ;-) -->
        <package name="kernel-default"/>
        <package name="venv-salt-minion"/>
        ...
    </packages>
    <packages type="bootstrap">
        ...
        <package name="sles-release"/>
        <!-- this certificate package is required to access {productname} repositories
             and is provided by {productname} automatically -->
        <package name="rhn-org-trusted-ssl-cert-osimage" bootinclude="true"/>

    </packages>
    <packages type="delete">
        <package name="mtools"/>
        <package name="initviocons"/>
        ...
    </packages>
</image>

3.8. 构建映像

可以使用 Web UI 以两种方式构建或获取映像。选择映像  构建,或单击映像  配置文件列表中的构建图标。

过程:构建映像
  1. 选择映像  构建

  2. Add a different tag name if you want a version other than the default latest (applies only to containers).

  3. Select the Image Profile and a Build Host.

    A Profile Summary is displayed to the right of the build fields. When you have selected a build profile, detailed information about the selected profile is shown here.

  4. 要安排构建,请单击 构建 按钮。

在映像构建过程中,构建服务器无法运行任何形式的自动挂载程序。如果适用,请确保不要以 root 身份运行 Gnome 会话。如果某个自动挂载程序正在运行,则映像构建可以成功完成,但映像的校验和将会不同,从而导致失败。

成功构建映像后,检查阶段随即开始。在检查阶段,SUSE Multi-Linux Manager 会收集有关映像的信息:

  • 映像中安装的软件包列表

  • 映像的校验和

  • 映像类型和其他映像细节

如果构建的映像类型是 PXE,则还会生成一个 Salt pillar。映像 pillar 存储在数据库中,Salt 子系统可以访问有关生成的映像的细节。细节包括映像文件所在位置和提供映像文件的位置、映像校验和、网络引导所需的信息,等等。

生成的 pillar 可供所有连接的客户端使用。

3.9. 查错

构建映像需要完成几个相关的步骤。如果构建失败,调查 Salt 状态结果和构建日志可能有助于确定失败原因。构建失败时,可以执行以下检查:

  • 构建主机是否可以访问构建源

  • 构建主机和 SUSE Multi-Linux Manager 服务器上是否为映像提供了足够的磁盘空间

  • 激活密钥是否关联了正确的通道

  • 使用的构建源是否有效

  • 包含 SUSE Multi-Linux Manager 公共证书的 RPM 软件包是否是最新的,并已在路径 /usr/share/susemanager/salt/images/rhn-org-trusted-ssl-cert-osimage-1.0-1.noarch.rpm 下提供。有关如何刷新公共证书 RPM 的详细信息,请参见 创建构建主机

3.10. 限制

本节包含使用映像时存在的一些已知问题。

  • 用于访问 HTTP 源或 git 储存库的 HTTPS 证书应通过自定义状态文件部署到客户端,或手动进行配置。

  • 不支持导入基于 Kiwi 的映像。

4. 构建的映像列表

要列出可用的已构建映像,请选择映像  映像列表。此时会显示所有映像的列表。

Displayed data about images includes an image Name, its Version, Revision, and the build Status. You can also see the image update status with a listing of possible patch and package updates that are available for the image.

For OS Images, the Name and Version fields originate from Kiwi sources and are updated at the end of successful build. During building or after failed build these fields show a temporary name based on profile name.

Revision is automatically increased after each successful build. For OS Images, multiple revisions can co-exist in the store.

For Container Images the store holds only the latest revision. Information about previous revisions (packages, patches, etc.) are preserved and it is possible to list them with the Show obsolete checkbox.

单击映像上的 细节 按钮会显示一个详细视图。详细视图包含相关补丁的确切列表、映像中安装的所有软件包的列表和构建日志。

单击 删除 按钮会从列表中删除映像。同时还会删除操作系统映像存储区中关联的 pillar 和文件,以及过时的修订版。

仅当构建后的检查状态为成功时,才会显示补丁和软件包列表。