Available Jvm's
-------------------
Hotspot JVM
IBM JVM
Oracle JVM
Open JDK
Different Application Servers
------------------------------------
JBoss Application Server
Weblogic
Websphere
Glassfish
Oracle Application Server
Domain Controller(DC)
Host Controller(HC)
Host Controller connects to DC, it's HC's responsibility to connect to DC.
DC is would just run and up, whenever HC connects to DC,DC got all the right to control over HC\s and knowledge ahout HC.
You must put servers in server groups in jboss.
server groups may span acrooss differet hosts
server1 from host1(HC) and server2 from host2(HC) can belongs to same group.
command to start DC - domain.bat
1) It will find out the location of the configuration file. -Djboss.domain.base.dir (bedefault points to jboss installation dir)
2) Go to the configuraiton folder and loads the host.xml in the memory.
3)Host will check <domain-controllerr>, wheather to act as DC or HC.
<domain-controllerr>
<local/> - it's DC
</domain-controllerr>
<domain-controllerr>
<remote host="192.168.0.14" port="9999"/> - it's HC
</domain-controllerr>
with help of <local/> or <remote/> it'll identify it's a DC or HC.
Documents\vamsi\EAP-6.4.0\domain\configuration
host.xml - this is where your <domain-controllerr> configurations.
host-slave.xml - sample file given by jboss
host-master.xml - sample file given by jboss
HC is the service running on a host.
IBM practice - One DC and two HC's installed in different mechines to avoid port conflicts
Configuring DC:
1) We will use host-master.xml
2) specify name to your domain controller
3) Modify interfaces and provide ip address rather than using localhost
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:192.168.1.208}"/>
</interface>
</interfaces>
Documents\vamsi\DC_replica\dc\configuration\host-master.xml
start domain controller
domain.bat -Djboss.domain.base.dir=C:\Users\edi5752\Documents\vamsi\DC_replica\dc -bydefault it picks up host.xml
-> domain.bat -Djboss.domain.base.dir=C:\Users\edi5752\Documents\vamsi\DC_replica\dc --host-config=host-master.xml
C:\Users\edi5752\Documents\vamsi\EAP-6.4.0\bin>domain.bat -Djboss.domain.base.di
r=C:\Users\edi5752\Documents\vamsi\DC_replica\dc --host-config=host-master.xml
Admin console listening on http://192.168.16.1:9990
Http management interface listening on http://192.168.16.1:9990/management
Documents\vamsi\DC_replica\dc\configuration\domain.xml
The Domain.xml is equalent to standalone.xml in standalone mode.
DC uses host.xml and domain.xml
HC uses host.xml, a unique host.xml is defined for each HC in DC.
When your HC get started, DC must be available, since it need a lot of information from DC while it's starting. It doesn't harm if DC is down once HC is up.
HC's only use host.xml not domain.xml found in it's configuration folder, we can delete them as they have no use.
Configure Host Controller(HC1):
1) We will use host-slave.xml in HC1
2) Modify host-slave.xml
provide a name to this host: Documents\vamsi\DC_replica\hc1\configuration\host-slave.xml
<host name="vamshi-host1" xmlns="urn:jboss:domain:1.7">
3) Increment the native port of HC1(port 9999) is already getting used by DC on same machine)
Documents\vamsi\DC_replica\hc1\configuration\host-slave.xml
<management-interfaces>
<native-interface security-realm="ManagementRealm">
<socket interface="management" port="${jboss.management.native.port:19999}"/>
</native-interface>
</management-interfaces>
4) Specify location(ip) of domain controller and native port of DC, so that HC can connect to DC while starting up.
<domain-controller>
<remote host="${jboss.domain.master.address:192.168.1.208}" port="${jboss.domain.master.port:9999}" security-realm="ManagementRealm"/>
</domain-controller>
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:192.168.1.208}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:192.168.1.208}"/>
</interface>
<interface name="unsecure">
<!-- Used for IIOP sockets in the standard configuration.
To secure JacORB you need to setup SSL -->
<inet-address value="${jboss.bind.address.unsecure:192.168.1.208}"/>
</interface>
</interfaces>
5) Ensure all the servers on this host using unique ports
6) starting host controller
domain.bat -Djboss.domain.base.dir=C:\Users\edi5752\Documents\vamsi\DC_replica\hc1 --host-config=host-slave.xml
You can find the following statement recorded to domain consile as soon as it revieves connection from HC1.
[Host Controller] 12:04:00,944 INFO [org.jboss.as.domain] (Host Controller Serv
ice Threads - 31) JBAS010918: Registered remote slave host "vamshi-host1", JBoss
EAP 6.4.0.GA (AS 7.5.0.Final-redhat-21)
Configure Host Controller(HC2):
Follow the same steps you did for HC1 along with the following one to avoid port conflicts.
For the second HC change ports : port-offset incremented by 1 here.
<servers>
<server name="server-one" group="main-server-group">
<socket-bindings port-offset="1"/>
</server>
<server name="server-two" group="other-server-group">
<!-- server-two avoids port conflicts by incrementing the ports in
the default socket-group declared in the server-group -->
<socket-bindings port-offset="151"/>
</server>
</servers>
domain.bat -Djboss.domain.base.dir=C:\Users\edi5752\Documents\vamsi\DC_replica\hc2 --host-config=host-slave.xml
C:\Users\edi5752\Documents\vamsi\EAP-6.4.0\bin>domain.bat -Djboss.domain.base.di
r=C:\Users\edi5752\Documents\vamsi\DC_replica\hc2 --host-config=host-slave.xml
Delete Configurations:
All these steps need to be followed sequentially.
- Stop all servers.
- Delete all servers for all hosts.
- Delete server groups.
You can stop/start servers from the console.
All these steps need to be followed sequentially.
- Create server groups.
- Create all servers for all hosts.
- Start all servers.
No comments:
Post a Comment