Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is Registry 2.0 unsupported? #138

Open
telamon opened this issue Sep 21, 2015 · 4 comments
Open

is Registry 2.0 unsupported? #138

telamon opened this issue Sep 21, 2015 · 4 comments

Comments

@telamon
Copy link

telamon commented Sep 21, 2015

Hi!
I'm trying to deploy using an private docker/registry-2.0 (docker-distribution)

Have I misconfigured my registry or is there simply no support for /v2/ api yet?

$ centurion -p myApp -e production 
** Invoke environment:production (first_time)
** Invoke environment:common (first_time)
** Execute environment:common
** Execute environment:production
** Invoke centurion:setup (first_time)
** Invoke centurion:clean_environment (first_time)
** Execute centurion:clean_environment
** Execute centurion:setup
** Invoke list (first_time)
** Execute list
** Invoke list:tags (first_time)
** Execute list:tags
GET: "https://registry.mydomain.com/v1/repositories/myapp/tags"
E, [2015-09-21T11:42:34.014356 #4959] ERROR -- : Couldn't communicate with Registry: #<Excon::Response:0x0000000195d188 @data={:body=>"<html>\r\n<head><title>404 Not Found</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>404 Not Found</h1></center>\r\n<hr><center>nginx/1.9.4</center>\r\n</body>\r\n</html>\r\n", :headers=>{"Server"=>"nginx/1.9.4", "Date"=>"Mon, 21 Sep 2015 09:51:43 GMT", "Content-Type"=>"text/html", "Content-Length"=>"168", "Connection"=>"keep-alive"}, :status=>404, :status_line=>"HTTP/1.1 404 Not Found\r\n", :reason_phrase=>"Not Found"}, @body="<html>\r\n<head><title>404 Not Found</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>404 Not Found</h1></center>\r\n<hr><center>nginx/1.9.4</center>\r\n</body>\r\n</html>\r\n", @headers={"Server"=>"nginx/1.9.4", "Date"=>"Mon, 21 Sep 2015 09:51:43 GMT", "Content-Type"=>"text/html", "Content-Length"=>"168", "Connection"=>"keep-alive"}, @status=404, @remote_ip="x.x.x.x", @local_port=39801, @local_address="x.x.x.x">

Note:
If i do try to replace the v1 to a v2 and visit the link manually:
https://registry.mydomain.com/v2/repositories/myapp/tags
I do indeed get to the place i should be, instead of a 404.

@relistan
Copy link
Collaborator

It looks like the V2 registry is not backward compatible in API with the V1 registry. We've never implemented the V2 calls so it looks like that doesn't work, unfortunately. Since our production code uses either the public registries or Dogestry, we've not had to implement V2 yet. The public registries all still work with the V1 API calls.

From your testing it looks like we could try to just substitute V2 everywhere and see what breaks but my guess is a lot breaks. If you want to work on that we'd appreciate the contribution. Otherwise it will probably be awhile.

@imdevin567
Copy link

I took a stab at this about a month ago due to this being a block for us using centurion for deployments. I made the API version a config parameter with a default of 1 to keep backwards-compatibility. FWIW, we've been using this fork in production for a few weeks now without any issues.

I would certainly not mind creating a pull request with these changes if people are interested. It would require a bit of refactoring at this point due to some of the recent changes here that conflict with some of the changes I made.

@deedubs
Copy link

deedubs commented Dec 13, 2015

Will definatly need v2 support to roll this out. Be happy to exercise your PR

@imdevin567
Copy link

Pull request for this referenced in #153

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants