Docker Community Forums

Share and learn in the Docker community.

Bring Your Own Node in the API


(Sacheendra) #1

I don’t see an API for BYON in the docs here (https://docs.docker.com/apidocs/docker-cloud/). Is there an API for that?

Trying to access the endpoint used in the website (https://cloud.docker.com/api/infra/v1/token) with my API key returns a 403.


(Dylangrafmyre) #2

This would be really nice to have in place for BYON. Lots of user already have tools like terraform in place for deploying complicated infrastructure to providers. I would be very useful to spin up some nodes with the current tooling and be able to BYON programmatically through the API. Not everyone wants to deploy their clusters through docker-cloud. BYON users are penalized with the current workflow.

Thanks,
Dylan


(Dylangrafmyre) #3

It would be nice to run from a script docker-cloud node byo --api_key=AFR34573de2358IIl durning AWS EC2 instance provisioning and have that pull down the docker-cloud-agent and connect the node to the account.


(Fendertonian) #4

Anyone found a way to do this? It used to be easy in Tutum.co.

There was an API endpoint: https://dashboard.tutum.co/api/v1/token/


(Brandonparncutt) #5

Yea I really need this feature…it seems the only way to get a legit token is through the web UI…but there has to be an API call, right?


(Brandonparncutt) #6

I managed to hack something together with the dockercloud cli and creating my own image…basically you need these lines to get it to join:

export DOCKERCLOUD_USER=username
export DOCKERCLOUD_PASS=pass
eval $(docker-cloud node byo|grep curl|sed ‘s/sudo\ -H\ //’)

I throw that in an rc.local (along with a bunch of other stuff I need for my environments) and build the image. This way any instance I build off that image (even in auto scaling groups) automatically joins docker cloud and is useable. Then, with the dockercloud api…or what’s left of it…you can then add this node to a cluster, etc.

Docker Cloud: Please do not remove this capability. In fact, it should be added once more to the API calls.