Commit Graph

17 Commits

Author SHA1 Message Date
Sun Hongliang e60b93aef3 make port 0 invalid in checkAddrFormat
Signed-off-by: Sun Hongliang <allen.sun@daocloud.io>
2016-03-30 19:47:42 +08:00
Sun Hongliang 5aa339ed38 validate duration flags:--delay, --timeout,--replication-ttl
Signed-off-by: Sun Hongliang <allen.sun@daocloud.io>
2016-03-16 10:09:57 +08:00
Dong Chen bf5c744a49 Check port range. Add more unit tests for address format.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2016-03-02 11:01:48 -08:00
Dong Chen c73f17fb6e Support IPv6 address format.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2016-03-02 10:04:03 -08:00
Victor Vieux fc1e7bbca2 use docker/docker/pkg/discovery
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-01-12 00:38:06 -08:00
Dong Chen 2c029f9795 Change '--joindelay' to '--delay' since it's a join option.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2015-12-14 17:00:34 -08:00
Dong Chen db5c8aba7c Add a command line option for swam join delay.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2015-12-14 17:00:34 -08:00
Dong Chen 36ca8ff63f Add a random delay to avoid synchronized registration at swarm join.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2015-12-14 17:00:34 -08:00
Daniel Hiltgen 3661b6e63b Add TLS support for libkv
This adds TLS support into the KV store for swarm.  The manage, join,
and list commands all have a new CLI argument, matching the docker engine
discovery backend.  This required adding the tlsconfig utility
package from docker engine.

Here's an example showing re-use of the cluster certs for the KV store:

    swarm manage --tlsverify \
        --tlscacert /etc/docker/ssl/ca.pem
        --tlscert /etc/docker/ssl/cert.pem
        --tlskey /etc/docker/ssl/key.pem
        --discovery-opt kv.cacertfile=/etc/docker/ssl/ca.pem
        --discovery-opt kv.certfile=/etc/docker/ssl/cert.pem
        --discovery-opt kv.keyfile=/etc/docker/ssl/key.pem
        --advertise 192.168.122.47:3376
        etcd://192.168.122.47:2379

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
2015-10-12 13:33:08 -07:00
Andrea Luzzardi ad6fac53db fix --addr backward compatibility
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-26 17:48:54 -07:00
Andrea Luzzardi 7394be0704 Replace --addr with --advertise
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-26 17:43:14 -07:00
Alexandre Beslic f81de46ab4 Fix Consul and etcd with latest changes, use etcd v2.0.11 for integration tests, remove call to SyncCluster for now (breaks the integration tests)
Signed-off-by: Alexandre Beslic <abronan@docker.com>
2015-05-19 10:25:31 -07:00
Andrea Luzzardi 7430fe5141 fix hb/timeout being time.Duration in a few places
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:38:14 -07:00
Andrea Luzzardi 0c72bcaf40 discovery cleanup: heartbeat is a time.Duration.
- Use a time.Duration instead of a uint64 for hb
- Flags can accept durations: --heartbeat 25s

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:38:14 -07:00
Andrea Luzzardi 3de0b5f567 join: Don't give up if registration fails, just retry.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:38:14 -07:00
Andrea Luzzardi 97984881c3 discovery: New channel based API.
- Watch() issues updates by channel rather than by callback
- Fetch() is gone
- Watch() can be stopped at any time by closing the stop channel
- Watch() is now resilient to errors and will try over and over

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-18 13:38:13 -07:00
Andrea Luzzardi eebc06aabe Cleanup: Move CLI related files to a subpackage.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-04-18 20:26:55 -07:00