47 Commits

Author SHA1 Message Date
Paul Bellamy
7ddc893ec4 WIP -- fixing some shellcheck issues in scope 2016-10-26 17:20:14 +01:00
Alfonso Acosta
5433c256c7 Fix argument escaping in Scope
By naively using echo and cat to print to serialize/deserealize arguments we were garbling
arguments with special characters and whitespaces
2016-10-25 15:35:48 +00:00
Tom Wilkie
32edfc9112 Don't reencode reports in the collector (#1819)
* Don't reencode reports in the collector

* Review feedback

* Fix comment

* Update alpine URLs so it will build

* Fix tests
2016-08-22 17:37:41 +01:00
Paul Bellamy
691ad042c7 adding a demo json report to the scope dockerfile 2016-07-11 11:50:28 +01:00
Tom Wilkie
8e1a6b3667 Add dry run flag to scope, so when launched we can check the args are valid. (#1609)
* Add dry run flag to scope, so when launched we can check the args are valid.

* Try and parse listen address and error early.

* Specify that -dry-run is for internal use only.
2016-06-27 10:13:55 +01:00
Alfonso Acosta
4dfd096ca7 Fix handling of implicit probe targets
Also, clean up entrypoint script.
2016-06-15 11:12:50 +00:00
Alban Crequy
42ad3aa12b Scope slow: improve error messages for debugging (#1534)
* alpine: dl-4.alpinelinux.org is dead, use another server

* increase buffer for docker stats

Attempt to avoid the following message:
docker container: dropping stats.

* probe: better timeout error messages

The logs contains the following messages:

Process reporter took longer than 1s
K8s reporter took longer than 1s
Docker reporter took longer than 1s
Endpoint reporter took longer than 1s

This patch prints how long it takes.
2016-05-22 18:21:55 +01:00
Tom Wilkie
cb0901e8e1 Move all the flag parsing to main.go; implement scope help 2016-04-20 15:48:43 +01:00
Tom Wilkie
531e08210c Pin alpine version. 2016-03-23 15:41:37 +00:00
Tom Wilkie
7711fe06d9 Make --app-only run the app, not the probe. 2016-02-29 18:00:10 +00:00
Tom Wilkie
96830942ed Plumb through custom weave domains. 2016-02-25 19:39:08 +00:00
Paul Bellamy
d4c6280820 Review Feedback: Stick args in /var/run/weave 2016-02-12 15:51:17 +00:00
Paul Bellamy
217b68c764 overwrite /etc/weave/apps, because it might already exist 2016-02-12 13:54:49 +00:00
Tom Wilkie
d4e58b9e33 Decouple Scope lifecycle from Weave lifecycle
- Run the Weave integrations regardless of if weave is detected.
- Make everything backoff and not spam the logs.
- Add miekg dns to vendor.
- Have the app periodically register with weaveDNS, and the probe do lookups there.
- Decide what the local networks are at runtime, not once at startup.
- Correctly resolve app ids, fixes #825
2016-02-09 14:24:57 +00:00
Alfonso Acosta
3d94082b07 Add debug logging 2016-02-05 16:58:40 +00:00
Tom Wilkie
f8c720f266 Use exec -a to differentiate app and probe process names. 2016-01-06 11:56:09 +00:00
Alfonso Acosta
f183590cf4 [probe] Only target scope.weave.works implicitly if no app is provided 2015-12-21 17:00:23 +00:00
Alfonso Acosta
4841340b33 [probe] Use https with scope.weave.works by default 2015-12-21 14:48:27 +00:00
Tom Wilkie
667dd0f1de Rationalise version handling 2015-12-11 12:23:01 +00:00
Tom Wilkie
c749f5aa33 Merge probe and app binaries, run with ./scope probe or ./scope app. 2015-12-09 11:00:42 +00:00
Paul Bellamy
d57d4aa53a Don't default to ssl for scope.weave.works
It doesn't support it yet, and we want to release 0.10.0
2015-11-16 10:44:30 +00:00
Tom Wilkie
0288b3151b Use gocertifi instead of random ca-certs. 2015-10-23 16:35:41 +00:00
Paul Bellamy
d380df5dd6 Merge pull request #575 from weaveworks/559-probe-ssl-support
Add ssl support for the probe
2015-10-20 14:57:39 +01:00
Paul Bellamy
a1466cb3fc Review Feedback 2015-10-20 14:26:27 +01:00
Tom Wilkie
b77fbcdaf1 Make scope work with weave master. 2015-10-20 09:48:12 +00:00
Paul Bellamy
986abd24cd Add ssl support for the probe
Hosts ending in :443 are treated as SSL. There is also a
--probe.insecure flag, for using it in development environments where
SSL cannot be verified.
2015-10-19 17:32:32 +01:00
Tom Wilkie
206a56b1ad Do all weave operations from within the container
Fixes #523
2015-09-30 11:54:38 +00:00
Peter Bourgon
36b743fe1f probe, app: reliable shutdown
- Restructure main funcs for clean defer-stack-unwinds
- Fix Docker container to handle signals properly
- Introduce runsvinit for container init process
- Integration test
2015-09-29 11:45:12 +02:00
Tom Wilkie
c92ee90716 Use alpine:latest instead of gliderlabs/alpine 2015-09-01 11:15:14 +00:00
Tom Wilkie
18cda35f73 Add works.weave.role=system label to the scope container. 2015-08-27 14:17:08 +00:00
Tom Wilkie
d8ac16d3f3 Gather container IP addresses from Docker and Weave, and apply them to nodes in the container topology. 2015-08-26 10:19:08 +00:00
Tom Wilkie
b4d7b88265 run.weave.works -> scope.weave.works 2015-08-14 16:58:01 +00:00
Tom Wilkie
6f3828a431 Add parameter shortcut for saas 2015-08-12 12:04:06 +00:00
Tom Wilkie
a17d0baf38 Support --probe.foo=bar style in entrypoint.sh 2015-08-11 13:54:19 +00:00
Tom Wilkie
f4af9695f2 Add options for starting scope without app or probe. 2015-08-11 11:49:27 +00:00
Peter Bourgon
7d51f173ea Probes POST to apps
- App takes POST report on /api/report
- Probe publishes to configured target(s)
- Name resolution happens on probe-side
- There's no longer an xfer.ProbePort
- xfer.Collector responsibility is reduced
- Fixes to remaining experimental components.
- rm experimental/bridge: it's not being used, and by changing the
  app/probe comm model, it would require a complete refactor anyway. We
  can easily rebuild it when we need to. It will even be much simpler.
- rm experimental/graphviz: it's broken for some time anyway, and we
  don't really need to play around with it as a rendering option
  anymore.
- rm experimental/oneshot: we never use this anymore.
2015-08-07 15:45:15 +02:00
Tom Wilkie
e48053b5b2 s/probe.args/scope-probe.args/ 2015-07-06 12:59:25 +00:00
Peter Bourgon
ea9eaae26a In Docker, {app,probe} -> {scope-app,scope-probe} 2015-06-29 18:59:19 +02:00
Tom Wilkie
a4ddd0094f Duplicate endpoints in the endpoint topology to account for NAT mapping.
Also, move spy.go into probe/endpoint and make it adhere to the Reporter interface.
2015-06-23 10:33:06 +00:00
Tom Wilkie
1efa88d773 Allow users to specify app and probe arguments. 2015-06-03 14:44:16 +00:00
Tom Wilkie
d9b54ba60b Yet More Plumbing for multi-host setup.
- Move peers from flags to args in the app
- Allow users to specify peers as IPs and hostname, both with and without ports
- Allow users to specify peers on ./scope launch, and plumb that through entrypoint.sh and run-app
- Improce ./scope usage text
- Add brief document explaining how to cluster Scope
2015-06-01 12:29:01 +00:00
Tom Wilkie
0c059b2f84 Don't do the hostproc dance, use --pid=host 2015-05-27 12:02:40 +00:00
Tom Wilkie
2c9a2da14f Don't set the hostname in the scope container when running with weavedns. 2015-05-22 17:11:06 +00:00
Tom Wilkie
07e1f0ff18 Squash docker layers to make the scope image fetch nicer. 2015-05-22 10:25:00 +00:00
Tom Wilkie
8c66c061c6 A docker process mapper 2015-05-20 11:21:54 +00:00
Tom Wilkie
7b1c949a51 Use runit inside the scope container 2015-05-19 13:50:02 +00:00
Tom Wilkie
84d724f645 Move container build files into their own dir and introduce the scope script. 2015-05-19 10:05:40 +00:00