You can change the number of nodes (compute instances) in your Oracle WebLogic Server for OCI stack to increase performance or to reduce costs. Add nodes to scale out, or remove nodes to scale in.
Note:You cannot use this procedure to scale a domain that was created before June 29, 2020.
To scale the domain, edit the node count variable for the stack and then run an Apply job.
Oracle WebLogic Server for OCI performs these tasks for a scaling operation:
- Add or remove compute instances
- Add or remove managed servers in the domain configuration (optional)
- Scale up or scale down the new compute instances (optional)
- Add managed servers to the existing cluster in the domain configuration, if the domain is not running Oracle WebLogic Server Standard Edition (optional)
- Update the backend set of the load balancer, if your stack includes a load balancer (optional)
If you customized your domain configuration after creating it (changing port numbers, changing server names, and so on), there is no guarantee that the domain modification part of the scaling job will succeed. You can disable this feature and perform these tasks manually after the scaling job completes.
- Sign in to the Oracle Cloud Infrastructure Console.
- Click the navigation menu , select Developer Services. Under the Resource Manager group, click Stacks.
- Select the Compartment that contains your stack.
- Click the name of your stack.
- Click Variables.
- Click Edit Variables.
- Edit WebLogic Server Node Count, and then change the shape of the new compute instances or use the default shape.For the compute instance shape:
If the default shape is a flexible shape and you choose to use this default shape, you can edit the OCPU count for the additional instances.
If you do not increase the node count and edit the OCPU count for any of the flexible shapes, the OCPU count remains unchanged.
If you select the standard shape for the new compute instance, you cannot specify the OCPU count for the instance.
If you increase the node count and modify the SSH Public Key, the key will be used for new compute instances only. The keys for existing compute instances remain unchanged.
- Optional: If you have updated the WebLogic Server administrator password, then enter the OCID of the secret that contains the password for the WebLogic Server administrator. See Create Secrets for Passwords.
- Optional: If you want Oracle WebLogic Server for OCI to create compute instances but not update your domain configuration, select Do Not Update Domain Configuration For Scale Out.
- Click Next.
- Click Save Changes.
- Click Terraform Actions, and then click Apply.
- Enter a name for the job, and then click Apply.
- Periodically monitor the progress of the Apply job until it is finished.
- Click Outputs.
WebLogic_Instances, and verify the number of compute instances in the updated stack.
If you selected Do Not Update Domain Configuration For Scale Out, then you must manually update your domain configuration and add the managed servers. Use the WebLogic Server Administration Console or the WebLogic Server Scripting Tool (WLST).
If your domain is in a private subnet, the bastion compute instance is deleted and recreated. As a result, the bastion might have a different IP address. See Access the WebLogic Console in a Private Subnet.
If you scale out a domain created after June 24th, 2021, any OPatches you added after provisioning are automatically applied to the new virtual machines.
For domains that were created before June 25th, 2021 or the domains on which the scaling operation did not successfully add a new WebLogic managed server, perform the binary synchronization step manually on the new added virtual machines using the following commands:
adminHost=$(python3 /opt/scripts/databag.py wls_admin_host) # Step 1: rsync middleware rsync -e "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR" -a --delete --timeout 60 / --exclude=user_projects --exclude=logs oracle@$adminHost:/u01/app/oracle/middleware/ /u01/app/oracle/middleware # Step 2: rsync jdk rsync -e "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR" -a --delete --timeout 60 / --exclude=user_projects --exclude=logs oracle@$adminHost:/u01/app/oracle/jdk/ /u01/app/oracle/jdk