Closed mikljohansson closed 9 years ago
Ping? We really like your utility, it's by far the best console client for Marathon we've found. The marathonctl tool would really help our dev and ops teams when they interact with Marathon in the console environment they're normally in. Having an easy way to run the tool, e.g. alias to "docker run .." would go a long ways in getting the tool used by people, as building from source or redistributing a binary is an issue.
Thanks, Mikael
Thanks! And sorry for the delay. I setup automated builds for this on the docker hub, but as of right now the status is still "pending". Will check back later to see if it worked
This appears to be working with docker hub now
$ sudo docker run --rm --net=host shoenig/marathonctl:latest
config error: no host info provided
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 [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]
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
Added Dockerfile that uses golang:onbuild to automatically build and package the app binary. This enables very simple deployment and usage e.g.
If this PR be merged then an automatic build with a webhook should be setup on https://registry.hub.docker.com/u/shoenig to automatically build the Docker image whenever the github repo is modified.