25 プロキシ、分散および仮想化デプロイメントの構成
dsconfig
コマンドを使用して、様々なデプロイメント・シナリオでプロキシ・サーバーを構成できます。次の各トピックでは、dsconfig
コマンドを使用して、プロキシ・サーバーを構成する方法について説明します。
ノート:
これらの構成は、対話モードでdsconfig
を使用して実行することもできます。詳細は、「対話型モードでのdsconfigの使用」を参照してください。
ノート:
ここで説明されている仮想ディレクトリ機能を使用するには、有効なOracle Directory Service Plus
ライセンスが必要です。
25.1 ロード・バランシングのデプロイメントの構成
2つのLDAPサーバーでフェイルオーバーする単純なロード・バランシングのためにプロキシ・サーバーを構成するとき、様々なオブジェクトを作成および定義できます。
次の各トピックでは、単純なロード・バランサの作成および構成について説明します。
25.1.1 単純なロード・バランシングのオブジェクトの作成
この項では、単純なロード・バランシングのためのプロキシ・サーバーを構成するときに作成するオブジェクトについて説明します。
単純なロード・バランシングにプロキシ・サーバーを構成する場合は、図25-1に示すオブジェクトを作成する必要があります。これらのオブジェクトは、示された順序で作成する必要があります。
このプロシージャで使用するすべてのコマンドで、プロキシ・ホスト名(-h
)、プロキシ管理ポート(-p
)、初期ルート・ユーザーのバインドDN(-D
)およびプロキシ・パスワードが含まれるファイル(-j
)が指定されます。また、認証も指定する必要があります。クライアントとサーバーが同じインスタンスで実行されている場合に認証が指定されていないと、Oracle Unified Directoryではローカル認証構成が使用されます。
25.2 分散デプロイメントの構成
2つのパーティションに分割される単純な分散デプロイメントのためにプロキシ・サーバーを構成するとき、様々なオブジェクトを作成および定義できます。
次の各トピックでは、分散デプロイメントの作成および構成について説明します。
ノート:
サポートされている分散タイプの詳細は、「プロキシを使用したデータ分散の概要」を参照してください。
25.2.1 単純な分散のためのオブジェクトの作成
単純な分散のためにプロキシ・サーバーを構成するとき、オブジェクトを作成できます。
単純な分散にプロキシ・サーバーを構成する場合は、図25-2に示すオブジェクトを作成する必要があります。これらのオブジェクトは、示された順序で作成する必要があります。
このプロシージャで使用するすべてのコマンドで、プロキシ・ホスト名(-h
)、プロキシ管理ポート(-p
)、初期ルート・ユーザーのバインドDN(-D
)および構成対象のプロキシ・パスワード(-w
)が指定されます。また、認証も指定する必要があります。クライアントとサーバーが同じインスタンスで実行されている場合に認証が指定されていないと、Oracle Unified Directoryではローカル認証構成が使用されます。
25.2.2 単純な分散デプロイメントの構成
単純な分散デプロイメントを構成するには、プロキシLDAPサーバー拡張を作成します。
単純な分散デプロイメントを構成するには:
-
プロキシLDAPサーバー拡張を作成します。
$ dsconfig -h localhost -p 4444 -D "cn=Directory Manager" -j pwd-file -X \ create-extension \ --extension-name proxy_extension1 \ --type ldap-server \ --set enabled:true \ --set remote-ldap-server-address:DS1_hostname \ --set remote-ldap-server-port:2389
LDAPサーバー拡張は、リモートLDAPサーバーへのリンクです。このタスクでは、2つのリモートLDAPサーバー・インスタンスが必要です。サーバーごとに異なるLDAPホスト名およびポートを使用して、このステップを繰り返します。
-
各LDAPサーバー拡張にプロキシ・ワークフロー要素を作成します。
$ dsconfig -h localhost -p 4444 -D "cn=Directory Manager" -j pwd-file -X \ create-workflow-element \ --element-name proxy-we1 \ --type proxy-ldap\ --set enabled:true \ --set client-cred-mode:use-client-identity \ --set ldap-server-extension:proxy_extension1
1つの分散アーキテクチャに少なくとも2つのリモートLDAPサーバーが必要です。サーバーごとにこのステップを繰り返します。ステップ1で作成したLDAPサーバー拡張名と同じ名前を使用します。
プロパティ
client-cred-mode
は、プロキシとリモートLDAPサーバーとの間で使用される認証のタイプを示します。クライアント資格証明モードは、use-client-identity
またはuse-specific-identity
です。 -
分散ワークフロー要素を作成して、分散を設定します。
$ dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ create-workflow-element \ --element-name distrib-we \ --type distribution \ --set base-dn:dc=example,dc=com \ --set enabled:true
-
分散アルゴリズムを設定します。
$ dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ create-distribution-algorithm \ --element-name distrib-we \ --type numeric \ --set distribution-attribute:uid
分散アルゴリズムのタイプは、
capacity
、numeric
、lexico
またはdnpattern
です。アルゴリズムのプロパティは、次のステップで分散パーティションを作成するときに定義します。 -
分散パーティションを定義します。
$ dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ create-distribution-partition \ --element-name distrib-we \ --partition-name distrib-part1\ --type numeric \ --set lower-bound:0 \ --set upper-bound:1000 \ --set partition-id:1 \ --set workflow-element:proxy-we1
このタスクでは、2つのパーティションを作成する必要があります。ワークフロー要素ごとに、一意のパーティションIDおよびパーティション名を使用する必要があります。パーティションを定義する場合は、分散アルゴリズムを定義したときに使用したタイプと同じタイプを指定する必要があります。
ノート:
上限自体は含まれません。つまり、上限として
upper-bound:1000
を指定すると、パーティションには0から999までの値のみが含まれることになります。-
capacity
分散アルゴリズムを作成した場合は、グローバル索引を作成する必要があります。 -
lexico
、numeric
またはdnpattern
の分散アルゴリズムを作成した場合は、グローバル索引の作成はオプションです。
グローバル索引を作成するには:
-
グローバル索引カタログを作成します。
$ gicadm -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ create-catalog \ --catalogName gi-catalog
-
DN属性を索引付けするグローバル索引をカタログに追加します。
$ gicadm -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ add-index \ --catalogName gi-catalog \ --attributeName dn
-
グローバル索引カタログを分散に関連付けます。
$ gicadm -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ associate \ --catalogName gi-catalog \ --distributionWorkflowElement distrib-we
-
-
ワークフローを作成します。
このワークフローによって、分散ワークフロー要素が分散パーティションに関連付けられます。
$ dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ create-workflow \ --workflow-name distrib-workflow \ --set enabled:true \ --set base-dn:dc=example,dc=com \ --set workflow-element:distrib-we
-
ネットワーク・グループを作成します。
このネットワーク・グループでは、クライアントとプロキシの間のすべてのリクエストが処理されます。
$ dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ create-network-group \ --group-name network-group1 \ --set enabled:true \ --set workflow:distrib-workflow \ --set priority:1
25.3 ロード・バランシングを使用する分散デプロイメントの構成
ロード・バランシングを使用する分散デプロイメントのためにプロキシ・サーバーを構成するとき、様々なオブジェクトを作成および定義できます。
次の各トピックでは、分散とロード・バランシングを併用するデプロイメントの作成および構成について説明します。
ノート:
グローバル索引は分散デプロイメントに追加できますが、この例には、グローバル索引を追加する手順は含まれていません。
グローバル索引の作成の詳細は、「コマンド行を使用したグローバル索引の構成」を参照してください。
25.3.1 分散とロード・バランシングを併用するためのオブジェクトの作成
分散およびロード・バランシングのためにプロキシ・サーバーを構成するとき、オブジェクトを作成できます。
分散とロード・バランシングにプロキシ・サーバーを構成する場合は、図25-3に示すオブジェクトを作成する必要があります。これらのオブジェクトは、示された順序で作成する必要があります。
この例は、2つのパーティションにわたる分散が指定されたデプロイメントを示しています。それぞれのパーティションに、レプリケートされた2つのLDAPサーバーへのロード・バランシングが設定されています。この例では、numeric
分散アルゴリズムを使用してデータをパーティション化します。
このプロシージャで使用するすべてのコマンドで、プロキシ・ホスト名(-h
)、プロキシ管理ポート(-p
)、初期ルート・ユーザーのバインドDN(-D
)およびプロキシ・パスワードが含まれるファイル(-j
)が指定されます。また、認証も指定する必要があります。クライアントとサーバーが同じインスタンスで実行されている場合に認証が指定されていないと、Oracle Unified Directoryではローカル認証構成が使用されます。
25.3.2 分散とロード・バランシングを併用するデプロイメントの構成
分散とロード・バランシングを併用するデプロイメントを構成する手順は、次のとおりです。
分散とロード・バランシングのデプロイメントを構成するには:
-
プロキシLDAPサーバー拡張を作成します。
$ dsconfig -h localhost -p 4444 -D "cn=Directory Manager" -j pwd-file -X \ create-extension \ --extension-name proxy_extension1 \ --type ldap-server \ --set enabled:true \ --set remote-ldap-server-address:DS1_hostname \ --set remote-ldap-server-port:2389
LDAPサーバー拡張は、リモートLDAPサーバーへのリンクです。このタスクでは、4つのリモートLDAPサーバー・インスタンスが必要です。サーバーごとに異なるLDAPホスト名およびポートを使用して、各リモートLDAPサーバーに対してこのステップを繰り返します。
-
各LDAPサーバー拡張にプロキシ・ワークフロー要素を作成します。
$ dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ create-workflow-element \ --element-name proxy-we1 \ --type proxy-ldap\ --set enabled:true \ --set client-cred-mode:use-client-identity \ --set ldap-server-extension:proxy_extension1
このタスクでは、4つのリモートLDAPサーバー・インスタンスが必要です。ステップ1で作成したLDAPサーバー拡張名と同じ名前を使用して、リモート・サーバーごとにこのステップを繰り返します。
プロパティ
client-cred-mode
は、プロキシとリモートLDAPサーバーとの間で使用される認証のタイプを示します。クライアント資格証明モードは、use-client-identity
またはuse-specific-identity
です。 -
ロード・バランシング・ワークフロー要素を作成します。
$ dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ create-workflow-element \ --element-name LB-we1 \ --type load-balancing \ --set enabled:true
2つのリモートLDAPサーバーのいずれかにリクエストをルーティングするために、ロード・バランシング・ワークフロー要素が1つのみ必要です。2つのロード・バランサを使用しているため、2つのロード・バランシング・ワークフロー要素を作成する必要があります。
-
ロード・バランシング・アルゴリズムを定義します。
$ dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ create-load-balancing-algorithm \ --element-name LB-we1 \ --type failover
ロード・バランシング・アルゴリズムのタイプは、
proportional
、optimal
、saturation
、searchfilter
またはfailover
です。ロード・バランシング・アルゴリズムのプロパティ(重み、しきい値または優先度)は、次のステップで、ロード・バランシング・ルートを使用して定義します。このタスクでは、2つのロード・バランシング・アルゴリズムが必要です。 -
各プロキシにロード・バランシング・ルートを定義します。
$ dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ create-load-balancing-route \ --element-name LB-we1 \ --route-name LB-route1 \ --type failover \ --set workflow-element:proxy-we1 \ --set add-priority:1 \ --set bind-priority:1 \ --set compare-priority:1 \ --set delete-priority:1 \ --set extended-priority:1 \ --set modify-priority:1 \ --set modifydn-priority:1 \ --set search-priority:1
このタスクでは、4つのロード・バランシング・ルートが必要です。ロード・バランシング・ワークフロー要素(ステップ4で作成した)ごとに2つのルートを設定します。たとえば、すべての操作について一方のルートを優先度1に設定し、すべての操作について他方のルートを優先度2に設定します。
ノート:
このステップのプロパティによって、
failover
ロード・バランシングの優先度が設定されます。proportional
またはsaturation
のロード・バランシングには、別のプロパティを使用します。様々なロード・バランシング・タイプの設定の詳細は、「ロード・バランシングのプロパティの変更」を参照してください。
-
分散ワークフロー要素を作成して、分散を設定します。
$ dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ create-workflow-element \ --element-name distrib-we \ --type distribution \ --set base-dn:dc=example,dc=com \ --set enabled:true
このタスクでは、分散アルゴリズムを指定する1つの分散ワークフロー要素のみが必要です。
-
分散アルゴリズムを設定します。
$ dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ create-distribution-algorithm \ --element-name distrib-we \ --type numeric \ --set distribution-attribute:uid
分散アルゴリズムのタイプは、
capacity
、numeric
、lexico
またはdnpattern
です。境界は、次のステップで分散パーティションを作成するときに定義します。 -
分散パーティションを定義します。
$ dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ create-distribution-partition \ --element-name distrib-we \ --partition-name distrib-part1\ --type numeric \ --set lower-bound:0 \ --set upper-bound:1000 \ --set partition-id:1 \ --set workflow-element:LB-we1
このタスクでは、2つのパーティションを作成する必要があります。ワークフロー要素ごとに、一意のパーティションIDおよびパーティション名を使用する必要があり、各パーティションでは、異なるロード・バランシング・ワークフロー要素を使用します。パーティションを定義する場合は、分散アルゴリズムを定義したときに使用したタイプと同じタイプを指定する必要があります。
ノート:
上限自体は含まれません。つまり、上限として
upper-bound:1000
を指定すると、パーティションには0から999までの値のみが含まれることになります。-
capacity
分散アルゴリズムを作成した場合は、グローバル索引を作成する必要があります。 -
lexico
、numeric
またはdnpattern
の分散アルゴリズムを作成した場合は、グローバル索引の作成はオプションです。
グローバル索引を作成するには、次のようにします。
-
グローバル索引カタログを作成します:
$ gicadm -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ create-catalog \ --catalogName gi-catalog
-
DN属性を索引付けするグローバル索引をカタログに追加します。
$ gicadm -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ add-index \ --catalogName gi-catalog \ --attributeName dn
-
グローバル索引カタログを分散に関連付けます。
$ gicadm -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ associate \ --catalogName gi-catalog \ --distributionWorkflowElement distrib-we
-
-
ワークフローを作成します。
このワークフローによって、分散ワークフロー要素がベースDNに関連付けられます。
$ dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ create-workflow \ --workflow-name workflow \ --set enabled:true \ --set base-dn:dc=example,dc=com \ --set workflow-element:distrib-we
-
ネットワーク・グループを作成します。
このネットワーク・グループでは、クライアントとプロキシの間のすべてのリクエストが処理されます。
$ dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ create-network-group \ --group-name network-group1 \ --set enabled:true \ --set workflow:workflow \ --set priority:1
25.4 データ・センター間のフェイルオーバー・デプロイメントの構成
2つのデータ・センター間のフェイルオーバー・デプロイメントを設定するには、プロキシ内に2レベルのロード・バランサをデプロイする必要があります。
2つのデータ・センター間のフェイルオーバー・デプロイメントを設定するには、「構成3: データ・センター間のフェイルオーバー」を参照してください。
2つのデータ・センター間にフェイルオーバー・デプロイメントを構成するには、次のコマンドを使用します。
#Create a proxy LDAP extension for each remote LDAP server dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-extension \ --type ldap-server \ --extension-name proxy-extension1 \ --set enabled:true \ --set remote-ldap-server-address:DS1_hostname \ --set remote-ldap-server-port:3189 dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-extension \ --type ldap-server \ --extension-name proxy-extension2 \ --set enabled:true \ --set remote-ldap-server-address:DS2_hostname \ --set remote-ldap-server-port:3289 dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-extension \ --type ldap-server \ --extension-name proxy-extension3 \ --set enabled:true \ --set remote-ldap-server-address:DS3_hostname \ --set remote-ldap-server-port:3389 dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-extension \ --type ldap-server \ --extension-name proxy-extension4 \ --set enabled:true \ --set remote-ldap-server-address:DS4_hostname \ --set remote-ldap-server-port:3489 #Create a proxy workflow element for each LDAP server extension dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow-element \ --element-name proxy-we1 \ --type proxy-ldap \ --set enabled:true \ --set client-cred-mode:use-client-identity \ --set ldap-server-extension:proxy-extension1 dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow-element \ --element-name proxy-we2 \ --type proxy-ldap \ --set enabled:true \ --set client-cred-mode:use-client-identity \ --set ldap-server-extension:proxy-extension2 dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow-element \ --element-name proxy-we3 \ --type proxy-ldap \ --set enabled:true \ --set client-cred-mode:use-client-identity \ --set ldap-server-extension:proxy-extension3 dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow-element \ --element-name proxy-we4 \ --type proxy-ldap \ --set enabled:true \ --set client-cred-mode:use-client-identity \ --set ldap-server-extension:proxy-extension4 # Create a load balancing workflow element for each data center dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow-element \ --element-name LB-we1 \ --type load-balancing \ --set enabled:true dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow-element \ --element-name LB-we2 \ --type load-balancing \ --set enabled:true # Define the load balancing algorithm for each data center dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-algorithm \ --element-name LB-we1 \ --type proportional dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-algorithm \ --element-name LB-we2 \ --type proportional # Define the load balancing routes for each proxy dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-route \ --element-name LB-we1 \ --route-name LB-route1 \ --type proportional \ --set workflow-element:proxy-we1 dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-route \ --element-name LB-we1 \ --route-name LB-route2 \ --type proportional \ --set workflow-element:proxy-we2 dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-route \ --element-name LB-we2 \ --route-name LB-route3 \ --type proportional \ --set workflow-element:proxy-we3 dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-route \ --element-name LB-we2 \ --route-name LB-route4 \ --type proportional \ --set workflow-element:proxy-we4 # Set failover between the two data centers dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow-element \ --element-name FO-we \ --type load-balancing \ --set enabled:true dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-algorithm \ --element-name FO-we \ --type failover dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-route \ --element-name FO-we \ --route-name FO-route1 \ --type failover \ --set workflow-element:LB-we1 \ --set add-priority:1 \ --set bind-priority:1 \ --set compare-priority:1 \ --set delete-priority:1 \ --set extended-priority:1 \ --set modify-priority:1 \ --set modifydn-priority:1 \ --set search-priority:1 \ dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-route \ --element-name FO-we \ --route-name FO-route2 \ --type failover \ --set workflow-element:LB-we2 \ --set add-priority:2 \ --set bind-priority:2 \ --set compare-priority:2 \ --set delete-priority:2 \ --set extended-priority:2 \ --set modify-priority:2 \ --set modifydn-priority:2 \ --set search-priority:2 \ # Create workflow dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow \ --workflow-name FO-workflow \ --set enabled:true \ --set base-dn:dc=example,dc=com \ --set workflow-element:FO-we # Create network group dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-network-group \ --group-name network-group1 \ --set enabled:true \ --set workflow:FO-workflow \ --set priority:1
25.5 データ・センター間のフェイルオーバー・デプロイメントを使用した分散の構成
2つのデータ・センター間のフェイルオーバー・デプロイメントを設定するには、フェイルオーバー・ロード・バランシングを使用する分散を含むトポロジを構成します。
2つのデータ・センター間のフェイルオーバー・デプロイメントを設定するには、「構成5: 分散とデータ・センター間のフェイルオーバーの併用」を参照してください。
分散と2つのデータ・センター間のフェイルオーバーの併用を構成するには、次のコマンドを使用します。
#Create the first failover route #Create a proxy LDAP extension for each remote LDAP server dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-extension \ --type ldap-server \ --extension-name proxy-extension-1a \ --set enabled:true \ --set remote-ldap-server-address:DS1a_hostname \ --set remote-ldap-server-port:3189 dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-extension \ --type ldap-server \ --extension-name proxy-extension-2a \ --set enabled:true \ --set remote-ldap-server-address:DS2a_hostname \ --set remote-ldap-server-port:3289 dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-extension \ --type ldap-server \ --extension-name proxy-extension-1b \ --set enabled:true \ --set remote-ldap-server-address:DS1b_hostname \ --set remote-ldap-server-port:3389 dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-extension \ --type ldap-server \ --extension-name proxy-extension-2b \ --set enabled:true \ --set remote-ldap-server-address:DS2b_hostname \ --set remote-ldap-server-port:3489 #Create a proxy workflow element for each LDAP server extension dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow-element \ --element-name proxy-we-1a \ --type proxy-ldap \ --set enabled:true \ --set client-cred-mode:use-client-identity \ --set ldap-server-extension:proxy-extension-1a dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow-element \ --element-name proxy-we-2a \ --type proxy-ldap \ --set enabled:true \ --set client-cred-mode:use-client-identity \ --set ldap-server-extension:proxy-extension-2a dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow-element \ --element-name proxy-we-1b \ --type proxy-ldap \ --set enabled:true \ --set client-cred-mode:use-client-identity \ --set ldap-server-extension:proxy-extension-1b dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow-element \ --element-name proxy-we-2b \ --type proxy-ldap \ --set enabled:true \ --set client-cred-mode:use-client-identity \ --set ldap-server-extension:proxy-extension-2b # Create a load balancing workflow element for each data center dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow-element \ --element-name LB-we-1a \ --type load-balancing \ --set enabled:true dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow-element \ --element-name LB-we-1b \ --type load-balancing \ --set enabled:true # Define the load balancing algorithm for each data center dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-algorithm \ --element-name LB-we-1a \ --type proportional dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-algorithm \ --element-name LB-we-1b \ --type proportional # Define the load balancing routes for each proxy dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-route \ --element-name LB-we-1a \ --route-name LB-route-1a \ --type proportional \ --set workflow-element:proxy-we-1a dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-route \ --element-name LB-we-1a \ --route-name LB-route-2a \ --type proportional \ --set workflow-element:proxy-we-2a dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-route \ --element-name LB-we-1b \ --route-name LB-route-1b \ --type proportional \ --set workflow-element:proxy-we-1b dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-route \ --element-name LB-we-1b \ --route-name LB-route-2b \ --type proportional \ --set workflow-element:proxy-we-2b # Set failover between the two data centers dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow-element \ --element-name FO-we1 \ --type load-balancing \ --set enabled:true dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-algorithm \ --element-name FO-we1 \ --type failover dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-route \ --element-name FO-we1 \ --route-name FO-route-1a \ --type failover \ --set workflow-element:LB-we-1a \ --set add-priority:1 \ --set bind-priority:1 \ --set compare-priority:1 \ --set delete-priority:1 \ --set extended-priority:1 \ --set modify-priority:1 \ --set modifydn-priority:1 \ --set search-priority:1 dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-route \ --element-name FO-we1 \ --route-name FO-route-1b \ --type failover \ --set workflow-element:LB-we-1b \ --set add-priority:2 \ --set bind-priority:2 \ --set compare-priority:2 \ --set delete-priority:2 \ --set extended-priority:2 \ --set modify-priority:2 \ --set modifydn-priority:2 \ --set search-priority:2 #Create the second failover route #Create a proxy LDAP extension for each remote LDAP server dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-extension \ --type ldap-server \ --extension-name proxy-extension-3a \ --set enabled:true \ --set remote-ldap-server-address:DS3a_hostname \ --set remote-ldap-server-port:3189 dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-extension \ --type ldap-server \ --extension-name proxy-extension-4a \ --set enabled:true \ --set remote-ldap-server-address:DS4a_hostname \ --set remote-ldap-server-port:3289 dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-extension \ --type ldap-server \ --extension-name proxy-extension-3b \ --set enabled:true \ --set remote-ldap-server-address:DS3b_hostname \ --set remote-ldap-server-port:3389 dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-extension \ --type ldap-server \ --extension-name proxy-extension-4b \ --set enabled:true \ --set remote-ldap-server-address:DS4b_hostname \ --set remote-ldap-server-port:3489 #Create a proxy workflow element for each LDAP server extension dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow-element \ --element-name proxy-we-3a \ --type proxy-ldap \ --set enabled:true \ --set client-cred-mode:use-client-identity \ --set ldap-server-extension:proxy-extension-3a dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow-element \ --element-name proxy-we-4a \ --type proxy-ldap \ --set enabled:true \ --set client-cred-mode:use-client-identity \ --set ldap-server-extension:proxy-extension-4a dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow-element \ --element-name proxy-we-3b \ --type proxy-ldap \ --set enabled:true \ --set client-cred-mode:use-client-identity \ --set ldap-server-extension:proxy-extension-3b dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow-element \ --element-name proxy-we-4b \ --type proxy-ldap \ --set enabled:true \ --set client-cred-mode:use-client-identity \ --set ldap-server-extension:proxy-extension-4b # Create a load balancing workflow element for each data center dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow-element \ --element-name LB-we-2a \ --type load-balancing \ --set enabled:true dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow-element \ --element-name LB-we-2b \ --type load-balancing \ --set enabled:true # Define the load balancing algorithm for each data center dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-algorithm \ --element-name LB-we-2a \ --type proportional dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-algorithm \ --element-name LB-we-2b \ --type proportional # Define the load balancing routes for each proxy dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-route \ --element-name LB-we-2a \ --route-name LB-route-3a \ --type proportional \ --set workflow-element:proxy-we-3a dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-route \ --element-name LB-we-2a \ --route-name LB-route-4a \ --type proportional \ --set workflow-element:proxy-we-4a dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-route \ --element-name LB-we-2b \ --route-name LB-route-3b \ --type proportional \ --set workflow-element:proxy-we-3b dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-route \ --element-name LB-we-2b \ --route-name LB-route-4b \ --type proportional \ --set workflow-element:proxy-we-4b # Set failover between the two data centers dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow-element \ --element-name FO-we2 \ --type load-balancing \ --set enabled:true dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-algorithm \ --element-name FO-we2 \ --type failover dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-route \ --element-name FO-we2 \ --route-name FO-route-2a \ --type failover \ --set workflow-element:LB-we-2a \ --set add-priority:1 \ --set bind-priority:1 \ --set compare-priority:1 \ --set delete-priority:1 \ --set extended-priority:1 \ --set modify-priority:1 \ --set modifydn-priority:1 \ --set search-priority:1 dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-load-balancing-route \ --element-name FO-we2 \ --route-name FO-route-2b \ --type failover \ --set workflow-element:LB-we-2b \ --set add-priority:2 \ --set bind-priority:2 \ --set compare-priority:2 \ --set delete-priority:2 \ --set extended-priority:2 \ --set modify-priority:2 \ --set modifydn-priority:2 \ --set search-priority:2 # Create distribution to the two failover routes dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow-element \ --element-name distrib-we \ --type distribution \ --set base-dn:dc=example,dc=com \ --set enabled:true dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-distribution-algorithm \ --element-name distrib-we \ --type numeric \ --set distribution-attribute:uid dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-distribution-partition \ --element-name distrib-we \ --partition-name distrib-part1\ --type numeric \ --set lower-bound:0 \ --set upper-bound:1000 \ --set partition-id:1 \ --set workflow-element:FO-we1 dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-distribution-partition \ --element-name distrib-we \ --partition-name distrib-part2\ --type numeric \ --set lower-bound:1000 \ --set upper-bound:2000 \ --set partition-id:2 \ --set workflow-element:FO-we2 # Create workflow dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-workflow \ --workflow-name Distrib-workflow \ --set enabled:true \ --set base-dn:dc=example,dc=com \ --set workflow-element:distrib-we # Create network group dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file -X -n \ create-network-group \ --group-name network-group1 \ --set enabled:true \ --set workflow:Distrib-workflow \ --set priority:1
25.6 結合パーティションを使用した結合ワークフロー要素のデプロイの構成
dsconfig
コマンドを使用して、結合ワークフロー要素を作成して構成し、複数のDITを仮想統合DITに集約できます。
25.6.1 結合ワークフロー要素の構成を実装するためのOUDインスタンスの設定
結合ワークフロー要素の構成を実装するには、OUD (oud1
およびoud2
)インスタンスを作成して構成する必要があります。
次のステップを実行します。
-
次のように、
oud-setup
コマンドを実行して、oud1
を作成します。./oud-setup --cli --baseDN "o=company1" --addBaseEntry --adminConnectorPort 1444 --ldapPort 1389 \ --rootUserDN "cn=Directory Manager" --rootUserPasswordFile pwd.txt --no-prompt --noPropertiesFile
-
次のように、
oud-setup
コマンドを実行して、oud2
を作成します。./oud-setup --cli --baseDN "o=company2" --addBaseEntry --adminConnectorPort 2444 --ldapPort 2389 \ --rootUserDN "cn=Directory Manager" --rootUserPasswordFile pwd.txt --no-prompt --noPropertiesFile
25.6.2 結合ワークフロー要素の構成を実装するためのOUDプロキシ・サーバーの設定
この項では、結合ワークフロー要素の構成を実装するためのOUDプロキシ・サーバーの設定方法について説明します。
oud-setup
コマンドを実行して、プロキシ・サーバー・インスタンス(oud3
)を作成します。
./oud-proxy-setup --cli --ldapPort 3389 --adminConnectorPort 3444 --rootUserDN "cn=Directory Manager" --rootUserPasswordFile pwd.txt
25.6.3 結合ワークフロー要素の構成を実装するためのOUDプロキシ・サーバーの構成
リモートLDAPディレクトリ・サーバーに接続するには、LDAPサーバー拡張とLDAPプロキシ・ワークフロー要素がOracle Unified Directoryプロキシに必要です。
LDAPサーバー拡張は、OUDプロキシoud3
からリモートLDAPサーバー(oud1
およびoud2
)に接続するのに必要なプロパティです。oud1
およびoud2
のLDAPサーバー拡張を作成します。これらの拡張は、後でワークフロー構成に使用します。
また、OUD1
およびOUD2
のプロキシ・ワークフロー要素を作成する必要があります。これらは、リモートLDAPサーバーとの接続の詳細と資格証明を指定します。
-
oud1
を指すLDAPサーバー拡張(LDAPServerExtension1
)を作成します。./dsconfig create-extension \ --set enabled:true \ --set remote-ldap-server-address:host01.example.com \ --set remote-ldap-server-port:1389 \ --type ldap-server \ --extension-name LDAPServerExtension1 \ --hostname host01.example.com \ --port 3444 \ --trustAll \ --bindDN cn=Directory\ Manager \ --bindPasswordFile pwd.txt \ --no-prompt
-
oud1
を指すLDAPプロキシ・ワークフロー要素(ProxyLDAPWorkFlowElement1
)を作成します。./dsconfig create-workflow-element \ --set client-cred-mode:use-client-identity \ --set enabled:true \ --set remote-ldap-server-bind-dn:"cn=directory manager" \ --remote-ldap-server-bind-password:file://pwd-file \ --set ldap-server-extension:LDAPServerExtension1 \ --set remote-root-dn:"cn=directory manager" --set remote-root-password:******** --type proxy-ldap \ --element-name ProxyLDAPWorkFlowElement1 \ --hostname host01.example.com \ --port 3444 \ --trustAll \ --bindDN cn=Directory\ Manager \ --bindPasswordFile pwd.txt \ --no-prompt
-
oud2
を指すLDAPサーバー拡張(LDAPServerExtension2
)を作成します。./dsconfig create-extension \ --set enabled:true \ --set remote-ldap-server-address:host01.example.com \ --set remote-ldap-server-port:2389 \ --type ldap-server \ --extension-name LDAPServerExtension2 \ --hostname host01.example.com \ --port 3444 \ --trustAll \ --bindDN cn=Directory\ Manager \ --bindPasswordFile pwd.txt \ --no-prompt
-
oud2
を指すLDAPプロキシ・ワークフロー要素(ProxyLDAPWorkFlowElement2
)を作成します。./dsconfig create-workflow-element \ --set client-cred-mode:use-client-identity \ --set enabled:true \ --set remote-ldap-server-bind-dn:"cn=directory manager" \ --remote-ldap-server-bind-password:file://pwd-file \ --set ldap-server-extension:LDAPServerExtension2 \ --set remote-root-dn:"cn=directory manager" --set remote-root-password:******** --type proxy-ldap \ --element-name ProxyLDAPWorkFlowElement2 \ --hostname host01.example.com \ --port 3444 \ --trustAll \ --bindDN cn=Directory\ Manager \ --bindPasswordFile pwd.txt \ --no-prompt
-
dsconfig
コマンドを実行して、サーバー拡張を表示します。./dsconfig -h host01.example.com -p 3444 -D "cn=Directory Manager" --bindPasswordFile pwd.txt -X -n list-extensions
-
dsconfig
コマンドを実行して、プロキシLDAPワークフロー要素を表示します。./dsconfig -h host01.example.com -p 3444 -D "cn=Directory Manager" --bindPasswordFile pwd.txt -X -n list-workflow-elements
25.6.4 結合ワークフロー要素の作成
dsconfig
コマンドを使用して、結合ワークフローを作成できます。
dsconfig
コマンドを実行します。
$ ./dsconfig create-workflow-element \ --set base-dn:o=company1 \ --set enabled:true --type union \ --element-name union-we \ --set enabled:true --hostname host01.example.com \ --port 3444 --bindDN "cn=Directory Manager" \ --bindPasswordFile pwd.txt \
dsconfig
コマンドライン対話モードを使用して、結合ワークフロー要素のプロパティを編集することもできます。
対話モードのdsconfig
コマンドを使用して、プロパティを編集する場合は、次の例を参照してください。
Oracle Unified Directory Configuration Console Main Menu What do you want to configure? 1) General Configuration 7) Virtualization 2) Authentication and authorization 8) Load Balancing 3) Schema 9) Distribution 4) Replication 10) Integration 5) Local Data Source 11) HTTP 6) Remote Data Source q) quit Enter choice: 9 Distribution Management Menu What would you like to do? 1) Distribution Workflow 3) Global Index Catalogs Shared Cache Element Extension 2) Global Index Catalogs 4) Union Workflow Element Extension b) back q) quit Enter choice [b]: 4 Union Workflow Element management menu What would you like to do? 1) List existing Union Workflow Elements 2) Create a new Union Workflow Element 3) View and edit an existing Union Workflow Element 4) Delete an existing Union Workflow Element 5) >>>> Union Partition management menu b) back q) quit Enter choice [b]: 3 >>>> There is only one Union Workflow Element: "union-we". Are you sure that this is the correct one? (yes / no) [yes]: >>>> Configure the properties of the Union Workflow Element Property Value(s) ---------------------------------------------------------------------- 1) auto-tune-search-option false 2) base-dn "dc=example,dc=com" 3) bind-option bind-first-success 4) cache-size 10000 5) enabled true 6) search-first-match true 7) suppress-entry-duplicates false ?) help f) finish - apply any changes to the Union Workflow Element q) quit Enter choice [f]: ? Component name: Union Workflow Element The Union workflow element is used to aggregate several DITs into a virtual unified DIT. Option Types: r -- Property value(s) are readable w -- Property value(s) are writable m -- The property is mandatory s -- The property is single-valued a -- Administrative action is required for changes to take effect Property Options Syntax -------------------------------------------------- auto-tune-search-option rw-s- BOOLEAN base-dn r-ms- DN bind-option rw-s- OPTION cache-size rw-s- INTEGER enabled rwms- BOOLEAN search-first-match rw-s- BOOLEAN suppress-entry-duplicates rw-s- BOOLEAN ---------------------------------------------------
結合ワークフロー要素の構成プロパティの詳細は、「結合ワークフロー要素の構成パラメータ」を参照してください。
25.6.5 結合ワークフロー要素の構成
dsconfig
コマンドを使用して、結合ワークフロー要素を構成できます。
-
ワークフローを作成します。このワークフローによって、結合ワークフロー要素がベースDNに関連付けられます。
./dsconfig create-workflow \ --set base-dn:o=company1 \ --set enabled:true --set workflow-element:union-we --type generic \ --workflow-name distrib-workflow \ --hostname host01.example.com \ --port 3444 \ --portProtocol LDAP \ --trustAll \ --bindDN cn=Directory\ Manager \ --bindPasswordFile pwd.txt \ --no-prompt
-
結合ワークフロー(
distrib-workflow
)をネットワーク・グループにアタッチします。./dsconfig set-network-group-prop \ --group-name network-group \ --set workflow:distrib-workflow \ --hostname host01.example.com \ --port 3444 \ --portProtocol LDAP \ --trustAll \ --bindDN cn=Directory\ Manager \ --bindPasswordFile pwd.txt \ --no-prompt
25.6.6 結合パーティションの構成
dsconfig
コマンドを使用して、結合ワークフロー要素を作成できます。
dsconfig create-workflow-element --type generic
コマンドを使用します。
-
oud1
の結合パーティションを作成します。./dsconfig create-union-partition \ --element-name union-we \ --set workflow-element:ProxyLDAPWorkFlowElement1 --type generic \ --partition-name union-part1\ --set priority:1 --set source-base-dn:ou=people,ou=apac,o=comapny1 \ --set relative-base-dn:ou=people \ --hostname host01.example.com \ --port 3444 \ --portProtocol LDAP \ --trustAll \ --bindDN cn=Directory\ Manager \ --bindPasswordFile pwd.txt \ --no-prompt
結合ワークフロー要素の構成プロパティの詳細は、「結合パーティションの構成パラメータ」を参照してください。
-
oud2
の結合パーティションを作成します。./dsconfig create-union-partition \ --element-name union-we \ --set workflow-element:ProxyLDAPWorkFlowElement2 --type generic \ --partition-name union-part2\ --set priority:2 --set source-base-dn:ou=people,ou=apac,o=company2 \ --set relative-base-dn:ou=people \ --hostname host01.example.com \ --port 3444 \ --portProtocol LDAP \ --trustAll \ --bindDN cn=Directory\ Manager \ --bindPasswordFile pwd.txt \ --no-prompt
結合ワークフロー要素の構成プロパティの詳細は、「結合パーティションの構成パラメータ」を参照してください。
25.6.7 結合ワークフロー要素の構成の検証
結合ワークフロー要素の構成の検証を学習します。
-
union-part1
結合パーティションの次のデータを入力します。dn: o=company1 objectclass: top objectclass: organization o: company1 dn: ou=apac,o=company1 objectclass: top objectclass: organizationalunit ou: apac dn: ou=people,ou=apac,o=company1 objectclass: top objectclass: organizationalunit ou: people dn: uid=user.10,ou=people,ou=apac,o=company1 objectclass: top objectclass: inetOrgPerson cn: 10 sn: snof10 uid: user.10 userPassword: 10
-
union-part2
結合パーティションの次のデータを入力します。dn: o=company2 objectclass: top objectclass: organization o: company2 dn: ou=apac,o=company2 objectclass: top objectclass: organizationalunit ou: apac dn: ou=people,ou=apac,o=company2 objectclass: top objectclass: organizationalunit ou: people dn: uid=user.20,ou=people,ou=apac,o=company2 objectclass: top objectclass: inetOrgPerson cn: 20 sn: snof20 uid: user.20 userPassword: 20
-
oud-proxy-setupの
ldapsearch
を実行して、パーティションからすべての要素を返します。./ldapsearch -h localhost -p 3444 -D "cn=Directory Manager" -j pwd.txt -b "o=company1" -s sub "(objectclass=*)"
それに応じて、異なるパーティションから統合データを取得します。ただし、データはパーティションの異なるベースDNに存在します。
結合ワークフロー要素(
union-we
)に対して、auto-tune-search-option
およびsearch-first-match
プロパティをtrue
に設定している場合、ldapsearch
がユーザーを両方のパーティション(union-part1
およびunion-part2
)からフェッチします。