Note:

Deploy an Oracle Cloud Marketplace WebLogic Cluster in a High Availability Environment

Introduction

In this tutorial, we will see how to create an Oracle WebLogic Cluster on Oracle Cloud Infrastructure (OCI) through Marketplace. Oracle Cloud Marketplace is a rich library of click-to-deploy Terraform stacks that provides complete, fully automated solutions for deploying third-party software on OCI.

Through the Oracle Cloud Marketplace, we will have a Oracle WebLogic Cluster operating in high availability, scalable and integrated with OCI’s virtual cloud network (VCN). In addition, we will activate OCI Observability and Management where it will monitor and track the operating metrics of the Oracle WebLogic Cluster.

Objectives

Prerequisites

Task 1: Create an OCI Object Storage Bucket to Store your Terraform Script

We need to create an OCI Object Storage bucket to store the Terraform script generated automatically in the Oracle Cloud Marketplace.

  1. Log in to the OCI Console, click Storage and Bucket.

    img_6.png

  2. Select your compartment and click Create Bucket. This bucket will be used to store the Terraform script.

    img_7.png

  3. Enter a name for your bucket. For this tutorial, we will use Terraform_Scripts. Maintain the other options as it is and click Create.

    img_8.png

Task 2: Create Secrets in OCI Vault

