sabato 2 gennaio 2016

How to create a WLS 12.2.1 Domain with Dynamic Cluster, OTD Runtime and Domain Partitions

You have learned :


Now we can proceed with:
- Creation of a WLS 12.2.1 domain
- Creation of a Dynamic Cluster
- Creation of an OTD Runtime, so WLS can update the OTD configuration. 
- Creation of a Domain Partition (Virtual Target, Resource Group)

To create a WLS 12.2.1 domain you must execute the config.sh from /home/weblogic/Oracle/wls1221/oracle_common/common/bin


Create wls_domain under /home/weblogic/Oracle/wls1221/user_projects/domains/


Select Oracle Enterprise Manager - Restricted JRF - 12.2.1 [em] and do not deselect nothing


Click Next:


user weblogic password welcome1


Select Production:


Select Administration Server:


Click on Next: (remember that we are using port 8001 for OTD)


Click on Create:


Click on Next:


Click on Finish:


Start the Node Manager (the default configuration is ok, remember that there is another node manager on port 5557 for OTD)

Go to the directory:
/home/weblogic/Oracle/wls1221/user_projects/domains/wls_domain/bin
execute the command:
nohup ./startNodeManager.sh &


With the command:
tail -f nohup.out
you can see if the node manager is started on the correct port 5556
(ctrl+c to exit from tail)


you can start now WLS:

Go to the directory:
/home/weblogic/Oracle/wls1221/user_projects/domains/wls_domain/
execute the command:
nohup ./startWebLogic.sh



We are in Production Mode so the user and the password must be provided:


Wait untill the server is Running.
Go to the directory:
/home/weblogic/Oracle/wls1221/user_projects/domains/wls_domain/
execute the command:
tail -f nohup.out 
to see if the server is runnig



Now you can login in EM console:
http://localhost:7001/em
(you can use also the classic console http://localhost:7001/console)

In this guide I'll use always the new em console, so we can learn how to use it :)



We will create now a boot.properties file so we can start the server without providing user and passord: (is the same operation that we have already done in the previous POST)

You must:
- stop the Admin Server
- create a directory named security 
in /home/weblogic/Oracle/wls1221/user_projects/domains/wls_domain/servers/AdminServer
- create the file boot.properties inside security dir
- write inside boot.properties:
username=weblogic
password=welcome1

see the image:



We need also to modify the startWebLogic.sh file, we need to add :
JAVA_OPTIONS="-XX:+UnlockCommercialFeatures -XX:+ResourceManagement -XX:+UseG1GC
We need it for Resource Consumption MAnagement configurations that we will do later:

The line is already present inside the startWebLogic.sh file, you must remove only the # at the beginning of the line.

Go to the directory:
/home/weblogic/Oracle/wls1221/user_projects/domains/wls_domain/bin
execute the command:
gedit startWebLogic.sh

see the image:


Restart the Admin Server:


Now we have:
otd_omain: 1 server running + 1 node manager running
wls_domain:  1 server running + 1 node manager running


Login in the Admin Server:
http://localhost:7001/em
Lock & Edit the console for next configurations:


Now we configure a new Machine in wls_domain:
 (is the same operation that we have already done in the previous POST)







Now we can proceed with the creation of a Dynamic Cluster:




Here you can choose the dimension of your Dynamic Cluster:


We are working on a single Oracle Linux VM, so we can select "Use a single machine ..." then select the name of the Machine that you have previous created.


The range of the ports that will be automatically assigned to the new managed servers in the Dynamic Cluster (at the moment we are using 7001 and 8001 for the two Admin Server)




Activate Changes from em console:


Now we proceed with the OTD Runtime configuration:


We MUST enable the Lifecycle Manager, this require the restart of the Admin Server:


We must restart the Admin Server:


Select the Admin Server clicking on the left of the item AdminServer(admin) then you can stop it:




Restart the Admin Server:


Login in em console: http://localhost:7001/em
Select OTD Runtimes:



 Remember the configurations that we have done in the previous POST:


We have created an OTD Runtime:


Start the Dynamic Cluster:




You can refresh the page so you can see when the servers are up and running.



Now we can start to configure a Domain Partition, the first thing to do is to create a Virtual Target:


Lock & Edit the em console:



With the Url Prefix: /dp1 we will have:

http://localhost:7101/dp1 (if we not use OTD)
http://localhost:7102/dp1 (if we not use OTD)

http://localhost:8080/dp1 (if we use the OTD)



Activate Changes in em console:


Select Domain Partitions:



Here is important to check:

- Use OTD for load balancing
- OTD Runtime: choose the previuos OTD Runtime configured.


Select a Virtual Target and set as Default:


Create a Resource Group and assign a Target:



As you can read in the next image we must restart the Admin Server.
We can restart only the Admin Server without restarting the Dynamic Cluster:



Select and Shutdown only the Admin Server:




As you can see now we have:

otd_domain: 1 wls (AdminServer)  running + 1 node manager running
wls_domain 2 wls (ManagedServer of the Dynamic Cluster) running + 1 node manager running

The AdminServer in wls_domain is stopped and now we can restart it:


Login in em console:
http://localhost:7001/em

Select:
WebLogic Domain->Environment->Domain Partitions

Select Domain Partition dp1 and start it:



Domain Partition dp1 is started:


Now you can see in OTD console that we have an updated configuration:

Login in OTD console:
http://localhost:8001/em
Select OTD Configurations:



Click on Virtual Servers Box:


Click on HTTP/S Origin Servers:


You can see that OTD now know that there are 2 Managed Servers running in MTCluster in wls_domain:


If you click on Virtual Servers:


here you can see the route configuration:


In the next post we will deploy applications on different domain partitions and we will create Diagnostic Modules and Resource Consumption Management Rules on it.

Nessun commento:

Posta un commento