tinkerbell / playground

Example deployments of the Tinkerbell Stack for use as playground environments
Apache License 2.0
131 stars 87 forks source link

Reconfigure the registry to proxy quay.io/tinkerbell-actions #73

Closed gianarb closed 3 years ago

gianarb commented 3 years ago

We need a way to simplify pull from quay.io/tinkerbell-actions, the location for the reusable actions we release.

https://artifacthub.io/packages/search?kind=4

All the images are proxies via an internal registry. This commit configures it to look at the images hosted in quay.io/tinkerbell-actions when there is not one in the internal registry and it proxies.

For example:

$ docker pull 192.168.1.1/tinkerbell-actions/rootio:v1.0.0

v1.0.0: Pulling from tinkerbell-actions/rootio
b5b0f03f0cb8: Pull complete
48742f086697: Pull complete
06d27b65800a: Pull complete
3281556401c6: Pull complete
b94e835dc9fd: Pull complete
Digest: sha256:ec9855556388a690cad2535cf813f69cffa6df24476aedb16b3cdfc0d809492c
Status: Downloaded newer image for 192.168.1.1/tinkerbell-actions/rootio:v1.0.0
192.168.1.1/tinkerbell-actions/rootio:v1.0.0
thebsdbox commented 3 years ago

Interesting.. 👀

gauravgahlot commented 3 years ago

This is cool. Using internal registry as a mirror. 🚀

moadqassem commented 3 years ago

@gianarb really nice addition mate, tested it and works like a charm 👍

nshalman commented 3 years ago

I think the build failure here might be the one I ran into the other day (#59) rather than related to this actual change... I would love to see this land as it could make the sandbox experience smoother and remove some annoying extra steps. I hope to test this along with another change today so that I can provide a +1

nshalman commented 3 years ago

While building a sandbox from scratch, something in this change seems to cause things to fail. The last thing that happens when running setup.sh is that a docker push appears to retry repeatedly and then finally fails

Login Succeeded
sha-1b178dae: Pulling from tinkerbell/tink-worker
e95f33c60a64: Pull complete
6cb589350ff0: Pull complete
c7d4e28e649a: Pull complete
Digest: sha256:38623a35554e7269d296e68b1afb42ee0733e0d2f4d846af61c2a7abf498ad1b
Status: Downloaded newer image for quay.io/tinkerbell/tink-worker:sha-1b178dae
quay.io/tinkerbell/tink-worker:sha-1b178dae
The push refers to repository [192.168.1.1/tink-worker]
1590366c183f: Retrying in 1 second
03c3dd2bf6ed: Retrying in 1 second
6169bf830ae6: Retrying in 1 second
unsupported

Those retry lines counted down multiple times before things appeared to give up. Commenting out the new line in the Dockerfile (and thus not adding the config) and re-running setup.sh succeeded.

Can anyone else reproduce that? Is the registry trying to push things back upstream too when it receives a local push??

gianarb commented 3 years ago

That's why it fails. CI/CD is able to reproduce the issue. That's why it fails (not sure why @gauravgahlot @markyjackson-taulia approved and if they were able to figure it out or they approve the idea 💡 )

jacobweinstock commented 3 years ago

With this failing on the build, being quite stale and a pending large refactor to the sandbox here coming, I'm going to close this. Please do re-open after the refactor lands if this is still a desired feature. also, this idea is nice but feels like the community is leaning toward removing the internal container repo requirement entirely. If that were to happen it would negate the need for this. Regardless, will close this.