CoreOS: Rebase on initilization

For CoreOS, is there a deployment pattern that enables me to deploy on AWS with a custom image for ostree-native-containers? Ideally, I am hoping for a method via Ignition/Butane that provides something akin to a “rpm-ostree rebase”.

Alternatively, I suspect I could use COSA or manage AMIs, but I was hoping for a simpler streamlined approach.

  • Is there a method to initialize CoreOS AWS AMI with a custom ostree-native-container via Ignition?
  • If a streamlined approach does not already exist with something like Ignition, then is there a “recommended” approach to this?
  • If there are not existing “recommended” approaches for this challenge, is there a ticket that is already discussing possible patterns for future development?

This is still work in progress. A draft documentation is available in this PR: Add a doc for container provisioning and updates by cgwalters · Pull Request #540 · coreos/fedora-coreos-docs · GitHub

Got it. From your link, it looks like the (soon to be) documented approach is Butane/Ignition with a systemd unit. Thank you!

variant: fcos
version: 1.4.0
    # Our custom unit for rebasing
    - name: rebase-custom.service
      enabled: true
      contents: |
        Description=Fetch and deploy target image
        # Only run on the firstboot
        # This ordering is important
        ExecStart=rpm-ostree rebase --reboot

I wouldn’t consider it the final solution. This is a temporary setup/workaround.

Good to know. It would feel more like a core feature of CoreOS if there was a direct interface exposed in ignition that triggered the “rebase” during the host initialization process.