-
Notifications
You must be signed in to change notification settings - Fork 59
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
Improve package layering UX #681
Comments
So one way to do this is to call out to rpm-ostree before switchroot to do the install and then doing A first cut would be to just reboot for now, the way we will do for kargs. This won't work for live ISO/PXE though. |
For #767, note that these improvements should keep modular extensions in mind. |
Just an idea: Afaik, *COS extensions today aren't something that RPM is aware of. |
Another path that came up in today's community meeting related to this is embedding packages at install time so that they can be layered offline on first boot. See #862 (comment). |
Has there been any progress on this? |
As an intermediate step to having Ignition support doing package layering in the initramfs we could take what is in the docs and modify it slightly and add it to the host. Then users could define their own RPMs in a dropin. Here's the full example:
The proposal is that Of course we can also add some sort of |
Feel free to ignore the message below. I realized this was quite inefficient since I was rebooting anyway so I've modified my approach to mirror the one above. I was having some issues with rpm-ostree seemingly being killed/locked files (/etc/passwd) etc. There is already an issue about that somewhere on this issue tracker. For now I've settled on using this for deployments:
variant: fcos
version: 1.5.0
storage:
directories:
- path: /var/cache/rpm-ostree-install
systemd:
units:
- name: [email protected]
enabled: true
contents: |
[Unit]
Description=Layer %i with rpm-ostree
Wants=network-online.target
After=network-online.target
Before=zincati.service
ConditionPathExists=!/var/cache/rpm-ostree-install/%i.stamp
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/flock /var/cache/rpm-ostree-install/.lock -c "/usr/bin/rpm-ostree install --assumeyes --idempotent --reboot --allow-inactive %i | tee /var/cache/rpm-ostree-install/%i.stamp"
[Install]
WantedBy=multi-user.target
- name: [email protected]
enabled: true
- name: [email protected]
enabled: true
- name: [email protected]
enabled: true |
👋 hi all, |
Any update on this? It would be really great to have an easier way to auto-install packages on CoreOS without having to create systemd units, and to reduce the size and complexity of the butane YAML files |
I've been trying to use the documented setup that uses a systemd unit on first boot, but in ~10 tries it only succeeded 2 times, the rest of the attempts failed with It would be really awesome to have robust support for layering right in Ignition and thus Butane. |
Hi. Yup, can confirm I’ve had that weird networking problem like that too. I don’t fully remember, but I think it was DNS related: you’ve got connectivity at the IP level, but some DNS caching in systemd-resolved is hitting you… or something. Not sure, it was a while ago. Anyway, here is the line I added to the unit to make it work, just before the
Hacky, sure 🤷… Hope that helps someone ! |
Thanks, that makes the hack a bit more hacky but might actually work. :) |
Another reason that makes these "systemd unit on first boot" hacks to hacks: If a system with layered packages is reprovisioned but the |
This is a follow-up to #401. Fedora CoreOS now ships with an archive repo which allows reliable package layering operations. However, there is still work remaining to make it easier to use. Right now, users have to create a systemd unit which runs
rpm-ostree install --reboot ...
which is not great.Specifically:
The sugar that was proposed in #401 was something like:
The text was updated successfully, but these errors were encountered: