diff --git a/.gitignore b/.gitignore index f7490607..32a24925 100644 --- a/.gitignore +++ b/.gitignore @@ -26,4 +26,4 @@ _testmain.go bin/ coverage/ Godeps/_workspace/src/github.com/coreos/coreos-baremetal -static/ \ No newline at end of file +images/ \ No newline at end of file diff --git a/cmd/bootcfg/main.go b/cmd/bootcfg/main.go index 175a9d05..d12af7d4 100644 --- a/cmd/bootcfg/main.go +++ b/cmd/bootcfg/main.go @@ -14,40 +14,12 @@ import ( var log = capnslog.NewPackageLogger("github.com/coreos/coreos-baremetal/cmd/bootcfg", "main") -// Example Boot Configs - -var CoreOSStable = &api.BootConfig{ - Kernel: "http://stable.release.core-os.net/amd64-usr/current/coreos_production_pxe.vmlinuz", - Initrd: []string{"http://stable.release.core-os.net/amd64-usr/current/coreos_production_pxe_image.cpio.gz"}, - Cmdline: map[string]interface{}{}, -} - -var CoreOSBeta = &api.BootConfig{ - Kernel: "http://beta.release.core-os.net/amd64-usr/current/coreos_production_pxe.vmlinuz", - Initrd: []string{"http://beta.release.core-os.net/amd64-usr/current/coreos_production_pxe_image.cpio.gz"}, - Cmdline: map[string]interface{}{}, -} - -var CoreOSAlpha = &api.BootConfig{ - Kernel: "http://alpha.release.core-os.net/amd64-usr/current/coreos_production_pxe.vmlinuz", - Initrd: []string{"http://alpha.release.core-os.net/amd64-usr/current/coreos_production_pxe_image.cpio.gz"}, - Cmdline: map[string]interface{}{}, -} - var CoreOSLocal = &api.BootConfig{ - Kernel: "/images/coreos_production_pxe.vmlinuz", - Initrd: []string{"/images/coreos_production_pxe_image.cpio.gz"}, + Kernel: "/images/stable/coreos_production_pxe.vmlinuz", + Initrd: []string{"/images/stable/coreos_production_pxe_image.cpio.gz"}, Cmdline: map[string]interface{}{}, } -var CoreOSLocalAutoLogin = &api.BootConfig{ - Kernel: "/images/coreos_production_pxe.vmlinuz", - Initrd: []string{"/images/coreos_production_pxe_image.cpio.gz"}, - Cmdline: map[string]interface{}{ - "coreos.autologin": "", - }, -} - func main() { flags := flag.NewFlagSet("bootcfg", flag.ExitOnError) address := flags.String("address", "127.0.0.1:8080", "HTTP listen address") @@ -81,7 +53,6 @@ func main() { // load some boot configs bootAdapter := api.NewMapBootAdapter() - bootAdapter.SetUUID("8a549bf5-075c-4372-8b0d-ce7844faa48c", CoreOSLocalAutoLogin ) bootAdapter.SetDefault(CoreOSLocal) config := &api.Config{ diff --git a/scripts/get-coreos b/scripts/get-coreos new file mode 100755 index 00000000..3a259561 --- /dev/null +++ b/scripts/get-coreos @@ -0,0 +1,22 @@ +#!/bin/bash -e + +CHANNEL="stable" +VERSION="current" +DEST=${PWD}/images/$CHANNEL + +mkdir -p $DEST +echo "Downloading CoreOS kernel and initrd" + +# kernel and sig +BASE_URL=http://$CHANNEL.release.core-os.net/amd64-usr/$VERSION +curl $BASE_URL/coreos_production_pxe.vmlinuz -o $DEST/coreos_production_pxe.vmlinuz +curl $BASE_URL/coreos_production_pxe.vmlinuz.sig -o $DEST/coreos_production_pxe.vmlinuz.sig + +# initrd and sig +curl $BASE_URL/coreos_production_pxe_image.cpio.gz -o $DEST/coreos_production_pxe_image.cpio.gz +curl $BASE_URL/coreos_production_pxe_image.cpio.gz.sig -o $DEST/coreos_production_pxe_image.cpio.gz.sig + +# verify signatures +# https://coreos.com/security/image-signing-key/ +gpg --verify $DEST/coreos_production_pxe.vmlinuz.sig +gpg --verify $DEST/coreos_production_pxe_image.cpio.gz.sig