Skip to content
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

CT for Fedora CoreOS #129

Closed
7 of 8 tasks
bgilbert opened this issue Jan 23, 2019 · 10 comments
Closed
7 of 8 tasks

CT for Fedora CoreOS #129

bgilbert opened this issue Jan 23, 2019 · 10 comments

Comments

@bgilbert
Copy link
Contributor

bgilbert commented Jan 23, 2019

From #89:

CL has the Container Linux Config Transpiler or ct for short. Since users should not be writing Ignition configs by hand, they write Container Linux Configs (CLCs) which ct then renders into an Ignition config. This scheme has a few advantages:

  • Forces users to validate their configs
  • Allows easy addition of sugar for common operations
  • Allows for adding OS specific bits without making the Ignition spec OS specific
  • Allows users to write configs in yaml but keeps the configs that Ignition ingests in json

Implement a config transpiler for Fedora CoreOS.

  • Select a name for the config language and the tool: FCCL is the language of FFCs which are processed by FCCT
  • Decide whether to support Red Hat CoreOS as well: no, but structure the project such that the core bits are easily included in other projects or distros
  • Implement config versioning (FCOS config versioning #89)
  • Decide on what case to use for keys (Which case for FCCT #176): snake_case
  • Create FCCT
    • Barebones "just Ignition equivilents" parts
    • Sugar for parts of the distro
    • Line and column information included in error messages
@dustymabe
Copy link
Member

dustymabe commented Jan 23, 2019

  • Decide whether to support Red Hat CoreOS as well

To this point, we could build this tool with a plugin model to make it easy to support other distros. Each distro could pick/choose which modules it wanted to enable and/or override for their platform.

@arithx
Copy link
Contributor

arithx commented Jan 23, 2019

Select a name for the config language and the tool. "FCOSC" and "FCOSCT" are slightly less than ideal.

I'm partial to FCC & FCCT. Keeps it a minimal acronym by just dropping the OS while still differentiating from what standard Fedora would/could use.

@bgilbert
Copy link
Contributor Author

To this point, we could build this tool with a plugin model to make it easy to support other distros. Each distro could pick/choose which modules it wanted to enable and/or override for their platform.

That's a good medium-term goal. I think initially we should focus on making a CT available quickly, so was thinking we'd start with the existing CLCT codebase and defer refactoring where possible.

@ajeddeloh
Copy link
Contributor

With regards to supporting multiple OSs, there's basically two parts to the CT spec: a distro-agnostic part that roughly mirrors Ignition's spec (with niceties for things like inlining files) and a part that's disto-specific bit that is sugar for things like setting up etcd, flannel, etc. The structure in CLCs looks like the top level Ignition fields merged with top level sugar fields. Basically:

storage: <stuff> # from Ignition
systemd: <stuff>  # from Ignition
etcd: <stuff> # from sugar
flannel: <stuff> # from sugar

Go supports struct embedding. Assuming the go-yaml library supports this (need to check this), we can have a top level struct that contains the versioning info and embeds both the Ignition and each distro's sugar. We could even have multiple top level structs, one for each distro, and switch them based on a flag. This allows us to cleanly separate the distro dependent and independent parts without having to deal with branches, forks, or a lot of code duplication.

@ajeddeloh ajeddeloh added the meeting topics for meetings label Apr 23, 2019
@jasonbrooks
Copy link
Collaborator

jasonbrooks commented Apr 24, 2019

How about a name that's connected to "ignition config" -- ignition config source or proto ignition config or something? It seems unnecessary to put "fedora" or "container linux" in there at all, and wouldn't this be something that people outside of fedora might want to use? [ah, I see other distro support has already been mentioned above]

Feed ignition config language into the ignition config tool and get ignition configs.

@arithx
Copy link
Contributor

arithx commented Apr 24, 2019

@jasonbrooks the Fedora or Container Linux portions in the name is to imply that it has additional sugar for those specific distributions. The base level representations of the Ignition spec should be kept distro-agnostic naming wise in my opinion (and tying it directly to Ignition is a good idea).

@bgilbert bgilbert removed the meeting topics for meetings label Apr 25, 2019
@ajeddeloh
Copy link
Contributor

From the community meeting today, we're going forward with fcct/fcc/fccl.

@ajeddeloh
Copy link
Contributor

Closing this as FCCT 0.1.0 was just released. Doesn't have any distro-specific sugar yet, just it's enough for preview.

@lucab
Copy link
Contributor

lucab commented Jul 12, 2019

For reference, FCCT upstream project is at https://github.com/coreos/fcct.

@dghubble
Copy link
Member

Looks great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants