Oracle® Fusion Middleware

Using WebLogic Server on Windows Azure (Oracle Linux x86-64)

12c (12.1.2)

E48696-01

October 2013

This document describes how to configure and use WebLogic Server on Windows Azure.

It includes the following topics:

Introduction

Oracle is committed to enabling you to embrace cloud computing by providing greater choice and flexibility in how you deploy Oracle software. In support of that commitment, Oracle has created virtual machine images hosted in the Windows Azure Virtual Machine Gallery that include pre-installed Oracle software. You can use these images to easily create virtual machines in your Azure environment and run your applications on Oracle software.

This document describes how to use the Oracle WebLogic Server 12c image hosted on Windows Azure. You can find the image in the Gallery of virtual machine images with the following title: Oracle WebLogic Server 12.1.2 on Oracle Linux 6.4.0.0.0.

This image includes the following products pre-installed:

  • Oracle WebLogic Server 12.1.2.0.0

  • Oracle JDJK 1.7.0u25

  • Oracle Linux 6.4.0.0.0

When you create a virtual machine based on the WebLogic Server 12c image, you use it just as you would use it on an on-premise virtual or physical machine. All of the configuration and management tooling is available. You must configure a WebLogic domain and then configure servers within that domain to run your applications.

Note that you must have an appropriate license to run Oracle software. See the following links for more information:

In addition, refer to your agreement with Oracle for details on software that you are licensed to use.

WebLogic Server Virtual Machine Directory Structure

The following table shows the Oracle-specific directory structure for each virtual machine that is created using the Oracle WebLogic Server 12.1.2 image. When referring to Oracle WebLogic Server documentation, substitute these paths for the directory variables in the documentation.

Table 1 WebLogic Server Virtual Machine Directories

Directory Variable Purpose Directory Path

ORACLE_HOME

Oracle home directory

/opt/oracle/products/Middleware

WL_HOME

WebLogic Server home directory

/opt/oracle/products/Middleware/wlserver

JAVA_HOME

Java home directory

/opt/oracle/products/jdk1.7.0_25


Related Documentation

For related documentation, access the following URLs:

Getting Started: Creating a Single Virtual Machine

For testing and development purposes, you may want to create a standalone virtual machine that is not part of a virtual network.

To create a WebLogic Server domain that contains only a single virtual machine that is not part of a virtual network, you must complete the following tasks:

  • Create a virtual machine on Windows Azure.

  • Create a WebLogic Domain. The domain can contain an Administration Server and, if needed, Managed Servers, all of which will reside on the single virtual machine.

Before You Begin

Prior to creating the virtual machine, collect the following information:

  • Name to use for the virtual machine. The URL for accessing the virtual machine via a web browser will be virtual_machine_name.cloudapp.net.

  • Listen port numbers to use for the WebLogic Server Administration Server. If you enable SSL, you will need two port numbers (typically 7001 and 7002). You must configure these ports as endpoints on the virtual machine.

  • If you plan to create Managed Servers on this virtual machine, you also need listen port numbers for each Managed Server. If you enable SSL, you will need two port numbers for each Managed Server. You must configure these ports as endpoints on the virtual machine.

  • The user name and password that you want to use to log in to the virtual machine via an SSH connection.

  • If applicable, the SSH key certificate file, available on your local client or network, to upload for SSH authentication.

Creating a Virtual Machine on Windows Azure

This section describes how to create a standalone virtual machine for running WebLogic Server.

