swarmkit-client

command module
v0.0.0-...-04ba5ad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

README

swarmkit-client

The http client for swarmkit

usage

run
swarmkit-client -s /tmp/manager1/swarm.sock
api
node
# ls all nodes
curl -X GET http://localhost:8888/nodes

# inspect node and display task
curl -X GET http://localhost:8888/nodes/{nodeid:.*}?all=1

# accept node
curl -X POST http://localhost:8888/nodes/{nodeid:.*}/accept

# remove node
curl -X DELETE http://localhost:8888/nodes/{nodeid:.*}

# activate node
 curl -X POST /nodes/{nodeid:.*}/activate
service
# create service
curl -X POST -d '{"name":"redis", "image":"redis:3.0.5"}' http://localhost:8888/services/create

# ls all running services
curl -X GET http://localhost:8888/services

# inspect service
curl -X GET http://localhost:8888/services/{serviceid:.*}

# update service
curl -X POST -d '{...}' http://localhost:8888/services/{serviceid:.*}/update

# delete service
curl -X DELETE http://localhost:8888/services/7zyp89z8zefrq96jga06vho5f
tasks
# list tasks
# GET /tasks?all=1&quiet=1
    all:0 only display running
		  1 display all
	  default 0
curl -X GET http://localhost:8888/tasks?all=1&quiet=1


# inspect task
curl -X GET http://localhost:8888/tasks/{taskid:.*}

# remove task
curl -X DELETE http://localhost:8888//tasts/{taskid:.*}
networks
# list networks
curl -X GET http://localhost:8888/networks

# inspect networks
curl -X GET http://localhost:8888/networks/{networkid:.*}

# create networks
curl -X POST -d '{...}' http://localhost:8888/networks/creat

# remove networks
curl -X DELETE http://localhost:8888/networks/{networkid:.*}
clusters
# list clusters
curl -X GET http://localhost:8888/clusters

# inspect cluster
curl -X GET http://localhost:8888/clusters/{clusterid:.*}

# update cluster
curl -X POST -d '{...}' http://localhost:8888/clusters/{clusterid:.*}/update

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL