by Jie Shen, Lu Wang, and Yu Wang
Published March 2015
Setting up an Oracle WebLogic Server cluster can be a highly time-consuming task. An Oracle WebLogic Server cluster consists of multiple instances of Oracle WebLogic Server running simultaneously and working together to provide increased scalability and reliability. A cluster usually contains many machines on which Oracle WebLogic Server instances running. You have to go through the entire process of installing the operating system and Oracle WebLogic Server on all machines that constitute the cluster.
In this lab, you will learn how to leverage Oracle Solaris Unified Archives to accelerate the process of setting up an Oracle WebLogic Server cluster. You will clone and deploy a virtual machine (an Oracle Solaris non-global zone) from an existing virtual machine (an Oracle Solaris non-global zone) with Oracle WebLogic Server installed, and you will add the new virtual machine to the Oracle WebLogic Server cluster.
Unified Archives is a new feature introduced in Oracle Solaris 11.2. A Unified Archive unifies the archive requirements for Oracle Solaris virtual and physical environments and enables moving to or from Oracle Solaris virtual or physical environments. Virtual environments include Oracle Solaris Zones, Oracle Solaris Kernel Zones, and Oracle VM for SPARC. A Unified Archive file may contain one or more archived instances of Oracle Solaris from a single host.
Note: For more background on Oracle WebLogic Server as well as Unified Archives and other Oracle Solaris technologies used in this lab, see the Appendix.
This hands-on lab assumes you have a runnable Oracle Solaris 11.2 operating environment configured as shown in Figure 1.
Figure 1. The required environment
Note: Because of limitations on the length of this article, we skip step-by-step instructions for the Oracle Solaris and Oracle WebLogic Server Cluster installation and configuration. Please refer to following resources for more information and detailed instructions.
Ensure your system can meet the following requirements:
In this exercise, you will check the IP address and hosts file configuration in your environment.
Start Oracle Solaris 11.2, host name
globalzone, with two non-global zones running, as shown in Figure 2.
Figure 2. Environment configuration
In this Oracle Solaris 11.2 environment, we assume there is an installed Oracle WebLogic Server cluster environment, named
zone01, an Oracle WebLogic Administration Server and two managed Oracle WebLogic Server instances are installed and configured, and on
zone02, three managed Oracle WebLogic Server instances are installed and configured.
The goals of this lab are to do the following:
zone02to create a third non-global zone,
zone03, with Oracle WebLogic Server installed. To do this, you will use the Oracle Solaris Unified Archives feature to avoid manually installing Oracle Solaris and Oracle WebLogic Server on
zone03and add it to
As you are doing the exercises in this lab, use the usernames and passwords shown in Table 1 to log in to the zones.Table 1. User account and IP address configuration information
| || || || |
|Host name: || || || || |
|Host name: || || || || |
|Host name: || || || |
|OS type||Oracle Solaris 11.2 global zone||Oracle Solaris 11.2 non-global zone||Oracle Solaris 11.2 non-global zone||Oracle Solaris 11.2 non-global zone|
Note: To open a terminal window, click on the top panel.
labuser@globalzone:~$ ipadm show-addr ADDROBJ TYPE STATE ADDR lo0/v4 static ok 127.0.0.1/8 net0/v4 static ok 192.168.1.100/24 lo0/v6 static ok ::1/128 net0/v6 addrconf ok fe80::a00:27ff:fe3e:ca4d/10
labuser@globalzone:~$ cat /etc/hosts # # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # Internet host table # ::1 globalzone localhost 127.0.0.1 globalzone localhost loghost 192.168.1.100 globalzone 192.168.1.101 zone01 192.168.1.102 zone02 192.168.1.103 zone03
zone01and then check its IP address and
Note: The first time you use
ssh to log in to
zone01, the system will ask whether you want to continue connecting. Answer
labuser@globalzone:~$ ssh wls@zone01 The authenticity of host 'zone01 (192.168.1.101)' can't be established. RSA key fingerprint is a9:e5:36:7c:5e:4b:eb:2b:0d:13:1c:08:92:15:ff:84. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'zone01,192.168.1.101' (RSA) to the list of known hosts. Password: Last login: Wed Aug 27 09:45:33 2014 Oracle Corporation SunOS 5.11 11.2 June 2014 wls@zone01:~$ ipadm show-addr wls@zone01:~$ cat /etc/hosts
zone02and then check its IP address and
Note: The first time you use
ssh to log in to
zone02, the system will ask whether you want to continue connecting. Answer
labuser@globalzone:~$ ssh wls@zone02 The authenticity of host 'zone02 (192.168.1.102)' can't be established. RSA key fingerprint is a9:e5:36:7c:5e:4b:eb:2b:0d:13:1c:08:92:15:ff:84. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'zone02,192.168.1.102' (RSA) to the list of known hosts. Password: Last login: Wed Aug 27 09:45:33 2014 Oracle Corporation SunOS 5.11 11.2 June 2014 wls@zone02:~$ ipadm show-addr wls@zone02:~$ cat /etc/hosts
In this exercise, you will start the preinstalled Oracle WebLogic Server cluster in
wlsuser1as the password:
labuser@globalzone:~$ ssh wls@zone01 The authenticity of host 'zone01 (192.168.1.101)' can't be established. RSA key fingerprint is a9:e5:36:7c:5e:4b:eb:2b:0d:13:1c:08:92:15:ff:84. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'zone01,192.168.1.101' (RSA) to the list of known hosts. Password: Last login: Wed Aug 27 09:45:33 2014 Oracle Corporation SunOS 5.11 11.2 June 2014
zone01using the following command:
When Oracle WebLogic Server has started successfully, you will see the following message:
<Aug 28, 2014 8:27:19 AM PDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING.> <Aug 28, 2014 8:27:19 AM PDT> <Notice> <WebLogicServer> <BEA-000360> <The server started in RUNNING mode.>
zone01using the following
labuser@globalzone:~$ ssh wls@zone01 Password: Last login: Wed Aug 27 09:45:33 2014 Oracle Corporation SunOS 5.11 11.2 June 2014
The following information indicates Node Manager started successfully.
<Aug 28, 2014 8:29:18 AM> <INFO> <Plain socket listener started on port 5556> Aug 28, 2014 8:29:18 AM weblogic.nodemanager.server.Listener run INFO: Plain socket listener started on port 5556
zone02using the following
labuser@globalzone:~$ ssh wls@zone02 Password: Last login: Wed Aug 27 10:02:43 2014 Oracle Corporation SunOS 5.11 11.2 June 2014
The following information indicates that Node Manager started successfully.
<Aug 28, 2014 8:35:27 AM> <INFO> <Plain socket listener started on port 5556> Aug 28, 2014 8:35:27 AM weblogic.nodemanager.server.Listener run INFO: Plain socket listener started on port 5556
Figure 3. Starting Firefox
weblogicas the username and
labuser1as the password:
Figure 4. Logging in to the Oracle WebLogic Server cluster
Figure 5. Viewing the six Oracle WebLogic Server instances in the cluster
Figure 6. Starting all the server instances
After each instance has been started, its state becomes STARTING.
Figure 7. Checking the state of the server instances
Figure 8. Checking the health of the server instances
In this exercise, you will create a Unified Archive file of
To get ready for zone installation, set the publisher of the IPS package repository to a local repository, as follows.
root@globalzone:~# pkg set-publisher -G '*' -g /media/SOL-11_2_REPO_42/repo/ solaris
In the command above:
solarisis the name of the default package publisher.
-G '*'removes all existing origins for the
-gspecifies the URI of a local repository to add as the new origin for the
root@globalzone:~# pkg publisher PUBLISHER TYPE STATUS P LOCATION solaris origin online F file:///media/SOL-11_2_REPO_42/repo/
root@globalzone:~# pkg search -r developer/vala INDEX ACTION VALUE PACKAGE incorporate depend email@example.com pkg:/firstname.lastname@example.org require depend email@example.com pkg:/firstname.lastname@example.org pkg.fmri set solaris/developer/vala pkg:/email@example.com
The results shown above indicate that your repository is ready to use.
rootto acquire superuser privileges.
labuser@globalzone:~$ su - Password: Oracle Corporation SunOS 5.11 11.2 June 2014 root@globalzone:~#
root@globalzone:~# zfs create -o mountpoint=/export/dat rpool/dat root@globalzone:~# zfs list | grep dat rpool/dat 38.5K 84.9G 38.5K /export/dat root@globalzone:~#
z02.uarthat includes only
root@globalzone:~# archiveadm create -z zone02 -e -s /export/dat/z02.uar Initializing Unified Archive creation resources... Unified Archive initialized: /export/dat/z02.uar Logging to: /system/volatile/archive_log.5538 Executing dataset discovery... Dataset discovery complete Preparing archive system image... Beginning archive stream creation... Archive stream creation complete Beginning final archive assembly... Archive creation complete
In the command above:
-zoption specifies which zone(s) to archive.
-eoption indicates to skip creating automate installation media.
-soption indicates to skip the capacity check.
This command will take several minutes to complete.
root@globalzone:~# ls -lh /export/dat/z02.uar -rw-r--r-- 1 root root 922M Aug 28 09:19 /export/dat/z02.uar root@globalzone:~#
archiveadm info command to verify the contents of the
z02.uar archive. The
-v option specifies verbose output.
root@globalzone:~# archiveadm info -v /export/dat/z02.uar Archive Information Creation Time: 2014-08-28T16:11:21Z Source Host: globalzone Architecture: i386 Operating System: Oracle Solaris 11.2 X86 Recovery Archive: No Unique ID: 40ae0d01-b2dd-c515-9876-f54c31087275 Archive Version: 1.0 Deployable Systems 'zone02' OS Version: 0.5.11 OS Branch: 0.175.2.0.0.42.2 Active BE: solaris-0 Brand: solaris Size Needed: 1.7GB Unique ID: c4e59f8a-7a7d-6c55-acf2-aa5dec2701cb Root-only: Yes
Note: The value shown for
Unique ID in the sample output above will be different from your value.
In this exercise, you will deploy a new zone using the archive file
zone03by using the
zone02configuration specified in the
z02.uarfile as a template:
root@globalzone:~# zonecfg -z zone03 create -a /export/dat/z02.uar -z zone02 root@globalzone:~#
root@globalzone:~# zonecfg -z zone03 info zonename: zone03 zonepath: /system/zones/zone03 brand: solaris autoboot: true autoshutdown: shutdown bootargs: -m verbose file-mac-profile: pool: limitpriv: scheduling-class: ip-type: exclusive hostid: tenant: fs-allowed: anet: linkname: net0 lower-link: auto allowed-address not specified configure-allowed-address: true defrouter not specified allowed-dhcp-cids not specified link-protection: mac-nospoof mac-address: auto mac-prefix not specified mac-slot not specified vlan-id not specified priority not specified rxrings not specified txrings not specified mtu not specified maxbw not specified rxfanout not specified vsi-typeid not specified vsi-vers not specified vsi-mgrid not specified etsbw-lcl not specified cos not specified pkey not specified linkmode not specified evs not specified vport not specified
sysconfig utility is the interface for unconfiguring and reconfiguring an Oracle Solaris instance.
To automate the system configuration process for
zone03, use the following steps to generate a system configuration profile in a directory named
root@globalzone:~# sysconfig create-profile -o /export/dat/zone03-profile
Figure 9. Initial screen of the
Figure 10. Entering a name for the computer
Figure 11. Specifying that the wired Ethernet connection will be configured manually
Figure 12. Entering the network configuration information
Figure 13. Specifying to not configure DNS
Figure 14. Specifying the name service
Figure 15. Choosing the time zone region
Figure 16. Choosing the time zone location
Figure 17. Choosing the time zone
Figure 18. Choosing the language
Figure 19. Choosing the language territory
Figure 20. Choosing the keyboard
labuseras the username and
passwordas the user password.
Figure 21. Specifying the user information
Figure 22. Providing My Oracle Support credentials
Figure 23. Choosing not to specify a proxy
Figure 24. Reviewing the settings to ensure they are correct
The following information indicates the successful generation of the
SC profile successfully generated as: /export/dat/zone03-profile/sc_profile.xml Exiting System Configuration Tool. Log is available at: /system/volatile/sysconfig/sysconfig.log.11081 root@globalzone:~#
root@globalzone:~# cd /export/dat root@globalzone:/export/dat#
zone03from the archive file, which might take a few minutes:
root@globalzone:/export/dat# zoneadm -z zone03 install -c zone03-profile/sc_profile.xml -a z02.uar -z zone02
In the command above:
-zspecifies the name of the target zone.
-cspecifies the name of the system configuration file of the zone to be installed.
-aspecifies the name of the Unified Archive file.
-zspecifies which zone to clone from
z02.uar, because a single Unified Archive may contain multiple zones.
The following output indicates
zone03 was installed successfully.
Updating non-global zone: Zone updated. Result: Attach Succeeded. Done: Installation completed in 126.756 seconds. Next Steps: Boot the zone, then log into the zone console (zlogin -C) to complete the configuration process. Log saved in non-global zone as /system/zones/zone03/root/var/log/zones/zoneadm.20140827T074118Z.zone03.install
root@globalzone:/export/dat# zoneadm -z zone03 boot root@globalzone:/export/dat#
zone03to see the process of the first boot, which may take a few minutes.
root@globalzone:/export/dat# zlogin -C zone03
The following message indicates
zone03 has booted up.
zone03 console login:
In this exercise, you will create a new Oracle WebLogic Server instance on
zone03 and add it to the
wlsuser1for the password:
zone03 console login: wls Password: Last login: Wed Aug 27 09:45:33 2014 Oracle Corporation SunOS 5.11 11.2 June 2014
The following output indicates Node Manager started.
<Aug 28, 2014 11:03:28 AM> <INFO> <Plain socket listener started on port 5556> Aug 28, 2014 11:03:28 AM weblogic.nodemanager.server.Listener run INFO: Plain socket listener started on port 5556
zone03as a New Machine and Add a New Server Instance
Figure 25. Adding a new machine
zone03as a new machine, do the following:
Machine-2in the Name field.
Figure 26. Starting to add
zone3 as a new machine
zone03as the host name in the Listen Address field.
Figure 27. Specifying the rest of the parameters for the new machine
Machine-2was successfully added.
Figure 28. Verifying that the new machine was added
Figure 29. Checking the status of the new machine
oowClustercluster and bind it to
Figure 30. Starting to add a new Oracle WebLogic Server instance
Server03-1in the Server Name field.
7003in the Server Listen Port field.
Figure 31. Specifying information for the new server instance
Figure 32. Finishing the creation of the new server instance
Figure 33. Starting the process of binding the new server instance to the new machine
Figure 34. Completing the binding operation
Figure 35. Displaying the list of server instances
Figure 36. Starting the new server instance
Figure 37. Verifying that the new server instance is running
Figure 38. Checking the health of the new server instance
Congratulations! You completed this lab successfully.
In this lab, you experienced how quickly you can clone and deploy an Oracle WebLogic Server node by leveraging the Unified Archive feature of Oracle Solaris. Unified Archives are very flexible and can be used for performing "any system to any system" migrations, which means both the source system and the target system can be either a physical or virtualized platform. You can accomplish physical-to-virtual (P2V) cloning and virtual-to-physical (V2P) cloning using this feature.
In real-world large-scale deployments, you can benefit even more by using this feature with the Oracle Solaris Automated Installer. Unified Archives can be also used as a means for system recovery.
An Oracle WebLogic Server cluster consists of multiple Oracle WebLogic Server instances running simultaneously and working together to provide increased scalability and reliability. A cluster appears to clients to be a single Oracle WebLogic Server instance. The server instances that constitute a cluster can run on the same machine, or they can be located on different machines. You can increase a cluster's capacity by adding additional server instances to the cluster on an existing machine, or you can add machines to the cluster to host the incremental server instances. Each server instance in a cluster must run the same version of Oracle WebLogic Server.
Unified Archives are a new native archive type for Oracle Solaris. Unified Archives enable multiple system instances to be archived in a single, unified file format. Unified Archives may contain one or more archived instances of Oracle Solaris from a single host. You can select individual installed zones to include during archive creation; including the host system itself is optional.
You can deploy Unified Archives to recover a system that needs to be replaced due to failure, duplicate or clone a system configuration that you want to install on multiple machines, or migrate an existing system to new hardware or to a virtual system. You can deploy archives using any of the following methods:
A Unified Archive type is a collection of archive attributes that serve a common use case. The two types of Unified Archive are clone and recovery.
Both clone archives and recovery archives are created and managed by using the
archiveadm command. This command enables you to select which zones are to be included in or excluded from an archive, as well as allowing for the exclusion of ZFS data sets.
By default, an archive includes all data sets associated with the selected zones, unless they are specifically excluded during the archive creation process. For a non-global zone, the archive will contain the zone's boot environment data sets and all delegated data sets assigned to it. For a global zone, the boot environment data sets are archived as well as all data sets not associated with a zone. Note that the process includes all top-down pools. Any number of data sets may be excluded from the archive.
Oracle Solaris ZFS is a revolutionary file system that changes the way file systems are administered, and it has features and benefits not found in any other file system available today. ZFS is robust, scalable, and easy to administer.
ZFS is a combined file system and logical volume manager. The features of ZFS include protection against data corruption, support for high storage capacities, efficient data compression, integration of the concepts of file system and volume management, snapshots and copy-on-write clones, continuous integrity checking, and automatic repair and RAID-Z support.
The Oracle Solaris Zones partitioning technology is used to virtualize operating system services and provide an isolated and secure environment for running applications. A non-global zone, often referred to as a zone, is a virtualized operating system environment created within a single instance of the Oracle Solaris operating system. The instance of the operating system is in a zone called the global zone.
When you create a zone, you produce an application execution environment in which processes are isolated from the rest of the system. This isolation prevents processes that are running in one zone from monitoring or affecting processes that are running in other zones. Even a process running with
root credentials cannot view or affect activity in other zones. You can use Oracle Solaris Zones to maintain the one-application-per-server deployment model while simultaneously sharing hardware resources.
Oracle Solaris Zones let you separate one application from others on the same OS, allowing you to create isolated environments where users can log in and do what they want without affecting anything outside that zone. In addition, Oracle Solaris Zones also are secure from external attacks and internal malicious programs. Each Oracle Solaris Zone contains a complete resource-controlled environment that allows you to allocate resources such as CPU, memory, networking components, and storage.
Administrators can choose to closely manage all the Oracle Solaris Zones or they can assign rights to other administrators for specific Oracle Solaris Zones. This flexibility lets you tailor an entire computing environment to the needs of a particular application, all within the same OS.
Oracle Solaris 11.2 has integrated deployment support for Unified Archives, and both the Oracle Solaris
zoneadm commands natively support Unified Archives.
zonecfg command is used to configure a non-global zone. The following operations can be performed using this command:
zoneadm command is the primary tool used to install and administer non-global zones. Operations using the
zoneadm command must be run from the global zone. In this lab, we use the
zoneadm command to accomplish the following tasks.
After you configure a zone, install the zone, and boot the zone, the
zlogin command is used to log in to the zone.
The Oracle Solaris Image Packaging System (IPS) is a framework that enables you to list and search for software packages, install and remove software, and upgrade to a new Oracle Solaris release. IPS commands enable you to restrict which packages can be installed or which versions of packages can be installed.
Oracle Solaris 11.2 software is distributed in IPS packages. IPS packages are stored in IPS package repositories, which are populated by IPS publishers. Software developers, or publishers, make their software available in software package repositories that administrators can install to their systems. IPS packages are installed into Oracle Solaris 11 images. A subset of the capabilities that are available through the IPS command-line interface is available through the Package Manager graphical user interface. Administrators can install and update software from local or remote software package repositories.
Oracle Solaris 11 installations are configured to have a default publisher,
solaris, which supplies software packages from the Oracle Solaris release repository at http://pkg.oracle.com/solaris/release.
Jie Shen is a senior software engineer in the Oracle Systems group who has specialized in Oracle Solaris application performance tuning and porting for over 10 years. He works with large independent software vendors (ISVs) to make their software run optimally on Oracle Solaris and Oracle's SPARC servers. In recent years, he has also focused on cloud computing solutions based on Oracle technologies.
Lu Wang is a technical consultant in Oracle's ISV Engineering group. Her responsibilities include providing technical support to ISVs and evangelizing about and consulting on Oracle Solaris and Oracle's system-related technologies.
Yu Wang presently works as a Java technology engineer and architect consultant for Oracle's ISV Engineering group and focuses on Oracle Solaris and Java. His duties include supporting ISVs and evangelizing about and consulting on Oracle Solaris and Java technologies.
|Revision 1.0, 03/18/2015|