psm jcs import

Use this command to migrate an on-premises WebLogic Server domain to an Oracle Java Cloud Service instance.

Syntax

 psm jcs import -s|--service-name serviceName
   -c|--config-payload pathToPayload
      [-of|--output-format json|html|short]
      [-wc|--wait-until-complete true|false] 

Parameters

All parameters are required unless otherwise noted.

Parameter Description
-s|--service-name serviceName Name of the Oracle Java Cloud Service instance.
-c|--config-payload pathToPayload Specifies the path to the JSON file containing the information necessary for importing an on-premises WebLogic Server domain into a Java Cloud Service instance.
-of|--output-format json|html|short (Optional) Output format of the command’s response:

Accepted values: json, html, short

The default output format is the one you specified when using the psm setup command to configure the psm CLI.

-wc|--wait-until-complete true|false

(Optional) A boolean value that, when set to true, makes the command behave synchronously; that is, it does not return until the submitted job is complete. The following message is displayed until the job is complete:
Waiting for the job to complete... (it cannot be cancelled)
Default: false

Sample Payload

The following example shows how to import a WebLogic Server domain configuration from an on-premises environment into your Oracle Java Cloud Service instance that was created with AppToCloud artifacts. For release 17.4.1 and higher, customPayLoad is an object. The following shows an example that uses the customPayLoad object in the request body.

Each data source in the original WebLogic Server domain must be associated with an existing Oracle Database Cloud Service database deployment. For GridLink and Multi data sources, use a Database Cloud Service database deployment that hosts an Oracle Real Application Clusters (Oracle RAC) database.

