6.5. HTTP API를 사용하여 애플리케이션 배포 관리
애플리케이션은 curl 명령과 함께 HTTP API를 사용하여 JBoss EAP에 배포할 수 있습니다. HTTP API 사용에 대한 자세한 내용은 HTTP API 섹션을 참조하십시오.
6.5.1. HTTP API를 사용하는 독립 실행형 서버에서 애플리케이션 배포 관리 링크 복사링크가 클립보드에 복사되었습니다!
기본적으로 HTTP API는 http://HOST:PORT/management 에서 액세스할 수 있습니다(예: http://localhost:9990/management ).
애플리케이션 배포
$ curl --digest -L -D - http://HOST:PORT/management --header "Content-Type: application/json" -u USER:PASSWORD -d '{"operation" : "composite", "address" : [], "steps" : [{"operation" : "add", "address" : {"deployment" : "test-application.war"}, "content" : [{"url" : "file:/path/to/test-application.war"}]},{"operation" : "deploy", "address" : {"deployment" : "test-application.war"}}],"json.pretty":1}'
애플리케이션 배포 취소
$ curl --digest -L -D - http://HOST:PORT/management --header "Content-Type: application/json" -u USER:PASSWORD -d '{"operation" : "composite", "address" : [], "steps" : [{"operation" : "undeploy", "address" : {"deployment" : "test-application.war"}},{"operation" : "remove", "address" : {"deployment" : "test-application.war"}}],"json.pretty":1}'
JSON 요청을 프로그래밍 방식으로 생성하는 방법에 대한 자세한 내용은 Red Hat Knowledgebase 문서를 참조하십시오.
6.5.2. HTTP API를 사용한 관리형 도메인의 애플리케이션 배포 관리 링크 복사링크가 클립보드에 복사되었습니다!
HTTP API를 사용하여 관리형 도메인에 애플리케이션을 배포하고 배포를 취소할 수 있습니다.
6.5.2.1. HTTP API를 사용하여 관리형 도메인에 애플리케이션 배포 링크 복사링크가 클립보드에 복사되었습니다!
기본적으로 HTTP API는 http://HOST:PORT/management 에서 액세스할 수 있습니다(예: http://localhost:9990/management ).
프로세스
배포를 콘텐츠 리포지토리에 추가합니다.
$ curl --digest -L -D - http://<HOST>:<PORT>/management --header "Content-Type: application/json" -u <USER>:<PASSWORD> -d '{"operation" : "add", "address" : {"deployment" : "test-application.war"}, "content" : [{"url" : "file:</path/to>/test-application.war"}],"json.pretty":1}'원하는 서버 그룹에 배포를 추가합니다.
$ curl --digest -L -D - http://<HOST>:<PORT>/management --header "Content-Type: application/json" -u <USER>:<PASSWORD> -d '{"operation" : "add", "address" : {"server-group" : "main-server-group","deployment":"test-application.war"},"json.pretty":1}'서버 그룹에 애플리케이션을 배포합니다.
$ curl --digest -L -D - http://<HOST>:<PORT>/management --header "Content-Type: application/json" -u <USER>:<PASSWORD> -d '{"operation" : "deploy", "address" : {"server-group" : "main-server-group","deployment":"test-application.war"},"json.pretty":1}'
6.5.2.2. HTTP API를 사용하여 관리형 도메인에서 애플리케이션 배포 취소 링크 복사링크가 클립보드에 복사되었습니다!
기본적으로 HTTP API는 http://HOST:PORT/management 에서 액세스할 수 있습니다(예: http://localhost:9990/management ).
프로세스
할당된 모든 서버 그룹에서 배포를 제거합니다.
$ curl --digest -L -D - http://<HOST>:<PORT>/management --header "Content-Type: application/json" -u <USER>:<PASSWORD> -d '{"operation" : "remove", "address" : {"server-group" : "main-server-group","deployment":"test-application.war"},"json.pretty":1}'콘텐츠 리포지토리에서 배포를 제거합니다.
$ curl --digest -L -D - http://<HOST>:<PORT>/management --header "Content-Type: application/json" -u <USER>:<PASSWORD> -d '{"operation" : "remove", "address" : {"deployment" : "test-application.war"}, "json.pretty":1}'