mirror of https://github.com/docker/docs.git
Merge pull request #1193 from vieux/update_discovery_url
update discovery url
This commit is contained in:
commit
6787aa8619
|
@ -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`
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue