+

Search Tips   |   Advanced Search

Copy DataPower appliance domains between managed sets using scripting


Use wsadmin 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 wsadmin to manage appliances that are configured in the DataPower appliance manager.

Before beginning, set up the DataPower appliance manager by adding and configuring appliances, managed sets, and firmware versions.

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 the production environment. Modify the examples to best configure the environment.

To view additional information and examples for the commands in this topic, refer to the documentation for the dpManagerCommands.

 

  1. Launch the wsadmin scripting tool using the Jython scripting language.

  2. 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...

    print AdminTask.dpGetManagedSet('-managedSetId testSet')

  3. 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...

    print AdminTask.dpGetAllMSDomainVersionIds('[-msDomainId testSet:BANKING]')"

    The command returns string array that contains the IDs of each domain within the managed set. We can optionally use the dpGetMSDomain command to display additional information for a specific domain ID.

  4. Copy the domain version to the managed set. Use the dpCopyMSDomainVersion command to copy the domain version from the test environment to WAS NDion environment...
    
    
    
    
    

    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.

  5. 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...

    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 WAS NDionSet managed set in WAS NDion environment.

 

What to do next

Use the DataPower WebGUI to configure additional domains.

You can use the commands in the dpManagerCommands command group and wsadmin to manage appliances, firmware, domains, managed sets, and appliance-specific settings. Additionally, the system creates versions of domains, firmware, and appliance-specific settings. 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.


WebSphere DataPower appliance manager overview

 

Related tasks


Set up the DataPower appliance manager using scripting
Updating firmware versions for DataPower appliances using scripting
Administer managed domains, firmware, and settings versions using scripting
Administer DataPower appliance domains
Add a new managed set

 

Related


dpManagerCommands