7.5. HTTP API を使用したアプリケーションのデプロイ
HTTP API を使用してアプリケーションを JBoss EAP にデプロイするには、curl
コマンドを使用します。HTTP API の使用に関する詳細は、HTTP API を参照してください。
7.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 ナレッジベースの記事 を参照してください。