-
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
First class support for systemd portable services via ignition #311
Comments
redbaron wrote:
This suggests adding ostree overlay functionality to ignition would be useful and need not be "dangerous" if the overlayed item is a portable service, but as an ordinary I dont want to be making custom ostrees. So for now I will settle for using ignition to pull an archive into: /opt, and a systemd Unit to decompress archives into /var/lib/portables |
found: https://www.freedesktop.org/software/systemd/man/machinectl.html#pull-tar export-tar |
https://trello.com/b/mo7EHqbw/fcos-safe-layer IntroThis is the simplest approach I can think of which combines portable services and user packages. The aim here is to get as much bang as possible out of a small buck (two scripts and two services) added to ignition, thus bringing us up to the next level.
The next levelIs the ability to install code in a second layer, and run code in a third layer on top of the OS completely safely using built in chroot features without using containers. Each layer is provided as a chroot-ing shell, that can be directly invoked, attached to a user login, or run as portable service.
Thus a package created by "arne" can be run as an executable by "otto", or as a portable service (restricted by a suitable profile) The tools for managing layers will be collated in a package DesignA single tarball/package may provide: a code package, a portable service, either/and/or provide utility scripts (install.sh) that provide a user package and functions. In both cases the writer of the ignition file chooses the level of protection afforded the package installation, whether by portable service profile, or by restricted user.
IssuesEnabling/Starting Services is now supported. ImplementationThe Ignition File:
On each archive provided (via storage:files:) the
The script:
Nice to have
|
This has been discussed in #37 as a means to provide system containers.
Systemd provides the container isolation features for Portable Containers, but lacks the transport layer. Therefore it would seem useful for ignition to add the missing piece.
One option would be for portable service metadata to be defined outside of the portable data package, as a yaml file which can be included in the ignition file (as I did with goss.yaml in this walkthrough video https://youtu.be/cvWN8dXHaVo ), thus
health-check.ps.yaml
is processed on boot by two simple scriptsThis then means that there is an opportunity for ignition itself (or installer-coreos) to take on the role of that first script. Attaching a portable service is a very simple operation and could easily be performed in initramfs right up front by ignition.
example of yaml that could be processed by ignition or service/script ignition.ps
In the meantime I propose a systemd unit that performs the same tasks, on first boot.
The text was updated successfully, but these errors were encountered: