Repository navigation
oscontainer: New command - #90
Conversation
|
Do you have an example of running this command? Should we put this under another toplevel in the future so that we don't end up with too many? Maybe |
Don't have a publicly available container image that does this, but it's just
Maybe an |
thanks
yeah I was wondering if a |
| @@ -0,0 +1,43 @@ | |||
| #!/usr/bin/python3 | |||
There was a problem hiding this comment.
A description here would be nice for anyone that stumbles upon this file.
|
a few pending non-fatal comments.. going to go ahead and approve. |
I'll do something like that first, yeah.
I think this one can wait a bit until I have a chance to clean up more. One min. |
6e08299 to
ceb67af
Compare
|
OK, I updated this - it now has The code is derived from https://github.com/ostreedev/ostree-releng-scripts/blob/master/experimental/tree2oci However...the oscontainer build doesn't support having a base layer yet, which means there's no binaries like e.g. Theoretically we could do more sophisticated things if this was written in Go and vendored https://github.com/containers/storage or so. Probably best even if this shared code with That said though I'm wary of the overhead of vendoring a separate copy of containers/storage. All we really need from the stack is way to mount a container without running a process in it, but still holding a lock on the storage as if a process was running, so that e.g. concurrently running OpenShift instance doing normal pruning wouldn't prune the oscontainer. Or alternatively, we could always use a separate container storage directory. |
|
OK, so for this to address openshift/os#307, we'd want to have this script be part of the |
|
Re. |
Yes, eventually but for now my idea is that we'd run these scripts in the Jenkins pipeline before/after build. Anyways don't merge yet, I'm rewriting this.
I asked about this on |
We just need to mount it. See coreos/coreos-assembler#90 (comment).
We just need to mount it. See coreos/coreos-assembler#90 (comment).
We just need to mount it. See coreos/coreos-assembler#90 (comment).
ceb67af to
e34e2f4
Compare
|
OK I totally rewrote this code to use |
jlebon
left a comment
There was a problem hiding this comment.
Nice! I much prefer this version.
e34e2f4 to
c0f0ee2
Compare
|
All comments resolved ⬆️ |
5687475 to
5b5fb9d
Compare
|
LGTM, i'll defer to jonathan to review changes for his comments. |
|
Still testing out |
|
Interrupting: Yet, if I manually do: it returns right away. |
Non-root inside my privileged dev container. |
|
Hmm, OK same here. But for some reason |
| @@ -0,0 +1,105 @@ | |||
| #!/usr/bin/python3 | |||
|
|
||
| rootarg = '--root='+containers_storage | ||
| bid = subprocess.check_output(['buildah', rootarg, 'from', 'scratch']).strip() | ||
| subprocess.check_call(['buildah', rootarg, 'copy', bid, src, '/srv/repo']) |
There was a problem hiding this comment.
This is copying the whole repo though. We should be bundling just the latest commit, right?
|
So I figured out the hang has something to do with having: in my pet container. Running it with |
Ugh man Python and Unicode... But yeah we should be consistently decoding. Will fix. |
6082c72 to
ec16f4b
Compare
|
OK so...I've been doing more hacking on this but hitting one last stumbling block, which is that for some reason the |
ec16f4b to
47e43f6
Compare
OK so first, So for now let's just add |
47e43f6 to
b32af4a
Compare
jlebon
left a comment
There was a problem hiding this comment.
Looks good, just a few final nits.
For Red Hat CoreOS, we plan to ship the OSTree inside a container, or "oscontainer" for short. This script offers two subcommands: `extract` and `build`. Now, an important point to understand is that these tools are expected to run from inside an existing container. Since overlayfs-on-overlayfs is not supported, we use a separate `--workdir` which translates into `podman --root`. Hence these tools have nothing to do with any container storage on the host system.
b32af4a to
630989f
Compare
|
Respun with typo fix. |
This was changed in code review in coreos/coreos-assembler#90 (comment) We need to support both for a while to transition.
This was changed in coreos/coreos-assembler#90 (comment)
This was changed in coreos/coreos-assembler#90 (comment)
This was changed in coreos/coreos-assembler#90 (comment)
This was changed in coreos/coreos-assembler#90 (comment)
No description provided.