Saturday 12 March 2016

server groups

A server group is a collection of server instances that are managed and configured as one. In a managed domain, every application server instance belongs to a server group, even if it is the only member. The server instances in a group share the same profile configuration and deployed content. 

All servers (server instances) of the same server group perform the same tasks because they share the same profile configuration and deployed content.

A domain can consist of multiple server groups. Different server groups can be configured with different profiles and deployments. A domain can be configured with different server tiers providing different services.

Different server groups can also have the same profile and deployments. This can, for example, allow for rolling application upgrades where the application is upgraded on one server group and then updated on a second server group, avoiding a complete service outage.

Adding a Server Group

Launch the management CLI in Linux by typing the following text at the command prompt:
[domain@192.168.1.12:9999 /] /server-group=rpa-group:add(profile=full-ha, socket-binding-group=full-ha-sockets)
{
    "outcome" => "success",
    "result" => undefined,
    "server-groups" => undefined
}

fallowing content has been added to domain.xml
<server-groups>
        <server-group name="rpa-group" profile="full-ha">
            <socket-binding-group ref="full-ha-sockets"/>
        </server-group>
    </server-groups>


A server group includes the following mandatory attributes:

name: the server group name.
profile: the server group profile name.
socket-binding-group: the default socket binding group used for servers in the group. This name can be overridden on a per-server basis in host.xml. However, this is a mandatory element for every server group and the domain cannot start if it is missing.

A server group includes the following optional attributes:

deployments: the deployment content to be deployed on the servers in the group.
system-properties: the system properties to be set on servers in the group
jvm: the default JVM settings for all servers in the group. The host controller merges these settings with any other configuration provided in host.xml to derive the settings used to launch the server's JVM.
socket-binding-port-offset: the default offset to be added to the port values given by the socket binding group.

Removing a Server Group

You may want to remove a server group when you no longer need it—for example, in situations where no applications are running on these server groups.

[domain@192.168.1.12:9999 /] /server-group=main-server-group:remove
{
    "outcome" => "success",
    "result" => undefined,
    "server-groups" => undefined
}

Note : Unable to access Web Admin Console on JBoss EAP 6.2 and facing error : "Insufficient privileges to access".

When "domain.xml" is used without any profile and "server-group" then admin console shows "insufficient privileges"

Resolution
EAP 6.2.0 web console unnecessarily checks for the existence of a server-group.
As a work around, add a dummy profile and server group.

Adding a Server to a Server Group
[domain@192.168.1.12:9999 /] /host=slave01/server-config=rpa1:add(auto-start=true, group=rpa-group, socket-binding-port-offset=100)
{
    "outcome" => "success",
    "result" => undefined,
    "server-groups" => undefined
}


HOSTNAME is defined in host.xml in the JBOSS_HOME/domain/configuration directory.
SERVER_NAME is the name of the server that you want to add.
SERVER_GROUP_NAME is the name of the server group to which you want to add the new server.

fallowing content has been added to host.xml of slave01 HC.
<servers>
        <server name="rpa1" group="rpa-group" auto-start="true">
            <socket-bindings port-offset="100"/>
        </server>

Starting Servers in a Server Group
[domain@192.168.1.12:9999 /] /server-group=rpa-group:start-servers()
{
    "outcome" => "success",
    "result" => undefined,
    "server-groups" => undefined
}

Stopping Servers in a Server Group
[domain@192.168.1.12:9999 /] /server-group=rpa-group:stop-servers
{
    "outcome" => "success",
    "result" => undefined,
    "server-groups" => undefined
}

Removing a server

first stop the server, then you can able to remove the server.
[domain@192.168.1.12:9999 /] /host=slave02/server-config=server-two:stop(server=true)
{
    "outcome" => "success",
    "result" => "STOPPING"
}

[domain@192.168.1.12:9999 /] /host=slave02/server-config=server-two:remove()
{
    "outcome" => "success",
    "result" => undefined,
    "server-groups" => undefined
}



No comments: