-
Notifications
You must be signed in to change notification settings - Fork 377
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
mirror: Support mirroring to disk as a target #126
mirror: Support mirroring to disk as a target #126
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: smarterclayton The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
3ebbce0
to
17ea86c
Compare
/assign @abhinavdahiya Gradually improving the flexibility of the commands to allow offline content replication. Open to suggestions (I'm trying to improve the flexibility of the I think this would be a candidate for back port to simplify 4.2 offline support. |
1e30313
to
9211bcd
Compare
/retest |
I like this, will try to review by EOD. |
Specifically this is different than skopeo because a) it creates a disk layout that matches the HTTP layout of a registry server, like we already do for s3 |
if len(o.ToDir) > 0 { | ||
fmt.Fprintf(o.Out, "\nTo upload local images to a registry, run:\n\n oc image mirror --from-dir=%s file://%s* REGISTRY/REPOSITORY\n\n", o.ToDir, to) | ||
} else if len(o.To) > 0 { | ||
if o.PrintImageContentInstructions { |
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.
should we move this to conditional block a8c5d8f#diff-6c5f7c1cbfa2abdaa2847f0982a31e5fR507 ??
The |
I just discovered if the pull secret file doesn't exist it segfaults:
|
Thanks, separate bug but will update it here |
9211bcd
to
c535cd3
Compare
Comments addressed, did a bit more manual testing. |
I want to get some soak time on this, and get e2es going. Going to tag today unless there are other comments. |
We should not access context unless there is no error.
Allows release mirroring to disk. `oc adm release mirror` is updated to use this mechanism. The mirror command, when --to-dir is specified, prints out the command that can be used to restore the content.
Mark the command as no longer experimental as well.
Now that mirror supports local file destinations, add a simple server command under `oc image serve` that allows someone to mirror a release to disk and then host it within a firewall. I.e.: oc adm release mirror ... --to-dir=/srv/repo # Move inside the firewall oc image serve --dir=/srv/repo The server performs minimal HTTP header mangling to support modern container registry clients. Optional --tls-key and --tls-cert flags allow the server to listen on TLS.
c535cd3
to
3d85783
Compare
New changes are detected. LGTM label has been removed. |
/retest |
2 similar comments
/retest |
/retest |
Allows release mirroring to disk.
oc adm release mirror
is updated to usethis mechanism. The mirror command, when --to-dir is specified, prints out
the command that can be used to restore the content.
Mirroring a release to disk:
Mirroring that back to another registry
Now that mirror supports local file destinations, add a simple server command under
oc image serve
that allows someone to mirror a release to disk and then host it within a firewall.I.e.:
The server performs minimal HTTP header mangling to support modern container registry clients. Optional --tls-key and --tls-cert flags allow the server to listen on TLS.