To create a single virtual machine that is not part of a virtual network:

  1. Log into the Windows Azure Management Portal at https://manage.windowsazure.com/.

  2. From the Windows Azure Management Portal, click New on the lower left. The New configuration menu is displayed.

    New configuration menu
    Description of the illustration create_vm.gif

  3. Select Compute > Virtual Machine > From Gallery. The Virtual Machine Image Selection screen is displayed.

    Virtual Machine Image Selection
    Description of the illustration vm_image_select.gif

  4. Select All, locate and select the Oracle WebLogic Server 12.1.2 on Oracle Linux 6.4.0.0.0 image, and then click the arrow on the lower right to display the Virtual Machine Configuration screen.

    Virtual Machine Configuration
    Description of the illustration vm_config.gif

  5. Enter the following information:

    • For VIRTUAL MACHINE NAME, enter a unique name for the virtual machine, such as myvm01.

    • For SIZE, select the number of cores needed for the virtual machine. For development and testing environments, you may only need to select Small (1 core). You may, however, need to configure additional cores depending on the requirements of your application.

    • For NEW USER NAME, enter the user name that you want to use to log into and manage the virtual machine.

      Note:

      After creating the VM, you must change ownership of the files and directories under the Oracle home directory to the user you specify here.

    • To upload an SSH key to use for authentication when logging in to the virtual machine via SSH, select the AUTHENTICATION check box, and then use the CERTIFICATE field to locate the key file on your local client or network.

      For more information about user names and authentication, see "Authentication: User Names, Passwords, and SSH Keys" in the Windows Azure online documentation at:

      https://www.windowsazure.com/en-us/manage/linux/tutorials/intro-to-linux/#authentication

    • Select the PROVIDE A PASSWORD check box, enter a strong password, and then confirm the password.

  6. Click the arrow on the lower right to access the next Virtual Machine Configuration screen.

    Virtual Machine Configuration screen
    Description of the illustration vm_config_2b.gif

  7. Enter or select the following information on this screen:

    • For CLOUD SERVICE, select Create a new cloud service.

    • For CLOUD SERVICE DNS NAME, enter a unique name for the cloud service for this virtual machine. Typically, you should accept the default, which is the same name that you used for the virtual machine.

    • For REGION/AFFINITY GROUP/VIRTUAL NETWORK, select an available region. Note that for standalone VMs, there is no associated Affinity Group or Virtual Network. Therefore, if any Affinity Groups or Virtual Networks that are associated with your Azure account are listed here, do not select one for this virtual machine.

    • Leave AVAILABILITY SETS set to None.

  8. Click the arrow on the lower right to continue to the next Virtual Machine Configuration screen.

    Description of vm_config_3.gif follows
    Description of the illustration vm_config_3.gif

  9. Use this screen to create the endpoints (listen address ports and other ports) for the virtual machine. In addition to the default SSH port 22, you can also create the following endpoints for the virtual machine at this time, or you can create these endpoints later after the virtual machine is in a Running state. Note that you can call the ports anything you want. For each endpoint, use the same value for both the public and private ports. The following table shows recommended port values.

    Note:

    You must create all endpoints that you will need for the servers in the domain prior to starting the domain's Administration Server.

    Table 2 Endpoints to Create on the Virtual Machine

    Recommended Name Protocol Public Port/Private Port

    Admin

    TCP

    7001

    This is the default Administration Server listen port. After creating and starting the domain, this is the listen port you will use to access the Administration Console from a Web browser.

    AdminSSL

    TCP

    7002

    Required if SSL is enabled on the Administration Server.

    Managedn

    TCP

    Start with 7003 for the first Managed Server, increment by 2 for each additional Managed Server in the domain.

    ManagednSSL

    TCP

    Required if SSL is enabled on the Managed Servers. Start with 7004 for the first Managed Server, increment by 2 for each additional Managed Server in the domain.

    NodeManager

    TCP

    5556

    This is the default Node Manager listen port.


    After specifying the endpoints, click the check mark on the lower right to start the virtual machine creation process. Once the process completes, the virtual machine will be in a Running state.\

  10. Perform the following steps to change ownership of the installed files to the VM user you specified in Step 5:

    1. Open a terminal window and use SSH to log in to the virtual machine as the VM user.

    2. Enter sudo su and provide the VM user password. Note that the command in Step 10c must be run as superuser.

    3. Enter the following command to change ownership of the installed WebLogic Server directories to the VM user:

      chown -R vm_username /opt/oracle
      

To continue, see Creating and Configuring a WebLogic Domain.

Creating a Multi-Machine Virtual Network for WebLogic Server

If you want to take advantage of the scalability, elasticity, and availability of WebLogic Server Enterprise Edition, you need to create a virtual network in Windows Azure to host clustered WebLogic Server Managed Servers. In general, the instructions below expect you to configure one WebLogic Managed Server or Administration Server per virtual machine.

To create a virtual network that contains multiple virtual machines, you must complete the following tasks:

  • Create a virtual network on Windows Azure

  • Optionally create a storage account

  • Create one virtual machine for each WebLogic Server node in the configuration

  • Create a WebLogic domain on the Administration Server node

  • Copy the WebLogic domain to remote nodes that are running Managed Servers

Before You Begin

Prior to creating the virtual network and virtual machines, collect the following information:

  • Name to use for the virtual network.

  • Name to use for each virtual machine you plan to create. The URL for accessing each virtual machine via a web browser will be virtual_machine_name.cloudapp.net.

  • Listen port numbers to use for the WebLogic Server Administration Server. If you enable SSL, you will need two port numbers (typically 7001 and 7002).

  • Listen port numbers for each Managed Server that will be added to each virtual machine. If you enable SSL, you will need two port numbers for each Managed Server.

    The listen ports must be unique for each Managed Server on a given virtual machine.

  • The user name and password that you want to use to log in to each virtual machine via an SSH connection. You can use the same user name and password for each VM.

  • If applicable, the SSH key certificate file, available on your local client or network, to upload for SSH authentication.

