Use the wsadmin tool to copy domains from one managed set to another,
such as copying domains from a test environment to a production environment.
Use the Datapower appliance manager and the wsadmin tool to manage appliances
that are configured in the DataPower® appliance manager.
Before you begin
Before you begin, set up the DataPower appliance manager by adding
and configuring appliances, managed sets, and firmware versions.
About this task
The examples in this topic refer to a DataPower appliance manager which
administers two managed sets of DataPower appliances. The productionSet managed
set represents a production environment that uses three DataPower appliances.
The testSet managed set represents a test environment that uses one DataPower appliance.
Use the DataPower WebGUI
to configure and test the domains for the test environment managed set. Then,
use this topic to copy the domains to your production environment. Modify
the examples to best configure your environment.
To view additional
information and examples for the commands in this topic, refer to the documentation
for the dpManagerCommands command group for the AdminTask object.
Procedure
- Start the wsadmin scripting tool.
- Determine the ID of the managed set.
Use the dpGetAllManagedSetIDs
command to display the IDs of each managed set in the DataPower appliance manager configuration,
as the following command demonstrates:
print AdminTask.dpGetAllManagedSetIds()
Use
the dpGetManagedSet command to display attributes for a given specific managed
set ID, as the following example demonstrates:
print AdminTask.dpGetManagedSet('-managedSetId testSet')
- Determine the ID of the domain version to copy to the managed set.
Use the dpGetAllMSDomainVersionIds command to display the IDs of
each domain version for the BANKING domain, as the following example demonstrates:
print AdminTask.dpGetAllMSDomainVersionIds('[-msDomainId testSet:BANKING]')"
The command
returns string array that contains the IDs of each domain within the managed
set. You can optionally use the dpGetMSDomain command to display additional
information for a specific domain ID.
- Copy the domain version to the managed set.
Use the
dpCopyMSDomainVersion command to copy the domain version from the test environment
to the production environment, as the following example demonstrates:
copyTask=AdminTask.dpCopyMSDomainVersion('[-managedSetId productionSet -msDomainVersionId "testSet:BANKING:1"]')
The command submits a task to the DataPower appliance
manager and assigns the task identifier to the copyTask variable.
- Verify that the system successfully copied the domain version to
the managed set.
Use the dpGetTask command to display the status
and result information about the task, as the following example demonstrates:
AdminTask.dpGetTask('-taskId copyTask')
The commands return information about the asynchronous
task of interest. The isComplete attribute displays a value of true if
the task is complete. If it is not complete, note the value for the taskStatus attribute.
If the returned value is 0, then the task is in a queue and the system
has not started the task. If the returned value is 1, then the task
is in progress. If the returned value is 2, then the task completed
successfully. If the returned value is 3, then the task experienced
an exception.
Results
The system uses the testSet:BANKING:1 version of the productionSet
managed set in the production environment.
What to do next
You can use the DataPower WebGUI to configure additional domains.
You
can use the commands in the dpManagerCommands command group and the wsadmin
tool to manage appliances, firmware, domains, managed sets, and appliance-specific
settings. Additionally, the system creates versions of domains, firmware,
and appliance-specific settings. You can use the DataPower appliance manager and the
wsadmin tool to modify the current version, or to revert to previous versions
of domains, firmware, and appliance-specific settings.