{
    "customPayload": {
        "payload": {
            "ds":{
                "mymultidatasource":{
                    "username":"sys as sysdba",
                    "password":"password",
                    "mymultidatasource":"some-db-cloud-instance",
                    "targetDataSourceType":"Generic"},
                "grid-2":{
                    "username":"sys as sysdba",
                    "password":"password",
                    "grid-2":"some-db-cloud-instance",
                    "targetDataSourceType":"Generic"},
                "JDBC Data Source-0":{
                    "username":"sys as sysdba",
                    "password":"password",
                    "JDBC Data Source-0":"some-db-cloud-instance",
                    "targetDataSourceType":"Generic"},
                "abcdjdbc":{
                  "username":"sys as sysdba",
                  "password":"password",
                  "abcdjdbc":"some-db-cloud-instance",
                  "targetDataSourceType":"Generic"}},
            "jndi":{
                "myforeign-jndi":{
                    "bypassPrecheck": "false",
                    "username":"myweblogicuser",
                    "password":"password",
                    "provider":"T3_WEBLOGIC_SERVER_URL"},
                "abcd":{
                    "bypassPrecheck": "false",
                    "username":"myweblogicuser",
                    "password":"password",
                    "provider":"T3_WEBLOGIC_SERVER_URL"},
                "abcd provider jndi":{
                    "bypassPrecheck": "false",
                    "username":"myweblogicuser",
                    "password":"password",
                    "destination":{
                        "jaasInstance": "targetJCSInstance",
                        "server": "myserver",
                        "protocol": "t3"}}},
            "mailSession":{
                "MyMailSession-0":{
                    "mailSessionName": "MyMailSession-0",
                    "defaultMail":{
                        "port": "asdasd",
                        "username": "asdasd",
                        "host": "asad",
                        "type": "Default",
                        "password":"password"},
                    "send":{
                        "port": "465",
                        "username": "asdsad",
                        "protocol": "smtp",
                        "host": "anexample.example.com",
                        "type": "Send",
                        "password":"password"},
                    "bypassPrecheck": "false",
                    "receive":{
                        "port": "993",
                        "username": "asdsad",
                        "protocol": "imap",
                        "host": "anexample.example.com",
                        "type": "Receive",
                        "password":"password"},
                    "optionalProperties":{
                        "mail.smtp.ssl.enable": "true",
                        "mail.imap.starttls.enable": "true",
                        "mail.imap.ssl.enable": "true",
                        "mail.smtp.auth": "true",
                        "mail.smtp.starttls.enable": "true",
                        "mail.imap.auth": "true"}},
                "MyMailSession-1":{
                    "mailSessionName": "MyMailSession-1",
                    "defaultMail":{
                        "port": "asdsad",
                        "username": "asdsd",
                        "host": "asdasd",
                        "type": "Default",
                        "password":"password"},
                    "send":{
                        "port": "465",
                        "username": "asdasd",
                        "protocol": "smtp",
                        "host": "anexample.example.com",
                        "type": "Send",
                        "password":"password"},
                    "bypassPrecheck": "false",
                    "optionalProperties":{
                        "mail.smtp.ssl.enable": "true",
                        "mail.smtp.auth": "true",
                        "mail.smtp.password":"password",
                        "mail.smtp.starttls.enable": "true"}}},
            "jmsModule":{
                "My Advanced Jms Module 1":{
                    "jmsForeignServer":{
                        "MyForeignJMS3":{
                            "username": "asdsd",
                            "jndiConnectionUrl": "t3:\/\/127.0.0.1:8101",
                            "bypassPrecheck": "false",
                            "password":"password"}},
                    "safRemoteContext":{
                        "MyRemoteSAFcontext-0":{
                            "username": "asdasd",
                            "bypassPrecheck": "false",
                            "password":"password",
                            "url": "t3:\/\/127.0.0.1:8101"},
                        "MyRemoteSAFcontext-1":{
                            "username": "tjghgh",
                            "bypassPrecheck": "false",
                            "password":"password",
                            "url": "t3:\/\/127.0.0.1:8101"},
                        "MyRemoteSAFcontext-2":{
                            "username": "egertert",
                            "bypassPrecheck": "false",
                            "password":"password",
                            "destination":{
                                "jaasInstance": "targetJCSInstance",
                                "server": "mycluster",
                                "protocol": "t3"}}}},
                "MyAdvancedJmsModule2":{
                    "jmsForeignServer":{
                        "My Foreign JMS 0":{
                            "username": "dfhrtuu",
                            "jndiConnectionUrl": "t3:\/\/127.0.0.1:8101",
                            "bypassPrecheck": "false",
                            "password":"password"},
                        "ForeignServer-10":{
                            "username": "username3",
                            "password": "password",
                            "bypassPrecheck": "false",
                            "destination": { 
                                "jaasInstance": "targetJCSInstance", 
                                "cluster": "my cluster", 
                                "protocol": "t3"}}},
                    "safRemoteContext":{
                        "MyRemoteSAFcontext-0":{
                            "username": "were545",
                            "bypassPrecheck": "false",
                            "password":"password",
                            "url": "t3:\/\/127.0.0.1:8101"},
                        "MyRemoteSAFcontext-1":{
                            "username": "sdfsdfs",
                            "bypassPrecheck": "false",
                            "password":"password",
                            "url": "t3:\/\/127.0.0.1:8101"},
                        "MyRemoteSAFcontext-2":{
                            "username": "uuyhmn",
                            "bypassPrecheck": "false",
                            "password":"password",
                            "url": "t3:\/\/127.0.0.1:8101"}}}},
            "jmsMessageBridgeDestination":{
                "JMS Bridge Remote Destination":{
                    "connectionUrl": "t3:\/\/127.0.0.1:8101",
                    "bypassPrecheck": "false",
                    "username": "someusername",
                    "password": "password"},
                "JMS Bridge Local Destination":{
                    "connectionUrl": "t3:\/\/127.0.0.1:8101",
                    "bypassPrecheck": "false",
                    "username": "someusername",
                    "password": "password"},
                "JMS Bridge Another Local Destination":{
                    "connectionUrl": "t3:\/\/127.0.0.1:8101",
                    "bypassPrecheck": "false",
                    "username": "someusername",
                    "password": "password"},
                "JMS Bridge Another Remote Destination":{
                    "bypassPrecheck": "false",
                    "username": "someusername",
                    "password": "password",
                    "destination":{
                        "jaasInstance": "targetJCSInstance",
                        "server": "mycluster",
                        "protocol": "t3"}}},
            "jmsMessagingBridge":{
                "MyMessagingBridge-2":{
                    "sourceDestination": "JMS Bridge Remote Destination",
                    "targetDestination": "JMS Bridge Local Destination"},
                "MyMessagingBridge-1":{
                    "sourceDestination": "JMS Bridge Local Destination",
                    "targetDestination": "JMS Bridge Remote Destination"},
                "Another Messaging Bridge-2":{
                    "sourceDestination": "JMS Bridge Another Remote Destination",
                    "targetDestination": "JMS Bridge Another Local Destination"}},
            "storage":{
                "a2cModelJsonLocation": "https://storage-url/v1/storage-storageidentitydomain/containername/domain1.json",
                "cloudStoragePwd": "password",
                "cloudStorageUser": "joe@example.com"}},
        "type": "app2cloud"}}

Example

$ psm jcs import -s ExampleInstance -c D:/cli_apps/a2c_payload.json