$ tar xvzf <file>
Red Hat OpenShift GitOps 有关 Red Hat 技术预览功能的支持范围的更多信息,请参阅 技术预览功能支持范围。 |
使用 GitOps argocd
CLI 工具可从命令行配置和管理 Red Hat OpenShift GitOps 和 Argo CD 资源。GitOps argocd
CLI 旨在使 GitOps 计算任务简单明了。您可以在不同的平台上安装 CLI 工具。
压缩存档和 RPM 都包含 |
对于 Linux 发行版,您可以将 GitOps argocd
CLI 下载为 tar.gz
存档。
从内容网关下载适用于您操作系统和架构的最新版 CLI 工具。
操作系统 | 架构 | 压缩包 |
---|---|---|
Linux |
x86_64, amd64 |
|
IBM zSystems 和 IBM® LinuxONE 上的 Linux |
s390x |
|
IBM Power 上的 Linux |
ppc64le |
|
ARM 上的 Linux |
aarch64, arm64 |
|
较新版本的 CLI 工具兼容较旧版本的 Red Hat OpenShift GitOps 服务器,但反之则不然。 |
运行以下命令解压归档文件
$ tar xvzf <file>
运行以下命令将二进制文件移动到您的PATH
环境变量中的目录
$ sudo mv argocd /usr/local/bin/argocd
运行以下命令使文件可执行
$ sudo chmod +x /usr/local/bin/argocd
安装 GitOps argocd
CLI 后,运行以下命令验证其可用性
$ argocd version --client
argocd: v2.9.5+f943664
BuildDate: 2024-02-15T05:19:27Z
GitCommit: f9436641a616d277ab1f98694e5ce4c986d4ea05
GitTreeState: clean
GoVersion: go1.20.10
Compiler: gc
Platform: linux/amd64
ExtraBuildInfo: openshift-gitops-version: 1.12.0, release: 0015022024 (1)
1 | Red Hat 构建的 Red Hat OpenShift GitOps 的构建信息。 |
对于 Red Hat Enterprise Linux (RHEL) 8 或更高版本,您可以使用包管理器(例如yum
或dnf
)将 GitOps argocd
CLI 作为 RPM 安装。这允许系统自动管理 GitOps argocd
CLI 版本。例如,使用诸如dnf upgrade
之类的命令可以升级所有软件包,包括argocd
(如果可用新版本)。
您在 Red Hat 帐户中拥有有效的 OpenShift Container Platform 订阅。
您在本地系统上具有 root 或sudo
权限。
运行以下命令注册 Red Hat Subscription Manager
# subscription-manager register
运行以下命令拉取最新的订阅数据
# subscription-manager refresh
运行以下命令列出可用的订阅
# subscription-manager list --available --matches '*gitops*'
在先前命令的输出中,找到您的 OpenShift Container Platform 订阅的池 ID,然后运行以下命令将订阅附加到已注册的系统
# subscription-manager attach --pool=<pool_id>
运行以下命令启用 Red Hat OpenShift GitOps 在 RHEL 8 或更高版本所需的存储库
Linux (x86_64, amd64)
# subscription-manager repos --enable="gitops-<gitops_version>-for-rhel-<rhel_version>-x86_64-rpms"
# subscription-manager repos --enable="gitops-1.15-for-rhel-8-x86_64-rpms"
IBM zSystems 和 IBM® LinuxONE 上的 Linux (s390x)
# subscription-manager repos --enable="gitops-<gitops_version>-for-rhel-<rhel_version>-s390x-rpms"
# subscription-manager repos --enable="gitops-1.15-for-rhel-8-s390x-rpms"
IBM Power 上的 Linux (ppc64le)
# subscription-manager repos --enable="gitops-<gitops_version>-for-rhel-<rhel_version>-ppc64le-rpms"
# subscription-manager repos --enable="gitops-1.15-for-rhel-8-ppc64le-rpms"
ARM 上的 Linux (aarch64, arm64)
# subscription-manager repos --enable="gitops-<gitops_version>-for-rhel-<rhel_version>-aarch64-rpms"
# subscription-manager repos --enable="gitops-1.15-for-rhel-8-aarch64-rpms"
运行以下命令安装openshift-gitops-argocd-cli
包
# yum install openshift-gitops-argocd-cli
安装 GitOps argocd
CLI 后,运行以下命令验证其可用性
$ argocd version --client
argocd: v2.9.5+f943664
BuildDate: 2024-02-15T05:19:27Z
GitCommit: f9436641a616d277ab1f98694e5ce4c986d4ea05
GitTreeState: clean
GoVersion: go1.20.10
Compiler: gc
Platform: linux/amd64
ExtraBuildInfo: openshift-gitops-version: 1.12.0, release: 0015022024 (1)
1 | Red Hat 构建的 Red Hat OpenShift GitOps 的构建信息。 |
对于 Windows,您可以将 GitOps argocd
CLI 下载为压缩的zip
存档。
从内容网关下载适用于您操作系统和架构的最新版 CLI 工具。
操作系统 | 架构 | 压缩包 |
---|---|---|
Windows |
x86_64 |
|
较新版本的 CLI 工具兼容较旧版本的 Red Hat OpenShift GitOps 服务器,但反之则不然。 |
使用 ZIP 程序解压归档文件。
运行以下命令将二进制文件移动到您的PATH
环境变量中的目录
C:\> move argocd.exe <directory>
安装 GitOps argocd
CLI 后,运行以下命令验证其可用性
$ argocd version --client
argocd: v2.9.5+f943664
BuildDate: 2024-02-15T05:19:27Z
GitCommit: f9436641a616d277ab1f98694e5ce4c986d4ea05
GitTreeState: clean
GoVersion: go1.20.10
Compiler: gc
Platform: linux/amd64
ExtraBuildInfo: openshift-gitops-version: 1.12.0, release: 0015022024 (1)
1 | Red Hat 构建的 Red Hat OpenShift GitOps 的构建信息。 |
对于 macOS,您可以将 GitOps argocd
CLI 下载为tar.gz
存档。
从内容网关下载适用于您操作系统和架构的最新版 CLI 工具。
操作系统 | 架构 | 压缩包 |
---|---|---|
英特尔版 macOS |
x86_64 |
|
ARM 版 macOS |
arm64 |
|
较新版本的 CLI 工具兼容较旧版本的 Red Hat OpenShift GitOps 服务器,但反之则不然。 |
运行以下命令解压归档文件
$ tar xvzf <file>
运行以下命令将二进制文件移动到您的PATH
环境变量中的目录
$ sudo mv argocd /usr/local/bin/argocd
运行以下命令使文件可执行
$ sudo chmod +x /usr/local/bin/argocd
安装 GitOps argocd
CLI 后,运行以下命令验证其可用性
$ argocd version --client
argocd: v2.9.5+f943664
BuildDate: 2024-02-15T05:19:27Z
GitCommit: f9436641a616d277ab1f98694e5ce4c986d4ea05
GitTreeState: clean
GoVersion: go1.20.10
Compiler: gc
Platform: linux/amd64
ExtraBuildInfo: openshift-gitops-version: 1.12.0, release: 0015022024 (1)
1 | Red Hat 构建的 Red Hat OpenShift GitOps 的构建信息。 |