Comments (15)
I am OK with this. One thing to keep in mind is that this will become something used in the field enough there should be stable builds produced and available.
cc @dustymabe @e-minguez @mrguitar @christianh814
from butane.
Could also be part of the YAML file itself as sugar, e.g.:
storage:
local:
- path: relpath/to/local/dir
target: /path/to/extract # or default to / if omitted?
systemd:
local:
- relpath/to/dir/of/units
That way the YAML stays self-contained and is easier to use from a config git repo containing all those source files.
from butane.
Proposal:
variant: fcos
version: 1.1.0-experimental
storage:
trees:
# Can have more than one of these
- local: etc # local base directory to walk, relative to files-dir
path: /etc # root of the destination tree; defaults to /
follow_symlinks: true # defaults to false, which copies symlinks as symlinks
Semantics:
- This would walk the
local
tree and createfile
nodes embedding the contents of each file it finds (orlink
nodes, for links whenfollow_symlinks
is false or missing). Mode bits would be copied, ownership would not. - Any existing
file
node with a matching path and existingcontents
would be an error. - Any existing
file
node withoutcontents
would be merged in. The node'smode
, if set, would override the tree's file mode. directory
nodes would not be created; we'd rely on Ignition's existing behavior of creating parent directories automatically. If the user wants to override the default directory mode, they can createdirectory
entries by hand.
Possible future extensions:
- Explicitly support a tree of systemd units. For now, users can write into
/etc/systemd/system
directly. - Add an option to copy directory modes.
Thoughts?
from butane.
Yeah, one thing I am omitting here is the whole spec2 vs spec3 as well as another elephant 🐘 in the room which is MachineConfig vs Ignition. We'll need a debate about that. Plus the fact that parts of fcct high level may not apply to RHCOS (though ideally that's minimized).
I think tactically short term, we're not removing the filetranspiler project, just adding functionality to fcct.
from butane.
(I would probably say that we should have something like oc adm generate-machineconfig
)
from butane.
Also worth cross-posting a similar-ish request for having fcct read files from the filesystem directly at coreos/fedora-coreos-tracker#375.
from butane.
Could also be part of the YAML file itself as sugar, e.g.:
storage: local: - path: relpath/to/local/dir target: /path/to/extract # or default to / if omitted? systemd: local: - relpath/to/dir/of/unitsThat way the YAML stays self-contained and is easier to use from a config git repo containing all those source files.
I like this pattern. It doesn't seem like it would be helpful (yet) in RHCOS land but it's still a much nicer UX.
from butane.
Also related here is whether fcct
exposes conversion functionality too: coreos/mantle#1190
from butane.
Also from OpenShift architects one feedback on things here is a desire to avoid handing lots of binaries over to users. So we may end up e.g. adding Ignition functionality either to oc
or openshift-installer
. (Probably the former, but it needs an enhancement)
from butane.
seems reasonable to me
from butane.
What defines "files-dir"?
from butane.
does files-dir
default to $PWD?
from butane.
-d
/--files-dir
is added in #99, and does not have a default. The idea is that we should never inject files from the filesystem without the user explicitly requesting it. That matters for hosted FCCT services, and arguably also for users pasting malicious FCCs from the Internet.
from butane.
@bgilbert in your proposal, how is user/group ownership handled?
from butane.
They wouldn't be set by default (so, root/root), but could be overridden on a per-file basis by creating a file
node without contents
but with the user/group set.
from butane.
Related Issues (20)
- boot_device configuration with luks does not encrypt the boot partition HOT 2
- Wrong link to Fedora GPG Signing Key HOT 1
- Import SElinux module HOT 2
- Transpile merged butane configs into ignition HOT 1
- support multiple yaml documents in .bu file as input HOT 1
- Stabilize OCP 4.14 spec HOT 4
- Consider re-mapping RHEL 4 Edge config versions to match RHEL releases
- Release 0.19.0 HOT 1
- Systemd unit validation issue.
- support for systemd --user HOT 1
- Unable to automatically set up `/etc/subuid` and `/etc/subgid` for new user
- Add sugar for `.container` systemd quadlet units HOT 5
- Overwriting existing files: example in the documentation.
- Possible error in the yaml schema description of the "ssh_authorized_keys_local" directive. HOT 1
- Anchor merge key is reported as "Unused key <<"
- Stabilize openshift v4.15.0 spec
- Release Butane 0.20.0
- openshift 4.14 and later stable specs document `grub` section while it is not supported
- Potential typo in the document HOT 2
- Addressing 1:1 Dependency Between MCO and Butane HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from butane.