Created
September 30, 2016 02:02
-
-
Save nobuhikosekiya/ada96753b88a6d3c7bc71e742b94f63d to your computer and use it in GitHub Desktop.
REST API samples to deploy appilcations to WebLogic Server 12.2.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Upload and deploy a app from local. | |
curl -v --user user:password -H X-Requested-By:MyClient -H Accept:application/json -H Content-Type:multipart/form-data \ | |
-F "model={ | |
name: 'myapp', | |
targets: [ { identity: [ 'servers' , 'AdminServer' ] } ] | |
}" \ | |
-F "sourcePath=@target\myapp.war" -H "Prefer:respond-async" \ | |
-X POST http://192.168.99.100:8001/management/weblogic/latest/edit/appDeployments | |
# Redeploy a app. | |
curl -v --user user:password -H X-Requested-By:MyClient -H Accept:application/json -H Content-Type:multipart/form-data \ | |
-F "model={ | |
name: 'myapp', | |
targets: [ { identity: [ 'servers' , 'AdminServer' ] } ] | |
}" \ | |
-F "sourcePath=@target\myapp.war" -H "Prefer:respond-async" \ | |
-X POST http://192.168.99.100:8001/management/weblogic/latest/edit/appDeployments/myapp/redeploy | |
# Undeploy a app | |
curl -v --user user:password -H X-Requested-By:MyClient \ | |
-X DELETE http://192.168.99.100:8001/management/weblogic/latest/edit/appDeployments/myapp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment