Skip to content

Instantly share code, notes, and snippets.

@antonio-petricca
Forked from AKSarav/WeblogicREST-Examples
Created September 16, 2021 13:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antonio-petricca/819b0cb9cd13e117f3f854bde67f553a to your computer and use it in GitHub Desktop.
Save antonio-petricca/819b0cb9cd13e117f3f854bde67f553a to your computer and use it in GitHub Desktop.
DeploymentTasks-WeblogicREST
deploy an application
---------------------
curl -v \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-H Content-Type:application/json \
-d "{
name: 'mwiapp',
applicationPath : '/apps/oracle-weblogic/applications/mwiapp.war',
targets: ['mwiCluster1'],
plan: '/apps/oracle-weblogic/applications/plan.xml',
deploymentOptions: {}
}" \
-X POST http://localhost:17001/management/weblogic/latest/domainRuntime/deploymentManager/deploy
Get State
----------
curl -v \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-H Content-Type:application/json \
-d "{
target: 'mwiCluster1'
}" \
-X POST http://localhost:17001/management/weblogic/latest/domainRuntime/deploymentManager/appDeploymentRuntimes/mwiapp/getState
Redeploy an Application
------------------------
curl -v \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-H Content-Type:application/json \
-d "{
targets: ['mwiCluster1'],
plan: '/apps/oracle-weblogic/applications/plan.xml',
deploymentOptions: {}
}" \
-X POST http://localhost:17001/management/weblogic/latest/domainRuntime/deploymentManager/appDeploymentRuntimes/mwiapp/redeploy
Start an Application
--------------------
curl -v \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-H Content-Type:application/json \
-d "{
targets: ['mwiCluster1'],
deploymentOptions: {}
}" \
-X POST http://localhost:17001/management/weblogic/latest/domainRuntime/deploymentManager/appDeploymentRuntimes/mwiapp/start
Stop an Application
--------------------
curl -v \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-H Content-Type:application/json \
-d "{
targets: ['mwiCluster1'],
deploymentOptions: {}
}" \
-X POST http://localhost:17001/management/weblogic/latest/domainRuntime/deploymentManager/appDeploymentRuntimes/mwiapp/stop
undeploy an Application
------------------------
curl -v \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-H Content-Type:application/json \
-d "{
targets: ['mwiCluster1'],
deploymentOptions: {}
}" \
-X POST http://localhost:17001/management/weblogic/latest/domainRuntime/deploymentManager/appDeploymentRuntimes/mwiapp/undeploy
update an Application
----------------------
curl -v \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-H Content-Type:application/json \
-d "{
targets: ['mwiCluster1'],
deploymentOptions: {},
plan: '/apps/oracle-weblogic/applications/plan.xml'
}" \
-X POST http://localhost:17001/management/weblogic/latest/domainRuntime/deploymentManager/appDeploymentRuntimes/mwiapp/update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment