- WildFly Cookbook
- Luigi Fugaro
- 247字
- 2021-07-16 13:38:18
Stopping and starting your server groups via the CLI
In this recipe, we will learn how to stop and start an entire server group using the CLI. Since a server can belong to more than one server group, you might want to stop or start all the servers at once, and thus stop or start the server group.
Getting ready
For this recipe, both the domain controller and host controllers should be up and running. For their configuration, refer to the recipe Connecting the host controller to the domain controller in this chapter.
How to do it…
- Open your terminal and do as follows:
- With the command
ls
, you can list the entire context that you walk through. What we want to do is to "stop" the entire server group namedserver-group-REST-app
:[domain@localhost:9990 /] /server-group=server-group-REST-app:stop-servers() { "outcome" => "success", "result" => undefined, "server-groups" => undefined } [domain@localhost:9990 /]
- Now let's start the server-group again, by invoking the
start-servers
method:[domain@localhost:9990 /] /server-group=server-group-REST-app:start-servers() { "outcome" => "success", "result" => undefined, "server-groups" => undefined } [domain@localhost:9990 /]
How it works...
In the CLI, you have basically remapped the entire configuration, hence, if you look at the domain.xml
or host.xml
files, you find pretty much the same hierarchy.
In our recipe we wanted to stop a server group, so if you look at the domain.xml
you can determine the contexts and commands – you can see the available commands by hitting the Tab key next to :
or /
.
- R語言數(shù)據(jù)分析從入門到精通
- 編程珠璣(續(xù))
- INSTANT CakePHP Starter
- Learning Python Design Patterns(Second Edition)
- RabbitMQ Cookbook
- Android程序設(shè)計(jì)基礎(chǔ)
- Protocol-Oriented Programming with Swift
- 微服務(wù)從小白到專家:Spring Cloud和Kubernetes實(shí)戰(zhàn)
- Orleans:構(gòu)建高性能分布式Actor服務(wù)
- Python趣味編程與精彩實(shí)例
- 超簡(jiǎn)單:Photoshop+JavaScript+Python智能修圖與圖像自動(dòng)化處理
- 青少年學(xué)Python(第2冊(cè))
- 算法秘籍
- Java Hibernate Cookbook
- INSTANT Apache Hive Essentials How-to