Commit Graph

91 Commits

Author SHA1 Message Date
Alex Crawford
d9afc85b0e feat(teeth): Add new OEM and disk layout for teeth 2014-05-29 16:46:27 -07:00
Alex Crawford
ed50f5fe0b feat(disk_util): Replace Resize() with Update()
The new Update() performs the same tasks as the old Resize()
in addition to formatting previously-unformatted partitions. This
allows children disk-layouts to repartition the base layout in
addition to resizing.
2014-05-29 16:46:27 -07:00
Michael Marineau
822644fc54 feat(build_image): Add support for injecting a cloud config
The new --developer_data option can be used to specify a path to a cloud
config to bundle into the image. If none is provided but a shared user
password (for core) is set then generate a config to set that password.
This lets us use the same mechanism for setting the default password for
both disk and PXE images.
2014-05-17 16:23:18 -07:00
Michael Marineau
5417bd7ae3 fix(vm_image_util): Set correct group in Vagrant metadata. 2014-05-09 11:52:11 -07:00
Michael Marineau
33858859fb Merge pull request #238 from marineam/insecure
fix(vm_image_util): Don't use the full vagrant OEM on vmware_insecure
2014-05-03 14:19:20 -07:00
Michael Marineau
c4984b3c7c fix(vm_image_util): Don't use the full vagrant OEM on vmware_insecure
Only the key is needed, and currently the vagrant OEM is completely
broken outside of vagrant. This gets vmware_insecure images back into
the state that they were before cloud config came along. :)
2014-05-02 15:30:49 -07:00
Michael Marineau
3fdfe92b5d fix(vm_image_util): Fix building vagrant vmware fusion images. 2014-04-29 03:48:56 -04:00
Michael Marineau
8183430f6c feat(vm_image_util): Add Vagrant metadata file
This is required for Vagrant to recognize box versions:
http://docs.vagrantup.com/v2/boxes/versioning.html
2014-04-29 01:44:47 -04:00
Michael Marineau
39951946ca feat(vm_image_util): Add new build steps, update vagrant builds
This adds two new optional build steps.  The first user of these is the
vagrant images but many of the targets can be simplified now.

- fs_hook: Anything that needs to happen before unmounting the image.
  This happens after the OEM is installed but before disk images are
  made. It can be used to copy any data out of the image.
- bundle_format: Many VM types ship as some sort of archive format
  rather than plain disk images as this script originally assumed.
  Adding this final step lets us stop using the conf step awkwardly.

Vagrant now ships with a Vagrantfile and related code included in the
OEM package. This lets us version our vagrant-side code along with the
images themselves as well making the coreos-vagrant repo optional again.
The coreos-vagrant code will still be useful for handling the fancier
cluster configuration stuff but no longer has to carry the plugin code.
2014-04-28 19:52:24 -04:00
Michael Marineau
7f5b5baf22 maint(build_library): Remove special case code for -usr disk layouts
More cleanup now that amd64-generic is gone.
2014-04-26 14:45:28 -07:00
Alex Crawford
2662d0c784 Merge pull request #229 from crawford/master
fix(vm_image_util): Minor comment fix
2014-04-16 18:41:23 -07:00
Alex Crawford
9e72f6d187 fix(vm_image_util): Minor comment fix 2014-04-16 18:16:26 -07:00
Michael Marineau
b9c72ecda1 fix(vm_image_util): Fix DIGESTS path for compressed vhd images.
Missed this in eb72b6e5
2014-04-16 17:32:11 -07:00
Alex Crawford
9095908ca1 feat(vm_image_util): Adding support for openstack and brightbox
Added USE flags for specifying the provider (ec2, openstack, or brightbox).
2014-04-11 16:12:50 -07:00
Michael Marineau
58bac50d91 fix(vm_image_util): Remove fstab from PXE initrd
Using fstab made overriding it with kernel command line options like
root=/some/disk not work properly. A generator handles it now.
2014-04-04 16:58:43 -07:00
Alex Polvi
e3156672ce refactor to use _write_cpio_common 2014-03-31 16:08:29 -07:00
Alex Polvi
0d3cd4b417 feat(iso): add iso image format to image_to_vm 2014-03-31 15:49:57 -07:00
Michael Marineau
e2aaed1619 Merge pull request #209 from marineam/pxe
feat(vm_image_util): Add /usr/.noupdate flag file in PXE images.
2014-03-31 14:01:44 -07:00
Michael Marineau
cd00e6eafe Merge pull request #212 from marineam/gce
fix(vm_image_util): Default to larger vm (8GB) disk layout for GCE
2014-03-29 14:41:14 -07:00
Michael Marineau
17d22228f8 fix(vm_image_util): Default to larger vm (8GB) disk layout for GCE
GCE was using the base 3GB layout which isn't very useful for actual
machines.
2014-03-29 14:22:01 -07:00
Michael Marineau
e0cfea50fb fix(vm_image_util): Require OEM packages to be aware of /usr/share/oem
Installing to a temporary directory and then copying over the final
contents of /usr/share/oem allows more complicated OEM packages such as
python to be configured with --prefix=/usr/share/oem while previously
the atypical use of ROOT=/usr/share/oem would have complicated things.
2014-03-27 22:17:32 -07:00
Michael Marineau
a78c5fb665 fix(vm_image_util): Keep most partitions mounted read-only.
This ensures that the only partition being modified is OEM.
2014-03-27 21:52:40 -07:00
Michael Marineau
a6328f7c2b feat(vm_image_util): Add /usr/.noupdate flag file in PXE images.
This can be used by update_engine as a quick test to determine if it is
running on a system that it can handle. This avoids needing something
like the 'coreos.diskless' kernel command line flag.
2014-03-27 15:41:41 -07:00
Michael Marineau
11aabd7bd0 fix(vm_image_util): Do not generate a machine UUID.
If QEMU is given a uuid systemd will detect that and in turn use it for
the machine-id. This made the bug causing the machine-id to be always
re-generated on boot harder to notice since it didn't happen on QEMU.
2014-03-25 14:23:23 -07:00
Michael Marineau
c489d2f7c8 Merge pull request #196 from marineam/no_kexec
feat(vm_image_util): Add qemu_no_kexec image type
2014-03-24 14:48:55 -07:00
Michael Marineau
7c0e821953 Merge pull request #202 from marineam/pxe
PXE images
2014-03-23 20:19:41 -07:00
Michael Marineau
0a8f178002 feat(vm_image_util): Support other disk formats with Xen, such as vhd. 2014-03-23 17:15:36 -07:00
Michael Marineau
d4d06cfe57 feat(vm_image_util): Add new Rackspace target with VHD disk images. 2014-03-23 16:31:09 -07:00
Michael Marineau
5ab320d317 fix(vm_image_util): Fix typo in README 2014-03-23 11:43:36 -07:00
Michael Marineau
066bd23df8 feat(vm_image_util): Rework the qemu wrapper script to work for PXE
Now the script can be used with a disk image or a kernel/initrd.
Using a disk with the PXE kernel should work too but haven't tried it.
2014-03-22 22:28:10 -07:00
Michael Marineau
e151a33cee fix(vm_image_util): Fix building squashfs for /usr
Taking a bit of a new approach to booting PXE images here for both
amd64-generic and amd64-usr. Instead of requiring the user to specify
squashfs and tmpfs on the kernel command line we can simply provide
defaults in the initrd's fstab.
2014-03-22 22:23:40 -07:00
Michael Marineau
441a982a39 fix(vm_image_util): Disable installing oem-pxe
It only installed /usr/share/oem/oem-release which we no longer use.
2014-03-22 14:27:48 -07:00
Michael Marineau
81367903bf fix(vm_image_util): Package up /usr for pxe images. 2014-03-22 14:27:48 -07:00
Michael Marineau
e2536ad76f feat(vm_image_util): Add qemu_no_kexec image type
This makes it easy to test booting without kexec on qemu/kvm similar to
how images are booted on Xen.
2014-03-18 15:07:09 -07:00
Michael Marineau
0c1198c3bb feat(disk_util): Switch from SYSLINUX's gptmbr.bin to mbr.bin
cgpt now supports generating hybrid MBRs and the classic style mbr.bin
from any version of SYSLINUX should work the same with the hybrid MBR.
The other code, gptmbr.bin, changes after SYSLINUX 3. Switching lets me
play with different versions of SYSLINUX without breaking everything.

