WebLogic Cloud Steps
This library groups steps that can be used for content reference (conref). Each element that you want to conref to should be in a separate note <element>.
- Sign in to the Oracle Cloud Infrastructure Console.
- Click the navigation menu
, select Marketplace, and then click All Applications.
- Set the filter type to Stack.
- Select an application that matches the edition of Oracle WebLogic Server that you want
to provision, and also uses the type of billing you want (Universal Credits or Bring Your
Own License).
- Oracle WebLogic Server Standard Edition BYOL
- Oracle WebLogic Server Enterprise Edition BYOL
- Oracle WebLogic Server Enterprise Edition UCM
- Oracle WebLogic Suite BYOL
- Oracle WebLogic Suite UCM
Note:
If you set the filter type to Image, follow the steps in Create an Instance Using the Marketplace in Images for Oracle WebLogic Server for OCI. - Select an Oracle WebLogic Server version.
- WLS 12.2.1.3.<patch_number> (Oracle WebLogic Server 12c)
- WLS 10.3.6.0.<patch_number>(11.1.1.7) (Oracle WebLogic Server 11g)
- Select the compartment in which to create the stack.By default the stack compartment is used to contain the domain compute instances and network resources. If later on you specify a network compartment on the Configure Variables page of the Create Stack wizard, then only the compute instances are created in the stack compartment that you select here.
- Select the Oracle Standard Terms and Restrictions check box, and
then click Launch Stack.The Create Stack wizard is displayed.
- On the Stack Information page of the Create Stack wizard, enter a name for your stack.
- Enter a description for the stack (optional).
- Specify one or more tags for your stack (optional).
- Click Next.The Configure Variables page opens.
- On the Configure Variables page of the Create Stack wizard, enter the region where you want to create your domain.
- In the WebLogic Server Instance section, enter the resource name prefix.The maximum character length is 16.This prefix is used by all the created resources.
- Select the WebLogic Server shape for the compute instances.
Note:
In regional subnets, select the WebLogic Server shape that has sufficient service limits for an availability domain, else the provisioning fails.
- For the
flexible shapes, select the OCPU count for compute instances.
Note:
You can specify the OCPU count only for the flexible shapes. The memory, network bandwidth, and number of Virtual Network Interface Cards (VNICs) scale proportionately with the number of OCPUs.
- Enter the SSH public key, by either uploading the SSH key file or pasting the contents of your SSH public key file.
- Select the number of managed servers you want to create. For 12c and 14c versions and
all the editions, you can specify up to
8
nodes, which can be scaled out to 30 when you edit the domain.The managed servers will be members of a cluster, unless you selected WebLogic Server Standard Edition. - Enter a user name for the WebLogic Server administrator.
- Select the compartment where you have the WebLogic Server administration secret and then select the secret that contains the administration password. To create secrets, see Create Secrets for Passwords.
- Select
the JDK version for Oracle WebLogic Server.
Note:
Supported JDK versions and defaults vary by release.- 12.2.1.4 - only supports JDK8 (no option to select JDK)
- 14.1.1.0 - JDK8 or JDK11 (default is JDK8)
- 14.1.2.0 - JDK17 or JDK21 (default is JDK17)
- Select WLS Instance Advanced Configuration if you want to
change the default port numbers, or remove the
sample application.Cluster-related parameters are not applicable if you selected WebLogic Server Standard Edition.
- Select the Network Compartment in which to create the network
resources for this domain.If you don't specify a network compartment, then all the network resources and the domain compute instances are created in the stack compartment that you selected earlier upon launching the stack. Select a network compartment if you want the network resources to be in a different compartment than the compute instances.
- Enter a name and CIDR for the new VCN.
- Select the name of the existing VCN.
- Specify the subnet configuration as follows:
- For existing VCN and new subnets:
- Select Create New Subnet.
- For existing VCN and existing subnet:
- Do not select the Create New Subnet option.
- Enter YES to acknowledge if you validated the existing network. To validate a network, see Validate Existing Network Setup.
- Select the Subnet Compartment to use for the
existing subnet.
The subnet compartment is different than the VCN compartment. The subnets for the WebLogic Server nodes, load balancer and the bastion node use this same subnet compartment.
Note:
You can specify the subnet compartment only if you're using an existing subnet.
- Select Use Public Subnet.
- Select the regional subnet or availability domain-specific subnet.
- Select Existing Network Security Groups to
use existing Network Security Groups (NSGs) for the subnets.
You can use existing network security groups for administration server node, managed server node, bastion instance, load balancer, and file system.
- For existing VCN and new subnets:
- Select a Virtual Cloud Network (VCN) strategy:
- Select Use Existing VCN, and then select the name of the existing VCN.
- Select Create New VCN, and then enter a name and CIDR for the new VCN.
- Select one of the following subnet strategies:
- Select Use Existing Subnet.
- Select Create New Subnet.
Note:
If you're creating a new VCN, you can only create a new regional subnet.
- Select the Subnet Compartment to use for the existing
subnet.
The subnet compartment is different than the VCN compartment. The subnets for the WebLogic Server nodes, load balancer and the bastion node use this same subnet compartment.
Note:
You can specify the subnet compartment only if you're using an existing subnet.
- Keep the default Use Public Subnet selection.
- For the WebLogic Server subnet, specify one of the following:
- If you want to use an existing regional subnet, then choose the name of an existing regional subnet from the list of regional and availability domain-specific subnets.
- If you are creating a new regional subnet, specify a CIDR for the new
subnet.
Note:
This is applicable only if you are creating a new VCN or using an existing VCN with new subnets.
- Optional: If you are using a regional subnet, then from the WebLogic Administration Sever Availability Domain, select the availability domain in which you want to create the WebLogic administration server compute instance. If you do not select an availability domain, then by default, the compute instance is created in availability domain 1.
- If your want to use a bastion compute instance with a reserved public IP, then select Assign Reserved Public IP to Bastion Instance.
- Select Add Load Balancer, if not already selected.This option is selected by default.
- Configure the load balancer network.
- If you chose to use an
existing regional subnet for WebLogic Server, then select an existing regional subnet
from the list of regional and availability domain-specific subnets. A load balancer can
have only one regional subnet, which is shared between both nodes.
Note:
This option is not applicable if you use an existing load balancer. - If you chose to create a regional subnet for WebLogic Server, then specify a CIDR for the new load balancer subnet.
- If you chose to use an
existing regional subnet for WebLogic Server, then select an existing regional subnet
from the list of regional and availability domain-specific subnets. A load balancer can
have only one regional subnet, which is shared between both nodes.
- Configure the load balancer:
- If you chose to create a new Virtual Cloud Network (VCN) or use an
existing VCN and a new subnet:
- Select Create New Load Balancer.
- If you chose to use an existing VCN and an existing subnet, you can
do one of the following:
- Select Create Load Balancer.
- Select Use Existing Load Balancer.
Note:
The existing load balancer should be in the same compartment as the stack compartment, and should be in the same VCN as the existing VCN chosen for the stack.- Specify the OCID for the existing load balancer.
- Enter the name of the backend set for the existing load balancer that has a routing policy associated with the backend set. The backend set should not have any backends.
- If you create a new load balancer, select Load Balancer with Reserved Public IP, if you want to use a public load balancer with a reserved public IP. Then, specify the OCID of the public IP for the load balancer
- If you create a new load balancer, select a minimum and maximum
flexible load balancer shape.
By default, the minimum bandwidth size is set to 10Mbps and maximum to 400Mbps.
Note:
You can update the shape to a maximum of 8000Mbps. Before you select the maximum bandwidth, ensure to check the available service limit for the flexible load balancer bandwidth.
- If you chose to create a new Virtual Cloud Network (VCN) or use an
existing VCN and a new subnet:
- Configure load balancer:
- If you chose to create a new Virtual Cloud Network (VCN), or use an
existing VCN and a new subnet:
- Select Create New Load Balancer.
- If you chose to use an existing VCN and an existing subnet, you can
do one of the following:
- Select Create Load Balancer.
- Select Use Existing Load Balancer.
Note:
The existing load balancer should be in the same compartment as the stack compartment, and should be in the same VCN as the existing VCN chosen for the stack.- Specify the OCID for the existing load balancer.
- Enter the name of the backend set for the existing load balancer that has a routing policy associated with the backend set. The backend set should not have backends.
- If you create a new load balancer, select Private Load
Balancer, if you do not want to assign a public IP address to the load
balancer.
This option is available only if you use a private subnet for WebLogic Server. You cannot create a load balancer in a private subnet.
- If you create a new load balancer, select Load Balancer with Reserved Public IP, if you want to use a public load balancer with a reserved public IP. Then, specify the OCID of the public IP for the load balancer.
- If you create a new load balancer, select a minimum and maximum
flexible load balancer shape.
By default, the minimum bandwidth size is set to 10Mbps and maximum to 400Mbps.
Note:
You can update the shape to a maximum of 8000Mbps. Before you select the maximum bandwidth, ensure to check the available service limit for the flexible load balancer bandwidth.
- If you chose to create a new Virtual Cloud Network (VCN), or use an
existing VCN and a new subnet:
- If you create a
new load balancer, select a minimum and maximum flexible load balancer shape.
By default, the minimum bandwidth size is set to 10Mbps and maximum to 400Mbps.
Note:
You can update the shape to a maximum of 8000Mbps. Before you select the maximum bandwidth, ensure to check the available service limit for the flexible load balancer bandwidth. - Select Load balancer with reserved public IP, if you want to use a public load balancer with a reserved public IP. Then, specify the OCID of the public IP for the load balancer.
- Select Prepare Load Balancer for HTTPS if you want the load balancer to listen on the HTTPS port. You must add your SSL certificate to the load balancer after creating the domain.
- Select Enable Authentication Using Identity Cloud Service.
- Enter your Oracle Identity Cloud
Service (IDCS) tenant name, which is also referred to as the instance ID.This ID is typically found in the URL that you use to access Oracle Identity Cloud Service, and has the format
idcs-<GUID>
. - Enter the client ID of an existing confidential application in this Oracle Identity Cloud Service instance.
- Select the compartment where you have the IDCS secret and then select the secret that contains the client secret of the existing confidential application. To create secrets, see Create Secrets for Passwords.
- If necessary, you can override the default domain name and port that you use to access Oracle Identity Cloud Service, or the default port that is used for the App Gateway software appliance.
- In the Database section of the Configure Variables page, for Database Strategy, select No Database if you are creating a basic domain.
- In the Key Management Service Key ID field of the Key Management Service Configuration section of the Configure Variables page, enter the OCID of your encryption key.
- In the Key Management Service Cryptographic Endpoint field, enter the endpoint URL for the vault that contains your encryption key.
- Select Create Tags.
- To assign a free-form tag, enter the Tag Key and
Value.Free-form tag keys and values are case sensitive. For example,
costcenter
andCostCenter
are treated as different tags. - To assign an existing tag, for Tag Namespace, select a defined tag, and then select the Tag Key and Value. If no value is displayed for the Tag Key, enter the Value.
- Click Additional Tag to assign additional free-form or defined tags.
- At the bottom of the Configure Variables page, click Next.
- On the Review page of the Create Stack wizard, review the information you have provided, and then click Create to create your domain stack.
- On the Stacks Details page, click Terraform Actions, then click Plan. When prompted for confirmation, click Plan.
- Wait for the state of the plan job to change to
Succeeded
. - Click Terraform Actions, then click
Apply. When prompted for confirmation, click
Apply.When the state of the apply job changes to
Succeeded
, your domain instance and related resources are created. -
- Clone both the middleware and data block volumes of the Original
instance. See Cloning a Volume.
Note:
Follow the next steps, to first attach the middleware volume and then attach the data block volume to the Cloning instance. This sequence ensures that themountVolume.sh
script works as desired, which you will be running later in this procedure. - Attach Block Volume steps
- In the instance page, under Resources, click Attached Block Volume > Attach Block Volume.
- In the Attach Block Volume page, select the compartment where you cloned the block volume earlier.
- Click the drop-down and select the block volume you clone earlier.
- Select the Attachment Type as ISCSI.
- Click Attach.
An
Attach Block Volume
message appears. - Click Close.
- Run the following script:
/opt/scripts/cloning/mountVolume.sh -m <cloned-middleware-volume-name> -d <cloned-data-volume-name>
This script runs the iSCSI commands to attach both the middleware and data volumes. Also, the script updates the UUID entries of both the volumes in
/etc/fstab
, which ensures that the mount is persistent across reboot. - Update the metadata on each node by using
update_metadata.py
script, which is located at/opt/scripts/utils/
:We need to update the metadata for reboot to work correctly. This also starts the node manager and administration server automatically after every restart. There are 5 domain related values in metadata that need to be updated for reboot to work.
python3 /tmp/update_metadata.py -k wls_domain_name -v <resource_prefix>_domain python3 /tmp/update_metadata.py -k wls_machine_name -v <resource_prefix>_machine_ python3 /tmp/update_metadata.py -k wls_cluster_name -v <resource_prefix>_cluster python3 /tmp/update_metadata.py -k wls_admin_server_name -v <resource_prefix>_adminserver python3 /tmp/update_metadata.py -k wls_ms_server_name -v <resource_prefix>_server_
The script updates one value at time. Also, for every command, it creates the backup of previous setup under/opt/scripts/utils/metadata_backup_<timestamp>.txt
.Note:
After the restart works as desired, you can delete these backed up files. - Run the following
update_hostname.sh
script, which is located at/opt/scripts/cloning
:./update_hostname.sh <FQDN-of-source-instance>
For example:
./update_hostname.sh source12c-wls-0.subnet1fd5ed7.idcsvcn.oraclevcn.com
This updates the hostname to the cloned hostname in thenodemanager.properties
andconfig.xml
files. It also updates thestartup.properties
file to reflect the correct admin url. - Reboot the instance.
This will automatically first start the node manager and then start the administration server.
- Edit the following files to change the host name to the cloned host name:
/u01/data/cloudgate_config/origin_conf/weblogic.conf
/u01/data/cloudgate_config/cloudgate.config
- Restart the container.
sudo systemctl status appgateway.service sudo systemctl start appgateway.service sudo podman ps -a sudo systemctl status appgateway.service sudo /opt/scripts/idcs/run_cloudgate.sh
- Verify if
nginx
is redirecting traffic to WebLogic server through port9999
:ip=$(hostname -i) cloudgate_url=${ip}:9999 curl -v ${cloudgate_url} curl -s -o /dev/null -w ā%{http_code}\nā ${cloudgate_url}
- Create the Backends of the load balanacer that the clone instance uses.
- From the navigation menu, click Networking, and then click Load Balancers.
- Click the name of the Compartment that contains the load balancer you want to modify, and then click the load balancer's name.
- In the Resources menu, click Backend Sets, and then click the name of the backend set you want to modify.
- In the Resources menu, click Backends.
- Click Backends.
- Select IP Addresses.
- In the IP Address field, enter the IP address of the VMs of the cloned instance
- In the Port field, enter
9999
. - Click Add > Close.
- After every reboot, manually start the
appgateway
:sudo systemctl start appgateway sudo podman ps -a ip=$(hostname -i) cloudgate_url=${ip}:9999 curl -v ${cloudgate_url} curl -v ${cloudgate_url}/sample-app
-
- Select Enable Access to Administration Console.
- Specify the CIDR to create a security list to allow access to the WebLogic administration console port to the source CIDR range.
-
- Click the navigation menu
, select Developer Services. Under the Resource Manager group, click Stacks.
- Click the navigation menu
, select Compute. Under the Compute group, click Instances.
- Keep the default Use Public Subnet selection.
- If you selected to use an existing subnet, then for subnet type, select Use Public Subnet or Use Private Subnet. Compute instances in a private subnet are not directly accessible from outside of Oracle Cloud.
- Select Add File System Storage.
- Configure the file storage:
- If you chose to create a Virtual Cloud Network (VCN):
- Optional: Select the availability domain in which you want to create the file system and mount target.
- Specify the CIDR of the new subnet.
- If you chose to use an existing VCN and a new subnet:
- Optional: Select the availability domain where you want to create the file system and mount target.
- Specify the CIDR of the new subnet.
- If you chose to use an existing VCN and an existing subnet:
- If you do not want to use an existing mount target or an
existing file system:
- Optional: Select the availability domain where you want to create the file system and mount target.
- Select an existing subnet to use for the mount target. This subnet must be available in the selected VCN.
- If you select Existing Mount Target:
- Select the compartment where you have the existing mount target. The mount target must reside within the subnet in the selected VCN.
- Specify the OCID of the existing mount target ID.
- If you select Existing File System:
- Select an existing subnet to use for the mount target. This subnet must be available in the selected VCN.
- Select the compartment where you have the existing file system.
- Specify the OCID of the existing file system.
- If you select both Existing Mount Target and
Existing File System:
- Select the compartment where you have the existing mount target.
- Specify the OCID of the existing mount target ID.
- Select the compartment where you have the existing file system.
- Specify the OCID of the existing file system. The existing file system must be in the same availability domain as the existing mount target.
- If you do not want to use an existing mount target or an
existing file system:
- If you chose to create a Virtual Cloud Network (VCN):
- Select Configure Observability.
- Select Enable exporting logs to OCI Logging Service to integrate logging for the WebLogic instances.
- If you use an existing VCN and subnet, validate the network and then enter YES in the Validated Existing Network field. To validate a network, see Validate Existing Network Setup.
- Select Provision with JRF to configure the domain with JRF
components.See Configure Database Parameters.
If you are unsure of selecting this option, see JRF Domain.
- Keep the default selection for Deploy Sample Application, if you
want to install a sample web application to the WebLogic cluster, or Identity Cloud
Service (IDCS) protected sample application, if you enabled IDCS.This option is not displayed if you selected WebLogic Server Standard Edition.
- Specify the WebLogic startup arguments.You can use the server startup arguments to provide arguments to the Java Virtual Machine for WebLogic Server instances. When the servers are scaled out, any changes to the server startup arguments applies to the added nodes only.
For example, to configure memory settings, you can specify the arguments: -Xms1024m -Xmx1024m
- Select Configure Ports to change the default port numbers.You can change the default ports for the WebLogic Server Node Manager, WebLogic Server Administration Console, WebLogic Server Administration Console SSL, WebLogic Cluster, WebLogic Managed Server External, and WebLogic Managed Server External SSL.
- Select the compartment where you have the Application Performance Monitoring domain of your WebLogic instance.
- Select the Application Performance Monitoring domain of your WebLogic instance.
- By default, the key automatically generated for your domain
auto_generated_private_datakey
is displayed. But, you can specify any additional private key that you generated for your APM domain.See Create an APM Domain in the Oracle Cloud Infrastructure documentation. - Connect to the compute instance or the bastion instance as the
opc
user.ssh -i path_to_private_key opc@node_public_ip
Or,
ssh -i path_to_private_key -o ProxyCommand="ssh -W %h:%p -i path_to_private_key opc@bastion_public_ip" opc@node_private_ip
For Autoscaling section
- Select a performance metric for the WebLogic Monitoring Metrics.
- Specify the threshold values as follows:
- For CPU Load and Used Heap Percent, select the minimum and maximum threshold percentage.
- For Queue Length and Stuck threads, select the minimum and maximum threshold counter values.
- Enter a user name to access the image in the registry to deploy autoscaling OCI
functions.
The registry user name format is
tenancy_namespace/<username>
. If your tenancy is federated with Oracle Identity Cloud Service, then the registry user name format istenancy_namespace/oracleidentitycloudservice/<username>
.You can choose either to include thetenancy_namespace
or remove thetenancy_namespace
in the user name format. For example, you can either usetenancy_namespace/<username>
or<username>.
Note:
If you choose to includetenancy_namespace
in the user format, ensure that you use the correct namespace for your tenancy. - Select the compartment where you have OCI secret that contains the registry authentication token, and then select the secret that contains the registry authentication token that you generated for the user to access the image registry.
- Optional: Enter the email ID to receive scaling notifications.It is recommended to subscribe to email notifications.