This chapter provides some use case examples for configuring specific proxy, distribution, and virtualization deployments by using the dsconfig
command.
Note:
You can also perform these configurations by usingdsconfig
in interactive mode. For information, see Section 17.1.2, "Using dsconfig
in Interactive Mode."Note:
To use the virtual directory capabilities described here, you must have a validOracle Directory Service Plus
license.This chapter includes the following sections:
Section 25.3, "Configuring Distribution with Load Balancing Example"
Section 25.4, "Configuring Failover Between Data Centers Example"
Section 25.5, "Configuring Distribution with Failover Between Data Centers Example"
This use case describes how to configure simple load balancing with failover on two LDAP servers.
The topics in this section include:
When configuring a proxy server for simple load balancing, you must create the objects shown in Figure 25-1. You must create these objects in the order indicated.
All of the commands in this procedure specify the proxy hostname (-h
), the proxy admin port (-p
), the bind DN for the initial root user (-D
), and the file containing the proxy password (-j
). You must also indicate the authentication. If you do not specify authentication, and if the client and server are running in the same instance, then Oracle Unified Directory uses the local authentication configuration.
To configure a simple load balancing deployment:
Create a proxy LDAP server extension.
$ dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ 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
The LDAP server extension is a link to the remote LDAP server. For this use case, you need at least two remote LDAP server instances. Repeat this step, using a different LDAP hostname and port for each server.
Create a proxy workflow element for each LDAP server extension.
$ 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
The property client-cred-mode
indicates the type of authentication used between the proxy and remote LDAP server. The client credential mode can be: use-client-identity
or use-specific-identity
.
Create a load balancing workflow element.
$ 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
You only need one load balancing workflow element to route requests to either of the two remote LDAP servers.
Define the load balancing algorithm.
$ dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ create-load-balancing-algorithm \ --element-name LB-we1 \ --type failover
The load balancing algorithm types include proportional
, saturation
, optimal
, searchfilter
or failover
. You define the load balancing algorithm properties (weight, threshold, or priority) with the load balancing routes, in the next step.
Define the load balancing routes for each proxy.
$ 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:2 \ --set compare-priority:2 \ --set delete-priority:1 \ --set extended-priority:2 \ --set modify-priority:1 \ --set modifydn-priority:1 \ --set search-priority:2
When defining the routes, you must specify the same type that you used when defining the load balancing algorithm.
For this use case, you need two load balancing routes. Repeat this step, specifying a different priority for each route.
Note:
The properties in this step set the priority forfailover
load balancing. You use different properties for proportional
or saturation
load balancing.
For more information on the setting different load balancing types, see Section 21.1.4, "Modifying Load Balancing Properties."
Create a workflow.
This workflow associates the load balancing workflow element with the specified base dn.
$ dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ create-workflow \ --workflow-name LB-workflow1 \ --set enabled:true \ --set base-dn:dc=example,dc=com \ --set workflow-element:LB-we1
Create the network group.
The network group handles all the requests between the client and the proxy.
$ dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ create-network-group \ --group-name network-group1 \ --set enabled:true \ --set workflow:LB-workflow1 \ --set priority:1
This use case describes how to configure a simple distribution deployment that is split over two partitions.
Note:
For information about the supported distribution types, see Section 12.3, "Understanding Data Distribution Using the Proxy."The topics in this section include:
Section 25.2.1, "Creating the Objects for Simple Distribution"
Section 25.2.2, "Configuring a Simple Distribution Deployment"
When configuring a proxy server for simple distribution, you must create the objects shown in Figure 25-2. You must create these objects in the order indicated.
All of the commands in this procedure specify the proxy hostname (-h
), the proxy admin port (-p
), the bind DN for the initial root user (-D
) and the proxy password you want to configure (-w
). You must also indicate the authentication. If you do not specify authentication, and if the client and server are running in the same instance, then Oracle Unified Directory uses the local authentication configuration.
To configure a simple distribution deployment:
Create a proxy LDAP server extension.
$ 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
The LDAP server extension is a link to the remote LDAP server. For this use case, you need two remote LDAP server instances. Repeat this step, using a different LDAP hostname and port for each server.
Create a proxy workflow element for each LDAP server extension.
$ 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
You need at least two remote LDAP servers for a distribution architecture. Repeat this step for each server. Use the same LDAP server extension names that you created in step 1.
The property client-cred-mode
indicates the type of authentication used between the proxy and remote LDAP server. The client credential mode can be: use-client-identity
or use-specific-identity
.
Set up distribution by creating a distribution workflow element.
$ 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
Set the distribution algorithm.
$ 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
The distribution algorithm types include capacity
, numeric
, lexico
, or dnpattern
. You define the algorithm properties when you create the distribution partitions, in the next step.
Define the distribution partitions.
$ 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
For this use case, you must create two partitions. You must use unique partition IDs and partition names for each workflow element. When defining the partitions, you must specify the same type that you used when defining the distribution algorithm.
Note:
The upper boundary is exclusive, which means if you specifyupper-bound:1000
as the upper boundary, then the partition only includes values from 0 to 999, inclusive.If you created a capacity
distribution algorithm, then you must create a global index.
If you created a lexico
, numeric
, or dnpattern
distribution algorithm, then creating a global index is optional.
To create a global index:
Create a global index catalog.
$ gicadm -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ create-catalog \ --catalogName gi-catalog
Add a global index that indexes the dn attribute to the catalog.
$ gicadm -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ add-index \ --catalogName gi-catalog \ --attributeName dn
Associate the global index catalog to the distribution.
$ gicadm -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ associate \ --catalogName gi-catalog \ --distributionWorkflowElement distrib-we
Create a workflow.
This workflow associates the distribution workflow element with the distribution partition.
$ 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
Create the network group.
The network group handles all the requests between the client and the proxy.
$ 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
This use case describes how to configure distribution with load balancing.
Note:
Although you can add a global index to any distribution deployment, this example does not include instructions for adding a global index.The topics in this section include:
Section 25.3.1, "Creating the Objects for Distribution with Load Balancing"
Section 25.3.2, "Configuring a Distribution with Load Balancing Deployment"
Note:
For information about creating a global index, see Section 23.7, "Configuring Global Indexes Using the Command Line."When configuring a proxy server for distribution and load balancing, you must create the objects shown in Figure 25-3. You must create these objects in the order indicated.
Figure 25-3 Configuring Distribution and Load Balancing
This example illustrates a deployment with distribution over two partitions, with each partition load balanced onto two replicated LDAP servers. The example uses a numeric
distribution algorithm to partition the data.
All of the commands in this procedure specify the proxy hostname (-h
), the proxy admin port (-p
), the bind DN for the initial root user (-D
), and the file containing the proxy password (-j
). You must also indicate the authentication. If you do not specify authentication, and if the client and server are running in the same instance, then Oracle Unified Directory uses the local authentication configuration.
To configure a distribution and load balancing deployment:
Create the proxy LDAP server extensions.
$ 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
The LDAP server extension is a link to the remote LDAP server. For this use case, you need four remote LDAP server instances. Repeat this step for each remote LDAP server, using a different LDAP hostname and port for each server.
Create a proxy workflow element for each LDAP server extension.
$ 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
For this use case, you need four remote LDAP server instances. Repeat this step for each remote server, using the same LDAP server extension names as those created in step 1.
The property client-cred-mode
indicates the type of authentication used between the proxy and remote LDAP server. The client credential mode can be: use-client-identity
or use-specific-identity
.
Create a load balancing workflow element.
$ 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
You only need one load balancing workflow element to route requests to either of the two remote LDAP servers. You must create two load balancing workflow elements because you are using two load balancers.
Define the load balancing algorithm.
$ dsconfig -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ create-load-balancing-algorithm \ --element-name LB-we1 \ --type failover
The load balancing algorithm types include proportional
, optimal
, saturation
, searchfilter
, or failover
. You define the load balancing algorithm properties (weight, threshold, or priority) with the load balancing routes, in the next step. For this use case, you need two load balancing algorithms.
Define the load balancing routes for each proxy.
$ 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
For this use case, you need four load balancing routes. Set two routes per load balancing workflow element (created in step 4). For example, set one route with priority 1 for all operations and set the other route with priority 2 for all operations.
Note:
The properties in this step set the priority forfailover
load balancing. You use different properties for proportional
or saturation
load balancing.
For more information on the setting different load balancing types, see Section 21.1.4, "Modifying Load Balancing Properties."
Set up distribution by creating a distribution workflow element.
$ 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
For this use case, you need only one distribution workflow element that points to the distribution algorithm.
Set the distribution algorithm.
$ 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
The distribution algorithm types include capacity
, numeric
, lexico
, or dnpattern
. You define the boundaries when you create the distribution partitions, in the next step.
Define the distribution partitions.
$ 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
For this use case, you must create two partitions. You must use unique partition IDs and partition names for each workflow element and that each partition uses a different load balancing workflow element. When defining the partitions, you must specify the same type that you used when defining the distribution algorithm.
Note:
The upper boundary is exclusive, which means if you specifyupper-bound:1000
as the upper boundary, then the partition only includes values from 0 to 999, inclusive.If you created a capacity
distribution algorithm, then you must create a global index.
If you created a lexico
, numeric
, or dnpattern
distribution algorithm, then creating a global index is optional.
To create a global index.
Create a global index catalog:
$ gicadm -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ create-catalog \ --catalogName gi-catalog
Add a global index which indexes the dn attribute to the catalog.
$ gicadm -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ add-index \ --catalogName gi-catalog \ --attributeName dn
Associate the global index catalog to the distribution.
$ gicadm -p 4444 -h localhost -D"cn=Directory Manager" -j pwd-file \ associate \ --catalogName gi-catalog \ --distributionWorkflowElement distrib-we
Create a workflow.
This workflow associates the distribution workflow element with the base 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
Create the network group.
The network group handles all the requests between the client and the proxy.
$ 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
This use case describes how to set up a failover deployment between two data centers, as presented in Section 3.2.3, "Configuration 3: Failover Between Data Centers."
To configure a failover deployment between two data centers, use the following commands:
#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
This use case describes how to set up a failover deployment between two data centers, as presented in Section 3.2.5, "Configuration 5: Distribution with Failover Between Data Centers."
To configure distribution with failover between two data centers, use the following commands:
#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