Skip to content

Instantly share code, notes, and snippets.

@rantav
Created December 30, 2010 07:16
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 rantav/759549 to your computer and use it in GitHub Desktop.
Save rantav/759549 to your computer and use it in GitHub Desktop.
Glu: upload a model, then create an execution plan, then execute it
######################################################
# Define a system model (fill in the entries array with your model.
######################################################
$ curl -D - -u glua:password -d '{"entries": [],"fabric": "glu-dev-1"}' -H "Content-Type: text/json" http://localhost:8080/console/rest/v1/glu-dev-1/system/model
HTTP/1.1 201 Created
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=E68FFC0F95FA944FBCCA83A62F922B6E; Path=/console
Set-Cookie: rememberMe=deleteMe; Path=/console; Expires=Wed, 29-Dec-2010 07:09:52 GMT
Set-Cookie: fabric=Kqs9Bg72Lg1z; Expires=Fri, 30-Dec-2011 07:09:52 GMT; Path=/console
Set-Cookie: product=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/console
Content-Type: text/html;charset=utf-8
Transfer-Encoding: chunked
Date: Thu, 30 Dec 2010 07:09:52 GMT
id=f9613355767d4ae9caaef4c16be29cb070f69027
######################################################
# System ID: f9613355767d4ae9caaef4c16be29cb070f69027
# Now create a plan. Adjust &planAction, & systemFilter and and &order per your needs
######################################################
$ curl -D - -u glua:password -H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' -d 'planAction=deploy' http://localhost:8080/console/rest/v1/glu-dev-1/plans
HTTP/1.1 201 Created
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=615F9565EF60590ACE83FBE86439AD22; Path=/console
Set-Cookie: rememberMe=deleteMe; Path=/console; Expires=Wed, 29-Dec-2010 07:06:30 GMT
Location: http://192.168.34.113:8080/console/rest/v1/glu-dev-1/plan/6e4f7806
Set-Cookie: fabric=Kqs9Bg72Lg1z; Expires=Fri, 30-Dec-2011 07:06:30 GMT; Path=/console
Set-Cookie: product=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/console
Content-Type: text/html;charset=utf-8
Transfer-Encoding: chunked
Date: Thu, 30 Dec 2010 07:06:30 GMT
6e4f7806
######################################################
# Plan ID: 6e4f7806
# Use Location header to execute the plan
# Location: http://192.168.34.113:8080/console/rest/v1/glu-dev-1/plan/6e4f7806
# Now execute this plan.
######################################################
$ curl -D - -u glua:password -d '' http://192.168.34.113:8080/console/rest/v1/glu-dev-1/plan/6e4f7806
HTTP/1.1 201 Created
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=6308DAFABB3CB245609BF6EBE9ED2082; Path=/console
Set-Cookie: rememberMe=deleteMe; Path=/console; Expires=Wed, 29-Dec-2010 07:07:01 GMT
Location: http://192.168.34.113:8080/console/rest/v1/glu-dev-1/plan/6e4f7806/execution/2
Set-Cookie: fabric=Kqs9Bg72Lg1z; Expires=Fri, 30-Dec-2011 07:07:01 GMT; Path=/console
Set-Cookie: product=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/console
Content-Type: text/html;charset=utf-8
Transfer-Encoding: chunked
Date: Thu, 30 Dec 2010 07:07:01 GMT
2
######################################################
# Execution ID: 2
# Use the Location header to track the progress of the plan
# Location: http://192.168.34.113:8080/console/rest/v1/glu-dev-1/plan/6e4f7806/execution/2
######################################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment