update discovery url

Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
Victor Vieux
2015-09-02 21:04:04 -07:00
parent 15cc8a31d8
commit 6678a167fe
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() {