Quickstart: Deploy WebLogic Server on Azure Virtual Machine using the Azure portal

This article shows you how to quickly deploy WebLogic Application Server (WLS) on Azure Virtual Machines (VM) with the simplest possible set of configuration choices using the Azure portal. For a more full featured tutorial, including the use of Azure Application Gateway to make WLS cluster on VM securely visible on the public internet, see Tutorial: Migrate a WebLogic Server cluster to Azure with Azure Application Gateway as a load balancer.

In this quickstart, you:

  • Deploy WLS with Administration Server on a VM using the Azure portal.
  • Deploy a Java EE sample application with WLS Administration Console portal.

This quickstart assumes a basic understanding of WLS concepts. For more information, see Oracle WebLogic Server.

Prerequisites

Deploy WLS with Administration Server on a VM

The steps in this section direct you to deploy WLS on VM in the simplest possible way: using the single node with an admin server offer. Other offers are available to meet different scenarios, including: single node without an admin server, cluster, and dynamic cluster. For more information, see What are solutions for running Oracle WebLogic Server on Azure Virtual Machines?.

Screenshot of the Azure portal that shows the Create WebLogic Server With Admin console on Azure VM page.

The following steps show you how to find the WLS with Admin Server offer and fill out the Basics pane:

  1. In the search bar at the top of the portal, enter weblogic. In the auto-suggested search results, in the Marketplace section, select Oracle WebLogic Server With Admin Server.

    Screenshot of the Azure portal that shows WebLogic Server in the search results.

    You can also go directly to the offer with this portal link.

  2. On the offer page, select Create.

  3. On the Basics pane, ensure the value shown in the Subscription field is the same one that you used to sign in to the Azure portal.

  4. The offer must be deployed in an empty resource group. In the Resource group field, select Create new and fill in a value for the resource group. Because resource groups must be unique within a subscription, pick a unique name. An easy way to have unique names is to use a combination of your initials, today's date, and some identifier. For example, ejb0802wls.

  5. Under Instance details, select the region for the deployment. For a list of Azure regions how and where VMs operate, see Regions for virtual machines in Azure.

  6. Accept the default value in Oracle WebLogic Image.

  7. Accept the default value in Virtual machine size.

    If the default size isn't available in your region, choose an available size by selecting Change size, then select one of the listed sizes.

  8. Under Credentials for Virtual Machines and WebLogic, leave the default value for Username for admin account of VMs.

  9. Next to Authentication type, select Password. This article uses a user name and password pair for the authentication. If you want to use SSH, see Create and use an SSH public-private key pair for Linux VMs in Azure. Fill in wlsVmCluster2022 for Password. Use the same value for the confirmation.

  10. Leave the default value for Username for WebLogic Administrator.

  11. Fill in wlsVmCluster2022 for the Password for WebLogic Administrator. Use the same value for the confirmation.

  12. Select Review + create. Ensure the green Validation Passed message appears at the top. If not, fix any validation problems and select Review + create again.

  13. Select Create.

  14. Track the progress of the deployment in the Deployment is in progress page.

Depending on network conditions and other activity in your selected region, the deployment may take up to 30 minutes to complete.

Examine the deployment output

The steps in this section show you how to verify the deployment has successfully completed.

If you navigated away from the Deployment is in progress page, the following steps show you how to get back to that page. If you're still on the page that shows Your deployment is complete, you can skip to step 5, after the screenshot.

  1. In the corner of any portal page, select the hamburger menu and select Resource groups.

  2. In the box with the text Filter for any field, enter the first few characters of the resource group you created previously. If you followed the recommended convention, enter your initials, then select the appropriate resource group.

  3. In the left navigation pane, in the Settings section, select Deployments. You can see an ordered list of the deployments to this resource group, with the most recent one first.

  4. Scroll to the oldest entry in this list. This entry corresponds to the deployment you started in the preceding section. Select the oldest deployment, as shown in the following screenshot:

    Screenshot of the Azure portal that shows the resource group deployments list.

  5. In the left panel, select Outputs. This list shows the output values from the deployment. Useful information is included in the outputs.

  6. The sshCommand value is the fully qualified, SSH command to connect the VM that runs WLS. Select the copy icon next to the field value to copy the link to your clipboard. Save this value aside for later.

  7. The adminConsoleURL value is the fully qualified, public internet visible link to the WLS admin console. Select the copy icon next to the field value to copy the link to your clipboard. Save this value aside for later.

Deploy a Java EE application from Administration Console portal

Use the following steps to run a sample application in the WLS:

  1. Download a sample application as a .war or .ear file. The sample app should be self contained and not have any database, messaging, or other external connection requirements. The sample app from the WLS Kubernetes Operator documentation is a good choice. You can download it from Oracle. Save the file to your local filesystem.

  2. Paste the value of adminConsoleURL in an internet-connected web browser. You should see the familiar WLS admin console login screen as shown in the following screenshot:

    Screenshot of the WebLogic Server admin login screen.

  3. Log in with user name weblogic and your password (this article uses wlsVmCluster2022). You can see the WLS Administration Console overview page.

  4. Under Change Center on the top left corner, select Lock & Edit, as shown in the following screenshot:

    Screenshot of the Oracle WebLogic Server Administration Console with Lock & Edit button highlighted.

  5. Under Domain Structure on the left side, select Deployments.

  6. Under Configuration, select Install. There's an Install Application Assistant to guide you to finish the installation.

    1. Under Locate deployment to install and prepare for deployment, select Upload your file(s).
    2. Under Upload a deployment to the Administration Server, select Choose File and upload your sample application. Select Next.
    3. Select Finish.
  7. Under Change Center on the top left corner, select Activate Changes. You can see the message All changes have been activated. No restarts are necessary.

  8. Under Summary of Deployments, select Control. Select the checkbox near the application name to select the application. Select Start and then select Servicing all requests.

  9. Under Start Application Assistant, select Yes. If no error happens, you can see the message Start requests have been sent to the selected deployments.

  10. Construct a fully qualified URL for the sample app, such as http://<vm-host-name>:<port>/<your-app-path>. You can get the host name and port from adminConsoleURL by removing /console/. If you're using the recommended sample app, the URL should be http://<vm-host-name>:<port>/testwebapp/, which should be similar to http://wls-5b942e9f2a-admindomain.westus.cloudapp.azure.com:7001/testwebapp/.

  11. Paste the fully qualified URL in an internet-connected web browser. If you deployed the recommended sample app, you should see a page that looks similar to the following screenshot:

    Screenshot of the test web app.

Connect to the virtual machine

If you want to manage the VM, you can connect to it with SSH command. Before accessing the machine, make sure you have enabled port 22 for SSH agent.

Follow these steps to enable port 22:

  1. Navigate back to your working resource group. In the overview page, you can find a network security group named wls-nsg. Select wls-nsg.

  2. In the left panel, select Settings, then Inbound security rules. If there's a rule to allow port 22, then you can jump to step 4.

  3. In the top of the page, select Add.

    1. Under Destination port ranges, fill in the value 22.
    2. Fill in the rule name Port_SSH for Name.
    3. Leave the default value for the other fields.
    4. Select Add.

    After the deployment completes, you can SSH to the VM.

  4. Connect the VM with the value of sshCommand and your password (this article uses wlsVmCluster2022).

Clean up resources

If you're not going to continue to use the WLS, navigate back to your working resource group. At the top of the page, under the text Resource group, select the resource group. Then, select Delete resource group.

Next steps

Continue to explore options to run WLS on Azure.