Alex Dadgar
ddf5fb82b5
Small cleanups
2016-10-27 10:51:11 -07:00
Evan Gilman
59489e4e4f
Never return 0.0.0.0 as a non-bind address
2016-10-27 10:51:11 -07:00
Evan Gilman
7511490c12
Add more address selector tests
2016-10-27 10:51:11 -07:00
Evan Gilman
af3de22d4f
Remove old address advertise config code
2016-10-27 10:51:11 -07:00
Evan Gilman
de33949df8
Add address selector methods to the agent
2016-10-27 10:51:11 -07:00
Evan Gilman
06909d2465
Use bind address for consul healtchecks in nomad client too
2016-10-27 10:47:45 -07:00
Evan Gilman
c0ff732513
Use bind address for consul service checks
2016-10-27 10:47:45 -07:00
Diptanu Choudhury
a051d87c5d
Making the nomad agent checks tcp
2016-10-26 16:30:29 -07:00
Diptanu Choudhury
067fcda3fe
Making the cli use TLS if the client has enabled TLS
2016-10-26 11:13:53 -07:00
Diptanu Choudhury
cf35aeac84
Moving the TLSConfig to structs
2016-10-25 15:57:38 -07:00
Diptanu Choudhury
e03927bb5c
Changed the way TLS config is parsed
2016-10-24 13:56:19 -07:00
Diptanu Choudhury
2e3118e69c
Implemented TLS support for http and rpc
2016-10-23 22:22:00 -07:00
Diptanu Choudhury
0f6e0d10b6
Enable serf encryption ( #1791 )
...
* Added the keygen command
* Added support for gossip encryption
* Changed the URL for keyring management
* Fixed the cli
* Added some tests
* Added tests for keyring operations
* Added a test for removal of keys
* Added some docs
* Fixed some docs
* Added general options
2016-10-17 10:48:04 -07:00
Alex Dadgar
4e8576516f
Increase the timeout to be greater than the RPC hold threshold
2016-08-26 11:13:20 -07:00
Alex Dadgar
7d899b6c60
Pass Vault config to client
2016-08-17 16:23:29 -07:00
Alex Dadgar
c913e4396f
Add Vault config to server
2016-08-17 16:23:29 -07:00
Diptanu Choudhury
9a75052d2c
Merge pull request #1518 from pubnub/feature/chroot-map-rebase
...
Add config field to specify chroot mapping for exec driver
2016-08-10 17:00:03 -07:00
Jay Oster
7df692226a
Add config field to specify chroot mapping for exec driver
...
- Same format as used by the internal chroot mapping
- Map: source_path -> dest_path
- Example HCL:
client {
chroot_env {
"/etc" = "/etc"
"/lib" = "/lib"
"/opt/projects/foo/bin" = "/usr/bin"
}
}
2016-08-03 17:17:17 -07:00
Diptanu Choudhury
41b540fbc8
Allow operators to opt into publishing node and alloc metrics
2016-08-01 19:52:20 -07:00
Wim
c96f3ccb28
Use net.JoinHostPort
2016-07-25 23:34:08 +02:00
Wim
a04907ad91
Fix IPv6 advertise addresses
2016-07-25 22:52:18 +02:00
Alex Dadgar
f3bc85c20f
use microsecond granularity
2016-06-22 15:20:56 -07:00
Alex Dadgar
9406739ba8
remove resolving client rpc addr
2016-06-17 14:55:37 -07:00
Sean Chittenden
46e2d54acf
Provide nomad.Config
with a default LogOutput
of os.StdErr
2016-06-17 06:44:10 -07:00
Sean Chittenden
9a60999100
Pass a logger arg to NewClient
and NewServer
2016-06-16 23:29:23 -07:00
Sean Chittenden
c2f96ee6ba
Remove the shutdownCh as an argument, it was already present in the receiver
2016-06-16 23:15:41 -07:00
Sean Chittenden
e58c2a2ed4
Remove client registration of RPC services, only servers have an RPC interface
2016-06-16 18:14:59 -07:00
Sean Chittenden
2a2b35d1bc
Use /v1/agent/servers
(vs /v1/agent/self
).
2016-06-16 17:40:47 -07:00
Sean Chittenden
26cc057751
Automatically register service checks for HTTP, RPC, and Serf.
2016-06-16 17:34:25 -07:00
Sean Chittenden
af55b74114
Merge pull request #1276 from hashicorp/f-consul-server-autojoin
...
Teach Nomad servers how to fall back to Consul.
2016-06-16 14:40:45 -07:00
Diptanu Choudhury
14747848f7
Removed the stats block from client configuration
2016-06-16 21:30:29 +01:00
Sean Chittenden
b0fecbefc1
Define BootstrapExepct
as an int32
so it can be manipulated atomically.
2016-06-16 12:00:15 -07:00
Sean Chittenden
f05514335b
Teach Nomad servers how to fall back to Consul.
2016-06-15 12:40:51 -07:00
Diptanu Choudhury
fd80e6ed0f
Added a warn message for deprecated consul options
2016-06-15 02:31:57 +02:00
Sean Chittenden
6e22b680ce
Disambiguate auto_join
from auto_register
, rename reg to auto_advertise
.
...
Provide an option that describes the value to the user vs the
operation performed by the software. Momentarily introducing
`auto_join`
2016-06-14 12:11:38 -07:00
Alex Dadgar
4b04e503f3
address comments
2016-06-13 17:32:18 -07:00
Alex Dadgar
8bbf4a55e5
Fix IDs and domain scoping
2016-06-13 16:30:58 -07:00
Diptanu Choudhury
d019d8ef8e
implemented reconciliation of unwanted services
2016-06-13 14:52:26 +02:00
Alex Dadgar
753d50f3d4
agent just calls run
2016-06-12 22:30:52 -07:00
Alex Dadgar
8e231fa382
Rename ConsulService back to Service
2016-06-12 16:36:49 -07:00
Alex Dadgar
fdda90229f
only support latest and remove ring buffer
2016-06-12 09:32:38 -07:00
Sean Chittenden
917766a3df
Prefer %+q
over %q
in log messages.
2016-06-11 18:17:20 -04:00
Sean Chittenden
bbd8dfa798
goling(1) compliance pass (e.g. Rpc* -> RPC)
2016-06-10 23:38:28 -04:00
Sean Chittenden
c92306f020
Stash client and server registration behind consul.auto_register
2016-06-10 15:54:39 -04:00
Sean Chittenden
a1a0c313de
Skip nil check for agent's consulSyncer is always not nil
2016-06-10 15:54:39 -04:00
Sean Chittenden
c54539b860
Initialize Consul for the Nomad Agent in a more uniform way.
...
Decompose Client and Server registration into `setupClient()` and
`setupServer()`, respectively.
2016-06-10 15:54:39 -04:00
Sean Chittenden
d307ca2c28
Begin leveraging the Agent-level consul.Syncer
2016-06-10 15:54:39 -04:00
Sean Chittenden
8c813630e6
Move package client/consul/sync to command/agent/consul.
...
This has been done to allow the Server and Client to reuse the same
Syncer because the Agent may be running Client, Server, or both
simultaneously and we only want one Syncer object alive in the agent.
2016-06-10 15:54:39 -04:00
Sean Chittenden
6b126ce488
Change the API signature of Syncer.SyncServices().
...
SyncServices() immediately attempts to sync whatever information
the process has with Consul. Previously this method would take an
argument of the exclusive list of services that should exist,
however this is not condusive to having a Nomad Client and Nomad
Server share the same consul.Syncer.
2016-06-10 15:54:39 -04:00
Sean Chittenden
e24de53ead
Refine Nomad's Consul port
handling.
...
Previously this would immediately default to '127.0.0.1' if the
config was set to `:some-port-number`. Now it uses the BindAddr
if available. Also, if the `port` option is set to just a port`
number (e.g. '1234'), attempt to parse the port number by itself
to allow statically configured ports to work, even when no host is
specified.
2016-06-10 15:54:39 -04:00
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