67 Commits
Author SHA1 Message Date
Michael Bridgen 6d7de3ddff Proxy implementation
This adds a docker remote API proxy to the weaveexec image. The proxy
has hooks for (post-) container start and (pre-) container create; the
former attaches a weave interface to a container given a WEAVE_CIDR
environment entry, and the latter adjusts the entrypoint of a container
to wait for the ethwe interface.

Notes:

None of the hooks need to inspect/change large bodies. In order to avoid
a crash when handling images larger than memory we need to ensure that
the entire request body is never loaded into memory (i.e. No
ioutils.ReadAll).

When proxying a raw-stream response, we can't use http.WriteHeader. It
sets the Transfer-Encoding to chunked, which will throw off the clients.
Instead we have to hijack the socket, and write out http status code
manually.

For chunked transfer-encodings, clients (docker-py) depend on each http
chunk containing exactly one JSON object. Therefore, we cannot re-chunk
the body, and have to pass it across verbatim.

Proxy needs to pass multi-cidrs separately when calling weave. Otherwise
they get smashed together on the command line, and the call fails.

When creating the image, if no entrypoint is specified on the container,
it should use the entrypoint of the image. Code for this is based on
powerstrip-weave.

We handle WEAVE_CIDR='' by acting like it is not set. The reason being,
that because WEAVE_CIDR is inherited from images (along with env vars),
setting it to blank is equivalent to unsetting it.
2015-05-19 09:48:12 +01:00
Adam Harrison 4059ff67e8 Add Vagrantfile.local to git ignore 2015-04-20 16:15:43 +01:00
Adam Harrison 338d577fb7 Implement weaveexec signal proxy 2015-04-11 11:50:42 +01:00
Tom Wilkie d28d52da15 Move away from recursive go test, as it cannot output a merged coverage profile. Update said profile to coveralls.io; add badge. 2015-04-01 12:00:06 +00:00
Matthias Radestock e096b3bcd1 ignore weavexec/weave build artifact 2015-03-21 13:08:00 +00:00
Michael Bridgen 520c54f8da Use a fixed (and old) version of the docker client
As noted in #388 comment 76958961, we need the docker client to be as
old as possible while supporting what weave needs to do. At the minute
that means version 1.3.1.

The `apk` package index does not have old versions of docker, so the
most direct way of getting a docker executable is to download the
specific version from https://get.docker.com.
2015-03-20 14:37:24 +00:00
Michael Bridgen 795d0edc73 weavetools -> weaveexec
This is to make a visible break with previous releases, such that a
newly downloaded weave script will definitely work.

Without this change in name, an existing weavetools image that doesn't
include the script might be invoked, resulting in a confusing message
for the user.
2015-03-18 12:29:20 +00:00
rade d9cdfff35d Merge pull request #387 from dpw/build_in_container
Containerized weave build
2015-02-25 15:35:35 +00:00
David Wragg 438e57853b Leave the docker image .tar files in the weave directory
Making things into /var/tmp is a bit odd, and this works better in
the context of the containerized build.
2015-02-24 14:38:59 +00:00
Abhishek Chanda d930f5c54a Ignore vagrant directory 2015-02-21 23:21:43 -08:00
David Wragg 23233851db Support non-containerized WEAVETOOLS_EXES build 2015-02-10 16:05:54 +00:00
Matthias Radestock 57e86a8796 update .gitignore 2015-01-01 11:50:51 +00:00
Matthias Radestock 5da2219dc8 cosmetic: remove weaver/.gitignore
and handle that in the top-level .gitignore instead. Just as we do for weavedns.
2015-01-01 00:49:34 +00:00
Matthias Radestock f9593ac571 ignore release dir 2014-12-29 13:51:45 +00:00
Michael Bridgen 747d48749d Ignore compiled binary 2014-10-29 11:44:07 +00:00
Bryan Boreham 673b420afa Ignore Emacs backup files 2014-10-02 15:01:35 +01:00
Michael Bridgen 56a6ea6015 Initial commit 2014-09-29 16:34:39 +01:00