Merge pull request #1193 from vieux/update_discovery_url

update discovery url
This commit is contained in:
Alexandre Beslic 2015-09-03 18:13:56 -07:00
commit 6787aa8619
3 changed files with 8 additions and 10 deletions

View File

@ -1,31 +1,29 @@
#discovery-stage.hub.docker.com
#discovery.hub.docker.com
Docker Swarm comes with a simple discovery service built into the [Docker Hub](http://hub.docker.com)
The discovery service is still in alpha stage and currently hosted at `https://discovery-stage.hub.docker.com`
#####Create a new cluster
`-> POST https://discovery-stage.hub.docker.com/v1/clusters`
`-> POST https://discovery.hub.docker.com/v1/clusters`
`<- <token>`
#####Add new nodes to a cluster
`-> POST https://discovery-stage.hub.docker.com/v1/clusters/<token>?ttl=<ttl> Request body: "<ip>:<port1>"`
`-> POST https://discovery.hub.docker.com/v1/clusters/<token>?ttl=<ttl> Request body: "<ip>:<port1>"`
`<- OK`
`-> POST https://discovery-stage.hub.docker.com/v1/clusters/<token>?ttl=<ttl> Request body: "<ip>:<port2>")`
`-> POST https://discovery.hub.docker.com/v1/clusters/<token>?ttl=<ttl> Request body: "<ip>:<port2>")`
`<- OK`
#####List nodes in a cluster
`-> GET https://discovery-stage.hub.docker.com/v1/clusters/<token>`
`-> GET https://discovery.hub.docker.com/v1/clusters/<token>`
`<- ["<ip>:<port1>", "<ip>:<port2>"]`
#####Delete a cluster (all the nodes in a cluster)
`-> DELETE https://discovery-stage.hub.docker.com/v1/clusters/<token>`
`-> DELETE https://discovery.hub.docker.com/v1/clusters/<token>`
`<- OK`

View File

@ -13,7 +13,7 @@ import (
)
// DiscoveryUrl is exported
const DiscoveryURL = "https://discovery-stage.hub.docker.com/v1"
const DiscoveryURL = "https://discovery.hub.docker.com/v1"
// Discovery is exported
type Discovery struct {

View File

@ -8,7 +8,7 @@ DISCOVERY=""
function token_cleanup() {
[ -z "$TOKEN" ] && return
echo "Removing $TOKEN"
curl -X DELETE "https://discovery-stage.hub.docker.com/v1/clusters/$TOKEN"
curl -X DELETE "https://discovery.hub.docker.com/v1/clusters/$TOKEN"
}
function setup() {