Commit Graph

13 Commits

Author SHA1 Message Date
Stefan Majer
f47ae40332 Fix most of golangci-lint errors in the pixiecore package, keep unused logging function and unchecked errors in example 2020-01-26 13:20:21 -08:00
David Anderson
99cc04c381 Clean up more lint errors.
Also remove the 'vetshadow' linter, it's overly noisy on normal code.
2018-02-05 21:09:02 -08:00
David Anderson
a44cef6d7b Add an advanced option to pass in a raw iPXE script.
The feature is heavily laced with warnings and a complete lack of
promises around future compatibility. But within those parameters,
it might allow some people to do cool things.

Fixes #60.
2018-02-03 21:25:55 -08:00
pancho horrillo
57a1c9bea2 pixiecore: return file size on apibooter version of ReadBootFile (#14)
Otherwise Content-Length header cannot be properly set, and this
causes issues with iPXE.
2016-10-01 14:20:58 -07:00
David Anderson
3aa769557c pixiecore: set Content-Length when serving the kernel/initrd.
iPXE appears to have *really* poor performance (orders of magnitude worse) if
it doesn't know the length of the kernel/initrds that it's downloading. Without
this change, booting CoreOS takes longer than I've had patience to wait. With
this change, the bottleneck becomes the network transfer speed.

Fixes #10.
2016-09-14 20:54:04 -07:00
David Anderson
445f92459b pixiecore: only close a non-nil body in API mode.
Fixes #7.
2016-09-02 13:25:27 -07:00
David Anderson
d3cf17aa06 pixiecore: unit test booters, and fix bugs found by tests. 2016-08-15 00:02:10 -07:00
David Anderson
16aa5cf353 pixiecore: properly quote the ID parameter in StaticBooter. 2016-08-14 22:36:30 -07:00
David Anderson
81a8cca451 pixiecore: refactor APIBooter commandline construction.
This allows API servers to return URL(x) in the cmdline template,
which pixiecore translates to an appropriate ID(x) template call
to get the file proxied via Pixiecore.
2016-08-14 22:28:39 -07:00
David Anderson
f904f42035 pixiecore: factor out URL signing/decoding, and unit test it. 2016-08-14 21:46:12 -07:00
David Anderson
4941f47975 pixiecore: switch Spec.Cmdline from a map to a templated string.
The main difficulty in passing a commandline as a plain string is
that you sometimes want to encode IDs into it, to tell your kernel
to fetch something via Pixiecore. Solving that problem with maps is
a bit clunky. Instead, now we use a text/template {{ ID "foo" }} to
mean "make a URL that, when fetched, reads the file "foo" from the
Booter.
2016-08-14 21:22:17 -07:00
David Anderson
7bbdbc7df1 pixiecore: implement API mode, and plumb it into the CLI. 2016-08-14 19:44:34 -07:00
David Anderson
7ffbdcadd2 pixiecore: Implement a static booter for simple boot cases. 2016-08-11 23:09:50 -07:00