signalfx / maestro-ng

Orchestration of Docker-based, multi-host environments
https://signalfx.com
Apache License 2.0
683 stars 83 forks source link

Removing password requirement from registry check #189

Closed ac111 closed 4 years ago

ac111 commented 7 years ago

This change will allow locally-cached credentials (via docker login) to be used in place of hard-coded registry password within orchestration YAML when pulling service images from a given registry.

mpetazzoni commented 7 years ago

Why do you still require username? If people have individual accounts to a private registry, you wouldn't be able to enforce a username in the YAML.

ac111 commented 7 years ago

Originally I took out both username and password, but found the underlying "login" call to docker-py required the username at the very least (password is optional, and is derived from cached credentials). The username from the orchestration YAML is an interim step until I can find a way to derive the username from the environment (docker login) automatically for the given registry. At that point, I would remove the dependency on username as well. Hope this makes sense.

mpetazzoni commented 7 years ago

If the auth file already has information for a registry you don't need to docker login. If no username and password are provided, Maestro shouldn't try to login() at all and just go on with the pull(), which should work as long as the user has authed previously.