Book Image

Wildfly Cookbook

Book Image

Wildfly Cookbook

Overview of this book

Table of Contents (23 chapters)
WildFly Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a server group


In this recipe, you will learn how to create a server group, by invoking a command to the CLI. This applies only within the domain mode.

Getting ready

Remember, I'm running WildFly remotely, bound to 192.168.59.103 as IP. WildFly is already up and running.

How to do it…

Open a new terminal window and run the following code:

$ cd $WILDFLY_HOME
$ ./bin/jboss-cli.sh -c --controller=192.168.59.103:9990 --user=wildfly --password=cookbook.2015 --command="/server-group=next-server-group:add(profile=ha,socket-binding-group=ha-sockets)"
{
    "outcome" => "success",
    "result" => undefined,
    "server-groups" => undefined
}

Note

The server group is ready to use without requiring any reload or restart. This means that it can be used to add servers to it. For the moment, it is just an empty server group. Later in this chapter, we will see how to add a server to a server group, using the CLI.

In case you need to remove the server group, just use the remove method on it, as...