Oracle by Example brandingGet Started with Oracle WebLogic Server for Oracle Cloud Infrastructure

section 0Before You Begin

This 30-minute tutorial shows you how to provision an Oracle WebLogic Server cluster in Oracle Cloud Infrastructure using Marketplace and Resource Manager.

Background

You can use Oracle WebLogic Server for Oracle Cloud Infrastructure applications in the Oracle Cloud Infrastructure Marketplace to provision a cluster of WebLogic Server nodes. The first node hosts the administration server for the domain along with the first managed server. This service can also provision a load balancer to distribute application traffic across the servers in your cluster. Marketplace uses Oracle Resource Manager to provision the network, compute instances, and load balancer as single unit called a stack.

Oracle Cloud Infrastructure Marketplace offers separate services for:

  • Oracle WebLogic Server Standard Edition
  • Oracle WebLogic Server Enterprise Edition - includes clustering
  • Oracle WebLogic Suite - includes Oracle Coherence for increased performance and scalability, and Active Gridlink for RAC for advanced database connectivity

This tutorial uses Oracle WebLogic Server for Oracle Cloud Infrastructure to create a virtual cloud network (VCN) and subnets in Oracle Cloud Infrastructure to support WebLogic Server and the load balancer. But you can also use an existing VCN and existing subnets if desired. By default the WebLogic Server subnet is public and accessible from external clients, but Oracle WebLogic Server for Oracle Cloud Infrastructure can also provision WebLogic Server in a private subnet.

This tutorial creates a basic WebLogic Server domain configuration, which does not require a database. Oracle WebLogic Server for Oracle Cloud Infrastructure can also be used to create a JRF-enabled domain, if you want to build applications with Oracle Application Development Framework (ADF). An existing Oracle Autonomous Transaction Processing database or Oracle Cloud Infrastructure DB System is required in order to provision a JRF-enabled domain. Refer to this tutorial.

Provisioning a domain in Oracle WebLogic Server for Oracle Cloud Infrastructure requires one or more secrets in Oracle Cloud Infrastructure Vault. Secrets store one or more passwords you would require when creating a WebLogic Server cluster. This tutorial uses a standard vault, which is hosted on a hardware security module (HSM) partition with multiple tenants, and uses a more cost-efficient, key-based metric for billing purposes. A virtual private vault provides greater isolation and performance by allocating a dedicated partition on an HSM. Each type of vault has a separate service limit in your Oracle Cloud Infrastructure tenancy. The limit for secrets spans all vaults. See Service Limits and Oracle Cloud Infrastructure Vault FAQ.

What Do You Need?

  • Your Oracle Cloud Infrastructure user name and password. You must belong to at least one group.

    You must be an Oracle Cloud Infrastructure administrator. If you are not an administrator, you must be able to create dynamic groups and policies, use secrets, and view tenancies in your tenancy.

    Controlled access to these tenancy resources are defined in a root-level policy that is typically created by the Oracle Cloud Infrastructure administrator. For a sample root-level policy, download the text file.

  • An Oracle Cloud Infrastructure compartment.

    This tutorial uses a single compartment, which contains the compute instances, load balancer, and network resources that will be created for the domain.

    See Managing Compartments.

  • A dynamic group that lists the OCID of the compartment in which users who are not administrators can create domains. The Oracle Cloud Infrastructure administrator creates this dynamic group. For a sample dynamic group, download the text file and replace the value with your compartment OCID. For dynamic group policies, see this text file.

    See Managing Dynamic Groups.

  • A compartment-level Oracle Cloud Infrastructure policy that enables you to work with resources and create resources in the compartment you intend to use.

    If you are not an administrator:

    • You must be able to access Marketplace applications and Resource Manager to create stacks and jobs, compute instances, networks (optional), and load balancers (optional) in the compartment.
    • You must also be able to create vaults, keys, and secrets in the compartment.

    See Common Policies. For a sample compartment-level policy, download the text file.

  • An SSH public key and corresponding private key.

section 1Create a Vault and a Key

  1. Sign in to the Oracle Cloud Infrastructure console.
  2. Click the navigation menu Menu icon, under Governance and Administration, select Security, and then click Vault.
  3. Select your Compartment, if not already selected.
  4. Click Create Vault.
  5. For Name, enter WebLogicOCIVault.
  6. Click Create.

    Wait for the vault to be created.

  7. Click the new vault.
  8. Click Master Encryption Keys, and then click Create Key.
  9. For Name, enter WebLogicOCIKey.
  10. Click Create Key.

    Wait for the key to be created and enabled before you create a secret.


