Hello Everyone! I would like to help others and myself by gathering and summarizing the available information on starting and stopping Wildfly in domain mode. For this reason, I am asking for your help: we need to figure out the "correct" commands for the use cases that follow. First, I'll define the scope and finally I'll present my questions. IMHO, at the moment, this information is pretty much scattered and/or inconsistent. I will collect the results and produce a summary. Thanks.
The example domain (6 servers in 3 hosts):
Hosts: H1, H2, H3
Server-groups: G1, G2
Servers: H1G1S1, H2G1S2, H3G1S3, H1G2S4, H2G2S5, H3G2S6
SRVRS | GROUP 1 | GROUP2 |
HOST 1 | H1G1S1 (S1) | H1G2S4 (S4) |
HOST 2 | H2G1S2 (S2) | H2G2S5 (S5) |
HOST 3 | H3G1S3 (S3) | H3G2S6 (S6) |
The targets (domain mode):
The target commands:
- START (start the target)
- RUN (basically means checking if the target is running)
- STOP (stop the target)
The command execution:
- Command to be run (START, RUN, STOP) on a target (HOST, SERVER-GROUP, or SERVER)
- Result of the command execution (SUCCESS, FAILURE) and actual result (see question b)
Different states of a target:
- Stopped (initial state)
- Starting (after START)
- Started (after START success)
- Running (automatically after 'Started')
- Stopping (after STOP)
- Stopped (after STOP success, initial state)
Answers should make use of CLI and/or CLI scripting.
a) How to issue each target command on each target?
- HOST, how to execute START, RUN, STOP?
- SERVER-GROUP, how to execute START, RUN, STOP?
- SERVER, how to execute START, RUN, STOP?
b) How to query state of HOST, SERVER-GROUP, and SERVER (so same set of queries for each)? Also, please comment if a particular query is not feasible or reasonable for that target. The return type can be Boolean, or JSON, for instance...
- [Boolean/JSON/etc] target.isStopped()
- [Boolean/JSON/etc] target.isStarting()
- [Boolean/JSON/etc] target.isStarted()
- [Boolean/JSON/etc] target.isRunning()
- [Boolean/JSON/etc] target.isStopping()
- (same as first)
- [Boolean/JSON/etc] target.isHealthy() (bonus query for basic health checking, like memory, cpu, etc.)