shoenig / marathonctl

marathonctl is a CLI tool for Marathon
MIT License
100 stars 26 forks source link

deploy destroy is not working #27

Closed scalp42 closed 8 years ago

scalp42 commented 8 years ago

Hi @shoenig

Using master branch, currently if you try to stop a deploy (with destroy) passing the UID, it doesn't work, as in the cli acts like it's missing a parameter.

Example:

root@gz-mesos-scalp-vagrant-aws-1 [gz-antho] ~ # marathonctl -c antho.conf deploy destroy d84181c4-f8ce-4cec-b594-b303a0fef5d7
marathonctl <flags...> [action] <args...>
 Actions
    app
       list                      - list all apps
       versions [id]             - list all versions of apps of id
       show [id]                 - show config and status of app of id (latest version)
       show [id] [version]       - show config and status of app of id and version
       create [jsonfile]         - deploy application defined in jsonfile
       update [jsonfile]         - update application as defined in jsonfile
       update [id] [jsonfile]    - update application id as defined in jsonfile
       update cpu [id] [cpu%]    - update application id to have cpu% of cpu share
       update memory [id] [MB]   - update application id to have MB of memory
       update instances [id] [N] - update application id to have N instances
       restart [id]              - restart app of id
       destroy [id]              - destroy and remove all instances of id

    task
       list               - list all tasks
       list [id]          - list tasks of app of id
       kill [id]          - kill all tasks of app id
       kill [id] [taskid] - kill task taskid of app id
       queue              - list all queued tasks

    group
       list                        - list all groups
       list [groupid]              - list groups in groupid
       create [jsonfile]           - create a group defined in jsonfile
       update [groupid] [jsonfile] - update group groupid as defined in jsonfile
       destroy [groupid]           - destroy group of groupid

    deploy
       list               - list all active deploys
       destroy [deployid] - cancel deployment of [deployid]

    marathon
       leader   - get the current Marathon leader
       abdicate - force the current leader to relinquish control
       ping     - ping Marathon master host[s]

    artifact
       upload [path] [file]   - upload artifact to artifacts store
       get [path]             - get artifact from store
       delete [path]          - delete artifact from store

 Flags
  -c [config file]
  -h [host]
  -u [user:password] (separated by colon)
  -f [format]
       human  (simplified columns, default)
       json   (json on one line)
       jsonpp (json pretty printed)
       raw    (the exact response from Marathon)
shoenig commented 8 years ago

Sorry about that, I typod "deploy cancel" instead of "deploy destroy". It also didn't print anything out after doing a destroy, so I fixed that too.

$ go clean && go build && ./marathonctl -h http://hoenig.ausoff.indeed.net:18080 deploy destroy f8057adb-ef7e-4c7d-82bc-98663c4a1019
DEPLOYID                              VERSION                   
121c330a-600a-4f4a-959e-97d4dde03d4e  2016-02-15T04:20:24.738Z