With this change all images feature a hybrid MBR so the special case for
some VM platforms has been removed.
2014-03-12 15:38:34 -07:00
Michael Marineau
c90ea5f504 fix(vm_image_util): Skip kexec when booting on Xen HVM
This is buggy, instead we will need to handle Xen HVM similar to PV
except this requires SYSLINUX config tweaking instead of grub's menu.lst
2014-03-11 11:38:46 -07:00
Michael Marineau
a022642e54 rename(disk_layout): Remove the legacy use of "legacy" 2014-03-05 15:57:22 -08:00
Michael Marineau
1177d198da fix(release_util): Fix DIGESTS regression from feb59db9f
While attempting to fix the easy to mix up DIGESTS names in feb59db9f I
stumbled across yet another way that the DIGESTS names were a bit
unpredictable: previously a .bz2 got stuck into the file name when
upload_images automatically compressed some file types. The new code
missed this and never added the .bz2. Correct this now, both for
image_to_vm which has a pile of glue to keep the legacy names in place
for now and build_image which I never intended to change.
2014-02-19 17:50:40 -08:00
Michael Marineau
821d718a74 fix(vm_image_util): assert qemu wrapper is sh friendly 2014-02-09 18:22:34 -08:00
Michael Marineau
bf6ee33244 fix(vm_image_util): If DIGESTS wasn't generated don't copy it.
Failed to test my last change with uploads disabled :(

Also, it needs to be return 0, not return.
2014-01-30 13:31:36 -08:00
Michael Marineau
8a15840d6a fix(vm_image_util): Use more consistent names for vm .DIGESTS
Switch from naming DIGESTS based in disk image name to a common prefix.

old: coreos_production_qemu_image.img.DIGESTS ->
new: coreos_production_qemu.DIGESTS

The old behavior wasn't very consistent since plain disk images aren't
used by all types and the code implementing that was easy to brake,
namely by mistake coreos_production_pxe_image.cpio.gz.DIGESTS became
coreos_production_pxe.vmlinuz.DIGESTS a couple releases ago.

The old names will continue to exist as well for the time being to avoid
breaking existing install/download scripts and the original pxe DIGESTS
name is back.
2014-01-29 17:23:10 -08:00
Michael Marineau
feb59db9f5 fix(release_util): Add argument to specify the name to use for .DIGESTS
For multi-file uploads we should explicitly declare what the name of the
.DIGESTS file should be instead of using the first file name. Relying on
the ordering was subtle and easy to break.
2014-01-29 16:30:03 -08:00
Michael Marineau
b3e81f22e4 fix(image_to_vm): Wrap upload_image in vm_upload.
This keeps all references to VM_GENERATED_FILES inside of
build_library/vm_image_util.sh so changes that impact it more obvious.
2014-01-29 14:01:33 -08:00
Michael Marineau
bfe47817e4 fix(build_image): Add support for COREOS_DISK_LAYOUT_SUFFIX
Append COREOS_DISK_LAYOUT_SUFFIX from the portage profile to disk layout
names. Allows switching from "base" to "base-usr" and similar.
2014-01-05 18:39:47 -08:00
Michael Marineau
3546256597 fix(vm_image_util): Unmount STATE before making squashfs 2014-01-04 21:39:31 -08:00
Michael Marineau
bfcbb3f57f fix(image_to_vm): Move to disk_util, modify images in-place.
Avoid unpacking/repacking partitions by using disk_util's resize and
mount commands. Also simplify assorted bits along the way.
2014-01-04 21:00:45 -08:00
Michael Marineau
8e0d630699 fix(image_to_vm): Remove support for alternate state fs image.
We haven't really needed this, remove the option to simplify things.
2013-12-30 16:32:37 -08:00
Michael Marineau
de9ff4fc8e fix(disk_util): Rework how argument parsing/passing works.
Move from optparse to argparse. Move layout file and layout type to
global options with reasonable default values so every command doesn't
need to them. Adjust calling scripts to match.

For now layout type is being passed via an environment variable
DISK_LAYOUT_TYPE but this is a temporary situation.
2013-12-30 16:10:46 -08:00
Michael Marineau
95388caab1 fix(image_to_vm): Add GCE oem package 2013-11-30 17:33:33 -08:00
Michael Marineau
0cb0cbf71e feat(image_to_vm): Add minimal GCE support.
Simply rolls our disk image into a tarball that can be passed to gcutil.
To actually be useful we need an OEM package to handle SSH keys.
2013-11-30 16:39:31 -08:00