Cloning an SOA 11g environment is rather simple. Due to the architecture of the Weblogic application server, you can do this easily. The steps are as follows.
- Make sure you stopped the Managed Servers and Admin server.
- Copy the BEA_HOME directory to your target destination.
- Copy the SOADOMAIN_HOME directory to your target destination.
- Export the SOA repository from the database.
- Import the SOA repository in target database.
- Manually make changes in the SOADOMAIN_HOME/config/config.xml file.
- Manually make changes in the WLS_HOME/wls_server1/common/nodemanger/* properties.
- Manually make changes in the SOADOMAIN_HOME/config/jdbc/* datasource file(s) to target database.
- Make changes in start-up scripts when using WKA in Coherence clustering.
- Start servers
- Check SOAP Server URL and Callback Server URL
1
Make sure that all the WLS servers are stopped in the domain, even the clustered ones. This is to make sure that no caching occurs.
2
Copy the binary tree to another destination. You could install the WLS software-only, but a copy is quicker.
3
Use the tool pack/unpack to copy a complete domain from one destination to another. Alternatively you could copy the complete file tree of your SOA_DOMAIN, including the application directory.
4
Make an export of the SOA repository, make sure you have the rights to export the various SOA schema's such as, MDS, SOA_INFRA etc.
5
Import the exported data. In this case, the SOA schema's must be already there or they will be created during the import. Again, you must have the correct privileges to create schema's and apply the correct grants.
But be ware that the users in the other database need to have to following roles:
select * from dba_role_privs where grantee like 'DEV_%' order by grantee;
GRANTEE GRANTED_ROLE
-------------- ---------------------
DEV_SOAINFRA CONNECT
DEV_SOAINFRA RESOURCE
DEV_SOAINFRA AQ_USER_ROLE
DEV_SOAINFRA AQ_ADMINISTRATOR_ROLE
DEV_SOAINFRA SELECT_CATALOG_ROLE
DEV_MDS RESOURCE
DEV_MDS CONNECT
DEV_ORABAM CONNECT
DEV_ORABAM RESOURCE
Or more in detail:
select
lpad(' ', 4*level) || granted_role "User, his roles and privileges"
from
(
/*
* Users
*/
select
null grantee,
username granted_role
from
dba_users
where
username like 'DEV_%'
/*
* the roles to roles relations
*/
union
select
grantee,
granted_role
from
dba_role_privs
/* THE ROLES TO PRIVILEGE RELATIONS */
union
select
grantee,
privilege
from
dba_sys_privs
)
start with grantee is null
connect by grantee = prior granted_role;
6
Make changes in the config.xml file, to set new hostnames and/or IP addresses for the Admin Server, Managed Servers and node manager (machine)
7
Make changes in the nodemanger comnfiguration. If this is a new server, the nodemanager.properties should be updated. If the cloning is done on the same server, you should change the port number only, or reuse an existing node-manager.
8
Make changes in the JDBC connections. The data-sources for target database updated.
9
If you are using a clusterm verify the coherence properties, such as multicast adresses. If you are using well-known-adresses (WKA) make sure the are updated.
10
Now you are able to start the admin and managed servers.
11
If you are usingf a loadbalancer check SOAP Server URL and Callback Server URL via Enterprise manager. (EM -> SOA-INFRA -> SOA Administration -> Common Properties)
Note: With this solution you loose existing running processes.