section 2Create a Secret for Your WebLogic Password

  1. In the vault, click Secrets, and then click Create Secret.
  2. For Name, enter WebLogicAdminSecret.
  3. Select the key WebLogicOCIKey that you created.
  4. For Secret Contents, enter the password you want to use for the WebLogic Server administrator.

    The password must start with a letter, is between 8 and 30 characters long, contain at least one number, and, optionally, any number of the special characters ($ # _).

  5. Click Create Secret.

    Wait for the secret to be created.

  6. Click the secret name.
  7. Copy the OCID for the secret.

section 3Create the Stack

  1. Click the navigation menu Menu icon. Under the Solutions and Platform group, go to Marketplace and click Applications.
  2. Click one of the following Oracle WebLogic applications:
    • 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 choose Standard Edition, the two managed servers in the domain will not be part of a cluster.

  3. Select a 12c Version of WebLogic Server to run on your domain.
  4. Select the Compartment in which to create the stack.
  5. Select the Oracle Standard Terms and Restrictions check box, and then click Launch Stack.

    The Create Stack page displays.

  6. For Name, enter MyWLStack.
  7. Click Next.

    The Configure Variables page displays.

  8. For Resource Name Prefix, enter MyWLS.
  9. For WebLogic Server Shape, select the shape of the compute instances.

    See Compute Shapes.

  10. For VM.Standard.E3.Flex shape, select the OCPU count for compute instances.
  11. For SSH Public Key, upload the SSH public key file or paste the contents of your SSH public key file.

    After creating the stack, you can connect to the WebLogic Server compute instances by using an SSH client and the corresponding private key.

  12. For WebLogic Server Node Count, select 2.
  13. For WebLogic Server Admin User Name, enter the administrator user name for the new WebLogic Server domain.
  14. For Secrets OCID for WebLogic Server Admin Password, enter the OCID of the secret you created to contain the password for the WebLogic Server administrator.
  15. For Virtual Cloud Network Strategy, select Create New VCN.

    Oracle WebLogic Server for Oracle Cloud Infrastructure can create a new network and subnets to support this stack.

    This tutorial uses the same compartment for Network Compartment.

  16. For WebLogic Server Network, enter MyWLStackNetwork.
  17. For Subnet Strategy, select Create New Subnet.

    Keep the default value of Use Public Subnet for the subnet type, and Regional Subnet for the subnet span.

  18. Click Provision Load Balancer.
  19. Ensure the OCI Policies check box is selected.
  20. Click Next to verify your configuration variables.
  21. Click Create.

    The Job Details page in Oracle Resource Manager is displayed.

    An Apply job is started to provision your stack. To return to this page at a later time, click the navigation menu Menu icon, select Resource Manager, and then click Jobs.

  22. Periodically monitor the progress of the Apply job until it is finished.

    If an email address is associated with your user profile, you will receive an email notification.

  23. If the job is in the Failed state, click the job name to view the logs.

section 4Test WebLogic Server

  1. From the Job Details page, click Associated Resources.
  2. Click MyWLS-wls-0.
  3. Identify the Public IP Address for this compute instance.
  4. Browse to the following URL:

    https://wls_public_ip:7002/console

    The WebLogic Server Administration Console is displayed.

  5. Enter the administrator credentials for the domain.
  6. From the Domain Structure panel on the left, click Deployments.
  7. Locate the sample-app application.
  8. Return to the Oracle Cloud Infrastructure console.
  9. Click the navigation menu Menu icon, select Networking, and then click Load Balancers.
  10. Click MyWLS-lb.
  11. Identify the IP Address for this load balancer.
  12. Browse to the following URL:

    https://lb_public_ip/sample-app

    The sample application is displayed.

  13. Return to the load balancer in the Oracle Cloud Infrastructure console.
  14. Click the Virtual Cloud Network link, MyWLS-MyWLStackNetwork.
  15. Identify the subnets that were created for your stack.

section 5Delete the Stack (Optional)

  1. Click the navigation menu Menu icon, select Resource Manager, and then click Stacks.
  2. Click MyWLStack.
  3. Click Terraform Actions, and then select Destroy.
  4. When prompted for confirmation, click Destroy.
  5. Periodically monitor the progress of the Destroy job until it is finished.

    If an email address is associated with your user profile, you will receive an email notification.

  6. Click Delete Stack.

more informationWant to Learn More?