Creating a Virtual Network for WebLogic Server on Windows Azure

To create a production, development, or testing domain that contains multiple virtual machines, you must first create a virtual network for the virtual machines.

To create your virtual network for WebLogic Server on Windows Azure, refer to the following topics in the Windows Azure online documentation:

Notes:

When creating the virtual network, Oracle recommends that you not define a DNS server. Leave the DNS Server fields blank. This will create a default DNS server for you in Windows Azure.

You have the option to add your own DNS server. If you do so, you must configure it yourself to work with your Windows Azure virtual network. For more information, see "Windows Azure Name Resolution" at:

http://msdn.microsoft.com/en-us/library/windowsazure/jj156088.aspx

After creating the virtual network, you can create the storage account for the network and create the virtual machines for each node in the configuration.

Creating a Storage Account

Prior to creating the first virtual machine, you may want to create a storage account. If so, create the storage account before you create the virtual machines for your network. For information on storage accounts and how to create one, refer to "How to Create a Storage Account" in the Windows Azure online documentation at:

http://www.windowsazure.com/en-us/manage/services/storage/how-to-create-a-storage-account/

When creating the storage account, select the Affinity Group that you created for your virtual network.

Creating a WebLogic Server Virtual Machine on a Virtual Network

This section describes how to create a virtual machine for each WebLogic Server node in your virtual network. These steps are specific to a virtual machine that was created using the available Oracle WebLogic Server 12.1.2 on Oracle Linux 6.4.0.0 disk image.

Once you have created a storage account, you can create the virtual machines. For more details on creating virtual machines, refer to the following topics in the Windows Azure online documentation:

To create a WebLogic Server virtual machine:

  1. Log into the Windows Azure Management Portal at https://manage.windowsazure.com/.

  2. From the Windows Azure Management Portal, click New on the lower left. The New configuration menu is displayed.

    New configuration menu
    Description of the illustration create_vm.gif

  3. Select Compute > Virtual Machine > From Gallery. The Virtual Machine Image Selection screen is displayed.

    Virtual Machine Image Selection
    Description of the illustration vm_image_select.gif

  4. Select ALL, locate and select the Oracle WebLogic Server 12.1.2 on Oracle Linux 6.4.0.0 image, and then click the arrow on the lower right to display the Virtual Machine Configuration screen.

    Virtual Machine Configuration
    Description of the illustration vm_config.gif

  5. Enter the following information:

    • For VIRTUAL MACHINE NAME, enter a unique name for the virtual machine, such as MyVM-1.

    • For SIZE, select the number of cores needed for the virtual machine. For production environments, Oracle recommends that you select a minimum of 2 cores. Note that you may need to configure additional cores depending on the requirements of your application.

    • For NEW USER NAME, enter the user name that you want to use to log into and manage the virtual machine.

      Note:

      After creating the VM, you must change ownership of the files and directories under the Oracle home directory to the user you specify here.

    • To upload an SSH key to use for authentication when logging in to the virtual machine via SSH, select the AUTHENTICATION check box, and then use the CERTIFICATE field to locate the key file on your local client or network.

      For more information about user names and authentication, see "Authentication: User Names, Passwords, and SSH Keys" in the Windows Azure online documentation at https://www.windowsazure.com/en-us/manage/linux/tutorials/intro-to-linux/#authentication.

    • Select the PROVIDE A PASSWORD check box and then enter and confirm the password.

  6. Click the arrow on the lower right to access the next Virtual Machine Configuration screen.

    Virtual Machine Configuration screen
    Description of the illustration vm_config_2.gif

  7. Enter or select the following information on this screen:

    • For CLOUD SERVICE, select Create a new cloud service.

    • For CLOUD SERVICE DNS NAME, enter a unique name for this virtual machine. Each virtual machine in the virtual network must have a unique cloud service DNS name. The default is vm_name.cloudapp.net.

    • For REGION/AFFINITY GROUP/VIRTUAL NETWORK, select the virtual network to which you want to assign the virtual machine.

    • For VIRTUAL NETWORK SUBNETS, select one of the subnets that you created for this virtual network. The specified subnet will be used as the front-end subnet.

    • If the STORAGE ACCOUNT drop-down list is displayed, select a storage account that you have already created or select the default to automatically generate a new storage account.

    • Leave AVAILABILITY SETS set to (None).

  8. Click the arrow on the lower right to continue to the next Virtual Machine Configuration screen.

    Description of vm_config_3.gif follows
    Description of the illustration vm_config_3.gif

  9. In addition to the default SSH port 22, you can also create the following endpoints for the virtual machine at this time, or you can create these endpoints later after the virtual machine is in a Running state. Note that you can call the ports anything you want. The assigned ports are used as the WebLogic Server listen ports on each machine in the network. Assign the same port names and values to the endpoints on each virtual machine in the network. For each endpoint, use the same value for both the public and private ports. The following table shows recommended port values.

    Note:

    You must create all endpoints that you will need for the domain prior to starting the domain's Administration Server.

    Table 3 Endpoints to Create on Each Virtual Machine

    Recommended Name Protocol Public Port/Private Port

    Admin

    TCP

    7001

    This is the default Administration Server listen port. After creating and starting the domain, this is the listen port you will use to access the Administration Console from a Web browser. You need to configure this port only on the virtual machine on which the Administration Server will run.

    AdminSSL

    TCP

    7002

    Required if SSL is enabled on the Administration Server. You need to configure this port only on the virtual machine on which the Administration Server will run.

    Managedn

    TCP

    These are the listen ports for each Managed Server, which must be unique for each Managed Server on a given virtual machine. Start with 7003 for the first Managed Server on a given virtual machine, increment by 2 for each additional Managed Server in the domain.

    ManagednSSL

     

    Required if SSL is enabled on each Managed Server. These must be unique for each Managed Server on a given virtual machine. Start with 7004 for the first Managed Server on a given virtual machine, increment by 2 for each additional Managed Server in the domain.

    NodeManager

    TCP

    5556

    This is the default Node Manager listen port on all VMs in the network. You must configure this port on all virtual machines in the network.


    After specifying the endpoints, click the check mark on the lower right to start the virtual machine creation process. Once the process completes, the virtual machine will be in a Running state.

  10. For each machine on which you specified a username other than oracle in Step 5, perform the following steps:

    1. Open a terminal window and use SSH to log in to the virtual machine as the VM user.

    2. Enter sudo su and enter the VM user password. The command in Step 10c must be run as superuser.

    3. Enter the following command to change ownership of the installed WebLogic Server directories to the VM user:

      chown -R vm_username /opt/oracle
      
  11. Repeat Steps 2 through 10 to configure additional virtual machines. Keep the following points in mind:

    • You must select the same platform image for each virtual machine.

    • Enter the same user name for each virtual machine.

    • Create a new cloud service for each machine. Oracle recommends that you accept the default, which is based on the virtual machine name.

