5.2. 更新插件 registry
使用最新的 Ansible 插件文件在 OpenShift 集群中重建插件 registry 应用。
先决条件
- 您已下载了 Ansible 插件文件。
-
您已设置了环境变量,如
$DYNAMIC_PLUGIN_ROOT_DIR
,以表示您存储了.tar
文件的本地目录的路径。
流程
- 使用凭证登录到 OpenShift Container Platform 实例,以创建新应用程序。
打开 Red Hat Developer Hub OpenShift 项目。
$ oc project <YOUR_DEVELOPER_HUB_PROJECT>
运行以下命令,以更新 OpenShift 集群中的插件 registry 构建。命令假定
$DYNAMIC_PLUGIN_ROOT_DIR
代表您的.tar
文件的目录。如果您选择了不同的环境变量名称,请在命令中替换它。$ oc start-build plugin-registry --from-dir=$DYNAMIC_PLUGIN_ROOT_DIR --wait
$ oc start-build plugin-registry --from-dir=$DYNAMIC_PLUGIN_ROOT_DIR --wait
当 registry 启动时,输出会显示以下信息:
Uploading directory "/path/to/dynamic_plugin_root" as binary input for the build … Uploading finished build.build.openshift.io/plugin-registry-1 started
验证
验证 plugin-registry
是否已更新。
- 在 OpenShift UI 中,单击 Topology。
- 单击 redhat-developer-hub 图标,以查看插件 registry 的 pod。
- 点插件 registry pod 的 View logs。
-
打开 Terminal 选项卡,再运行
ls
来查看插件 registry 中的
.tar
文件。 -
验证新
.tar
文件是否已上传。