DataStageの動的構成ファイルの値の変更

独自のプール、リソース、およびスクラッチ・ディスクの値を使用するように、デフォルトの動的構成テンプレート・ファイルを編集します。

APT_CONFIG_FILE 環境変数が設定されていない場合、ds-runtime 環境はテンプレート・ファイルを使用して動的構成ファイルを生成します。 テンプレート構成ファイルの名前は dynamic_config.apt.template で、/px-storage/config にあります。

デフォルトでは、テンプレート構成ファイルには以下の項目が含まれています。
{
node "conductor"
{
fastname "$conductor"
pools "conductor"
resource disk "/px-storage/pds_files/node1" {pool "" "export" "node1"}
resource scratchdisk "/opt/ibm/PXService/Server/scratch" {pool ""}
}
node "compute"
{
fastname "$pod"
pools ""
resource disk "/px-storage/pds_files/node#" {pool "" "export" "node#"}
resource scratchdisk "/opt/ibm/PXService/Server/scratch" {pool ""}
}
}

このファイルを編集して、コンダクター・ノードと計算ノードの両方のプール、リソース・ディスク、およびリソース・スクラッチ・ディスクの値を変更します。

ds-runtime 環境は、ファイル /px-storage/config/aptconfig.template が存在するかどうかを検査し、存在する場合は、このテンプレートを使用して、環境から受け取った追加のパーティション情報を含む構成ファイルを生成します。 px-runtime 環境は、テンプレート構成ファイル内で「node#」を検出するたびに、パーティション情報に基づいて、node2node3node4 などの増分値で置き換えます。

4 つのパーティションの生成済み構成ファイルの例を以下に示します。
{
node "node1"
{
fastname "10.254.12.172"
pools "conductor"
resource disk "/px-storage/pds_files/node1" {pool "" "export" "node1"}
resource scratchdisk "/opt/ibm/PXService/Server/scratch" {pool ""}
}
node "node2"
{
fastname "ds-px-default-ibm-datastage-px-compute-0.ds-px-default-ibm-datastage-px-compute"
pools ""
resource disk "/px-storage/pds_files/node2" {pool "" "export" "node2"}
resource scratchdisk "/opt/ibm/PXService/Server/scratch" {pool ""}
}
node "node3"
{
fastname "ds-px-default-ibm-datastage-px-compute-1.ds-px-default-ibm-datastage-px-compute"
pools ""
resource disk "/px-storage/pds_files/node3" {pool "" "export" "node3"}
resource scratchdisk "/opt/ibm/PXService/Server/scratch" {pool ""}
}
node "node4"
{
fastname "ds-px-default-ibm-datastage-px-compute-0.ds-px-default-ibm-datastage-px-compute"
pools ""
resource disk "/px-storage/pds_files/node4" {pool "" "export" "node4"}
resource scratchdisk "/opt/ibm/PXService/Server/scratch" {pool ""}
}
node "node5"
{
fastname "ds-px-default-ibm-datastage-px-compute-1.ds-px-default-ibm-datastage-px-compute"
pools ""
resource disk "/px-storage/pds_files/node5" {pool "" "export" "node5"}
resource scratchdisk "/opt/ibm/PXService/Server/scratch" {pool ""}
}
}

新規テンプレートの作成および編集

プロジェクトの新規テンプレートを作成し、要件に合うように編集することができます。

  1. インフラ・ノードに接続します。
    [root@api.is-cpd-a.cp.fyre.ibm.com ~]# oc get pods | grep px
    ds-px-default-ibm-datastage-px-compute-0 1/1 Running 0 6d21h
    ds-px-default-ibm-datastage-px-compute-1 1/1 Running 0 6d21h
    ds-px-default-ibm-datastage-px-runtime-c46dfd64d-87zv7 1/1 Running 0 6d21h
  2. px podを入力します。
    $oc rsh ds-px-default-ibm-datastage-px-runtime-c46dfd64d-87zv7
  3. px-storage/config/dynamic_config.apt.templateをプロジェクトにコピーします。以下に例を示します。
    sh-5.1$ cp /px-storage/config/dynamic_config.apt.template /ds-storage/PXRuntime/Projects/a44d10c3-cbc2-48ae-9c65-09ddb0c8b4b5/
  4. dynamic_config.apt.template ファイルを nano エディターで編集します。
    sh-5.1$ nano /ds-storage/PXRuntime/Projects/a44d10c3-cbc2-48ae-9c65-09ddb0c8b4b5/dynamic_config.apt.template

スクラッチ・ディスクの場所を変更する場合は、プロジェクト固有の dynamic_config.apt.templatescratchdisk設定を変更します。

最初にコピーされたファイル:
{
  node "conductor"
  {
   fastname "$conductor"
   pools "conductor"
   resource disk "/px-storage/pds_files/node1" {pool "" "export" "node1"}
   resource scratchdisk "/opt/ibm/PXService/Server/scratch" {pool ""}
  }
  node "compute"
  {
   fastname "$pod"
   pools ""
   resource disk "/px-storage/pds_files/node#" {pool "" "export" "node#"}
   resource scratchdisk "/opt/ibm/PXService/Server/scratch" {pool ""}
  }
}
変更されたファイル:
{
  node "conductor"
  {
   fastname "$conductor"
   pools "conductor"
   resource disk "/px-storage/pds_files/node1" {pool "" "export" "node1"}
   resource scratchdisk "/new/scratch/dir" {pool ""}
  }
  node "compute"
  {
   fastname "$pod"
   pools ""
   resource disk "/px-storage/pds_files/node#" {pool "" "export" "node#"}
   resource scratchdisk "/new/scratch/dir" {pool ""}
  }
}

この場合、変更が保存されると、プロジェクト内で実行されるジョブは新しいテンプレートを選択します。