Skip to content

Commit

Permalink
Stabilize container functionality
Browse files Browse the repository at this point in the history
I think we have sufficient experience with this to call this
functionality officially stable.
  • Loading branch information
cgwalters committed Sep 13, 2022
1 parent 417cf08 commit 539069c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
7 changes: 2 additions & 5 deletions docs/container.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
---
parent: Experimental features
nav_order: 1
nav_order: 5
---

# ostree native containers

For more information on this, see [CoreOS layering](https://github.com/coreos/enhancements/pull/7).

rpm-ostree inherits work in [ostree-rs-ext](https://github.com/ostreedev/ostree-rs-ext/) to
create "container native ostree" functionality. This elevates OCI/docker containers to
be natively supported as a transport mechanism for bootable operating systems.
Expand All @@ -16,7 +13,7 @@ be natively supported as a transport mechanism for bootable operating systems.
Use this to switch to booting from a container image:

```
$ rpm-ostree rebase --experimental ostree-unverified-registry:quay.io/coreos-assembler/fcos:testing-devel
$ rpm-ostree rebase ostree-unverified-registry:quay.io/coreos-assembler/fcos:testing-devel
```

In the near future, we hope to push this more officially to `quay.io/fedora/coreos:stable`.
Expand Down
2 changes: 1 addition & 1 deletion docs/layering.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ We need to stop the Zincati service so that auto-updates won't interfere with ou
Next, we call `rpm-ostree` to rebase our system using the image we just pushed to quay.

```bash
[core@tutorial ~]$ sudo rpm-ostree rebase --experimental \
[core@tutorial ~]$ sudo rpm-ostree rebase \
ostree-unverified-registry:quay.io/<YOURUSER>/my-custom-fcos
```

Expand Down
3 changes: 1 addition & 2 deletions rust/src/cliwrap/yumdnf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@ fn disposition(opt: Opt, hosttype: SystemHostType) -> Result<RunDisposition> {
ImageCmd::Rebase(rebase) => {
let container_ref = rebase.to_ostree_container_ref()?;
let container_ref = container_ref.to_string();
let experimental = rebase.experimental.then(|| "--experimental");
let cmd = ["rebase"].into_iter().chain(experimental).chain([container_ref.as_str()])
let cmd = ["rebase"].into_iter().chain([container_ref.as_str()])
.map(|s| s.to_string()).collect::<Vec<String>>();
RunDisposition::ExecRpmOstree(cmd)
},
Expand Down
9 changes: 5 additions & 4 deletions tests/kolainst/destructive/container-image
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ case "${AUTOPKGTEST_REBOOT_MARK:-}" in
# Since we're switching OS update stream, turn off zincati
systemctl mask --now zincati

ostree container encapsulate --compression-fast --repo=/ostree/repo ${checksum} "${image}"
rpm-ostree rebase "$image_pull" --experimental | tee out.txt
ostree container encapsulate --repo=/ostree/repo ${checksum} "${image}"
# This one keeps --experimental, but we also test without it below
rpm-ostree rebase --experimental "$image_pull" | tee out.txt
assert_file_has_content out.txt 'Importing.*'"$image_pull"
rpmostree_assert_status ".deployments[0][\"container-image-reference\"] == \"ostree-unverified-image:$image\""
rpmostree_assert_status ".deployments[0][\"checksum\"] == \"${checksum}\""
Expand All @@ -57,7 +58,7 @@ case "${AUTOPKGTEST_REBOOT_MARK:-}" in

# Test rebasing back to ostree https://github.com/coreos/rpm-ostree/issues/3677
rpm-ostree rebase "$checksum"
rpm-ostree rebase "$image_pull" --experimental
rpm-ostree rebase "$image_pull"

/tmp/autopkgtest-reboot 1
;;
Expand Down Expand Up @@ -179,7 +180,7 @@ EOF
fi
derived=oci:$image_dir:derived
skopeo copy containers-storage:localhost/fcos-derived $derived
rpm-ostree rebase --experimental ostree-unverified-image:$derived
rpm-ostree rebase ostree-unverified-image:$derived
rm $image_dir -rf
/tmp/autopkgtest-reboot 3
;;
Expand Down

0 comments on commit 539069c

Please sign in to comment.