LoginSignup
1
0

More than 1 year has passed since last update.

Db2 on CP4D 4.6.2 導入と構成 - 付録DMC1.サービス導入

Posted at

DMC on Cloud Pak for Data 4.6.2 導入と構成

シリーズ"Db2 on CP4D 4.6.2 導入と構成"では 2023年02月の経験をベースに Cloud Pak for Data (以下CP4D)4.6.2環境へ Db2を導入デプロイする手順をご紹介しました。 
付録として同じ次の環境にDMC(Db2 Data Management Console)を導入する手順をご紹介します。

  • Managed OpenShift cluster (ROKS) on IBM Cloud (VPC/"Gen2")
  • OpenShift Container Platform (OCP) 4.10 , OpenShift Data Foundation (ODF) 4.10
  • Cloud Pak for Data (CP4D) 4.6.2

DMCは、Db2、Db2 Warehouse、Db2 Big SQL、Watson™ Query といったDb2データベースを一つのユーザーインターフェースで管理監視することができるとても便利なツールです。

ここでは DMCサービスを導入します。

付録DMC1.サービス導入

CP4D環境にDMCを導入します。

  • DMC オペレーターを導入する。
  • DMC サービスを導入する。

手順

作業は踏み台マシンでおこないます。
(1) 環境変数シェルスクリプトを次のようにして実行して環境変数を定義してOpenShiftクラスターにログインしましょう。 ここで実行している$CPDOCLOGINはcpd-cli manage login-to-ocpをオプション付きで実行するようにcpd_vars.sh内で環境変数として定義しています。

# source ./cpd_vars.sh
# $CPDOCLOGIN
[INFO] 2023-02-24T15:02:06.909389Z Checking architecture: amd64
[INFO] 2023-02-24T15:02:06.909472Z Checking podman or docker
[INFO] 2023-02-24T15:02:06.999726Z Dockerexe: podman
[INFO] 2023-02-24T15:02:07.172603Z Container olm-utils-play is running already. Image: icr.io/cpopen/cpd/olm-utils:latest
[INFO] 2023-02-24T15:02:07.298690Z Processing subcommand login-to-ocp
KUBECONFIG is /opt/ansible/.kubeconfig
WARNING: Using insecure TLS client config. Setting this option is not supported!

Login successful.

You have access to 67 projects, the list has been suppressed. You can list all projects with 'oc projects'

Using project "default".
Using project "default" on server "https://c115-e.jp-tok.containers.cloud.ibm.com:31714".
[SUCCESS] 2023-02-24T15:02:30.845670Z You may find output and logs in the /home/xxxxx/cpd-cli-workspace/olm-utils-workspace/work directory.
[SUCCESS] 2023-02-24T15:02:30.845776Z The login-to-ocp command ran successfully.
#

(2) DMC オペレーターを導入します。所要時間は10分程度です。

# cpd-cli manage apply-olm --release=${VERSION} --cpd_operator_ns=${PROJECT_CPD_OPS} --components=dmc
[INFO] 2023-02-27T16:29:15.838941Z Checking architecture: amd64
[INFO] 2023-02-27T16:29:15.838984Z Checking podman or docker
[INFO] 2023-02-27T16:29:15.856326Z Dockerexe: podman
[INFO] 2023-02-27T16:29:15.978192Z Container olm-utils-play is running already. Image: icr.io/cpopen/cpd/olm-utils:latest
[INFO] 2023-02-27T16:29:16.098630Z Processing subcommand apply-olm

PLAY [localhost] *******************************************************************************************************
(省略)
TASK [debug] ***********************************************************************************************************
skipping: [localhost]

PLAY RECAP *************************************************************************************************************
localhost                  : ok=133  changed=17   unreachable=0    failed=0    skipped=106  rescued=0    ignored=0

[SUCCESS] 2023-02-27T16:37:46.201071Z You may find output and logs in the /home/xxxxx/cpd-cli-workspace/olm-utils-workspace/work directory.
[SUCCESS] 2023-02-27T16:37:46.201174Z The apply-olm command ran successfully.
#

cpd-cli manage apply-olmコマンドで最後に[SUCCESS]が返されたので成功しました。 

(3) DMCサービスを導入します。 次でDMCのカスタムリソースを作成します。所要時間は20分程度です。

# cpd-cli manage apply-cr --components=dmc --release=${VERSION} --cpd_instance_ns=${PROJECT_CPD_INSTANCE} --license_acceptance=true
[INFO] 2023-02-27T16:57:14.891275Z Checking architecture: amd64
[INFO] 2023-02-27T16:57:14.891317Z Checking podman or docker
[INFO] 2023-02-27T16:57:14.910971Z Dockerexe: podman
[INFO] 2023-02-27T16:57:15.034901Z Container olm-utils-play is running already. Image: icr.io/cpopen/cpd/olm-utils:latest
[INFO] 2023-02-27T16:57:15.156722Z Processing subcommand apply-cr
(省略)
PLAY RECAP *************************************************************************************************************
localhost                  : ok=38   changed=5    unreachable=0    failed=0    skipped=58   rescued=0    ignored=0

[SUCCESS] 2023-02-27T17:02:42.604513Z You may find output and logs in the /home/xxxxx/cpd-cli-workspace/olm-utils-workspace/work directory.
[SUCCESS] 2023-02-27T17:02:42.604557Z The apply-cr command ran successfully.
#

cpd-cli manage apply-crコマンドで最後に[SUCCESS]が返されたので成功しました。 

(オプション) cpd-cli manage get-cr-status コマンドでカスタムリソースの状況が完了しているかどうか 確認することができます。

# cpd-cli manage get-cr-status --cpd_instance_ns=${PROJECT_CPD_INSTANCE} --components=dmc
[INFO] 2023-02-27T17:09:35.275536Z Checking architecture: amd64
[INFO] 2023-02-27T17:09:35.275574Z Checking podman or docker
[INFO] 2023-02-27T17:09:35.293655Z Dockerexe: podman
[INFO] 2023-02-27T17:09:35.414989Z Container olm-utils-play is running already. Image: icr.io/cpopen/cpd/olm-utils:latest
[INFO] 2023-02-27T17:09:35.535734Z Processing subcommand get-cr-status
# component,CR-kind,CR-name,status,version,creationtimestamp,reconciled-version,operator-info
dmc,Dmcaddon,dmc-addon,Completed,4.6.2,2023-02-27T07:57:38Z,--,--
[SUCCESS] 2023-02-27T17:09:57.047471Z You may find output and logs in the /home/xxxxx/cpd-cli-workspace/olm-utils-workspace/work directory.
[SUCCESS] 2023-02-27T17:09:57.047606Z The get-cr-status command ran successfully.
#

statusCompletedになっているので 完了していることがわかります。

参考文書

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0