Provision an Oracle SOA Suite on Marketplace Instance Using the Oracle Cloud Infrastructure Command Line Interface

The Oracle Cloud Infrastructure Command Line Interface (CLI) is a small-footprint tool that you can use on its own or with the Oracle Cloud Infrastructure Console to complete tasks. The CLI provides the same core functionality as the Oracle Cloud Infrastructure Console, plus additional commands. Some of these, such as the ability to run scripts, extend Console functionality. For more information about the CLI, see Command Line Interface (CLI) in the Oracle Cloud Infrastructure documentation.

You can provision an Oracle SOA Suite on Marketplace instance using Oracle Cloud Infrastructure CLI commands to perform operations such as creating a stack, creating a plan job, and creating an apply job.

Install the Command Line Interface

To install the CLI, see Installing the CLI in the Oracle Cloud Infrastructure documentation.

Notes:

  • Select default values during installation.
  • Do not install any optional packages.

Example CLI Installation Output

PS C:\WINDOWS\system32> powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.ps1'))"

        ******************************************************************************
        You have started the OCI CLI Installer in interactive mode. If you do not wish
        to run this in interactive mode, please include the -AcceptAllDefaults option.
        If you have the script locally and would like to know more about
        input options for this script, then you can run:
        help .\install.ps1
        If you would like to know more about input options for this script, refer to:
        https://github.com/oracle/oci-cli/blob/master/scripts/install/README.rst
        ******************************************************************************
VERBOSE: Python found in registry: HKCU:\Software\Python\PythonCore
VERBOSE: Python found in registry: HKLM:\Software\Python\PythonCore
VERBOSE: C:\Python34\python.exe Python version 3.4.2 is below minimum required version 3.5.0
VERBOSE: Downloading install script to C:\Users\vgorugan.ORADEV\AppData\Local\Temp\tmp4226.tmp
VERBOSE:  False   False
VERBOSE: Using Python executable: C:\Users\vgorugan.ORADEV\AppData\Local\Programs\Python\Python38\python.exe to run
install script...
VERBOSE: Arguments to python script: "C:\Users\vgorugan.ORADEV\AppData\Local\Temp\tmp4226.tmp"
-- Verifying Python version.
-- Python version 3.8.1 okay.

===> In what directory would you like to place the install? (leave blank to use 'C:\Users\vgorugan.ORADEV\lib\oracle-cli'): d:\ociclinew
-- Creating directory 'D:\ociclinew'.
-- We will install at 'D:\ociclinew'.

===> In what directory would you like to place the 'oci.exe' executable? (leave blank to use 'C:\Users\vgorugan.ORADEV\bin'): d:\ociclinew
-- The executable will be in 'D:\ociclinew'.

===> In what directory would you like to place the OCI scripts? (leave blank to use 'C:\Users\vgorugan.ORADEV\bin\oci-cli-scripts'): d:\ociclinew
-- The scripts will be in 'D:\ociclinew'.

