-
Notifications
You must be signed in to change notification settings - Fork 876
rearranging code into a proper python package, per #1 #297
Conversation
|
||
|
||
VERSION = '0.6.6' | ||
VERSION = '0.6.7' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm making some assumptions here about your release process. I'm happy to undo this or change it to a different version if that's preferable.
Looks like the travis build failed because it couldn't connect to github. Can someone with access restart that build? There should be a button on the build page: http://stackoverflow.com/questions/17606874/trigger-a-travis-ci-rebuild-without-pushing-a-commit UPDATE: looks like someone did restart it |
What about adding a bin/script to start the registry like this: $ pip install docker-registry This would take care of spawning the gunicorn. So we can also remove the run.sh script. What do you think? |
On Sun, Mar 23, 2014 at 01:41:54PM -0700, Michael Hrivnak wrote:
I'd prefer relative imports here. For example, in from .lib import config to the current (as of 555dbb2): from docker_registry.lib import config Importing just the final module (without the associated namespacing) images.cfg._config['nginx_x_accel_redirect'] = accel_prefix instead of the current: docker_registry.images.cfg._config['nginx_x_accel_redirect'] You can also avoid some wrapped lines in your setup.py by storing _this_dir = os.path.dirname(os.path.abspath(file)) which reads more easily to me. I think that this would be a good time to move registry.app.VERSION to |
I made the changes requested by @wking and am working on replacing the |
I replaced |
cc @shin- Could you review? |
Sorry that took so long. Works for me, only had to update the boto dependency. LGTM. |
Working on merging this and we do want to merge it, believe me :-) I am testing locally and I have few more comments.
Not sure if your console script addresses the second point, I tried to test it but got conflict in the checkout... Probably need a rebase. |
|
On Tue, Apr 15, 2014 at 10:01:25PM -0700, Michael Hrivnak wrote:
Outsider vote for package name 'docker-registry' and root module
I'd prefer if docker_registry.run_gunicorn was moved to Another minor quibble is the lack of a summary line 1 for |
Thanks for catching the package name! I have fixed that, and I improved the doc block for "run_gunicorn". I don't feel strongly about where the |
After upgrading the private registry to 0.6.8, there were some changes to the API that were missed. For example, the docker version is now mandatory[1]. If you have docker v0.10.0 or higher, there is also a checksum computation check done on each push, so I hardcoded the user-agent to v0.9.0. This is a stopgap until a) we update the API calls to v0.10.0 b) we replace this component with a docker-registry python package[2] [1]: docker-archive/docker-registry@64f4198 [2]: docker-archive/docker-registry#297 fixes #779
I'm fine with |
Thanks! |
This was initially added in 534c6da (run.sh: Add '$GUNICORN_OPTS "$@"' to gunicorn invocation, 2014-02-13), but didn't survive the translation to a setuptools entry_points in bf3360a (replacing run.sh with a "docker-registry" console script, 2014-04-02). bf3360a was part of docker-archive#297, which branched off before 534c6da landed with docker-archive#247, and the entry_points invocation wasn't updated to reflect the change. The syntax has also changed a bit, since we're invoking Gunicorn from Python instead of Bash. Instead of dropping the string verbatim onto the command-line ($GUNICORN_OPTS), it now goes through the usual docker_registry.server.env.source YAML parsing (884b418, Type from environment properly (like Config), 2014-06-23). So instead of something like: GUNICORN_OPTS='--preload --log-syslog' you should now be using: GUNICORN_OPTS='[--preload, --log-syslog]'
This was initially added in 534c6da (run.sh: Add '$GUNICORN_OPTS "$@"' to gunicorn invocation, 2014-02-13), but didn't survive the translation to a setuptools entry_points in bf3360a (replacing run.sh with a "docker-registry" console script, 2014-04-02). bf3360a was part of docker-archive#297, which branched off before 534c6da landed with docker-archive#247, and the entry_points invocation wasn't updated to reflect the change. The syntax has also changed a bit, since we're invoking Gunicorn from Python instead of Bash. Instead of dropping the string verbatim onto the command-line ($GUNICORN_OPTS), it now goes through the usual docker_registry.server.env.source YAML parsing (884b418, Type from environment properly (like Config), 2014-06-23). So instead of something like: GUNICORN_OPTS='--preload --log-syslog' you should now be using: GUNICORN_OPTS='[--preload, --log-syslog]'
This was initially added in 534c6da (run.sh: Add '$GUNICORN_OPTS "$@"' to gunicorn invocation, 2014-02-13), but didn't survive the translation to a setuptools entry_points in bf3360a (replacing run.sh with a "docker-registry" console script, 2014-04-02). bf3360a was part of docker-archive#297, which branched off before 534c6da landed with docker-archive#247, and the entry_points invocation wasn't updated to reflect the change. The syntax has also changed a bit, since we're invoking Gunicorn from Python instead of Bash. Instead of dropping the string verbatim onto the command-line ($GUNICORN_OPTS), it now goes through the usual docker_registry.server.env.source YAML parsing (884b418, Type from environment properly (like Config), 2014-06-23). So instead of something like: GUNICORN_OPTS='--preload --log-syslog' you should now be using: GUNICORN_OPTS='[--preload, --log-syslog]'
After upgrading the private registry to 0.6.8, there were some changes to the API that were missed. For example, the docker version is now mandatory[1]. If you have docker v0.10.0 or higher, there is also a checksum computation check done on each push, so I hardcoded the user-agent to v0.9.0. This is a stopgap until a) we update the API calls to v0.10.0 b) we replace this component with a docker-registry python package[2] [1]: docker-archive/docker-registry@64f4198 [2]: docker-archive/docker-registry#297 fixes #779
No description provided.