64 Commits
Author SHA1 Message Date
Matthias Radestock 3bd5ae56f0 fix make update
Trying to build the thing for which we want to fetch the dependencies
is rather silly.
2015-07-02 11:46:48 +01:00
Alvaro Saurin a1cb5b16a6 Run the unit tests with GOMAXPROCS=4 2015-06-16 14:58:53 +02:00
Bryan Boreham 0e6569d78c New program netcheck to check if network overlaps routes 2015-06-11 17:27:20 +01:00
Paul Bellamy c31358259f [proxy] Add tls support
Caveats:
* TLS files must be present on the target server (and readable)
* TLS file paths cannot contain spaces
* TLS file paths must be absolute (i.e. cannot be relative)
* Bash argument parsing is terrible
2015-06-05 13:23:14 +01:00
Paul Bellamy 92444a75eb [proxy] Use USR2 signal to tell weavewait when to continue
There was a race condition with containers running and exiting before
`weave attach` was finished, which would cause an error.
2015-06-02 15:48:49 +01:00
Matthias Radestock 5b04efac7c move weaver 2015-06-02 14:04:02 +01:00
Matthias Radestock 485db6e48b move weavedns 2015-06-02 13:51:19 +01:00
Matthias Radestock ee28cf91e1 move weaveexec 2015-06-02 13:46:02 +01:00
Matthias Radestock 8d4a97fed5 move sigproxy, weaveproxy, weavewait 2015-06-02 13:19:16 +01:00
Matthias Radestock 8dc5ae662a simplify dependencies
This isn't as precise, but these common dependencies rarely change.
2015-05-28 17:16:22 +01:00
Matthias Radestock ec6a251b7c fix dependencies 2015-05-28 17:10:42 +01:00
Matthias Radestock 5e0d1e6036 refactor: add some lists
in order to reduce likelihood of adding an item in one place and
forgetting to do so in another.
2015-05-27 19:04:39 +01:00
Matthias Radestock 7fc51a508a cosmetic: consistency 2015-05-27 18:28:16 +01:00
Matthias Radestock cd6ba31cfa add weavewait to 'make update' target 2015-05-27 18:27:56 +01:00
Matthias Radestock d68dd39839 build all exes 2015-05-27 17:22:56 +01:00
Adam Harrison 387ec3fdd5 Add run-smoketests target to Makefile 2015-05-21 11:40:12 +01:00
Paul Bellamy 55d17ba3bf separate proxy package into weaveproxy and proxy 2015-05-19 10:34:46 +01:00
Paul Bellamy 444b1482fa add weavewait
binocarlos/wait-for-weave is Apache2 licensed, so attribution/etc applies. Thus, we
re-invent the wheel here.
2015-05-19 10:34:45 +01:00
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
Matthias Radestock 2934e89e14 fetch dependencies of sigproxy
There aren't any right now, but might be in the future.
2015-05-16 01:15:47 +01:00
Bryan Boreham 3cd1a17c23 IP Allocation Management
Using the Ring CRDT and Weave gossip, provides an interface
for the weave script to allocate IP addresses in `weave run`,
`weave start` and `weave expose`.

See docs/ipam.md for implementation details, and site/features.md
for user-visible changes.
2015-05-14 17:44:06 +01:00
Matthias Radestock cbe73e7645 switch dockerhub user from zettio to weaveworks 2015-04-21 15:37:41 +01:00
Bryan Boreham 8c6c14c6d3 Accumulate any errors from go test commands so we can report overall status 2015-04-14 18:03:10 +01:00
David Wragg 433d406d83 Use $(@D) rather than $(shell dirname $@) 2015-04-13 20:39:01 +01:00
David Wragg bc9bb9e4ae tempfile is a deprecated debianism
As noted in its man page.
2015-04-13 20:37:12 +01:00
Adam Harrison 338d577fb7 Implement weaveexec signal proxy 2015-04-11 11:50:42 +01:00
Tom Wilkie db9a0d7528 More feedback on test 'harness' 2015-04-01 12:32:35 +00: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
Tom Wilkie 7969566b27 Setup Travis CI for Weave. Add .travis.yml; add target to makefile which doesn't use docker; add image to readme. 2015-03-31 15:02:35 +00:00
Tom Wilkie 592be90904 Use recursive go test instead of naming directories individually 2015-03-31 13:33:36 +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
Michael Bridgen 8d12810446 Move weave script into tools image with its deps
This rearrangement means that the `weave` command can be used
remotely; and, as a side-effect, the script that does all the work is
using executables in its own filesystem, rather than invoking them via
docker.

The remote weavetools is given a terminal so it can be interrupted.

With the flag `--local`, the script will assume all its dependencies
are available and run then and there. Without the flag, it will run
via the weavetools image (adding the flag to the invocation).

A choice here is whether to base the tools image on scratch and add
all the deps, or base it on something else. I've used alpine linux,
which itself is based on busybox. This gives us the usual tools (sed
etc.) while keeping the image size small.

Adding the docker binary adds substantially to the image size, but it
cannot always be e.g., bind-mounted. To mitigate this image bloat, we
might build or otherwise get a client-only docker executable, or write
a special-purpose client, or indeed rewrite the driver script and use
a client library.

This also makes the dockerhub user part of the image names
parameterised, to make it easier to test the release process in full.
2015-03-18 12:29:19 +00:00
Matthias Radestock 5327c41c82 Allow build to be interrupted.
This was missed in #387.
2015-02-27 16:45:24 +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 cf2b7bc673 Remove 'make prerequisites' and update docs accordingly 2015-02-25 14:15:07 +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 ed2d0d56a5 Enable code coverage reports
This will make the test print code coverage report once done in each directory
2015-02-14 16:30:32 -08:00
David Wragg a31b115b06 Add 'build' makefile target 2015-02-10 16:27:06 +00:00
David Wragg 23233851db Support non-containerized WEAVETOOLS_EXES build 2015-02-10 16:05:54 +00:00
Matthias Radestock b42766fb81 'docker tag' with '-f' so we can easily re-do failed releases 2015-02-03 14:20:04 +00:00
Matthias Radestock 13fc0bf720 add some tests for Peers
extracted from #313
2015-01-24 10:56:44 +00:00
rade 73e1d0c12e Merge pull request #314 from squaremo/issue289_exclude_test
Move testing utils to its own package

Fixes #289.
2015-01-12 11:42:55 +00:00
Michael Bridgen 97bece2d7b Move testing utils to its own package
So as not to pollute command-line flags with test.* options.

It appears that importing "testing" (from stdlib) will add flags. To
avoid this, we need code to not depend on testing. But, since
testing_utils was previously in the same package as the rest of the
code, it dragged testing in.

Renaming testing_util.go to e.g., util_for_test.go might be enough to
avoid it being compiled with the regular code. We may want it to be
available to tests for other packages -- after all it is utilities for
testing -- so it goes in its own package.
2015-01-09 12:36:32 +00:00
Matthias Radestock b1ca832ed5 re-instate 'make publish'
and call it from the release script
2015-01-08 20:06:00 +00:00
Matthias Radestock 3090282a15 permit overriding of dockerhub user 2015-01-08 19:15:28 +00:00
rade ba27fd6523 Merge pull request #309 from rade/101_eliminate_dependencies
eliminate dependency on ethtool and conntrack on host

Closes #101.
2015-01-04 08:57:33 +00:00
Matthias Radestock cd985c1bed cosmetic: more idiomatic way of figuring out directory 2015-01-02 16:39:02 +00:00
Matthias Radestock b8e4ad1314 add 'make update' to update dependencies 2015-01-02 16:35:51 +00:00
Matthias Radestock da3d343f26 tidying: remove 'publish' targer from .PHONY
we forgot to do that when removing the target itsel
2015-01-02 16:27:37 +00:00