X

Proactive insights, news and tips from Oracle WebLogic Server Support. Learn Oracle from Oracle.

Using AppToCloud to Migrate an On-Premise Domain to the Oracle Cloud

Part One - On-Premise Migration

 

Moving your WebLogic Server domains to the Oracle Cloud just got a whole shebang easier (#!)

 

With the introduction of the AppToCloud Tooling in Oracle Java Cloud Service 16.3.5 you can now simply and easily migrate a configured on-premise domain to  an equivalent Java Cloud Service instance in the Oracle Cloud, complete with the same set of configured settings, resources and deployed applications.

 

A key component of the AppToCloud landscape is the on-premise tooling which is responsible for inspecting a domain to check it's suitability for moving to the Oracle Cloud and then creating an export file containing a model of the domain topology (cluster with managed servers), local settings such as CLASSPATH entries and VM arguments, the set of configured WebLogic Server services such as data sources and deployments units such as Java EE applications and shared-libraries.

 

In this first of several blogs, I will provide an overview of how the AppToCloud on-premise tooling is used to create an export of a domain that is ready to be uploaded to the Oracle Cloud to then be provisioned as an Oracle Java Cloud Service instance.

 

Download and Install Tooling

 

AppToCloud on-premise tooling is used to inspect and export a domain.  The tooling needs to be downloaded from Oracle and installed on the server where the source domain is located.

 

Download the AppToCloud a2c-zip-installer.zip file from the Oracle Cloud Downloads page:  http://www.oracle.com/technetwork/topics/cloud/downloads/index.html

 

Copy the asc-zip-installer.zip file onto the machine hosting the on-premise installation and domain and unzip into a relevant directory.

 

 
  1. $ unzip a2c-zip-installer.zip  
  2. Archive:  a2c-zip-installer.zip  
  3.   inflating: oracle_jcs_app2cloud/jcs_a2c/modules/features/model-api.jar    
  4.   inflating: oracle_jcs_app2cloud/bin/a2c-healthcheck.sh    
  5.   inflating: oracle_jcs_app2cloud/jcs_a2c/modules/wlst.jar    
  6.   inflating: oracle_jcs_app2cloud/jcs_a2c/modules/healthcheck.jar    
  7.   inflating: oracle_jcs_app2cloud/jcs_a2c/modules/commons-lang-2.6.jar    
  8.   ...  
  9.   inflating: oracle_jcs_app2cloud/oracle_common/modules/com.fasterxml.jackson.core.jackson-databind_2.7.1.jar    
  10.   inflating: oracle_jcs_app2cloud/bin/a2c-export.cmd    
  11.   inflating: oracle_jcs_app2cloud/bin/a2c-export.sh    
  12.   inflating: oracle_jcs_app2cloud/jcs_a2c/modules/jcsprecheck-api.jar    
  13.   inflating: oracle_jcs_app2cloud/jcs_a2c/modules/jcsprecheck-impl.jar    
  14.   inflating: oracle_jcs_app2cloud/oracle_common/modules/fmwplatform/common/envspec.jar    

 

Verify the installation is successful by executing one of the utilities, such as the a2c-export utility, and inspecting the help text.

 

 
  1. $ ./oracle_jcs_app2cloud/bin/a2c-export.sh -help  
  2. JDK version is 1.8.0_60-b27  
  3. A2C_HOME is /tmp/oracle_jcs_app2cloud  
  4. /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java -Xmx512m -DUseSunHttpHandler=true -cp /tmp/oracle_jcs_app2cloud/jcs_a2c/modules/features/jcsa2c_lib.jar -Djava.util.logging.config.class=oracle.jcs.lifecycle.util.JCSLifecycleLoggingConfig oracle.jcs.lifecycle.discovery.AppToCloudExport -help  
  5. The a2c-export program will write its log to /private/tmp/oracle_jcs_app2cloud/logs/jcsa2c-export.log  
  6.   
  7. Usage: a2c-export.sh [-help] -oh <oracle-home> -domainDir <domain-dir>  
  8.           -archiveFile <archive-file> [-clusterToExport <cluster-name>]  
  9.           [-clusterNonClusteredServers <cluster-name>] [-force]  
  10.           ...  

 

Step 1: Run a healthcheck on the source domain

 

The first step to performing an AppToCloud migration is to perform a healthcheck of the on-premise domain using the a2c-healthcheck utility.  The purpose of the healthcheck is to connect to the specified on-premise domain, inspect its contents, generate a report for any issues it discovers that may prevent the migration from being successful and finally, store the results in a directory for the export utility to use.

 

The healtcheck is run as an online operation.  This requires that the  AdminServer of the specified domain must be running and the appropriate connection details must be supplied as parameters to the healthcheck utility.  For security considerations the use of the password as a parameter should be be avoided as the healthcheck utility will securely prompt for the password when needed.

 

 
  1. $ ./oracle_jcs_app2cloud/bin/a2c-healthcheck.sh \  
  2.   -oh /Users/sbutton/Desktop/AppToCloudDemo/wls_1213 \  
  3.   -adminUrl t3://localhost:7001 \  
  4.   -adminUser weblogic \  
  5.   -outputDir /tmp/demo_domain_export  
  6.   
  7. JDK version is 1.8.0_60-b27  
  8. A2C_HOME is /Users/sbutton/Desktop/AppToCloudDemo/oracle_jcs_app2cloud  
  9. /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java -Xmx512m -cp /Users/sbutton/Desktop/AppToCloudDemo/oracle_jcs_app2cloud/jcs_a2c/modules/features/jcsa2c_lib.jar -Djava.util.logging.config.class=oracle.jcs.lifecycle.util.JCSLifecycleLoggingConfig oracle.jcs.lifecycle.healthcheck.AppToCloudHealthCheck -oh /Users/sbutton/Desktop/AppToCloudDemo/wls_1213 -adminUrl t3://localhost:7001 -outputDir /tmp/demo_domain_export -adminUser weblogic  
  10. The a2c-healthcheck program will write its log to /Users/sbutton/Desktop/AppToCloudDemo/oracle_jcs_app2cloud/logs/jcsa2c-healthcheck.log  
  11. Enter password: ***********  
  12. Checking Domain Health  
  13. Connecting to domain  
  14.   
  15. Connected to the domain demo_domain  
  16.   
  17. Checking Java Configuration  
  18. ...  
  19. checking server runtime : conference_server_one  
  20. ...  
  21. checking server runtime : AdminServer  
  22. ...  
  23. checking server runtime : conference_server_two  
  24. Done Checking Java Configuration  
  25. Checking Servers Health  
  26.   
  27. Done checking Servers Health  
  28. Checking Applications Health  
  29. Checking ConferencePlanner  
  30. Done Checking Applications Health  
  31. Checking Datasource Health  
  32. Done Checking Datasource Health  
  33. Done Checking Domain Health  
  34.   
  35. Activity Log for HEALTHCHECK  
  36.   
  37. Informational Messages:  
  38.   
  39.   1. JCSLCM-04037: Healthcheck Completed  
  40.   
  41. An HTML version of this report can be found at /tmp/demo_domain_export/reports/demo_domain-healthcheck-activityreport.html  
  42.   
  43. Output archive saved as /tmp/demo_domain_export/demo_domain.zip.  You can use this archive for the a2c-export tool.  

 

Any findings from the healthcheck utility are reported as messages, including any items that need attention or that aren't supported with the current version of AppToCloud.  A static report is also generated that can be viewed after the execution of the utility showing the details of the on-premise domain and any messages generated from the healthcheck.

Screen Shot 2016-09-01 at 14.50.11.png

 

Note: it is mandatory to perform a healtcheck on the on-premise domain before an export operation can be performed.  The export operation requires the output from the healthcheck to perform its tasks.

 

Step 2: Export the source domain

 

Once a successful healthcheck has been performed on the on-premise domain, it is then ready to be exported into a form that can be uploaded to Oracle Cloud and used in the provisioning process for new Oracle Java Cloud Service instances.

 

Besides the path to the on-premise domain and location of the WebLogic Server installation, the export utility uses the output from the healthcheck operation to drive the export operation, storing the final output in the same file.

 

 
  1. $ ./oracle_jcs_app2cloud/bin/a2c-export.sh \  
  2.   -oh /Users/sbutton/Desktop/AppToCloudDemo/wls_1213 \  
  3.   -domainDir /Users/sbutton/Desktop/AppToCloudDemo/wls_1213/user_projects/domains/demo_domain \   
  4.   -archiveFile /tmp/demo_domain_export/demo_domain.zip  
  5.   
  6. JDK version is 1.8.0_60-b27  
  7. A2C_HOME is /Users/sbutton/Desktop/AppToCloudDemo/oracle_jcs_app2cloud  
  8. /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java -Xmx512m -DUseSunHttpHandler=true -cp /Users/sbutton/Desktop/AppToCloudDemo/oracle_jcs_app2cloud/jcs_a2c/modules/features/jcsa2c_lib.jar -Djava.util.logging.config.class=oracle.jcs.lifecycle.util.JCSLifecycleLoggingConfig oracle.jcs.lifecycle.discovery.AppToCloudExport -oh /Users/sbutton/Desktop/AppToCloudDemo/wls_1213 -domainDir /Users/sbutton/Desktop/AppToCloudDemo/wls_1213/user_projects/domains/demo_domain -archiveFile /tmp/demo_domain_export/demo_domain.zip  
  9. The a2c-export program will write its log to /Users/sbutton/Desktop/AppToCloudDemo/oracle_jcs_app2cloud/logs/jcsa2c-export.log  
  10. ####<31/08/2016 12:33:12 PM> <INFO> <AppToCloudExport> <getModel> <JCSLCM-02005> <Creating new model for domain /Users/sbutton/Desktop/AppToCloudDemo/wls_1213/user_projects/domains/demo_domain>  
  11. ####<31/08/2016 12:33:12 PM> <INFO> <EnvironmentModelBuilder> <populateOrRefreshFromEnvironment> <FMWPLATFRM-08552> <Try to discover a WebLogic Domain in offline mode>  
  12. ####<31/08/2016 12:33:21 PM> <INFO> <EnvironmentModelBuilder> <populateOrRefreshFromEnvironment> <FMWPLATFRM-08550> <End of the Environment discovery>  
  13. ####<31/08/2016 12:33:21 PM> <WARNING> <ModelNotYetImplementedFeaturesScrubber> <transform> <JCSLCM-00579> <Export for Security configuration is not currently implemented and must be manually configured on the target domain.>  
  14. ####<31/08/2016 12:33:21 PM> <INFO> <AppToCloudExport> <archiveApplications> <JCSLCM-02003> <Adding application to the archive: ConferencePlanner from /Users/sbutton/Desktop/AppToCloudDemo/ConferencePlanner.war>  
  15. ####<31/08/2016 12:33:22 PM> <INFO> <AppToCloudExport> <run> <JCSLCM-02009> <Successfully exported model and artifacts to /tmp/demo_domain_export/demo_domain.zip. Overrides file written to /tmp/demo_domain_export/demo_domain.json>  
  16.   
  17. Activity Log for EXPORT  
  18.   
  19. Features Not Yet Implemented Messages:  
  20.   
  21.   1. JCSLCM-00579: Export for Security configuration is not currently implemented and must be manually configured on the target domain.  
  22.   
  23. An HTML version of this report can be found at /tmp/demo_domain_export/reports/demo_domain-export-activityreport.html  
  24.   
  25. Successfully exported model and artifacts to /tmp/demo_domain_export/demo_domain.zip. Overrides file written to /tmp/demo_domain_export/demo_domain.json  

 

Again messages from the execution of the export operation  are reported the console, including any items that need further attention or that aren't supported with the current version of AppToCloud.  A static report is also generated that can be viewed after the execution of the export of the on-premise domain.

Screen Shot 2016-09-01 at 16.25.42.png

The export utility also generates an overrides file which externalizes all of the major settings that were extracted from the on-premise domain.  This file can be  modified locally to change the values of any of the provided settings and supplied with the domain export to the Oracle Java Cloud Service provisioning process.  Any modified settings in the overrides file will be used in place of the original values stored in the domain export when the new instance is provisioned.

 

 
  1. {  
  2.   "model" : {  
  3.     "databases" : [ {  
  4.       "id" : "demo_domain-database",  
  5.       "jdbcConnectInfos" : [ {  
  6.         "id" : "demo_domain-database-jdbc-0",  
  7.         "url" : "jdbc:oracle:thin:@localhost:1521:xe",  
  8.         "driverName" : "oracle.jdbc.xa.client.OracleXADataSource",  
  9.         "xa" : true  
  10.       } ]  
  11.     } ],  
  12.     "domains" : [ {  
  13.       "id" : "demo_domain-domain",  
  14.       "name" : "demo_domain",  
  15.       "domainProfile" : {  
  16.         "name" : "demo_domain",  
  17.         "servers" : [ {  
  18.           "id" : "AdminServer",  
  19.           "isAdminServer" : "true"  
  20.         }, {  
  21.           "id" : "conference_server_one",  
  22.           "isAdminServer" : "false"  
  23.         }, {  
  24.           "id" : "conference_server_two",  
  25.           "isAdminServer" : "false"  
  26.         } ],  
  27.         "clusters" : [ {  
  28.           "id" : "conference_cluster",  
  29.           "serverRefs" : [ "conference_server_one""conference_server_two" ]  
  30.         } ]  
  31.       },  
  32.       "serverBindings" : [ {  
  33.         "id" : "demo_domain-domain/AdminServer",  
  34.         "serverRef" : "AdminServer",  
  35.         "name" : "AdminServer"  
  36.       }, {  
  37.         "id" : "demo_domain-domain/conference_server_one",  
  38.         "serverRef" : "conference_server_one",  
  39.         "name" : "conference_server_one"  
  40.       }, {  
  41.         "id" : "demo_domain-domain/conference_server_two",  
  42.         "serverRef" : "conference_server_two",  
  43.         "name" : "conference_server_two"  
  44.       } ],  
  45.       "clusterBindings" : [ {  
  46.         "clusterRef" : "conference_cluster",  
  47.         "name" : "conference_cluster"  
  48.       } ],  
  49.       "dataSourceBindings" : [ {  
  50.         "id" : "Conference Planner DataSource",  
  51.         "dataSourceName" : "Conference Planner DataSource",  
  52.         "dataSourceType" : "Generic",  
  53.         "genericDataSourceBinding" : {  
  54.           "jdbcConnectInfoRef" : "demo_domain-database-jdbc-0",  
  55.           "credentialRef" : "jdbc/conference"  
  56.         }  
  57.       } ]  
  58.     } ]  
  59.   },  
  60.   "extraInfo" : {  
  61.     "domainVersion" : "12.1.3.0.0",  
  62.     "a2cClientVersion" : "0.7.6",  
  63.     "a2cClientCompatibilityVersion" : "1.0",  
  64.     "a2cArchiveLocation" : {  
  65.       "url" : "file:/tmp/demo_domain_export/demo_domain.zip"  
  66.     },  
  67.     "jvmInfos" : [ {  
  68.       "serverId" : "AdminServer",  
  69.       "maxHeapSize" : "512m"  
  70.     }, {  
  71.       "serverId" : "conference_server_one",  
  72.       "maxHeapSize" : "512m"  
  73.     }, {  
  74.       "serverId" : "conference_server_two",  
  75.       "maxHeapSize" : "512m"  
  76.     } ],  
  77.     "activityLog" : {  
  78.       "healthCheck" : {  
  79.         "infoMessages" : [ {  
  80.           "component" : { },  
  81.           "message" : "Healthcheck Completed"  
  82.         } ]  
  83.       },  
  84.       "export" : {  
  85.         "notYetSupportedMessages" : [ {  
  86.           "component" : { },  
  87.           "message" : "Export for Security configuration is not currently implemented and must be manually configured on the target domain."  
  88.         } ]  
  89.       }  
  90.     }  
  91.   }  
  92. }  

 

Uploading to the Oracle Cloud

 

When the JCS provisioning process for an AppToCloud migration commences, it will load the on-premise domain export and overrides file from an Oracle Storage Cloud Service container.  The a2c-export tool can automatically upload the generated archive and overrides file to the Oracle Storage Cloud Service as part of the export by specifying additional parameters that identify the cloud storage container to use.

 

 
  1. ./oracle_jcs_app2cloud/bin/a2c-export.sh \  
  2.   -oh /Users/sbutton/Desktop/AppToCloudDemo/wls_1213 \  
  3.   -domainDir /Users/sbutton/Desktop/AppToCloudDemo/wls_1213/user_projects/domains/demo_domain \  
  4.   -archiveFile /tmp/demo_domain_export/demo_domain.zip \  
  5.   -cloudStorageContainer "Storage-StorageEval01admin" \  
  6.   -cloudStorageUser "StorageEval01admin.Storageadmin"    

 

 

If you chose not to use the  a2c-export tool to upload the upload the archive and overrides files to the Oracle Storage Cloud Service then you will need to perform the upload using its REST API.

 

Next Steps

 

At this point the work with the on-premise domain is complete.  The next step after uploading the archive and overrides files to the Oracle Storage Cloud Service is to go to the Java Cloud Service console to provision a new instance using the AppToCloud option.   A Web UI will walk through the steps required, gathering the required information to create the service.Once the information is provided, the Oracle Java Cloud Service provisioning process will commence.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services