185 Commits

Author SHA1 Message Date
Phenix Rizen
a9d71481f7 handleBooting should return a no-op script, not an error.
Responding with an error makes iPXE print a misleading error message (misleading because it doesn't break the boot in any way, it just makes humans uncomfortable).
2017-02-24 15:22:11 -08:00
David Anderson
80ce588fdd Update Glide dependencies. 2017-02-22 16:08:31 -08:00
David Anderson
33769d2ec3 Update the vendored iPXE to the latest code. 2017-02-22 15:13:53 -08:00
David Anderson
735c025438 Add a section on demos and users of Pixiecore. #22 2017-02-22 15:00:38 -08:00
David Anderson
34da4bdc44 Add a "quick" command for fast booting of various installers.
The quick commands are just aliases for the `boot` command with
various pre-cooked kernel/initrds/cmdline combinations. Currently
supported are Debian, Ubuntu, Fedora and Centos. There's also code
for Arch, but it's currently disabled as I'm failing to get the
HTTP rootfs to work.
2017-02-22 04:21:07 -08:00
David Anderson
0d99a2ad1f Update README.api.md with the revised cmdline format.
Everything old is new again, we're back to a simple string for the
commandline, but this time with template goodness for URL expansion.
2017-02-22 01:05:34 -08:00
David Anderson
7642226388 Switch the deploy scripts to 1.8. 2017-02-20 18:16:08 -08:00
David Anderson
41d69f408f Don't build on tip for now.
x/net has been broken by recent changes to the stdlib internals.
Keep this build disabled until it's fixed.
2017-02-20 18:15:28 -08:00
David Anderson
84b8a99631 Switch the Travis build to Go 1.7 + 1.8.
All external triggers happen only for the 1.8 build now.
2017-02-20 17:44:43 -08:00
David Anderson
a762c94d61 Only try to parse the MAC address if the file has a known type.
Parsing unconditionally logs errors when serving non-kernel/initrd
files.
2017-02-20 17:43:59 -08:00
David Anderson
3df58430a4 Add a sample systemd service file for pixiecore.
The service file is added as documentation, rather than in the system
services directory, because it will almost certainly require customization
before it can be used.

So why bother including one at all? Because I've gone through the trouble of
figuring out the various systemd-exec security flags to lock down pixiecore
as much as possible with chroots, capabilties, syscall filters, etc. Having
that as a baseline will encourage people to run Pixiecore with maximum constraints,
even if they have to write their own ExecStart for it.
2017-01-31 17:53:45 -08:00
David Anderson
01a86583a5 Fix the debian package to actually package the binary.
Until now I was focused on getting the machinery in place, and
didn't notice I was packaging the source code directory, instead
of the binary. Oops.
2017-01-31 17:31:07 -08:00
David Anderson
6cd2249ed8 Trigger docker hub builds from Travis, instead of github.
This will make hub only build code that passes tests.
2017-01-31 17:26:10 -08:00
David Anderson
63de80a73e Appease Go 1.6's excessively paranoid vet command. 2017-01-31 16:56:40 -08:00
David Anderson
4f1ccf2f95 Make the secure vars global, so that Travis doesn't matrixify them. 2017-01-31 16:51:30 -08:00
David Anderson
5f5a6ab525 Listify the environment, so all vars are present. 2017-01-31 16:49:36 -08:00
David Anderson
89360d4cc5 Move the scripts to their own directories to appease golint. 2017-01-31 16:43:02 -08:00
David Anderson
7e2f651b1f Trigger quay builds from Travis, so we build from non-broken only. 2017-01-31 16:39:28 -08:00
David Anderson
b1baf72ae2 Add Debian/Ubuntu packaging information for Pixiecore. 2017-01-31 16:11:37 -08:00
David Anderson
2121a55c73 Replace the env API key with a freshly encrypted version.
Turns out, each repository has a *different* public key for encrypting
content, so copying encrypted blobs over from tlsrouter plain doesn't work.
Completely obvious in retrospect, derp.
2017-01-31 15:50:21 -08:00
David Anderson
4ef7271d34 Check the status code of the versions listing when pruning. 2017-01-31 15:47:28 -08:00
David Anderson
e7f3d579ca Correct the package name, so the pruning can actually function. 2017-01-31 15:42:22 -08:00
David Anderson
adafaecce7 Add the prune_old_versions script, so that the deploy cleanup can function. 2017-01-31 15:40:11 -08:00
David Anderson
ea01e2295a Only push packages in the top-level directory.
Otherwise, the packagecloud deploy script helpfully finds a random
xz archive in the vendor directory and tries to push it, which fails.
2017-01-31 15:24:01 -08:00
David Anderson
23a310b445 Reencrypt the packagecloud deploy token, to try and fix the deploy failure. 2017-01-31 15:17:51 -08:00
David Anderson
cc7e580a12 Disable atftp install temporarily.
Installing atftp requires sudo, which forces the use of VMs. I suspect
this is breaking packagecloud deploys somehow.
2017-01-31 15:06:10 -08:00
David Anderson
ba5b64bcf2 Autobuild debian packages for pixiecore on Go 1.7. 2017-01-31 14:59:37 -08:00
Mathias Kaufmann
19b787d836 Fixed Intendation
Signed-off-by: Mathias Kaufmann <me@stei.gr>
2017-01-23 00:40:58 -08:00
Mathias Kaufmann
574ee88ab1 Switch naming of FirmwareEFIBC/FirmwareEFI64
Signed-off-by: Mathias Kaufmann <me@stei.gr>
2017-01-23 00:40:58 -08:00
Mathias Kaufmann
6de5322b09 Readded removed firmware blob entries.
Signed-off-by: Mathias Kaufmann <me@stei.gr>
2017-01-23 00:40:58 -08:00
Mathias Kaufmann
bc95504ca6 Added DHCP Architecture Type 9
By supporting Type 9 ( „EFI x86-64“ ), pixiecore can boot VMware (Fusion) EFI-Type Machines.

The const for FirmwareEFI64 has been renamed to FirmwareEFIBC ( see RFC-4578, Section 2.1 ) and FirmwareEFI64 is assign to type 9 and uses the same ipxe blob as FirmwareEFIBC.

Signed-off-by: Mathias Kaufmann <me@stei.gr>
2017-01-23 00:40:58 -08:00
David Anderson
2ed87f6141 pixiecore: note the problem with using ULAs for v6 addressing. 2017-01-20 00:21:26 -08:00
David Anderson
7576c023fc Add a braindump for PXE-over-ipv6 support. 2017-01-20 00:00:14 -08:00
pancho horrillo
7e671a0899 Improve build logic (#28)
* dockerfiles: Drop duplicate mkdir

The mkdir gets executed if "Building from local dev copy", whereas if built from
upstream git, go get will take care of it.

* dockerfiles: Drop extra community repo

No longer needed with current edge or stable tags of alpine linux.

* dockerfiles: Drop gcc as an explicit dep; go pulls it

Current edge and 3.5 declare gcc as a dep for go.

* dockerfiles: Install glide from package repo

Both edge and 3.5 provide a packaged glide.  By using the provided package,
we reduce the build time a little.

* dockerfiles: Set GLIDE_HOME to prevent glide to pollute /root

glide promptly ignores HOME (it checks /etc/passwd), but honours GLIDE_HOME.
So, by pointing GLIDE_HOME to a ephemeral dir, ~/.glide will be created there
instead of /root/.glide, simplifying the cleanup process.

* dockerfiles: Use --purge to ensure clean package uninstalls

This way, /usr/lib/go gets purged, and we don't have to remove it manually.

* dockerfiles: Move netboot tree instead of copying it

Less space used and slightly faster build.

* dockerfiles: Simplify build steps

go build will honour GOBIN and leave the executable there.

* dockerfiles: Move the installation of packages to the top

* dockerfiles: Upgrade first, then install new stuff

* dockerfiles: Tie build deps with a virtual package for easier removal

By deleting the virtual .build-deps package, one ensures the
no-package-left-behind policy :-)

* dockerfiles: Split package list in multiple lines

It's a good practice for enhancing the readability of pull requests,
since addition or removal of packages from the list will result in single line
changes.

* dockerfiles: Drop changing dir to /

No need to change directory in order do the cleanup.

* dockerfiles: Test the existence of the go package, instead of .git

This way we can add .git to .dockerignore, thus preventing copying it over when
building the image.

* dockerfiles: Add .dockerfile files to minimize the files that are copied over

* dockerfiles: Place build logic in the Dockerfile

Makes it easier to understand the build process if the whole sequence is stored
in a single place.

OTOH, editing the shell script inside the Dockerfile is a bit harder.

* dockerfiles: Create a sandbox where to put all transient files

* dockerfiles: Set GLIDE_HOME to the sandbox

* dockerfiles: Set GOPATH to a dir under the sandbox

* dockerfiles: Simplify cleanup

* dockerfiles: Rename 'stuff' to 'context', to use Dockerfile lore

* dockerfiles: Install entrypoint onto /usr/local/bin

This is the default location for locally managed binaries, and as such, PATH
includes it.  This way, it is easier to run it interactively.

* dockerfiles: Extract sandbox and context paths into variables

* dockerfiles: Move vars up to help define other vars before they are used

* dockerfiles: Add the required vars to eliminate duplicated paths

* dockerfiles: Replace hardcoded paths with references to vars

* dockerfiles: Fix wording for clarity

* dockerfiles: Add emtpy line to improve readability

* dockerfiles: Tell the go linker to strip debugging symbols

This produces a sensibly smaller binary.

* dockerfiles: Drop the --rm to docker build, as it is the default behaviour

* dockerfiles: Use long flags for readability

* dockerfiles: Base image onto alpine:3.5

Now that 3.5 has been released, we can use it instead of edge, since it
provides go 1.7.3.  We get a more stable environment, plus a smaller image.
2017-01-05 15:54:43 -08:00
David Anderson
176c8f6c25 Document the ACI container image as well as the docker image.
Fixes #5.
2017-01-05 02:51:41 -08:00
David Anderson
24c1e129d6 dockerfiles: run pixiecore tests while building container.
This is a poor man's version of "only build a container when
the continuous build is green." Travis would be better, but
we can't yet trigger once per commit, only once per build
in the build matrix, so that doesn't work.
2017-01-05 02:33:40 -08:00
David Anderson
d0245412cc Give up on github→travis→quay integration for now.
Travis doesn't support post-all-builds hooks, so a single commit
would trigger 3 builds on quay.io. Travis have plans for fancier
pipelines, until then we'll just build directly.
2017-01-05 02:17:47 -08:00
David Anderson
be99b5e992 Try more escaping in the after_success command. 2017-01-05 01:33:05 -08:00
David Anderson
32bbec67d3 Trigger quay.io build from Travis, after a successful build.
... Maybe, if I got the incantation right.
2017-01-05 01:26:36 -08:00
David Anderson
5ba63cb0f0 cmd/pixiecore: update glide vendored versions.
This is also a test of triggering a quay.io build, even though that
integration still needs work elsewhere.
2017-01-05 00:58:37 -08:00
David Anderson
fbcb237a6d dhcp4: bind listeners to 0.0.0.0 and filter based on received interface.
Some DHCP messages are broadcast to 255.255.255.255, and binding to a
specific address filters those packets out. Instead, we have to translate
the "listen on ip:port" intent to "listen on interface:port", and filter
based on the interface that received the packet.

Fixes #27.
2017-01-05 00:29:13 -08:00
pancho horrillo
441857b277 Drop obsolete GO15VENDOREXPERIMENT env var from Travis CI config (#26)
Now that Go 1.5 is gone from the build matrix, this var is no longer needed,
as it is the default behaviour in Go 1.6+.
2017-01-01 13:40:10 -08:00
David Anderson
84d71de8c1 Remove Go 1.5 from the Travis continuous build.
Policy is to support the latest 2 releases of Go, and some dependent
code just broke on 1.5.
2016-12-24 13:26:24 -08:00
pancho horrillo
b5f135b0d0 pixiecore: Provide a default value for listen-addr flag (#24)
Fixes google/netboot#20
2016-12-24 13:19:19 -08:00
pancho horrillo
5215003867 pixiecore: Fix some backslashes within shell snippets (#23) 2016-12-24 13:18:47 -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
pancho horrillo
d1e0ba49c4 Add missing param 'name' to log entry text (#12)
Also add a missing closing parens in the textual description.
2016-09-22 21:24:17 -07:00
pancho horrillo
25de7b4882 Fix directory reference (example-> api-example) (#11) 2016-09-22 20:26:03 -07:00
David Anderson
a4369dcb64 pixiecore: fix import mangled by goimports. 2016-09-19 03:56:42 -07:00
David Anderson
d6d5d3c36a Update .gitignore to ignore pixiecore.test. 2016-09-19 03:55:18 -07:00