===> Currently supported optional packages are: ['db (will install cx_Oracle)']
What optional CLI packages would you like to be installed (comma separated names; press enter if you don't need any optional packages)?:
-- The optional packages installed will be ''.
-- Trying to use python3 venv.
-- Executing: ['C:\\Users\\vgorugan.ORADEV\\AppData\\Local\\Programs\\Python\\Python38\\python.exe', '-m', 'venv', 'D:\\ociclinew']
-- Executing: ['D:\\ociclinew\\Scripts\\pip', 'install', '--cache-dir', 'C:\\Users\\VGORUG~1.ORA\\AppData\\Local\\Temp\\tmpfjug5wd6', 'oci_cli', '--upgrade']
Collecting oci_cli
  Downloading https://files.pythonhosted.org/packages/0b/06/3ead2c0a3703d6dcc049affce4638c47279d8b20b60b1d0f08a1237ade4f/oci_cli-2.9.2-py2.py3-none-any.whl (7.3MB)
     |████████████████████████████████| 7.3MB 218kB/s
Collecting configparser==3.5.0 (from oci_cli)
  Downloading https://files.pythonhosted.org/packages/7c/69/c2ce7e91c89dc073eb1aa74c0621c3eefbffe8216b3f9af9d3885265c01c/configparser-3.5.0.tar.gz
Collecting cryptography==2.8 (from oci_cli)
  Downloading https://files.pythonhosted.org/packages/27/da/8ee8775f0b6883b6c53e3f2d8a9a1e109661176446ec09f27c070dfc7baf/cryptography-2.8-cp38-cp38-win_amd64.whl (1.5MB)
     |████████████████████████████████| 1.5MB 273kB/s
Collecting retrying==1.3.3 (from oci_cli)
  Downloading https://files.pythonhosted.org/packages/44/ef/beae4b4ef80902f22e3af073397f079c96969c69b2c7d52a57ea9ae61c9d/retrying-1.3.3.tar.gz
Collecting certifi (from oci_cli)
  Downloading https://files.pythonhosted.org/packages/b9/63/df50cac98ea0d5b006c55a399c3bf1db9da7b5a24de7890bc9cfd5dd9e99/certifi-2019.11.28-py2.py3-none-any.whl (156kB)
     |████████████████████████████████| 163kB 86kB/s
Collecting python-dateutil==2.7.3 (from oci_cli)
  Downloading https://files.pythonhosted.org/packages/cf/f5/af2b09c957ace60dcfac112b669c45c8c97e32f94aa8b56da4c6d1682825/python_dateutil-2.7.3-py2.py3-none-any.whl (211kB)
     |████████████████████████████████| 215kB 152kB/s
Collecting arrow==0.10.0 (from oci_cli)
  Downloading https://files.pythonhosted.org/packages/54/db/76459c4dd3561bbe682619a5c576ff30c42e37c2e01900ed30a501957150/arrow-0.10.0.tar.gz (86kB)
     |████████████████████████████████| 92kB 226kB/s
Collecting idna<2.7,>=2.5 (from oci_cli)
  Downloading https://files.pythonhosted.org/packages/27/cc/6dd9a3869f15c2edfab863b992838277279ce92663d334df9ecf5106f5c6/idna-2.6-py2.py3-none-any.whl (56kB)
     |████████████████████████████████| 61kB 245kB/s
Collecting terminaltables==3.1.0 (from oci_cli)
  Downloading https://files.pythonhosted.org/packages/9b/c4/4a21174f32f8a7e1104798c445dacdc1d4df86f2f26722767034e4de4bff/terminaltables-3.1.0.tar.gz
Collecting pytz==2016.10 (from oci_cli)
  Downloading https://files.pythonhosted.org/packages/f5/fa/4a9aefc206aa49a4b5e0a72f013df1f471b4714cdbe6d78f0134feeeecdb/pytz-2016.10-py2.py3-none-any.whl (483kB)
     |████████████████████████████████| 491kB 107kB/s
Collecting pyOpenSSL==18.0.0 (from oci_cli)
  Downloading https://files.pythonhosted.org/packages/96/af/9d29e6bd40823061aea2e0574ccb2fcf72bfd6130ce53d32773ec375458c/pyOpenSSL-18.0.0-py2.py3-none-any.whl (53kB)
     |████████████████████████████████| 61kB 206kB/s
Collecting oci==2.10.4 (from oci_cli)
  Downloading https://files.pythonhosted.org/packages/f0/e9/74ee0fdc42e26a1052a7d37d55aad5a36f473b969e79cc9d9b8eadc9cfb8/oci-2.10.4-py2.py3-none-any.whl (3.5MB)
     |████████████████████████████████| 3.5MB 344kB/s
Collecting click==6.7 (from oci_cli)
  Downloading https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl (71kB)                                                                                       |████████████████████████████████| 71kB 270kB/s                                                                    Collecting six==1.11.0 (from oci_cli)                                                                                     Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting jmespath==0.9.3 (from oci_cli)
  Downloading https://files.pythonhosted.org/packages/b7/31/05c8d001f7f87f0f07289a5fc0fc3832e9a57f2dbd4d3b0fee70e0d51365/jmespath-0.9.3-py2.py3-none-any.whl
Collecting PyYAML==5.1.2 (from oci_cli)
  Downloading https://files.pythonhosted.org/packages/e3/e8/b3212641ee2718d556df0f23f78de8303f068fe29cdaa7a91018849582fe/PyYAML-5.1.2.tar.gz (265kB)
     |████████████████████████████████| 266kB 94kB/s
Collecting cffi!=1.11.3,>=1.8 (from cryptography==2.8->oci_cli)
  Downloading https://files.pythonhosted.org/packages/b4/78/eefed9f51baa2b2c891915b4590a237ed6bc6d02beec177fc503bae8eb53/cffi-1.14.0-cp38-cp38-win_amd64.whl (177kB)
     |████████████████████████████████| 184kB 192kB/s
Collecting pycparser (from cffi!=1.11.3,>=1.8->cryptography==2.8->oci_cli)
  Downloading https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz (158kB)
     |████████████████████████████████| 163kB 198kB/s
Installing collected packages: configparser, pycparser, cffi, six, cryptography, retrying, certifi, python-dateutil, arrow, idna, terminaltables, pytz, pyOpenSSL, oci, click, jmespath, PyYAML, oci-cli
  Running setup.py install for configparser ... done
  Running setup.py install for pycparser ... done
  Running setup.py install for retrying ... done
  Running setup.py install for arrow ... done
  Running setup.py install for terminaltables ... done
  Running setup.py install for PyYAML ... done
Successfully installed PyYAML-5.1.2 arrow-0.10.0 certifi-2019.11.28 cffi-1.14.0 click-6.7 configparser-3.5.0 cryptography-2.8 idna-2.6 jmespath-0.9.3 oci-2.10.4 oci-cli-2.9.2 pyOpenSSL-18.0.0 pycparser-2.19 python-dateutil-2.7.3 pytz-2016.10 retrying-1.3.3 six-1.11.0 terminaltables-3.1.0
WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

===> Modify PATH to include the CLI and enable tab completion in PowerShell now? (Y/n):
--
-- ** Close and re-open PowerShell to reload changes to your PATH **
-- In order to run the autocomplete script, you may also need to set your PowerShell execution policy to allow for running local scripts (as an Administrator run Set-ExecutionPolicy RemoteSigned in a PowerShell prompt)
--
-- Installation successful.
-- Run the CLI with D:\ociclinew\oci.exe --help
VERBOSE: Successfully installed OCI CLI!

Configure the Command Line Interface

To configure the CLI, see Configuring the CLI in the Oracle Cloud Infrastructure documentation.

For Oracle SOA Suite on Marketplace, create a profile file with the following values:

  • user: Oracle Cloud ID (OCID) of the username you want to use to sign in.
  • fingerprint: API key of that user (shown on the User Details page in the Oracle Cloud Infrastructure Console)
  • key_file: Private key you want to use with new Oracle SOA Suite on Marketplace instances.

Example Profile File in D:\ociclinew\config1

[DEFAULT]
user=ocid1.user.oc1..aaaaaaaav4dfgdfgdfgdfgdgdfdfgdfdfgdcyqak625cfltnfsy7zsnyny5qwmdmwqxjqzq
fingerprint=2e:e0:9r:35:2c:14:49:3a:d2:cd:e0:ba:ea:d8:f1:f1
key_file=d:\ociclinew\oci_api_key.pem
tenancy=ocid1.tenancy.oc1..aaaaaaaaxd6jemgcmdpb3wewcwchzswgi6g55gth7ioc2gbpbvqo5ecoa
region=us-ashburn-1

Start the Command Line Interface

To start a CLI session, see Starting a CLI Session in the Oracle Cloud Infrastructure documentation.

Use CLI Commands to Provision an Oracle SOA Suite on Marketplace Instance

Use the CLI commands in the order provided here to provision an Oracle SOA Suite on Marketplace instance.

Topics:

Note:

Refer to Oracle Cloud Infrastructure CLI Command Reference for other CLI commands you can use to manage an Oracle SOA Suite on Marketplace instance.

Set File Permissions

Set permissions of a named profile file.

Syntax

See setup repair-file-permissions in the Oracle Cloud Infrastructure documentation.

Example

oci setup repair-file-permissions --file D:\opc_rsa  

Result

Changes the profile file permissions as required by Oracle Cloud Infrastructure.

Get the Compartment OCID

Get the OCID of the compartment in which you want to create the Oracle SOA Suite on Marketplace instance.

Syntax

See iam compartment list in the Oracle Cloud Infrastructure documentation.

Example

oci iam compartment list --config-file D:\ociclinew\config1 

Result

Generates a list of compartment OCIDs in the tenancy. For example:

ocid1.compartment.oc1..aaaaaaaalmnpc2nvr7s7jfxkuxp6finc5dif7fqnrkpbczwnojp2jy6saq5a

Create a Stack

Create a stack for the Oracle SOA Suite on Marketplace in a named compartment.

Syntax

See resource-manager stack create in the Oracle Cloud Infrastructure documentation.

Example

oci resource-manager stack create --compartment-id "ocid1.compartment.oc1..aaaaaaaalmnpc2nvr7s7jfxkuxp6finc5dif7fqnrkpbczwnojp2jy6saq5a"
--config-source "D:\ociclinew\ocid1.ormjob.oc1.iad.aaaaaaaaramgqimwcjjvf7wpu3bg6fugwpxvejymcmboixukkurcorach3dq.zip"
--display-name SOACmdline4 --terraform-version 0.12.x --config-file D:\ociclinew\config1 --variables file://D:\ociclinew\stackinp.json

where

  • compartment-id is the OCID of the compartment in which you want to create the stack, as shown in the output of iam compartment list
  • config-source is the terraform configuration zip file
  • display-name is the name the stack that will be created
  • variables provides variables associated with the stack in a .json file, as shown below

Example stackinp.json

{
"compartment_ocid":"ocid1.compartment.oc1..aaaaaaaalmnpc2nvr7s7jfxkuxp6finc5dif7fqnrkpbczwnojp2jy6saq5a",
"region":"us-ashburn-1",
"tenancy_ocid":"ocid1.tenancy.oc1..aaaaaaaaxd6jemgcmdpb3pnctl7yf2hzswgi6g55gth7ioc2gbpbvqo5ecoa",
"topology":"MFT Cluster",
"wls_node_count":"2",
"use_kms_decryption":"false",
"add_load_balancer":"true",
"lb_shape":"100Mbps",
"lb_subnet_type":"Use Public Subnet",
"lb_subnet_1_id":"ocid1.subnet.oc1.iad.aaaaaaaashmjwyhall67kqwjqttggdipseaoiduhx43mxejsms7gzqmt2bha",
"use_advanced_wls_instance_config":"false",
"network_compartment_id":"ocid1.compartment.oc1..aaaaaaaalmnpc2nvr7s7jfxkuxp6finc5dif7fqnrkpbczwnojp2jy6saq5a",
"ocidb_compartment_id":"ocid1.compartment.oc1..aaaaaaaaxw2j2w5xdlvia3vwz7gdxh25qk6d5pkdjpspawl4x4m3mfahudsa",
"subnet_compartment_id":"ocid1.compartment.oc1..aaaaaaaashmjwyhall67kqwjqttggdipseaoiduhx43mxejsms7gzqmt2bha",
"lb_subnet_compartment_id":"ocid1.compartment.oc1..aaaaaaaashmjwyhall67kqwjqttggdipseaoiduhx43mxejsms7gzqmt2bha",
"existing_vcn_id":"ocid1.vcn.oc1.iad.aaaaaaaajnyi3pvohrm2qwglghkfwmmqf7g33oh6afl2eb3qaaywdkufln6q",
"db_strategy_existing_vcn":"Database System",
"ocidb_dbsystem_id":"ocid1.dbsystem.oc1.iad.abuwcljt5zstolrw473is2urvdkuihmi6x73fgjlu5vovflgahxcyb5j4biq",
"ocidb_dbhome_id":"ocid1.dbhome.oc1.iad.abuwcljtba7wilkxmdnwq7qk3gg377epqf6vjfgvhvqmhc4ya4if4tswdoqq",
"ocidb_database_id":"ocid1.database.oc1.iad.abuwcljt2ww2xxrtg6um62pqvca3fb7oskry6fj5xksoa4ukavmiwo3z5p7a",
"ocidb_pdb_service_name":"PDB1",
"oci_db_user":"SYS",
"oci_db_password":"W#lC0m#1#",
"service_name":"SOACLI1",
"instance_shape":"{\"instanceShape\"=\"VM.Standard.E4.Flex\",\"ocpus\"=2,\"memory\"=45}",
"ssh_public_key":"",
"wls_availability_domain_name":"bcaH:US-ASHBURN-AD-2",
"wls_admin_user":"weblogic",
"wls_admin_password":"welcome1",
"existing_vcn_id":"ocid1.vcn.oc1.iad.aaaaaaaashmjwyhall67kqwjqttggdipseaoiduhx43mxejsms7gzqmt2bha",
"wls_subnet_id":"ocid1.subnet.oc1.iad.aaaaaaaashmjwyhall67kqwjqttggdipseaoiduhx43mxejsms7gzqmt2bha",
"vcn_strategy":"Use Existing VCN",
"subnet_strategy_existing_vcn":"Use Existing Subnet",
"subnet_type":"Use Public Subnet"
}

Output

The output provides the OCID for the value of stack-id in Create a Plan Job and Create an Apply Job.

Create a Plan Job

Create a plan job in a named stack.

Syntax

See resource-manager job create-plan-job in the Oracle Cloud Infrastructure documentation.

Example

oci resource-manager job create-plan-job 
--stack-id "ocid1.ormstack.oc1.iad.aaaaaaaagvq5fw6nf76uozbdlxsonwwl4qgiwnacvgsrctvhlqiej2oihvoq"
--config-file D:\ociclinew\config1

where

  • stack-id is the job OCID shown in the output of resource-manager stack create

Output

The output provides the OCID for the value of execution-plan-job-id in Create an Apply Job.

Create an Apply Job

After the plan job completes successfully, create an apply job in a named stack and execution plan.

Syntax

See resource-manager job create-apply-job in the Oracle Cloud Infrastructure documentation.

Example

oci resource-manager job create-apply-job 
--stack-id "ocid1.ormstack.oc1.iad.aaaaaaaagvq5fw6nf76uozbdlxsonwwl4qgiwnacvgsrctvhlqiej2oihvoq"
--execution-plan-strategy FROM_PLAN_JOB_ID 
--execution-plan-job-id "ocid1.ormjob.oc1.iad.aaaaaaaadvjowgs7zfv23224z4x3cpfdtm3w74pdp5qmc26uiwf7rkwn57la"
--config-file D:\ociclinew\config1

where

  • stack-id is the job OCID shown in the output of resource-manager stack create
  • execution-plan-job-id is shown in the output of resource-manager job create-plan-job

When the apply job completes, check the job logs to verify that the Oracle SOA Suite on Marketplace instance was successfully created.

Stop or Start a Compute Instance

Stop, start, or restart a compute instance.

Syntax

See compute instance action in the Oracle Cloud Infrastructure documentation.

Note:

This command stops or starts both WebLogic Servers and compute instances.

Example to stop an instance

oci compute instance action 
--config-file D:\ociclinew\config1 
--action SOFTSTOP 
--instance-id ocid1.instance.oc1.phx.anyhqljtty92jdjsmduytjowrsaa25oetrdqrbaw3wsv5klrj6r7rdsq6afq

where

  • instance-id is the OCID of the compute instance you want to stop.

Oracle recommends using SOFTSTOP or SOFTRESET instead of STOP or RESET actions.