18.4 CLI에서 배포
CLI를 사 용한 배포 방법에 대해 설명한다. CLI에서 배포하려면 deploy 명령어를 사용한다.
CLI에서 애플리케이션 배포
- deploy 명령을 실행하여 /EAP6book/download/example.war를 배포하는 예제이다.
[standalone@localhost:9999 /] deploy /EAP6book/download/example.war
[standalone@localhost:9999 /] deploy -l
NAME RUNTIME-NAME ENABLED STATUS
example.war example.war true OK
CLI에서 애플리케이션 제거
CLI 로 undeploy 하는 방법에 대해 설명한다. 스탠드얼론 모드에서는 애플리케이션에 대해 undeploy 명령어를 실행하기만 하면 배포된 애플리케이션이 삭제된다.
[standalone@localhost:9999 /] undeploy example.war
도메인 모드에서는 배포된 example.war 애플리케이션을 main-server-group 에서 제거하기 위해 remove 명령어를 사용한다.
[domain@localhost:9999 /] /server-group=main-server-group/deployment=example.war:remove
{
"outcome" => "success",
"result" => undefined,
"server-groups" => \{
"main-server-group" => \{
"host" => \{
"master" => \{
"server-one" => \{"response" => \{"outcome" => "success"}},
"server-two" => \{"response" => \{"outcome" => "success"}}
}
}
}
}
}