使用 Automation Hub 中的命名空间策展集合

Red Hat Ansible Automation Platform 2.1

使用命名空间来组织机构中自动化开发人员创建的集合。创建命名空间、上传集合并添加可帮助最终用户完成自动化任务的额外信息和资源。

Red Hat Customer Content Services

摘要

提供反馈:
如果您对本文档有任何改进建议,或发现错误,请联系技术支持 https://access.redhat.com,使用 Docs组件在 Ansible Automation PlatformJIRA 项目中创建一个问题。

前言

使用 Automation Hub 中的命名空间对您本机构自己开发的集合进行策展。

使开源包含更多

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。我们从这四个术语开始:master、slave、黑名单和白名单。由于此项工作十分艰巨,这些更改将在即将推出的几个发行版本中逐步实施。有关更多详情,请参阅我们的首席技术官 Chris Wright 提供的消息

第 1 章 使用命名空间管理 Automation Hub 中的集合

您可以使用 Automation Hub 中的命名空间组织在您的机构内开发的集合,以用于内部发布和使用。

使用命名空间需要一个有权创建、编辑和将集合上传到命名空间的组。上传到命名空间的集合可能需要管理员批准,然后才能发布并供使用。如需有关组和权限的更多信息,请参阅在 Automation Hub 中管理用户访问权限,以确定如何为您的内容策展人员和开发人员配置 Automation Hub。

1.1. 关于命名空间

命名空间是 Automation Hub 中的唯一位置,您可以上传并发布内容集合。对 Automation Hub 中的命名空间的访问取决于有权管理相应内容和相关信息的组。

为您的命名空间格式化集合

您可以将内部开发的集合上传到自动化中心,使用 tar.gz 文件格式,它们需要满足以下名称规则:

<my_namespace-my_collection-1.0.0.tar.gz>

1.2. 为内容 Curator 创建新组

您可以在 Automation Hub 中创建一个新组,旨在支持您机构中的内容策展,这些策展将提供内部开发的集合以便在 Automation Hub 中发布。

在本小节中,您将创建新组,并分配所需的权限来帮助内容开发人员创建命名空间并将其集合上传到 Automation Hub。

先决条件

  • 在自动化中心中有 admin 权限并创建组。

流程

  1. 登录到您的本地 Automation Hub。
  2. 进入 Groups,并点 Create
  3. 在界面中输入 Content Engineering 作为组的 Name,再点 Create。新组已创建,Groups 页会显示。
  4. Permissions 选项卡中,点 Edit
  5. Namespaces 下,为 Add NamespaceUpload to NamespaceChange Namespace 添加权限。
  6. 点击 Save

    使用您分配的权限创建新组。接下来,您可以将用户添加到组中。

  7. Groups 页面中的 Users 选项卡。
  8. 点击 Add
  9. 从界面中选择用户并点 Add

总结

现在,您有一个新组,它可使用 Automation Hub:

  • 创建命名空间,
  • 编辑命名空间详情和资源页面
  • 在内部上上传开发的集合到命名空间。

1.3. 创建命名空间

您可以创建一个命名空间来对开发人员进行分组到 Automation Hub。在创建命名空间时,您可以在 Automation Hub 中分配一个组作为该命名空间的拥有者。

先决条件

  • 您有 Add NamespacesUpload to Namespaces 权限。

流程

  1. 登录到您的本地 Automation Hub。
  2. 进入 My Namespaces
  3. Create 并提供 命名空间名称,并分配一个 Namespace owners 组。
  4. Create

您的内容开发人员现在可以将集合上传到新命名空间中,或者允许分配为拥有者组的用户上传集合。

1.4. 在命名空间中添加额外信息和资源

您可以将信息添加到命名空间中包含的集合中,并为用户提供资源。添加徽标、描述并将用户链接到 GitHub 存储库、签发跟踪程序或其他在线资产。您还可以在 Edit resources 选项卡中输入标记文本,使其包含有助于在其自动化任务中使用集合的最终用户的附加信息。

先决条件

  • 您有更改命名空间的权限。

流程

  1. 登录到您的本地 Automation Hub。
  2. 进入 My Namespaces
  3. More actions 并选择 Edit namespace
  4. Edit details 选项卡中,在字段中提供信息以增强您的命名空间体验。
  5. edit resources 选项卡在文本字段中输入标记。
  6. 完成后点 Save

您的内容开发人员现在可以将集合上传到新命名空间中,或者允许分配为拥有者组的用户上传集合。

创建命名空间后,具有上传权限的组便可开始添加其集合以进行批准。批准后,命名空间中的集合将出现在 Published 存储库中。

1.5. 将集合上传到您的命名空间中

您可以将内部开发的集合上传到本地 Automation Hub 命名空间,供 Automation Hub 管理员审核和批准。批准后,集合将移至 Automation Hub 用户可以查看并下载它的 Published 内容存储库。

注意

按如下方式格式化您的集合文件名: <NAMESPACE-COLECTION-NAME.tar.gz>

前提条件

  • 您有一个命名空间,可以将集合上传到这个命名空间。

流程

  1. 登录到您的本地 Automation Hub
  2. 进入 My Namespaces 并选择一个命名空间。
  3. Upload collection
  4. New collection 界面中点 Select file
  5. 选择要上传的集合。
  6. Upload

My Imports 屏幕将提供测试概述信息,并在集合上传成功或失败时通知您。

1.6. 查看命名空间导入日志

您可以查看上传到命名空间的集合状态,以评估进程是否成功或失败。

导入的集合信息包括:

  • Status - 完成或失败
  • Approval status - 等待批准或已批准
  • Version - 上传的集合的版本。
  • Import log - 在集合导入过程中执行的操作。

先决条件

  • 您可以访问可上传集合的命名空间。

流程

  1. 登录到您的本地 Automation Hub。
  2. 进入 My Namespaces
  3. 选择一个命名空间。
  4. More actions 并选择 My imports
  5. 使用 search 字段或找到列表中导入的集合。
  6. 点导入的集合。

查看集合导入详情,以确定命名空间中的集合状态。

第 2 章 总结

按照以上步骤,您可以
  • 使用可以创建命名空间的权限创建组来策展命名空间并上传其集合;
  • 在命名空间中添加有助于用户自动化任务中的集合的最终用户的信息和资源 ;
  • 将集合上传到命名空间中。
  • 查看命名空间导入日志,以确定上传集合及其当前批准状态是否成功或失败。

法律通告

Copyright © 2023 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.