To continue, see Creating and Configuring a WebLogic Domain.

Creating and Configuring a WebLogic Domain

This section describes how to create a domain on the Administration Server VM, deploy your applications, and (if you created a virtual network with multiple VMs) move the domain to each of your Managed Server VMs.

Creating the Domain on the Administration Server VM

Prior to creating your domain on the Administration Server VM, Oracle recommends that you configure all of the listen port endpoints on each VM, as shown in Table 3.

To create the domain on the Administration Server VM, you can use either a WLST script or the Fusion Middleware Configuration Wizard. When creating the domain or adding Managed Servers and machines to the domain via the Administration Console, keep the following points in mind:

  • If the virtual machine is a standalone VM that is not part of a virtual network, you must specify the external IP address of the VM when configuring the ListenAddress attribute for the Administration Server and Managed Servers.

  • If the virtual machine is part of a virtual network, you must specify the internal IP address of the VM when configuring the ListenAddress attribute for the Administration Server and Managed Servers. The ListenAddress for the Administration Server will indicate the Administration node for the domain. The ListenAddress for each Managed Server depends on the virtual machine to which each Managed Server will be assigned.

In addition, for Node Manager configuration:

  • The Node Manager Listen Address on the Administration Server virtual machine must be set to localhost.

  • The Node Manager Listen Address on each remote virtual machine must be set to the internal IP address of the virtual machine.

Creating the Domain Using a WLST Script

When using a WLST script to create a domain, you can use the script to completely configure the domain, Managed Servers, and other resources in the domain, or you can create a simple domain and configure the Managed Servers and other resources later via the WebLogic Server Administration Console. In addition, keep the following points in mind:

To create the domain:

  1. Use a secure copy client or scp command to copy the script from your local client to an appropriate location on the Administration Server VM, such as /tmp.

  2. Use SSH to log in to the virtual machine on which the Administration Server will reside:

    ssh vm_username@vmname.cloudapp.net
    
  3. Change to the /opt/oracle/products/Middleware/oracle_common/common/bin directory.

  4. Enter the following command to run WLST:

    ./wlst.sh
    
  5. Enter the following WLST command to run the script, where script_path is the full path and filename for the WLST script:

    execfile('script_path')
    