We need to create 2 secrets in the OCI Vault. For security reasons, the OCI Vault is a very good way to store passwords and certificates. The Oracle WebLogic Cluster will use a password for the admin console and to use and store the autoscaling functions in the OCI Container Registry (image repository in OCI).

  1. Go to the OCI Console, click Identity & Security and Vault.

    img_26.png

  2. Select the compartment where you want to store the secrets and click Create Vault.

    img_29.png

  3. Enter a name for your vault, confirm the compartment and click Create Vault.

    img_30.png

  4. Confirm the vault creation and create a key. Click Master Encryption Keys and Create Key.

    img_33.png

  5. Confirm the compartment and enter a name for your key. For example, enter weblogickey as Name and click Create Key.

    img_34.png

    Confirm the key is created.

    img_35.png

  6. Now, click Secrets and Create Secret.

    img_31.png

  7. We will create WebLogic Admin password. Enter the following information and click Create Secret.

    • Compartment: Select compartment.
    • Name: Enter name for your first secret.
    • Select Manual secret generation to include the password.
    • Secret Type Template: Enter Plain-Text.
    • Secret Contents: Enter your password.

    img_47.png

    Note: 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 ($,#,_). If you do not follow these rules, the WebLogic instance cannot be created.

    img_37.png

Now, we will create a new secret for your image repository (OCI Container Registry).

Oracle Cloud Infrastructure Container Registry is an open standards-based, Oracle-managed Docker registry service for securely storing and sharing container images. Engineers can easily push and pull Docker images with the familiar Docker Command Line Interface (CLI) and API. To support container lifecycle, Oracle Cloud Infrastructure Registry works with Oracle Cloud Infrastructure Container Engine for Kubernetes (OKE), Oracle Cloud Infrastructure Identity and Access Management (OCI IAM), Visual Builder Studio, and third-party developer and DevOps tools.

For more information about how to use the OCI Registry, see Push an Image to Oracle Cloud Infrastructure Registry, you will need your access token.

  1. Click Create Secret and enter the secret information with your OCIR token. Click Create Secret.

    img_40.png

  2. Click Show Base64 conversion toggle key to see the Base 64 conversion value of your token.

    img_46.png

  3. Confirm if your 2 secrets are created.

    img_41.png

Task 3: Create an Observability Application Performance Monitoring

Use OCI Observability and Management services to gain visibility and actionable insights that help you to manage your cloud environment. OCI services related to observability and management let you monitor, audit, and alert to changes in your cloud environment. Insights driven by machine learning help you to manage resources that are deployed on a variety of technology across all layers of the stack.

A top priority is to increase automation that enables scalable, predictable results. Use integrated functionality and automation for DevOps monitoring and IT operations management to prevent and solve IT problems.

You can use Application Performance Monitoring (APM). Application Performance Monitoring provides deep visibility into application performance and enables rapid diagnostics in order to deliver a consistent level of service. This includes the monitoring of the multiple components and application logic spread across clients, third-party services, and back-end computing tiers, on-premises or on the cloud. To create an APM in OCI, follow these steps:

  1. Go to the OCI Console, click Observability & Management and Administration.

    img_49.png

  2. Select your compartment to create an APM domain and click Create APM domain.

    img_50.png

  3. Enter a name for your APM Domain, select your compartment and click Create.

    img_51.png

Task 4: Create the Oracle WebLogic Clustered Instance

To create Oracle WebLogic Cluster instance, follow the steps:

  1. Go to the OCI Console, click Marketplace and All Applications.

    img_1.png

    img.png

    img_2.png

  2. Enter weblogic in the Search bar. The WebLogic applications will appear on screen. For WebLogic H.A., select WebLogic Enterprise or WebLogic Suite.

    img_3.png

  3. Select the Version and Compartment for your Oracle WebLogic Cluster, confirm the acceptance terms and click Launch Stack.

    img_4.png

  4. Click Use custom Terraform providers if you have a custom Terraform script and want to use it. Select the compartment of your bucket and your bucket name created in Task 1.

    img_9.png

    You can enter a name for your stack or keep the default name.

    img_10.png

  5. Click Next. Enter Resource Name Prefix for your WebLogic stack. All resources created in the Terraform process will contain this prefix name.

    img_11.png

  6. Generate a public and private key file. Enter the public key here. This will be used to authenticate your Bastion instance.

    img_12.png

  7. Select OCI Policies.

    img_13.png

  8. Use VCN, subnets, private/public, Bastion.

    You can use a valid VCN inside OCI or create a new one. If you do not have any VCN created, select Create a Virtual Cloud Network.

    img_14.png

  9. Use OCI Load Balancer.

    Select Provision Load Balancer to use OCI Load Balancer. Your WebLogic instance will be created on a clustered environment. So, you can stablish the number of WebLogic instances and can balance the use of this server through an OCI Load Balancer.

    img_15.png

    You can customize the CIDR block and performance options for the OCI Load Balancer.

    img_24.png

  10. Integrate Oracle WebLogic Cluster with Oracle Identity Cloud Service.

    Oracle Identity Cloud Service is an Identity-as-a-Service (IDaaS) solution available in Oracle Public Cloud (OPC). It is designed to extend enterprise controls by automating PaaS and SaaS account provisioning and deprovisioning, simplifying the user experience for accessing cloud applications by providing seamless integration with enterprise identity stores and authentication services, and facilitating compliance activities by clearly reporting on cloud application usage

    You can integrate your WebLogic Cluster with Oracle Identity Cloud Service. To integrate with Oracle Identity Cloud Service, click Enable Authentication Using Identity Cloud Service.

    img_16.png

  11. Integrate Oracle WebLogic Cluster with OCI Observability and Management.

    To integrate OCI Observability and Management with your WebLogic Cluster, select Enable Application Performance Monitoring.

    img_17.png

    Select your Application Performance Monitoring Domain created in Task 3.

    img_39.png

  12. The WebLogic stack available on Oracle Cloud Marketplace allows the use of the automated mechanism for autoscaling. This feature is available to use with OCI Functions that are automatically implemented when creating the WebLogic stack.

    To activate autoscaling, select Enable Autoscaling and configure the OCI Registry with your previously configured username and token. Also configure thresholds to automate autoscaling.

    img_18.png

    img_42.png

  13. Enable file system (HA).

    There is the possibility of working with shared storage, which is very important when it comes to creating a WebLogic Cluster for high availability.

    To enable the file system, select Add File System and configure the subnet’s CIDR block to mount the target. Be careful to establish a CIDR block that does not overlap with an existing one.

    img_19.png

    img_25.png

  14. Configure a VCN.

    Now you need to create where your WebLogic instance will operate. That means to configure the VCN and subnets. You selected to create a new VCN, so you can enter a name for your VCN and optionally select the CIDR block for the network. Subnets will be created automatically. Remember to check your compartment for your VCN.

    img_20.png

  15. Configure the WebLogic domain.

    To configure the WebLogic domain, enter the following information.

    • WebLogic Server Admin User Name: Enter admin username, by default it is weblogic.

    • WebLogic Server Admin Secret Compartment: Select the compartment of your secret.

    • Validated Secret for WebLogic Server Admin Password: Enter the weblogicadmin secret.

    • Java Development Kit Version: Select your JDK version.

    • Select Deploy Sample Application to create a sample application.

    img_38.png

  16. Configure the WebLogic Server compute instance.

    You can configure your cluster machines. Select your OCI Compute Shape, the OCPU Count and the number of Nodes for your cluster and configure the WebLogic Server Subnet CIDR block for your servers subnet.

    img_22.png

  17. Bastion usually helps to maintain your WebLogic cluster secure, so you need to access the WebLogic admin through this Bastion server. While Bastion will be exposed over a public IP, your WebLogic machines will be maintained in a secure private subnet.

    Select Assign Reserved Public IP to Bastion Instance, configure the Bastion Host Subnet CIDR block for the subnet and select the Bastion Host Shape.

    Remember to use your private key configured previously to access your Bastion in a SSH connection.

    img_23.png

    Get the public IP of your Bastion from the compute menu and from your Bastion detail. An example to access the Bastion is:

    ssh -i <PrivateKey.pem>  opc@<Bastion Public IP> -L 7002:<your_admin_server_private_IP_address>:7002
    

    Get the your_admin_server_private_IP_address from your WebLogic Resource Manager stack detail page. So you can stablish a tunnel for your WebLogic Admin Server.

    You can now access the admin server in your browser with this URL: https://localhost:7002/console.

  18. Review and click Create.

    img_43.png

Task 5: Confirm the Stack Creation

Go to the OCI Console and click Developer Services. Under Resource Manager, click Stacks.

img_44.png

img_45.png

Acknowledgments

More Learning Resources

Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.

For product documentation, visit Oracle Help Center.