GitOps のインストール


Red Hat OpenShift GitOps 1.9

Openshift GitOps Operator のインストールと Argo CD インスタンスへのログイン

Red Hat OpenShift Documentation Team

概要

このドキュメントでは、OpenShift GitOps Operator をインストールするためのサイジング要件と前提条件を説明します。また、OpenShift GitOps Operator をインストールして Argo CD インスタンスにログインする方法についても説明します。

第1章 Red Hat OpenShift GitOps のインストールの準備

Red Hat OpenShift GitOps を OpenShift Container Platform にインストールする前に、サイジング要件と前提条件に関する次の情報を確認してください。サイジング要件は、Red Hat OpenShift GitOps Operator によってインスタンス化されるデフォルト ArgoCD インスタンスのサイズの詳細を示すものでもあります。

1.1. GitOps のサイジング要件

Red Hat OpenShift GitOps は、クラウドネイティブアプリケーションの継続的デプロイメントを実装するための宣言的な方法です。GitOps を使用すると、アプリケーションの CPU とメモリーの要件を定義および設定できます。

Red Hat OpenShift GitOps Operator をインストールするたびに、namespace 上のリソースが、定義された制限内でインストールされます。デフォルトのインストールで制限と要求が設定されていない場合、Operator は namespace でクォータを使用して失敗します。十分なリソースがないと、クラスターは ArgoCD 関連の Pod をスケジュールできません。次の表に、デフォルトのワークロードのリソース要求および制限の詳細を示します。

Expand
ワークロードCPU 要求CPU 上限メモリー要求メモリー上限

argocd-application-controller

1

2

1024M

2048M

applicationset-controller

1

2

512M

1024M

argocd-server

0.125

0.5

128M

256M

argocd-repo-server

0.5

1

256M

1024M

argocd-redis

0.25

0.5

128M

256M

argocd-dex

0.25

0.5

128M

256M

HAProxy

0.25

0.5

128M

256M

オプションで、oc コマンドで ArgoCD カスタムリソースを使用して、詳細を確認し、変更することもできます。

oc edit argocd <name of argo cd> -n namespace
Copy to Clipboard Toggle word wrap

第2章 Red Hat OpenShift GitOps のインストール

Red Hat OpenShift GitOps は Argo CD を使用して、クラスター Operator、オプションの Operator Lifecycle Manager (OLM) Operator、ユーザー管理など、特定のクラスタースコープのリソースを管理します。

2.1. 前提条件

  • OpenShift Container Platform Web コンソールにアクセスできる。
  • cluster-admin ロールを持つユーザーとしてログインしている。
  • 管理者として OpenShift Container Platform クラスターにログインしている。
  • クラスターで Marketplace 機能 が有効になっているか、Red Hat Operator カタログソースが手動で設定されている。
警告

Red Hat OpenShift GitOps Operator をインストールする前にコミュニティーバージョンの Argo CD Operator がすでにインストールされている場合は、Argo CD Community Operator を削除します。

以下では、Red Hat OpenShift GitOps Operator を OpenShift Container Platform クラスターにインストールし、Argo CD インスタンスにログインする方法を説明します。

重要

latest チャネルにより、Red Hat OpenShift GitOps Operator の最新の安定バージョンをインストールできます。現在、Red Hat OpenShift GitOps Operator をインストールするためのデフォルトのチャネルです。

Red Hat OpenShift GitOps Operator の特定のバージョンをインストールするには、クラスター管理者は対応する gitops-<version> チャネルを使用できます。たとえば、Red Hat OpenShift GitOps Operator バージョン 1.8.x をインストールするには、gitops-1.8 チャネルを使用できます。

2.2. Red Hat OpenShift GitOps Operator を Web コンソールにインストールする

Web コンソールを使用して、OperatorHub から Red Hat OpenShift GitOps Operator をインストールできます。

手順

  1. Web コンソールの Administrator パースペクティブで、左側のメニューにある OperatorsOperatorHub に移動します。
  2. OpenShift GitOps を検索し、Red Hat OpenShift GitOps タイルをクリックし、Install をクリックします。

    Red Hat OpenShift GitOps は、クラスターのすべての namespace にインストールされます。

Red Hat OpenShift GitOps Operator がインストールされると、openshift-gitops namespace で利用可能なすぐに使える Argo CD インスタンスが自動的に設定され、Argo CD アイコンがコンソールツールバーに表示されます。プロジェクトでアプリケーション用に後続の Argo CD インスタンスを作成できます。

