14 Commits

Author SHA1 Message Date
David Anderson
09a8c3d87d pixiecore/cli: fix CLI's docstring. 2016-08-14 16:59:51 -07:00
David Anderson
0e92c2bebe pixiecore/cli: add secret debug command to dump builtin ipxe binaries.
The overall debug command is hidden from the CLI, since it should only
be useful when developing.
2016-08-14 16:57:02 -07:00
David Anderson
ff7a0b56c6 pixiecore: Add a retry loop in the iPXE boot.
iPXE has an annoying race condition where it sometimes doesn't notice
the ProxyDHCP response when booting, and fails. So we embed a boot
script in the builtin iPXE binaries that implements the retry loop
recommended in the documentation. Empirically, this has resolved
flaky boots on my test machine, usually no more than a single
retry is needed.
2016-08-14 16:55:27 -07:00
David Anderson
b5e956b9fc pixiecore/cli: implement v1 compatibility for the CLI.
This hack tries to interpret the commandline based on what Pixiecore v1
did, before handing off to the fancier v2 CLI logic.

Doesn't support API mode yet, since that's not yet implemented in
the library.
2016-08-14 16:54:06 -07:00
David Anderson
36351cddec pixiecore/cli: add flags for passing ipxe binaries at runtime.
These flags are both for providing binaries when running the apache2
version of pixiecore (which doesn't have builtin ipxe), and for
overriding the builtin version if desired.
2016-08-12 00:54:59 -07:00
David Anderson
62e2f4bee3 pixiecore/cli: pass Ipxe firmwares as a package global.
The cli package is meant for single-shot execution anyway, so
instead of plumbing everything through reentrantly, let's just
have a global you can seed before calling CLI().
2016-08-11 23:49:18 -07:00
David Anderson
b43c25904b pixiecore: implement the boot command, using static booter.
Doesn't quite work yet: cmdline isn't processed very well, and the
ipxe firmwares aren't plumbed through.
2016-08-11 23:29:46 -07:00
David Anderson
7ffbdcadd2 pixiecore: Implement a static booter for simple boot cases. 2016-08-11 23:09:50 -07:00
David Anderson
3e1664bb17 pixiecore: add missing file.
The build was broken for a while. Doh.
2016-08-10 22:28:20 -07:00
David Anderson
81efc36c64 pixiecore: Refactor the CLI logic into its own subpackage.
The two binaries (Apache2 and GPL) both invoke the cli package to do
the work, the only difference between them is that the GPL binary passes
it embedded ipxe binaries.
2016-08-10 22:27:09 -07:00
David Anderson
6a88cefc9b pixiecore: factor the ipxe script generation out of the HTTP handler.
This makes it easier to test the script generation in isolation,
as well as making the whole thing easier to follow.
2016-08-10 21:54:16 -07:00
David Anderson
2b4d1e8101 pixiecore: replace fmt.Print* with a user-customizable logging function.
Also introduces a "Trace" member to the API, for the future addition of
extremely verbose and complete tracing, to be used for bug reports. But
for now, only Log is used.
2016-08-10 21:36:47 -07:00
David Anderson
c3052f317f pixiecore: copy READMEs over.
The documentation doesn't match the current code at all, but it's
the target to aim for.
2016-08-09 00:32:45 -07:00
David Anderson
e440f01741 pixiecore: new version of Pixiecore, using netboot libraries.
This version is still *extremely* barebones, and the unstable tag
in the README applies triple for it, but the code in its current
state is capable of booting x86 and UEFI clients correctly, and
that was hard enough to merit a snapshot checkpoint.
2016-08-09 00:19:08 -07:00