第9章 デプロイメントプロセスの監視およびデバッグ
ユーザーは、デプロイメントフェーズ中に問題のトラブルシューティングを行えるようになりました。QuayRegistry オブジェクトのステータスは、デプロイメント時にコンポーネントの正常性をモニターするのに役立ちます。これにより、発生する可能性のある問題のデバッグに役立ちます。
手順
次のコマンドを入力して、デプロイメントのステータスを確認します。
$ oc get quayregistry -n quay-enterprise -o yaml出力例
デプロイメント直後に、
QuayRegistryオブジェクトに基本設定が表示されます。apiVersion: v1 items: - apiVersion: quay.redhat.com/v1 kind: QuayRegistry metadata: creationTimestamp: "2021-09-14T10:51:22Z" generation: 3 name: example-registry namespace: quay-enterprise resourceVersion: "50147" selfLink: /apis/quay.redhat.com/v1/namespaces/quay-enterprise/quayregistries/example-registry uid: e3fc82ba-e716-4646-bb0f-63c26d05e00e spec: components: - kind: postgres managed: true - kind: clair managed: true - kind: redis managed: true - kind: horizontalpodautoscaler managed: true - kind: objectstorage managed: true - kind: route managed: true - kind: mirror managed: true - kind: monitoring managed: true - kind: tls managed: true - kind: clairpostgres managed: true configBundleSecret: example-registry-config-bundle-kt55s kind: List metadata: resourceVersion: "" selfLink: ""oc get podsコマンドを使用して、デプロイされたコンポーネントの現在の状態を表示します。$ oc get pods -n quay-enterprise出力例
NAME READY STATUS RESTARTS AGE example-registry-clair-app-86554c6b49-ds7bl 0/1 ContainerCreating 0 2s example-registry-clair-app-86554c6b49-hxp5s 0/1 Running 1 17s example-registry-clair-postgres-68d8857899-lbc5n 0/1 ContainerCreating 0 17s example-registry-quay-app-upgrade-h2v7h 0/1 ContainerCreating 0 9s example-registry-quay-database-66f495c9bc-wqsjf 0/1 ContainerCreating 0 17s example-registry-quay-mirror-854c88457b-d845g 0/1 Init:0/1 0 2s example-registry-quay-mirror-854c88457b-fghxv 0/1 Init:0/1 0 17s example-registry-quay-postgres-init-bktdt 0/1 Terminating 0 17s example-registry-quay-redis-f9b9d44bf-4htpz 0/1 ContainerCreating 0 17sデプロイメントが進行中、
QuayRegistryオブジェクトに現在のステータスが表示されます。この場合、データベースの移行が行われ、その他のコンポーネントは完了するまで待機します。status: conditions: - lastTransitionTime: "2021-09-14T10:52:04Z" lastUpdateTime: "2021-09-14T10:52:04Z" message: all objects created/updated successfully reason: ComponentsCreationSuccess status: "False" type: RolloutBlocked - lastTransitionTime: "2021-09-14T10:52:05Z" lastUpdateTime: "2021-09-14T10:52:05Z" message: running database migrations reason: MigrationsInProgress status: "False" type: Available lastUpdated: 2021-09-14 10:52:05.371425635 +0000 UTC unhealthyComponents: clair: - lastTransitionTime: "2021-09-14T10:51:32Z" lastUpdateTime: "2021-09-14T10:51:32Z" message: 'Deployment example-registry-clair-postgres: Deployment does not have minimum availability.' reason: MinimumReplicasUnavailable status: "False" type: Available - lastTransitionTime: "2021-09-14T10:51:32Z" lastUpdateTime: "2021-09-14T10:51:32Z" message: 'Deployment example-registry-clair-app: Deployment does not have minimum availability.' reason: MinimumReplicasUnavailable status: "False" type: Available mirror: - lastTransitionTime: "2021-09-14T10:51:32Z" lastUpdateTime: "2021-09-14T10:51:32Z" message: 'Deployment example-registry-quay-mirror: Deployment does not have minimum availability.' reason: MinimumReplicasUnavailable status: "False" type: Availableデプロイメントプロセスが正常に終了すると、
QuayRegistryオブジェクトのステータスには正常でないコンポーネントは表示されません。status: conditions: - lastTransitionTime: "2021-09-14T10:52:36Z" lastUpdateTime: "2021-09-14T10:52:36Z" message: all registry component healthchecks passing reason: HealthChecksPassing status: "True" type: Available - lastTransitionTime: "2021-09-14T10:52:46Z" lastUpdateTime: "2021-09-14T10:52:46Z" message: all objects created/updated successfully reason: ComponentsCreationSuccess status: "False" type: RolloutBlocked currentVersion: {producty} lastUpdated: 2021-09-14 10:52:46.104181633 +0000 UTC registryEndpoint: https://example-registry-quay-quay-enterprise.apps.docs.quayteam.org unhealthyComponents: {}
9.1. OpenShift Container Platform コンソールからの Red Hat Quay のデプロイ リンクのコピーリンクがクリップボードにコピーされました!
-
namespace (例:
quay-enterprise) を作成します。 -
Operators
Installed Operators を選択してから Quay Operator を選択し、Operator の詳細ビューに移動します。 - 'Provided API' の下にある 'Quay Registry' タイルの 'Create Instance' をクリックします。
-
オプションで、
QuayRegistryの 'Name' を変更します。これはレジストリーのホスト名に影響します。その他のフィールドはすべてデフォルトで入力されています。 -
'Create' をクリックし、Quay Operator によってデプロイされる
QuayRegistryを送信します。 -
QuayRegistryリストビューにリダイレクトされるはずです。作成したQuayRegistryをクリックし、詳細ビューを表示します。 - 'Registry Endpoint' の値が設定されたら、その値をクリックして UI で新規 Quay レジストリーにアクセスします。'Create Account' を選択して、ユーザーを作成し、サインインできるようになりました。
9.1.1. Red Hat Quay UI を使用した最初のユーザーの作成 リンクのコピーリンクがクリップボードにコピーされました!
Red Hat Quay UI で最初のユーザーを作成するには、次の手順を実行します。
この手順では、FEATURE_USER_CREATION 設定オプションが false に設定されていることを前提としています。False の場合、UI での Create Account 機能が無効になり、API を使用して最初のユーザーを作成する必要があります。
手順
-
OpenShift Container Platform コンソールで、適切な namespace /プロジェクトを使用して Operators
Installed Operators に移動します。 新しくインストールされた
QuayRegistryオブジェクトをクリックして詳細を表示します。以下に例を示します。
-
Registry Endpointに値を設定したら、ブラウザーでこの URL に移動します。 Red Hat Quay レジストリー UI で Create Account を選択し、ユーザーを作成します。以下に例を示します。
Username、Password、Email の詳細を入力し、Create Account をクリックします。以下に例を示します。
最初のユーザーを作成すると、自動的に Red Hat Quay レジストリーにログインされます。以下に例を示します。