2.3. CLI を使用した Red Hat OpenShift GitOps Operator のインストール

CLI を使用して OperatorHub から Red Hat OpenShift GitOps Operator をインストールできます。

手順

  1. Subscription オブジェクトの YAML ファイルを作成し、namespace を Red Hat OpenShift GitOps にサブスクライブします (例: sub.yaml)。

    Subscription の例

    apiVersion: operators.coreos.com/v1alpha1
    kind: Subscription
    metadata:
      name: openshift-gitops-operator
      namespace: openshift-operators
    spec:
      channel: latest 
    1
    
      installPlanApproval: Automatic
      name: openshift-gitops-operator 
    2
    
      source: redhat-operators 
    3
    
      sourceNamespace: openshift-marketplace 
    4
    Copy to Clipboard Toggle word wrap

    1
    Operator のサブスクライブ元のチャネル名を指定します。
    2
    サブスクライブする Operator の名前を指定します。
    3
    Operator を提供する CatalogSource の名前を指定します。
    4
    CatalogSource の namespace。デフォルトの OperatorHub CatalogSource には openshift-marketplace を使用します。
  2. Subscription をクラスターに適用します。

    $ oc apply -f openshift-gitops-sub.yaml
    Copy to Clipboard Toggle word wrap
  3. インストールが完了したら、openshift-gitops namespace のすべての Pod が実行されていることを確認します。

    $ oc get pods -n openshift-gitops
    Copy to Clipboard Toggle word wrap

    出力例

    NAME                                                      	READY   STATUS	RESTARTS   AGE
    cluster-b5798d6f9-zr576                                   	1/1 	Running   0      	65m
    kam-69866d7c48-8nsjv                                      	1/1 	Running   0      	65m
    openshift-gitops-application-controller-0                 	1/1 	Running   0      	53m
    openshift-gitops-applicationset-controller-6447b8dfdd-5ckgh 1/1 	Running   0      	65m
    openshift-gitops-redis-74bd8d7d96-49bjf                   	1/1 	Running   0      	65m
    openshift-gitops-repo-server-c999f75d5-l4rsg              	1/1 	Running   0      	65m
    openshift-gitops-server-5785f7668b-wj57t                  	1/1 	Running   0      	53m
    Copy to Clipboard Toggle word wrap

2.4. Argo CD 管理アカウントを使用した Argo CD インスタンスへのログイン

Red Hat OpenShift GitOps Operator は openshift-gitops namespace で利用可能なすぐに使用できる Argo CD インスタンスを自動的に作成します。

前提条件

  • Red Hat OpenShift GitOps Operator がクラスターにインストールされている。

手順

  1. Web コンソールの Administrator パースペクティブで、OperatorsInstalled Operators に移動し、Red Hat OpenShift GitOps Operator がインストールされていることを確認します。
  2. red hat applications menu icon メニュー → OpenShift GitOpsCluster Argo CD の順に移動します。Argo CD UI のログインページは、新規ウィンドウに表示されます。
  3. オプション: OpenShift Container Platform の認証情報でログインするには、cluster-admins グループのユーザーであることを確認してから、Argo CD ユーザーインターフェイスで LOG IN VIA OPENSHIFT オプションを選択します。

    注記

    cluster-admins グループのユーザーになるには、oc adm groups new cluster-admins <user> コマンドを使用します。この場合の <user> は、クラスター全体またはローカルでユーザーおよびグループにバインドできるデフォルトのクラスターロールです。

  4. ユーザー名とパスワードを使用してログインするには、Argo CD インスタンスのパスワードを取得します。

    1. コンソールの左側のパネルで、パースペクティブスイッチャーを使用して Developer パースペクティブに切り替えます。
    2. Project ドロップダウンリストを使用して、openshift-gitops プロジェクトを選択します。
    3. 左側のナビゲーションパネルを使用して、Secrets ページに移動します。
    4. openshift-gitops-cluster インスタンスを選択して、パスワードを表示します。
    5. パスワードをコピーします。
  5. このパスワードおよび admin をユーザー名として使用し、新しいウィンドウで Argo CD UI にログインします。
注記

同じ namespace に 2 つの Argo CD CR を作成することはできません。

法律上の通知

Copyright © 2024 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.
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat