Sean Chittenden
555f4fe135
Change client/consul.NewSyncer() to accept a shutdown channel
...
In addition to the API changing, consul.Syncer can now be signaled
to shutdown via the Shutdown() method, which will call the Run()'ing
sync task to exit gracefully.
2016-06-10 15:54:39 -04:00
Sean Chittenden
e2a561204a
Fix typo in comment
2016-06-10 15:50:11 -04:00
Sean Chittenden
7fe1944bc5
Fix tests for client.TestAgent_ServerConfig
...
Add similar logic in Agent `serverConfig()` to set up the
`serverSerfAddr` the same as `serverHttpAddr` and `serverRpcAddr`.
2016-06-10 15:50:11 -04:00
Sean Chittenden
cb80e93a6b
Move client.DefaultConfig() to client/config.DefaultConfig()
...
Resolves an import cycle in testing and is more appropriate because
the default should reside next to its struct definition.
2016-06-10 15:50:11 -04:00
Sean Chittenden
b3fd455b1f
Register the serf service with the Nomad server service.
...
This will be unused in this PR.
2016-06-10 15:50:11 -04:00
Sean Chittenden
6cd01d7567
Nuke a.consulConfig in favor of a.consul.Config
2016-06-10 15:50:11 -04:00
Sean Chittenden
1fe979a5e4
Remove types.ShutdownChannel and replace with chan struct{}
2016-06-10 15:50:11 -04:00
Sean Chittenden
9fb0104def
Teach Client to reuse an Agent's consulSyncer.
...
"There can be only one."
2016-06-10 15:50:11 -04:00
Sean Chittenden
47891fb559
Register two services each for clients and servers, http and rpc.
...
In order to give clients a fighting chance to talk to the right port,
differentiate RPC services from HTTP services by registering two
services with different tags. This yields
`rpc.nomad-server.service.consul` and
`http.nomad-server.service.consul` which is immensely more useful to
clients attempting to bootstrap their world.
2016-06-10 15:50:11 -04:00
Sean Chittenden
ac7881226c
Advertise the server's RPC endpoint, not its HTTP endpoint.
...
Rename c.serverRpcAddr to serverRpcAddr. This will be broken out
into in additional set of services in a subsequent commit.
2016-06-10 15:50:11 -04:00
Sean Chittenden
10d1b6ba9b
Reduce all forms of ConsulConfig down to a single struct
...
nomad/structs/config/consul.go's ConsulConfig is the canonical definition
for all things Consul now.
2016-06-10 15:50:11 -04:00
Sean Chittenden
520fcb99de
Rename consulConfig to consulAgentConfig
2016-06-10 15:50:11 -04:00
Sean Chittenden
e6c78274c8
Rename client/config/config's ConsulConfig to ConsulAgentConfig
...
A follow up commit to the previous rename. More to come.
2016-06-10 15:50:11 -04:00
Sean Chittenden
882364f4d9
An Agent's consulSyncer is always not nil now.
2016-06-10 15:50:11 -04:00
Sean Chittenden
98cea9ba07
Revise Agent.syncAgentServicesWithConsul()'s interface
...
Reduce down to its lowest common helper function denominator.
2016-06-10 15:50:11 -04:00
Sean Chittenden
d1442dc317
Reduce all forms of ConsulConfig down to a single struct
...
nomad/structs/config/consul.go's ConsulConfig is the canonical definition
for all things Consul now.
2016-06-10 15:50:11 -04:00
Sean Chittenden
e60580b279
Define a type for the PeriodicCallback handlers and ShutdownChannel
2016-06-10 15:50:11 -04:00
Sean Chittenden
17116fc5a7
Rebalance Nomad client RPCs among different Nomad servers.
...
Implement client/rpc_proxy.RpcProxy.
2016-06-10 15:50:11 -04:00
Sean Chittenden
88f3422d7c
Rename NewConsulService to NewSyncer
2016-06-10 15:49:37 -04:00
Sean Chittenden
b9789e0cf7
Rename client/consul/sync.PeriodicSync to Run
2016-06-10 15:49:37 -04:00
Sean Chittenden
768aab015d
Rename client/consul/sync.ConsulService to client/consul/sync.Syncer
...
Syncer describes the responsibility and actions of the type.
2016-06-10 15:49:37 -04:00
Sean Chittenden
840b49a720
Distill config.Config.ConsulConfig down to config.Config.Consul
...
The enclosed struct provides the necessary context
2016-06-10 15:48:36 -04:00
Sean Chittenden
c7a680c28f
Rename consulConfig to consulAgentConfig
2016-06-10 15:48:36 -04:00
Sean Chittenden
73e173673e
Rename client/config/config's ConsulConfig to ConsulAgentConfig
...
A follow up commit to the previous rename. More to come.
2016-06-10 15:48:36 -04:00
Sean Chittenden
e97652bbfb
Rename consul.ConsulConfig to consul.AgentConfig
...
There were two `ConsulConfig` structs running around, one of them
needed to go away. Rely on the package's path to provide context
for the type of AgentConfig.
2016-06-10 15:48:36 -04:00
Diptanu Choudhury
c46400597e
Making the stats collection interval and number of data points to keep in memory configurable
2016-05-28 19:59:20 -07:00
Diptanu Choudhury
bf5b78b77e
Added a test for generation of the server addr
2016-05-24 21:29:13 -07:00
Diptanu Choudhury
227477533c
Using the bind addr as server's IP if advertise addr and addresses.HTTP is not specified
2016-05-24 17:27:09 -07:00
Diptanu Choudhury
c07770fd4d
Using the auto-register flag
2016-05-16 18:23:01 +02:00
Diptanu Choudhury
1b3356375d
Using advertise addr for the http address
2016-05-14 01:09:05 -07:00
Diptanu Choudhury
ecd995b283
Added some docs
2016-05-14 00:36:26 -07:00
Diptanu Choudhury
df9d256132
Making Nomad register services with consul in dev mode
2016-05-13 10:19:49 -07:00
Diptanu Choudhury
347cb890d2
Removed allocID and task name from consul service
2016-05-11 16:26:41 -07:00
Diptanu Choudhury
83fed62a0a
Implemented registering client and server services
2016-05-11 16:07:02 -07:00
Diptanu Choudhury
891b201eef
removing interfaces from config
2016-04-07 13:25:38 -07:00
Alex Dadgar
aefa4b9207
add nomad fingerprinter
2016-03-22 17:12:30 -07:00
Diptanu Choudhury
acd016c7c0
Overriding the device configuration if addresses is present
2016-03-20 23:41:16 -07:00
Diptanu Choudhury
cfb9ae91a1
Using the interfaces for configuring bind addrs for nomad servers
2016-03-19 00:54:19 -07:00
Diptanu Choudhury
6e6f2940f0
Setting the ip from the network interface to Addresses
2016-03-18 22:26:13 -07:00
Diptanu Choudhury
4f689d1a38
Using the interface name to find bind address for network services
2016-03-18 21:44:22 -07:00
Diptanu Choudhury
601008706d
Added an interfaces config
2016-03-18 13:50:29 -07:00
Alex Dadgar
7d4c19ed99
reserve resources on the node
2016-03-13 19:05:41 -07:00
Diptanu Choudhury
b18cbaa416
Using unix domain sockets for docker syslog collector
2016-03-09 23:28:26 -08:00
Diptanu Choudhury
a5d5919664
Fixed an issue around parsing client max and min ports
2016-03-09 12:25:30 -08:00
Alex Dadgar
89e3de7784
agent: Configurable heartbeat
2016-03-04 15:44:12 -08:00
Diptanu Choudhury
e3d6c4a9dd
Adding version information to snapshots
2016-02-24 19:06:30 -08:00
Diptanu Choudhury
f33a010f8d
Added a test for testing that http addr is set properly
2016-02-16 13:42:48 -08:00
Diptanu Choudhury
0e7a2d68c1
fixing the logic of addr resolution
2016-02-16 13:13:40 -08:00
Diptanu Choudhury
fe66b8b928
Adding comments
2016-02-12 14:25:32 -08:00
Diptanu Choudhury
772ed1eb7e
Reserving ports for client in every platform
2016-02-12 13:21:56 -08:00
Diptanu Choudhury
e53ebc9e3c
Extracted the cgroup info into isolation struct
2016-02-08 13:48:26 -08:00
Diptanu Choudhury
21677468cf
Setting defaults for client max and min port
2016-02-08 13:29:53 -08:00
Diptanu Choudhury
fa45e0b8ca
Using net.IsLoopback to determine if ifc is a loopback device
2016-02-08 07:57:31 -08:00
Diptanu Choudhury
d2eeba213c
Reserving ports on windows
2016-02-05 15:17:15 -08:00
Diptanu Choudhury
0736f45937
Simplified the logic of detecting addrs
2016-01-27 13:34:01 -08:00
Diptanu Choudhury
69a17e2a29
Added the advertise http option to the client
2016-01-27 12:53:24 -08:00
Diptanu Choudhury
e83130934d
Using the bindAddr only when user hasn't overrident it
2016-01-27 12:53:24 -08:00
Diptanu Choudhury
1e9c817a52
Added the cli for listing alloc dir
2016-01-27 12:53:23 -08:00
Ivo Verberk
91a9f2c4ce
Shorten CLI identifiers
...
* Truncate all UUID identifiers to eight characters by default
* Refactor the node identifier to an auto-generated UUID
* Created and updated tests and mocks
2016-01-14 21:57:43 +01:00
Alex Dadgar
ddf392c6be
User specifiable kill timeout and operator configurable max
2015-12-22 16:10:30 -08:00
Gregory Man
8f178b54d3
Added node_gc_threshold configuration option
...
Close #333
2015-10-29 15:58:21 +02:00
Alex Dadgar
4cc8588cb5
Merges
2015-10-02 17:32:11 -07:00
Ryan Uber
30fa300825
Merge branch 'parse-client-options' of https://github.com/carlosdp/nomad into b-options
2015-10-02 16:58:05 -07:00
Antoine POPINEAU
36daef1625
Renamed all instances of Iface
to NetworkInterface
.
2015-10-02 09:29:18 +02:00
Antoine POPINEAU
70d34da1bc
Client config param added to specify net iface to use for fingerprinting. Added a Golang-native method for determining the interface IP address.
2015-10-01 17:31:47 +02:00
Carlos Diaz-Padron
1c6ca9b0a4
Parse Client config Options
...
This adds Options to the agent ClientConfig and fixes the merging logic
to include Options, as defined in the docs
2015-09-28 16:45:32 -07:00
Ryan Uber
e5f644b02c
agent: remove explicit Bootstrap option in favor of BootstrapExpect
2015-09-22 14:41:49 -07:00
Ryan Uber
3b5004f2a4
agent: split out server config parser, add tests
2015-09-11 12:06:42 -07:00
Ryan Uber
8d816ec883
agent: allow specifying advertise addrs in ip:port format
2015-09-11 11:27:14 -07:00
Ryan Uber
35580ef9ec
agent: use ports/addresses/advertise_addrs for network config
2015-09-10 18:37:42 -07:00
Ryan Uber
936bca5194
agent: addresses and ports are configurable
2015-09-10 17:48:02 -07:00
Armon Dadgar
a4ac7fe177
agent: make unit tests much faster
2015-09-05 18:41:00 -07:00
Armon Dadgar
253995e377
agent: adding stats
2015-08-30 18:20:00 -07:00
Armon Dadgar
7989cb4642
agent: working on setup
2015-08-30 18:14:40 -07:00
Armon Dadgar
6e7fc1a4a3
agent: config merging
2015-08-30 18:10:23 -07:00
Armon Dadgar
19990f4657
agent: basic setup
2015-08-23 17:40:27 -07:00
Armon Dadgar
07b832c588
agent: use the client
2015-08-23 16:53:15 -07:00
Armon Dadgar
f42a37480e
agent: boilerplate
2015-08-16 16:40:04 -07:00
Armon Dadgar
e7505cfa69
agent: working on setup
2015-08-16 14:34:38 -07:00
Armon Dadgar
93332295db
agent: start basic logging setup
2015-08-16 13:54:49 -07:00