This example scenario explains how to use the ARSconfig command-line tool to transfer a set of configuration objects from a test Active Roles instance to a production instance.
Suppose you need to transfer the following configuration objects from a test Active Roles instance to a production Active Roles instance:
-
The Configuration/Access Templates/Common container, including all child objects stored in this container.
-
The Configuration/Managed Units/Development container, excluding the child objects stored in this container.
-
All child objects stored in the Script Modules/Corporate Policy/Priority Access container, but excluding the container itself.
Also, assume that the names of the domains managed by the test (source) Active Roles instance are test1.company.com and test2.company.com, and the two corresponding domains managed by the production (target) Active Roles instance are prod1.company.com and prod2.company.com.
To implement this scenario, complete the following steps:
-
Create a list of the configuration objects to collect
-
Create configuration data package
-
Add domain mapping
-
Deploy the configuration data package
Creating a list of the configuration objects to package
In this step, you create a list of the configuration objects that you want to collect into the configuration package, and define how you want to collect their child objects.
To do that, create the selection.xml file, and save that file to the solution installation folder: <Active Roles installation folder>\Configuration Transfer Wizard\Scripts.
To clarify the file format, consider the following sample file that illustrates how to collect Access Templates, Managed Units, and Script Modules residing within specified containers:
<?xml version="1.0" encoding="utf-8"?>
<Configuration>
<include DN="CN=Common,CN=Access Templates,CN=Configuration" collectSelf="True" collectChildren="True"/>>
<include DN="CN=Development,CN=Managed Units,CN=Configuration" collectSelf="True" collectChildren="False"/>
<include DN="CN=Priority Access,CN=Corporate Policy,CN=Script Modules,CN=Configuration" collectSelf="False" collectChildren="True"/>
</Configuration>
Creating configuration data package file
In this step, you use the ARSconfig command-line tool to create a configuration data package file using the data from the selection.xml file created in Step 1.
To create the configuration data package file
-
Open the Windows Command Prompt.
-
In the command prompt, navigate to the Configuration Transfer Wizard installation folder, and enter the following syntax:
Cscript.exe arsconfig.wsf /task:collect /selection:selection.xml
As the result, the package.xml configuration data package file will be created in the following default location:
\Active Roles\Configuration Transfer Wizard\Scripts
Configuring domain mapping
If the names of the managed domains are different in the test and production environments, you must add domain mapping that defines the correspondence between the domain names. When the configuration package is deployed in the target environment, the domain names specified as a part of the objects' attributes are replaced with the names of the production domains, according to the name mapping entries.
In this step, you create the CSV domain name mapping file (mapping.csv), then save that file to the installation folder of the Configuration Transfer Wizard:
\Active Roles\Configuration Transfer Wizard\Scripts
In this scenario, the mapping.csv file contains the following lines:
"DC=test1,DC=company,DC=com","DC=prod1,DC=company,DC=com"
"DC=test2,DC=company,DC=com","DC=prod2,DC=company,DC=com"
Deploying the configuration data package
In this step, you use the ARSconfig command-line tool to deploy the package.xml configuration package in the production Active Roles environment. When running the arsconfig.wsf script, specify the package file to deploy (package.xml), and the domain name mapping file (mapping.csv) you have created in the previous step.
To deploy the configuration data package
-
Open the Windows Command Prompt.
-
Navigate to the Configuration Transfer Wizard installation folder, and enter the following syntax:
Cscript.exe arsconfig.wsf /task:deploy /package:package.xml /map:mapping.csv