130 Commits

Author SHA1 Message Date
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
Dave Anderson
d040347fbd Merge pull request #9 from panchoh/patch-1
pixiecore: update notes on Example API server.
2016-09-04 00:53:27 -07:00
pancho
b4809c5ed3 Update notes on Example API server
. Update dirname
. Drop explanation of features present in v1
. Describe current behaviour (v2)
2016-09-04 09:44:12 +02:00
Dave Anderson
b9cd80144e Merge pull request #8 from panchoh/patch-1
pixiecore: remove superfluous dash from API spec.
2016-09-04 00:29:11 -07:00
pancho
a30021367f Drop the dash to api param
Currently, no dash is expected when specifying api param.
2016-09-04 07:55:42 +02: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
f061a783a7 dhcp4: Don't use the non-binding DHCP Conn silently on linux.
pixiecore: Plumb NewSnooperConn into Server as an advanced option.
pixiecore/cli: Plumb DHCPNoBind to the CLI.

Now, by default, Pixiecore will bind() to the DHCP server port in a way
that shows up in `netstat` by default. If you want to enable the "coexist
with my existing DHCP server" mode, you need to explicitly pass
--dhcp-no-bind.
2016-08-28 16:16:47 -07:00
David Anderson
7bde0dde1b pixiecore/cli: default to a valid IPv4 listen address.
Fixes #6.
2016-08-28 03:57:39 -07:00
David Anderson
6dfafb5bcf pixiecore: link to the docs for the right package. 2016-08-24 02:16:52 -07:00
David Anderson
03b8831533 pixiecore: Add a badge linking to the godoc API reference. 2016-08-24 02:16:12 -07:00
David Anderson
306f73cabf pixiecore: github doesn't correctly serve SVGs. Are you kidding me? 2016-08-24 02:12:35 -07:00
David Anderson
91d63797ed pixiecore: give up on gravizo, just embed directly. 2016-08-24 02:08:47 -07:00
David Anderson
9927c28dea pixiecore: struggle a bit with gravizo to render the graph. 2016-08-24 02:04:55 -07:00
David Anderson
7929a15c6a pixiecore: update the boot walkthrough to include iPXE and UEFI. 2016-08-24 01:58:11 -07:00
David Anderson
fef14c66e8 pixiecore: update README. 2016-08-24 00:59:35 -07:00
David Anderson
d759d198a9 Refactor the dockerfile for Pixiecore.
The way docker hub and quay.io work, you can't easily pass a custom
context to a Dockerfile. So, effectively, if you want multiple dockerfiles
per repository, you need to re-check out the whole repository by hand,
without help from the environment.

This sucks a little bit because it doesn't guarantee that the build happens
at the trigger revision ID, but for my purposes of "just have a recent build up",
it's sufficient.
2016-08-24 00:09:09 -07:00
David Anderson
ec83c11ff0 More twiddling of Dockerfile. 2016-08-23 23:22:22 -07:00
David Anderson
50df31a5a5 Twiddle the Dockerfile in an attempt to get it building. 2016-08-23 23:19:40 -07:00
David Anderson
60831bcf13 cmd/pixiecore: add a Dockerfile to build the Pixiecore binary. 2016-08-23 22:18:02 -07:00
David Anderson
37e2de8ead pixiecore/cli: unify flags related to Pixiecore server configuration. 2016-08-16 14:37:08 -07:00
David Anderson
f54844f56e Update glide.lock with new x/net dependencies. 2016-08-16 14:36:53 -07:00
David Anderson
5b23ef31b7 pixiecore/cli: add the "debug tcpdump" command.
This just runs `tcpdump` as a subprocess, with the right arguments
to capture interesting parts of the boot process (DHCP, PXE, TFTP).
2016-08-16 14:05:33 -07:00
David Anderson
05cc23ebb5 pixiecore/cli: remove the "quick" command family from the CLI for now.
I'll re-add it once I've actually implemented it.
2016-08-16 14:05:06 -07:00
David Anderson
b496cb6c1c pixiecore: checkpoint early bits of a full DHCP server.
I started hacking on this, but I need to take care of other bits
of the port before I embark on such a large feature. The code is
currently dead and not used by pixiecore, but I didn't want to
lose the small bits of address fiddling I've done so far.
2016-08-16 13:49:17 -07:00
David Anderson
e57cdc6354 pixiecore: document Shutdown. 2016-08-16 00:26:03 -07:00
David Anderson
0e0eaa8454 pixiecore: implement orderly shutdown on error or request. 2016-08-16 00:18:23 -07:00
David Anderson
8aa6f59cad pixiecore: give the error message when getting a file by ID fails. 2016-08-15 23:23:32 -07:00
David Anderson
d4fb2bbbe4 Add Go 1.7 to the test matrix, now that it's released. 2016-08-15 22:01:46 -07:00
David Anderson
ee0987169f pixiecore/cli: implement logging controls.
The v1compat CLI is now complete, with support for --debug. The v2 CLI
additionally supports optional timestamping, so that when you're using
a modern init system that captures logs for you (e.g. systemd), you
don't have stuttering timestamps.
2016-08-15 21:54:47 -07:00
David Anderson
a943caa093 pixiecore/cli: add missing file with logging functions. 2016-08-15 21:38:39 -07:00
David Anderson
39b02f723b tftp: move the "Listening on" log message to only show when using ListenAndServe. 2016-08-15 21:34:33 -07:00
David Anderson
4aa8885728 pixiecore: rework logging to provide less verbose, more useful logs by default.
Also adds a debug channel with the full line noise.
2016-08-15 21:33:57 -07:00
David Anderson
63a0c5fb32 pixiecore/cli: make CLI() consistently os.Exit() when done. 2016-08-15 18:34:21 -07:00
David Anderson
04527f7dfd pixiecore: lock import paths to go.universe.tf. 2016-08-15 00:58:15 -07:00
David Anderson
e17cabd818 dhcp4: correct the package documentation to match convention. 2016-08-15 00:46:45 -07:00
David Anderson
8293616a81 pixiecore/api-example: unexport the HTTP handler function. 2016-08-15 00:46:11 -07:00
David Anderson
2fe08ecbf6 pixiecore: add tests for the HTTP serving (notably ipxe script construction). 2016-08-15 00:41:25 -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
edb7ad89bb pixiecore/cli: plumb other flags to API mode in v1compat. 2016-08-14 19:48:39 -07:00
David Anderson
71a7b89493 pixiecore/cli: support API mode in v1compat. 2016-08-14 19:47:14 -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
c3fe975c1e Switch .travis.yml to using Travis's VM infrastructure.
My request to whitelist the install of atftp seems to be lost in issue tracker
limbo, as are all other whitelisting requests for the last few months.
2016-08-14 18:33:20 -07:00
David Anderson
2fc6bdac12 Fix the golint command in .travis.yml, to actually lint stuff. 2016-08-14 18:15:37 -07:00
David Anderson
2639514bac Correct .travis.yml to be further glide-ed. 2016-08-14 17:57:57 -07:00
David Anderson
fed7f78f53 Glide-ify .travis.yml to test everything against the glided dependencies. 2016-08-14 17:54:50 -07:00
David Anderson
0407e90330 Add glide.yaml and glide.lock for vendoring.
I'm deliberately *not* checking in the vendor/ directory here, because
doing so would interfere with people trying to use the libraries rather
than the binaries. Sadly, none of the vendoring tools work very well when
I ask them to vendorize just cmd/ (they reimport a copy of the libs in
this repository), so for simplicity right now I'll lock the versions with
glide, but users wanting reproducible builds will still need to
`glide install` themselves.
2016-08-14 17:49:01 -07:00