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

Support docker::registry_mirror config option. #244

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nuclearsandwich
Copy link
Contributor

With Docker Hub's new rate limits1 most buildfarm configurations will hit
the rate limit during normal operation. This would allow you to specify
a registry mirror to pull from. One recommendded configuration would be
to follow Docker's recipe for a read-through caching mirror2.

To enable this new option add a hiera config field of
docker::registry_mirror to your common.yaml hiera configuration in
buildfarm_deployment_config.

🚧
Note for reviewers: I haven't tested this yet. The canonical buildfarms had their changes manually deployed as a proof-of-concept. If anyone does try this out and find it working I would love to hear about it.

With Docker Hub's new rate limits[1] most buildfarm configurations will hit
the rate limit during normal operation. This would allow you to specify
a registry mirror to pull from. One recommendded configuration would be
to follow Docker's recipe for a read-through caching mirror[2].

To enable this new option add a hiera config field of
`docker::registry_mirror` to your common.yaml hiera configuration in
buildfarm_deployment_config.

[1]: https://www.docker.com/increase-rate-limits
[2]: https://docs.docker.com/registry/recipes/mirror/
@ros-discourse
Copy link

This pull request has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/read-through-caching-container-registry/17477/1

@j-rivero j-rivero self-requested a review November 30, 2020 15:43
@@ -0,0 +1,4 @@
{
<% if ! scope.function_hiera(["docker::registry_mirror"], "").empty? %> "registry-mirrors": ["<%= scope.function_hiera(["docker::registry_mirror"])%>"],<% end -%>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure about how puppet is going to return the scope.function_hiera(["docker::registry_mirror"]) being docker::registry_mirror an array. Probably worth to take a look once running this to be sure the format (plain string?) is the expected.

@j-rivero
Copy link
Contributor

j-rivero commented Dec 4, 2020

Changes looks good to me with the exception of minor comment about the format of the data. The configuration seems the right one to me.

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

Successfully merging this pull request may close these issues.

3 participants