12.3. 使用内容视图管理 OSTree 内容
使用内容视图管理应用程序生命周期中的 OSTree 分支。此过程使用与 RPM 和 Puppet 模块使用的相同发布和提升方法。
流程
要为 OSTree 创建内容视图并添加存储库,请完成以下步骤:
- 在 Satellite Web UI 中,进入到 Content > Content Views,再点 Create New View。
- 在 Name 字段中输入视图的纯文本名称。这会自动填充 Label 字段。
- 在 Description 字段中,输入 OSTree Content View 的描述。
- 如果要使用 Composite 内容视图,请选中 Composite View 复选框。
- 单击 Save 以完成。
- 导航到 OSTree Content 选项卡,然后单击 Add。
- 选择要使用的 OSTree 存储库。单击 Add Repository,将来自此存储库的 OSTree 内容添加到内容视图。
- 导航到 Versions,再单击 Publish New Version。
- 在 Description 字段中,输入版本的描述,然后单击 Save。
您也可以单击 Promote,以在应用生命周期的不同环境中提升此内容视图。
对于 CLI 用户
获取存储库 ID 列表:
hammer repository list --organization "_My_Organization_"
# hammer repository list --organization "_My_Organization_"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 创建内容视图并添加存储库:
hammer content-view create \ --name "OSTree" \ --description "OSTree for Red Hat Enterprise Linux Atomic Host" \ --repository-ids 5 \ --organization "My_Organization"
# hammer content-view create \ --name "OSTree" \ --description "OSTree for Red Hat Enterprise Linux Atomic Host" \ --repository-ids 5 \ --organization "My_Organization"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 发布视图:
hammer content-view publish \ --name "OSTree" \ --description "Example Content View for the OSTree" \ --organization "My_Organization"
# hammer content-view publish \ --name "OSTree" \ --description "Example Content View for the OSTree" \ --organization "My_Organization"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow