Oracle by Example brandingGet Started with Oracle WebLogic Cloud

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 the Oracle WebLogic Cloud 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 Enterprise Edition
  • 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 Cloud 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 Cloud can also provision WebLogic Server in a private subnet.

This tutorial creates a standard WebLogic Server domain configuration, which does not require a database. Oracle WebLogic Cloud 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 Cloud Infrastructure DB System or Oracle Autonomous Transaction Processing database is required in order to provision a JRF-enabled domain.

Note: Oracle WebLogic Cloud requires Oracle Cloud Infrastructure Key Management in order to encrypt and decrypt passwords. Key Management offers virtual vaults and virtual private vaults. A virtual private vault provides greater isolation and performance by allocating a dedicated partition on a hardware security module (HSM). A virtual vault is hosted on a partition with multiple tenants, and uses a more cost-efficient, key-based metric for billing purposes. Oracle is offering customers the opportunity to try out virtual vaults in our limited availability release. When requesting a service limit increase, you can also indicate that you want to try virtual vaults. See Service Limits and Oracle Cloud Infrastructure Key Management FAQ.

What Do You Need?

  • Your Oracle Cloud Infrastructure user name and password.
  • An Oracle Cloud Infrastructure compartment. See Managing Compartments.
  • An Oracle Cloud Infrastructure policy that enables you to work with or create these resources in the selected compartment:
    • Marketplace applications
    • Resource Manager stacks and jobs
    • Key Management vaults and keys
    • Compute instances, networks, and load balancers

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

  • An SSH public key and corresponding private key.
  • The Oracle Cloud Infrastructure command line interface (CLI). See CLI Quickstart.

section 1Create a Dynamic Group

  1. Sign in to the Oracle Cloud Infrastructure console.
  2. Click the navigation menu Menu icon, select Identity, and then click Compartments.
  3. Copy the OCID for the compartment that you plan to use.
  4. Click Dynamic Groups.
  5. Click Create Dynamic Group.
  6. For Name, enter AllInstances.
  7. For Description, enter this text:

    Required for WebLogic Cloud provisioning

  8. For Rule 1, enter this text:

    ALL {instance.compartment.id = 'Compartment_OCID'}

    All compute instances in this compartment are members of this group.

  9. Click Create Dynamic Group.

section 2Create a Temporary Policy for the Group

During provisioning, the compute instances created by WebLogic Cloud require access to the Key Management service.

  1. Click Policies.
  2. Select your Compartment, if not already selected.
  3. Click Create Policy.
  4. For Name, enter WebLogicCloudPolicy.
  5. For Description, enter this text:

    Required for WebLogic Cloud provisioning

  6. For Statement, enter this text:

    Allow dynamic-group AllInstances to use keys in compartment Compartment_Name

  7. Click Create.

section 3Create a Vault and a Key

  1. Click the navigation menu Menu icon, select Security, and then click Key Management.
  2. Select your Compartment, if not already selected.
  3. Click Create Vault.
  4. For Name, enter WebLogicCloudVault.
  5. For Vault Type, select VIRTUAL.

    Note: Oracle is offering customers the opportunity to try out virtual vaults in our limited availability release. When requesting a service limit increase, you can also indicate that you want to try virtual vaults. See Service Limits and Oracle Cloud Infrastructure Key Management FAQ.

  6. Click Create.
  7. Click the new vault.
  8. Copy the Cryptographic Endpoint.
  9. Click Keys, and then click Create Key.
  10. For Name, enter WebLogicCloudKey.
  11. Click Create Key.
  12. Click the new key.
  13. Copy the OCID for the key.

    Note: Oracle WebLogic Cloud uses the same key to decrypt all passwords for a single domain.


section 4Encrypt Your WebLogic Password

  1. Convert the administrator password that you want to use for the WebLogic Server domain to a base64 encoding.

    For example, from a Linux terminal, use this command:

    echo -n 'WebLogic_Password' | base64

  2. Run the encrypt command using the Oracle Cloud Infrastructure CLI (oci). Provide the following parameters:
    • The key's OCID
    • The vault's cryptographic endpoint
    • The base64-encoded password

    oci kms crypto encrypt --key-id Key_OCID --endpoint Crypto_Endpoint --plaintext Base64_WebLogic_Password

  3. From the output, copy the encrypted password text.

    "ciphertext": "Encrypted_Password"


section 5Create the Stack

  1. Return to the Oracle Cloud Infrastructure console.
  2. Click the navigation menu Menu icon, and then click Marketplace.
  3. Click one of the following applications:
    • WebLogic Cloud Enterprise Edition
    • WebLogic Cloud Suite
  4. Click Launch Stack.
  5. Select the Compartment in which to create the stack.
  6. Select the Terms of Use check box, and then click Launch Stack.

    The Stack Information page displays.

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

    The Configure Variables page displays.

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

    See Compute Shapes.

  11. For SSH Public Key, 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 Availability Domain, select the availability domain in which to create the compute instances.
  13. For WebLogic Server Node Count, select 2.
  14. For WebLogic Server Admin User Name, enter the administrator user name for the new WebLogic Server domain.
  15. For WebLogic Server Admin Password, enter the encrypted (not plain text) password.
  16. For Virtual Cloud Network Strategy, select Create New VCN.

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

    Select the same compartment for Network Compartment.

  17. For WebLogic Server Network, enter MyWLStackNetwork.
  18. For Subnet Strategy, select Create New Subnet.
  19. Click Provision Load Balancer.
  20. For Key Management Service Key ID, enter the OCID of the key that you used to encrypt the WebLogic Server administrator password.
  21. For Key Management Service Endpoint, enter the cryptographic endpoint of the vault that contains your key.
  22. Click Next.
  23. 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.

  24. 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.

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

section 6Test WebLogic Server

  1. From the Job Details page, click Associated Resources.
  2. Click Prefix-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 Prefix-lb.
  11. Identify the IP Address for this load balancer.
  12. Browse to the following URL:

    http://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, Prefix-MyWLStackNetwork.
  15. Identify the subnets that were created for your stack.

section 7Delete the Policy (Optional)

Note: If you delete the policy, you must recreate it before you create any WebLogic Cloud stacks.

  1. Click the navigation menu Menu icon, select Identity, and then click Policies.
  2. Click WebLogicCloudPolicy.
  3. Click Delete.
  4. When prompted for confirmation, click OK.

section 8Delete 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.
  7. When prompted for confirmation, click Delete.

    Tip: If you create a JRF-enabled domain, you can delete the schemas from the database by connecting to the compute instance with an SSH client, and then running the script /opt/scripts/delete_rcu.sh.


more informationWant to Learn More?