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

cmd-build: Refactor to support multiple artifact types #302

Merged
merged 1 commit into from
Feb 6, 2019

Conversation

cgwalters
Copy link
Member

Change the code so that it's prepared to handle e.g.:
coreos-assembler build qemu metal-uefi metal-bios openstack.

There's more work we'll need to do for adding any more image
types, this just lays the groundwork.

@cgwalters
Copy link
Member Author

(This will conflict with #299 - I'm fine rebasing if that lands first)

@cgwalters
Copy link
Member Author

cgwalters commented Jan 30, 2019

A few next steps on this:

  • Cleanly separate out the bits to e.g. do "net.ifnames=0" and write the eth0 into a image-cloud.ks fragment
  • Add some bits to virt-install to generate a UEFI system

Proposed target names: metal-uefi-512 and metal-bios-512. If they're later the same thing, then we just have them point to the same object. (We also add metal-uefi-4k e.g.) The PXE installer would need to detect the right disk image to install.

@jlebon
Copy link
Member

jlebon commented Jan 31, 2019

Weren't we moving towards specifying the artifact types we want in an artifacts.yaml config file? How do these interact?

@cgwalters
Copy link
Member Author

Weren't we moving towards specifying the artifact types we want in an artifacts.yaml config file? How do these interact?

I think we may want both; it'd be convenient for development to be able to do e.g. coreos-assembler build qemu which overrides artifacts.yaml.

@cgwalters
Copy link
Member Author

Per discussion I think we want a pxe target too that's a tarball of the kernel+initramfs.

@lucab
Copy link
Contributor

lucab commented Jan 31, 2019

My bad that I didn't see this PR early today, I opened a FCOS ticket on the same topic as this PR: coreos/fedora-coreos-tracker#142

@cgwalters
Copy link
Member Author

Rebased 🏄‍♂️ though I didn't test the rebase yet.

@cgwalters
Copy link
Member Author

OK now rebased again 🏄‍♂️ and tested. Would be nice to get this in as the rebase pain is adding up.

src/cmd-build Outdated Show resolved Hide resolved
src/cmd-build Outdated Show resolved Hide resolved
Change the code so that it's prepared to handle e.g.:
`coreos-assembler build qemu metal-uefi metal-bios openstack`.

There's more work we'll need to do for adding any more image
types, this just lays the groundwork.
@cgwalters
Copy link
Member Author

OK, now passing shellcheck.

@jlebon jlebon merged commit 4d4cdaf into coreos:master Feb 6, 2019
jlebon added a commit to jlebon/coreos-assembler that referenced this pull request Feb 12, 2019
I'm often just iterating on the OSTree content itself and don't require
new images. In such cases, it's a waste of time to wait for images to be
generated when all I want is the treecompose. But using
`coreos-assembler build` is still more convenient than dropping down to
`rpm-ostree compose tree`, especially with the virtualization wrapper.

Add a new `--no-images` option in which we only generate a commit to the
OSTree repo. This is a natural extension of coreos#302. Crucially though, we
still create a build directory under `builds/` with metadata about the
built commit.  The only practical difference is that there are no image
files and no subkeys under `images` in `meta.json`.

(I didn't bother breaking the idempotency coupling here wrt the
kickstart since (1) it's going away, and (2) this is really just for the
local dev case where you're iterating on the tools, like rpm-ostree, or
the content, like the treefile.)
jlebon added a commit to jlebon/coreos-assembler that referenced this pull request Feb 12, 2019
I'm often just iterating on the OSTree content itself and don't require
new images. In such cases, it's a waste of time to wait for images to be
generated when all I want is the treecompose. But using
`coreos-assembler build` is still more convenient than dropping down to
`rpm-ostree compose tree`, especially with the virtualization wrapper.

Add a new `--ostree-only` option in which we only generate a commit to
the OSTree repo. This is a natural extension of coreos#302. Crucially though,
we still create a build directory under `builds/` with metadata about
the built commit. The only practical difference is that there are no
image files and no subkeys under `images` in `meta.json`.

(I didn't bother breaking the idempotency coupling here wrt the
kickstart since (1) it's going away, and (2) this is really just for the
local dev case where you're iterating on the tools, like rpm-ostree, or
the content, like the treefile.)
jlebon added a commit to jlebon/coreos-assembler that referenced this pull request Feb 12, 2019
I'm often just iterating on the OSTree content itself and don't require
new images. In such cases, it's a waste of time to wait for images to be
generated when all I want is the treecompose. But using
`coreos-assembler build` is still more convenient than dropping down to
`rpm-ostree compose tree`, especially with the virtualization wrapper.

Change the concept of `IMAGETYPES` to `TARGETS` and add a new `ostree`
target for which we only generate a commit to the OSTree repo. This is a
natural extension of coreos#302. Crucially though, we still create a build
directory under `builds/` with metadata about the built commit. The only
practical difference is that there are no image files and no subkeys
under `images` in `meta.json`.

(I didn't bother breaking the idempotency coupling here wrt the
kickstart since (1) it's going away, and (2) this is really just for the
local dev case where you're iterating on the tools, like rpm-ostree, or
the content, like the treefile.)
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

Successfully merging this pull request may close these issues.

3 participants