For more information on using WLST to create a domain, see "Creating WebLogic Domains Using WLST Offline" in Understanding the WebLogic Scripting Tool. For a list of available sample WLST scripts, see "WLST Sample Scripts" in Understanding the WebLogic Scripting Tool.

Creating the Domain Using the Configuration Wizard

When using the Configuration Wizard to create a domain, you can completely configure the Managed Servers, clusters, and machines in the domain, or you can create a basis WebLogic Server domain and configure these items later via the WebLogic Server Administration Console.

To use the Configuration Wizard to create the domain, perform the following steps:

  1. Use SSH to log in to the virtual machine on which the Administration Server will reside. You must include the -X parameter to enable graphical mode on the virtual machine.

    ssh - X vm_username@vmname.cloudapp.net
    
  2. Change to the /opt/oracle/products/Middleware/oracle_common/common/bin directory.

  3. Enter the following command to run the Configuration Wizard:

    ./config.sh
    

For information on using the Configuration Wizard to create a domain, see "Creating a WebLogic Domain" in Creating WebLogic Domains Using the Configuration Wizard.

You can create the Managed Servers, clusters, and machines for the domain during the wizard session, or you can create them later via the Administration Console.

Moving the Domain to Managed Server VMs

If your domain contains multiple VMs, after completing the domain configuration, use the pack and unpack commands to move the domain to each VM that is hosting Managed Servers. Prior to moving the domain to the Managed Server VMs, you should have already created the Managed Servers, clusters, and machines for the domain.

  1. On the Administration Server VM, change to the /opt/oracle/products/Middleware/oracle_common/common/bin directory.

  2. Enter the following command to pack the domain, where domain_path is the full path to the domain directory, template_file is the path and file name for the template file you are creating, and name is any name you want to give to the template:

    ./pack.sh -domain=domain_path -template=template_file -managed=true -template_name="name"
    

    For example:

    ./pack.sh -domain=/opt/oracle/products/domains/mydomain -template=/opt/oracle/products/Middleware/domains/mydomain.jar -managed=true -template_name="mydomain"
    
  3. Move the template JAR to a preferred location on each Managed Server VM.

  4. On the Managed Server VM, change to the /opt/oracle/products/Middleware/oracle_common/common/bin directory.

  5. Enter the following command to unpack the domain, where template_file is the path and file name for the template JAR you are using to create the domain, domain_path is the full path to the directory in which you want to create the domain, and application_path is the full path to the applications directory for the domain. Note that appdir applies only if the domain JAR defines applications for the domain.

    ./unpack.sh -template=template_file -domain=domain_path -appdir=application_path
    

    For example:

    ./unpack.sh -template=/opt/oracle/products/domains/mydomain.jar -domain=/opt/oracle/products/Middleware/domains/mydomain -appdir=/opt/oracle/products/Middleware/applications/mydomain
    

    For more information on the pack and unpack commands, see Creating Domains Using the pack and unpack Commands.

Deploying Applications in the Domain

To deploy applications in the domain, use scp or a secure copy client to copy the application EAR or WAR files to the appropriate directory on the Administration Server and optionally each Managed Server. After doing so, deploy the applications as you normally would in WebLogic Server. For more information, see Deploying Applications to Oracle WebLogic Server.

Configuring Load Balancing on a Virtual Network

Load balancing for your virtual network can be configured using the Windows Azure load balancing feature. For information on how to configure load balancing on Windows Azure, see "Load Balancing Virtual Machines" at:

https://www.windowsazure.com/en-us/manage/windows/common-tasks/how-to-load-balance-virtual-machines/

Known Issues

This section describes know issues when using the Oracle WebLogic Server 12.1.2 on Oracle Linux 6.4.0.0.0 image on Microsoft Azure.

java.io.UTFDataFormat Exception Error Occurs When Running OPatch

A java.io.UTFDataFormatException error occurs when running OPatch if the patch ZIP files are stored in the PATCH_TOP directory on a Windows Azure virtual machine.

Workaround

Store patch ZIP files in a directory other than PATCH_TOP

Documentation Accessibility

For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.

Access to Oracle Support

Oracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.


Using WebLogic Server on Windows Azure (Oracle Linux x86-64), 12c (12.1.2)

E48696-01

Copyright © 2013 Oracle and/or its affiliates. All rights reserved.

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate failsafe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.