Chapter 06: Configuring a Weblogic Domain

Friends!!, In the last chapter we learnt how to install weblogic server binaries on a linux OS platform. Further to that, We need to learn how to configure a weblogic domain.

In this chapter I will show you how to configure a very basic domain with just having an Admin Server and slowly as we move to the next chapters, I will be explaining you the other important and advance topics wrt Domain ...

Configuration wizard allows you to create a new domain or extend an already existing domain. The best example of extending a domain is adding a new server on a remote machine and configuring a cluster.

Before starting with the weblogic configuration wizard, lets first understand few basic concepts related to domain.

What is a weblogic domain ?

  • Weblogic domain is a logical entity which groups logically related Servers and allows you to manage them from a single set of configuration.

  • A Weblogic  domain can contain ZERO to N number of managed servers and ONE Admin Server that is a domain must have only one admin server., without an Admin Server you cannot configure a domain.

  • It may contain individual servers or cluster of servers

  • NOTE: All WebLogic Server instances within the same domain must be at the same major and minor version.

  • A domain looks like as below:

domain

  • You can see in the above pic that the domain contains few individual servers and a group of servers withing a cluster.

  • Domain can be spanned across number of physical servers (hosts) depending upon the business need.

What is a Server ?

  • A Server in Weblogic domain is an instance which you configure and can host applications and other resources such as Enterprise Apps, WebApps,Web Services, JDBC, JMS ...etc

  • There are 2 types of servers, one is Admin Server and the other type is called as Managed Server.



What is an Admin Server ?

  • Admin Server maintains the configuration information of your entire domain.

  • This is the server where your "Admin Console" gets deployed.

  • It provides you the power to start/stop/restart/monitor the servers of the domain (cluster or non-clustered) from a single URL that is admin console. (You need to understand the concept of Nodemanager as well to be more clear on ho start/stop/restart of servers running on a remote machine is possible using admin server/console...I will describe it in the following section)

  • It also enables you to deploy/undeploy applications on the servers within the domain.

  • Allows you to configure services like JDBC, JMS, Logging..etc

  • It is recommended to keep your admin server running on an individual physical server (host) and configure rest of the managed server on the different physical  servers(s) or hosts.

admn-console



What is Managed Server ?

  • Managed servers are those which actually hosts your applications (JAR, WAR, EAR). In other words you deply your application on managed servers.

  • As of now, Oracle has not commented on the maximum number of managed server a domain can have so, you can have as many as you need for your domain.



How the communication happens between Admin Server and Managed Server(s) ?

  • The Administration Server stores the master copy of the domain configuration in a file called config.xml, including the configuration for all managed servers in the domain.

  • Each Managed Server stores a local copy of its configuration.

  • When a Managed Server starts, it connects to the Admin Server to synchronize the configuration.

  • When configuration is changed, the Administration Server sends changed configuration to Managed Servers.



What is a cluster ?

  • A cluster is a group of Managed Servers running simultaneously and working together to provide high availability, reliability/scalability and fail-over.

  • All servers in a cluster must also be in the same domain.

  • All servers within a cluster must be at the same Maintenance Pack Level.

  • Clustered servers can be on the same or different
    machines.

  • There can be multiple clusters in a domain.

  • In the picture below the brown pentagons inside the purple ovals represent managed servers.



clstr



What is Node manager ?

  • Node manager is a process running on a physical server that enables you to start, stop, suspend, and restart WebLogic Server instances remotely

  • It must be configured and running on each physical server that hosts WebLogic Server instances which you want to control with Node Manager

  • It is not associated with a domain and can start, stop, suspend, and restart any server instance that resides on the same physical server.

  • Node manager is an optional entity but required to tart, stop, suspend, and restart servers using the Admin Console



nodemanager-1

NOTE: In the picture above the BLACK BOXES represents the individual Physical Servers OR Hosts.





What is Machine wrt Weblogic Domain ?

  • A machine is a logical representation of the physical machine (computer) that hosts one or more WebLogic Server instances.

  • If you run Node Manager on a machine that does not host an Administration Server, as is typical in production environments, you must create a machine configuration for each computer that runs a Node Manager process.

  • The machine configuration includes information about the listen address and port number that the Administration Server uses to connect with the Node Manager process running on that machine.

  • In a cluster, WebLogic Server uses machines to ensure that server session data is replicated on separate pieces of hardware.

  • If the computer runs a UNIX operating system, you can create a UNIX machine configuration, which enables you to assign the process under which a WebLogic Server instance runs to a user ID (UID) or group ID (GID). The WebLogic Server process is assigned (bound) to the UID or GID after the computer has carried out all privileged startup actions.

















I think, Its a good time now to start with the weblogic domain configuration, what you say ???

Yeah,OK..Lets move on to the weblogic configuration wizard.....

STEPS for configuring a Weblogic domain would go as follows:


1.Below is the location where all your common scripts are located. So first traverse to that location:

cnf-1

2. config.sh is the script which helps you in creating and configuring a weblogic domain, so just invoke the configuration wizard by running the script, then select the radio button "Create a New Weblogic Domain" 

$config.sh

cnf-2

3. No change, just click on "Next", coz the default installer has already been selected.

cnf-3

4. Provide a name to your domain. and notice the domain location.

cnf-5

5. Enter credentials for the admin user "weblogic". The same user will be able to login to admin console and perform the administrative tasks.



cnf-6

6. A domain can be configured in either Development mode or in Production mode. Will discuss the difference in coming sessions.



cnf-7

7. Just select Admin Server and rest of the tasks can be performed from admin console.

cnf-8

8. Provide Admin Server name, hostname and the port number. Make sure the port is open.

cnf-9

9. Click on "Create" which will initiate the process of creating the domain.

cnf-10



cnf-11



10. Click on "Done" to complete the process.

cnf-12

11. Now, go to the prompt and check your domain directory and home.

cnf-13

12. execute the script startWeblogic.sh to start the Admin Server. Enter weblogic credentials when prompted.

cnf-14



cnf-15

13. Access the console. The URL will be if format:

http://<hostname>:<weblogic admin server port>/console

cnf-16



Thanks and Regards,

Diwakar Singh

Keep learning...Keep growing...

No comments:

Post a Comment

Chapter 09 : Application Deployment in Weblogic

To get into the practical session, lets first understand some basics of deployment process... What is Application Deployment ? AN...