JBoss EAP & Wildfly

주로 사용하는 JBoss 시작 옵션을 자동화 해보기

$ ./standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0 -Dorg.jboss.as.logging.per-deployment=false 를 cli 로 대체하는 방법은?

주로 사용되는 실행 옵션 중 대표적인 것들을 cli 를 통해서 지정하여 옵션을 지정하지 않도록 하는 방법이다.

다음과 같은  실행 옵션 중 3 가지를 cli 를 변경하여 한번만 수행하면 이후에는 옵션을 지정하지 않아도 된다.

$ ./standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0 -Dorg.jboss.as.logging.per-deployment=false

cli 스크립트


[jboss@f17optiplex bin]$ ./jboss-cli.sh

You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.

[disconnected /] connect

[standalone@localhost:9999 /] /interface=public:write-attribute(name=inet-address,value="${jboss.bind.address:0.0.0.0}")

{

    "outcome" => "success",

    "response-headers" => {

        "operation-requires-reload" => true,

        "process-state" => "reload-required"

    }

}

[standalone@localhost:9999 /] /interface=management:write-attribute(name=inet-address,value="${jboss.bind.address:0.0.0.0}") 

{

    "outcome" => "success",

    "response-headers" => {

        "operation-requires-reload" => true,

        "process-state" => "reload-required"

    }

}

[standalone@localhost:9999 /] /system-property=org.jboss.as.logging.per-deployment:add(value=false) 

{

    "outcome" => "success",

    "response-headers" => {"process-state" => "reload-required"}

}

[standalone@localhost:9999 /]

기본적인 명령 목록

명령 설명
cn (or cd) 노드 (디렉토리)의 경로 변경
connect 서버 인스턴스에 연결
deploy 애플리케이션 배포
help (or h) 도움말  표시
history 히스토리
ls 현 노드 (디렉토리)를 나열
pwn (or pwd) 현 노드 (디렉토리)까지의 경로 표시
quit (or q) CLI 종료
undeploy 애플리케이션 배포 중단
version 버전 및 환경 정보를 표시