Diptanu Choudhury
1789dbd1ff
Fixed implementation of the docker stats
2016-05-28 19:51:22 -07:00
Diptanu Choudhury
6c1b60ff07
Add the Stats api to driverhandle
2016-05-28 19:42:34 -07:00
Daniel Kerwin
df7f5175a8
Add support for shm_size to docker driver. Required update of go-dockerclient
...
to more recent version (ba4298ecf4cfa216f1cce2befbf653359f62c722).
2016-05-27 12:30:04 +02:00
Sean Chittenden
dc28ab0cb5
Speling police
2016-05-15 09:41:34 -07:00
Ivo Verberk
e25a2d2f4f
Docker labels configuration should be of type "array" in schema
2016-04-25 23:58:31 +02:00
Alex Dadgar
ae0a54eb70
Timeout docker connections after 1 minute
2016-04-22 11:11:38 -07:00
Alex Dadgar
9ccacaa9e5
Remove unused field
2016-04-14 11:05:20 -07:00
Alex Dadgar
78adfa8ed6
changelog + docker GC cleanup
2016-04-14 10:52:38 -07:00
Alex Dadgar
c4406f2b31
Merge pull request #1071 from hashicorp/b-docker-fix-gc
...
GC Docker containers and images after the container exits
2016-04-14 10:26:37 -07:00
Diptanu Choudhury
bab7d8c9ce
Fixing the API call of stopping container
2016-04-12 02:29:28 -07:00
Diptanu Choudhury
02f16e0ea5
Removing container and image once the wait from docker api returns
2016-04-12 00:52:45 -04:00
Ivo Verberk
11f4e647b2
Add interactive option to the Docker driver configuration schema
2016-04-10 12:20:01 +02:00
Ivo Verberk
13a2d62bfa
Implement configuration validation for all task drivers
2016-04-10 00:42:57 +02:00
Ivo Verberk
542603dec6
Add helper to validate raw configuration data
2016-04-10 00:42:43 +02:00
Paul Hinze
044978783f
client/docker: add `interactive` option
...
Equivalent to `docker run --interactive` - keeps STDIN open.
Also adds docs for both `tty` and `interactive` docker config.
2016-04-08 12:51:07 -05:00
Diptanu Choudhury
77fbf85518
Added the tty flag to the driverconfig
2016-04-06 09:54:45 -07:00
Diptanu Choudhury
8c7c48b01a
Logging in fingerprinters only when state changes
2016-04-01 02:22:17 -07:00
Diptanu Choudhury
fd3c05a2be
Making driver fingerprinters run periodically and unblocking evals when node registration happens
2016-03-31 18:11:27 -07:00
Diptanu Choudhury
2601468708
Making the load a list of strings and added website docs
2016-03-30 17:23:29 -07:00
Diptanu Choudhury
6b46e27236
Simplified the logic of deciding how to create image
2016-03-30 15:45:17 -07:00
Diptanu Choudhury
52af6cd63c
Added docs
2016-03-30 15:26:51 -07:00
Diptanu Choudhury
cc9c07afdb
Added a test
2016-03-30 13:42:17 -07:00
Diptanu Choudhury
babbe86933
Added ability to create image from archive
2016-03-30 13:09:32 -07:00
Diptanu Choudhury
f517eb16de
Added version to executor
2016-03-29 22:24:22 -07:00
Diptanu Choudhury
2b773b0a39
Added the Version method to executor
2016-03-29 22:23:03 -07:00
Diptanu Choudhury
a6711ea25f
Introducing ConsulContext
2016-03-24 15:57:16 -07:00
Diptanu Choudhury
f09bb1572a
Fixed merge conflicts
2016-03-24 15:09:50 -07:00
Diptanu Choudhury
2a5f300f92
Added a check type for consul service to delegate certain checks
2016-03-24 14:54:26 -07:00
Diptanu Choudhury
60fc9919f7
Changing the log line
2016-03-24 14:53:53 -07:00
Diptanu Choudhury
6a62d4f452
Fixing check registration in perform sync
2016-03-24 14:12:09 -07:00
Alex Dadgar
fc0e48b0ec
Merge pull request #950 from mssola/raw-exec-user
...
client: added the "user" option to tasks
2016-03-24 08:57:13 -07:00
Diptanu Choudhury
62242595fc
Using the name of the task and the alloc id in the service name
2016-03-23 17:35:29 -07:00
Diptanu Choudhury
8b91606b22
Making the docker driver register services and checks
2016-03-23 12:59:22 -07:00
Diptanu Choudhury
f6a932194f
Removing references to old consul services and adding consul config to executor context
2016-03-23 12:19:19 -07:00
Miquel Sabaté Solà
8c56c64615
client/driver: added the `user` config value
...
This way Nomad allows to set which user has to run the task.
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
2016-03-23 12:57:31 +01:00
Diptanu Choudhury
abf8e50c29
Destroying the plugin if kill wasn't successful
2016-03-18 11:53:25 -07:00
Diptanu Choudhury
3c7b83b393
Introduced a method in executor to launch syslog server
2016-03-18 11:49:10 -07:00
Diptanu Choudhury
512d0c317a
Merge pull request #897 from hashicorp/syslog-addr
...
Using unix domain sockets for docker syslog collector
2016-03-10 11:49:21 -08:00
Diptanu Choudhury
b18cbaa416
Using unix domain sockets for docker syslog collector
2016-03-09 23:28:26 -08:00
Diptanu Choudhury
f1c9d11c55
Merge pull request #878 from hashicorp/b-kill-timeout-update
...
client: Updating kill timeout adheres to operator specified maximum
2016-03-09 18:33:40 -08:00
Diptanu Choudhury
674d1c9b24
Making the docker fingerprinter periodic
2016-03-08 12:02:55 -08:00
Erik Evenson
c515cce551
moves transform to Init()
2016-03-06 19:00:40 -06:00
Erik Evenson
bef4b0d9b6
Merge branch 'master' into study/aws-ecr-1
2016-03-06 18:18:20 -06:00
Alex Dadgar
929e705ba1
Updating kill timeout adheres to operator specified maximum
2016-03-03 09:21:21 -08:00
Alex Dadgar
144ccfb561
Killing a docker container that is dead is not an error
2016-03-02 16:27:01 -08:00
Erik Evenson
eca9029664
adds comments and removes redundant false flag setting
2016-02-29 08:17:40 -06:00
Alex Dadgar
61972c9ddc
Refactor task runner to include driver starting into restart policy and add recoverable errors
2016-02-28 16:56:05 -08:00
Erik Evenson
10e32a74d1
refactors
2016-02-27 12:00:17 -06:00
Erik Evenson
4572753014
allows AWS ECR to work
2016-02-27 11:06:40 -06:00
Diptanu Choudhury
e3d6c4a9dd
Adding version information to snapshots
2016-02-24 19:06:30 -08:00
Diptanu Choudhury
27ab08ce1c
Merge pull request #842 from hashicorp/f-validate-command
...
drivers: validate that command contains one field
2016-02-23 13:45:10 -08:00
Alex Dadgar
f612b9c81e
validate that command contains one field
2016-02-23 10:19:40 -08:00
Diptanu Choudhury
d6f09400f7
Merge pull request #819 from hashicorp/r-syslog-collector
...
Refactored syslog server and log rotator
2016-02-23 10:15:14 -08:00
Diptanu Choudhury
c21f6f8eea
Throwing an error if Nomad can't create an docker auth object
2016-02-22 13:20:06 -08:00
Diptanu Choudhury
bf3e3f5f59
Throwing an error if Nomad can't create an docker auth object
2016-02-22 13:00:54 -08:00
Diptanu Choudhury
488fd763c8
Renamed packages
2016-02-19 13:08:25 -08:00
Diptanu Choudhury
b1c57e078f
Changing log messages in the docker driver
2016-02-12 13:33:09 -08:00
Alex Dadgar
18da7eea95
Update go-plugin
2016-02-12 12:16:56 -08:00
Diptanu Choudhury
3db617472c
Fixed an issue with purge
2016-02-11 14:44:35 -08:00
Diptanu Choudhury
5480a6744e
Renamed the syslog package to logcollector
2016-02-10 18:47:46 -08:00
Diptanu Choudhury
566d709110
Handling errors when client can't re-attach to syslog collector
2016-02-10 16:40:36 -08:00
Diptanu Choudhury
25c48cd1ea
Updating log configs
2016-02-10 15:04:41 -08:00
Diptanu Choudhury
776e57deb0
Adding newlines to loglines
2016-02-10 10:18:14 -08:00
Diptanu Choudhury
4b22221c27
Writing log lines from docker to files
2016-02-10 07:52:15 -08:00
Diptanu Choudhury
1e4c42f29d
Starting the syslog collector along with a docker container
2016-02-09 18:24:30 -08:00
Diptanu Choudhury
b8e4941862
Fixed merge conflicts
2016-02-08 10:24:27 -08:00
Diptanu Choudhury
d0b6fb1993
Updated the docker auth config
2016-02-06 05:47:56 -08:00
Diptanu Choudhury
745bfaae7b
Reading dockercfg files for authenticating with private registries
2016-02-06 05:43:30 -08:00
Diptanu Choudhury
faf6083352
Passing the log rotation parameters to docker daemon
2016-02-05 00:22:31 -08:00
Alex Dadgar
41e1174f72
Client handles updates to KillTimeout and Restart Policy
2016-02-03 19:43:44 -08:00
Ivo Verberk
061445468b
Rename IPPort env variable and add a mapped host port to the env.
2016-01-25 20:46:01 +01:00
Ivo Verberk
e58bda9056
Pass a combination of ip and port to the task environment.
...
The different labels can be on different IPs.
2016-01-24 10:31:03 +01:00
Alex Dadgar
ec9c375c1c
Have docker use the task environment in the context
2016-01-22 15:00:36 -08:00
Alex Dadgar
1ceb6f012a
Fix a bunch of tests
...
Up timeouts
trusty travis beta
Increase timeouts
2016-01-20 16:03:53 -08:00
Alex Dadgar
9f5ccee7ff
Fix docker tests
2016-01-19 15:35:01 -08:00
Alex Dadgar
3ba1c9b76b
merge
2016-01-11 09:58:26 -08:00
Bastiaan Bakker
fcfa8373b2
Add options ipc_mode, pid_mode and uts_mode to docker driver.
...
May only be used if priviliged mode is enabled in driver config.
2016-01-08 23:34:49 +01:00
Alex Dadgar
ddf392c6be
User specifiable kill timeout and operator configurable max
2015-12-22 16:10:30 -08:00
Alex Dadgar
b943c6e278
Remove all calls to the default logger
2015-12-11 15:02:13 -08:00
Alex Dadgar
5eeec26102
Do Once docker client initialization
2015-12-10 13:49:29 -08:00
Diptanu Choudhury
29915ddd16
Moving the args to helper
2015-11-26 14:13:19 -08:00
Alex Dadgar
b2daa5e2e6
Standardize log messages in fingerprinters to DEBUG
2015-11-24 11:06:51 -08:00
Chris Bednarski
719c345164
Change println to printf
2015-11-20 16:00:58 -08:00
Chris Bednarski
8169c8e185
Don't show endpoint when we're not using it
2015-11-20 15:53:38 -08:00
Chris Bednarski
4063b6583e
Added docker.tls config file options and docs
2015-11-20 15:47:03 -08:00
Chris Bednarski
cf4bb4cfd0
Squash []map[string]type for port_map and labels into map[string]type
2015-11-19 21:29:37 -08:00
Chris Bednarski
275550dcd3
Fixed some issues with expose, port mapping, and environment variables
...
- Port mapping now works for reserved ports as well as dynamic ports
- Environment variables were being set twice in two different ways; now they are only set once
- Comprehensive tests for exposed ports, forwarded ports, and environment variables
- Cleaned up / DRYed up a lot of test code
2015-11-19 19:08:21 -08:00
Chris Bednarski
b9b786732e
Export DockerHandle and change tests to use DockerHandle.ContainerID()
2015-11-19 14:20:41 -08:00
Chris Bednarski
6253b1d0aa
Add ContainerID() method to get the containerID from a handle
2015-11-19 13:57:18 -08:00
Antonio Fernández
581245f881
fix docker port allocation?
2015-11-19 19:15:25 +01:00
Alex Dadgar
4d817f5cbc
Revert "Revert "Make drivers take arguments as a list and not as a string""
2015-11-18 15:16:42 -08:00
Alex Dadgar
0e51375285
Revert "Make drivers take arguments as a list and not as a string"
2015-11-18 13:46:43 -08:00
Alex Dadgar
6574fd27e3
Remove returning the error
2015-11-18 12:40:34 -08:00
Alex Dadgar
5a678548fa
Rebase
2015-11-18 12:30:35 -08:00
Alex Dadgar
54ddf4d3c1
Rebase
2015-11-18 12:29:04 -08:00
Chris Bednarski
fc69721cc7
Added missing %s to error format string
2015-11-18 11:29:49 -08:00
Chris Bednarski
e17f5984ef
Revert "Added missing %s to error format string"
...
This reverts commit f4acdfd035c2ffa196035cc574d8b40a1795abb3.
2015-11-18 11:28:38 -08:00
Chris Bednarski
7a077a29b5
Added missing %s to error format string
2015-11-18 11:28:07 -08:00
Chris Bednarski
b9fcdc400a
Merge branch 'master' into f-docker-dns-config
2015-11-18 10:31:06 -08:00
Carlos Diaz-Padron
4a6c3d773d
Nest Docker driver auth under object
2015-11-18 01:37:42 -08:00
Carlos Diaz-Padron
de6c06d332
De-nest docker registry auth and reformat related doc
2015-11-17 23:32:57 -08:00
Chris Bednarski
c80cf651e8
Merge branch 'master' into f-docker-dns-config
2015-11-17 21:43:04 -08:00
Chris Bednarski
7b25c9b4d9
Change dns_servers and dns_search_domains from comma-delimited strings to lists
2015-11-17 21:41:00 -08:00
Chris Bednarski
c851ae67c7
Change error check to contains instead of ==
2015-11-17 21:36:23 -08:00
Chris Bednarski
563e1aff56
Renamed some things so it's more apparent that reserved and dynamic port mapping have very similar code
2015-11-17 21:34:07 -08:00
Chris Bednarski
8705ea07a4
Remove \n since this is added by the logger
2015-11-17 21:17:51 -08:00
Chris Bednarski
5ac6664c46
Purge existing container during Start()
2015-11-17 20:50:14 -08:00
Chris Bednarski
0e1fe2373a
Log container name and labels
2015-11-17 20:04:10 -08:00
Chris Bednarski
640af994ca
Added a randomized alloc id for tests so container names don't collide
2015-11-17 19:45:33 -08:00
Chris Bednarski
9a7adb9eb3
Fix guards for docker port mapping and change dummy dynamic ports to real ports (0 is not a valid port)
2015-11-17 19:21:36 -08:00
Chris Bednarski
d098acef90
Fix guard for port maps not being specified
2015-11-17 18:16:01 -08:00
Chris Bednarski
122220a424
Merge branch 'master' into f-docker-any-network
2015-11-17 17:22:13 -08:00
Chris Bednarski
9cad290b18
Merge pull request #436 from hashicorp/f-docker-cleanup
...
Cleanup docker driver
2015-11-17 17:13:17 -08:00
Chris Bednarski
b22b5eb3aa
Inline err assignment
2015-11-17 17:12:45 -08:00
Chris Bednarski
a2f4188246
Streamline reading boolean values from the driver / job config
2015-11-17 16:58:23 -08:00
Chris Bednarski
67ee502acb
Added missing linebreaks for log.Printf calls
2015-11-17 16:49:01 -08:00
Chris Bednarski
43aaf94383
Do Itoa once so line items are simpler
2015-11-17 16:31:47 -08:00
Chris Bednarski
ffd3f114dd
Merge branch 'docker-allow-to-add-labels' of https://github.com/fernandezvara/nomad into f-docker-labels
2015-11-17 16:02:42 -08:00
Chris Bednarski
3b7c252090
Improve phrasing in log messages
2015-11-17 15:17:44 -08:00
Alex Dadgar
7551a263c5
Merge pull request #389 from achanda/name
...
Set a name for the container
2015-11-17 15:07:23 -08:00
Chris Bednarski
629cdd6baa
Clean up extraneous variables
2015-11-17 14:51:38 -08:00
Chris Bednarski
7f117b3b55
That's not a declaration
2015-11-17 14:27:58 -08:00
Chris Bednarski
89c6f56059
Remove restrictions from docker networking mode; we assume users know what they are doing
2015-11-17 14:25:10 -08:00
Chris Bednarski
f2e8357e4a
Merge branch 'master' into f-docker-cleanup
2015-11-17 14:20:29 -08:00
Antonio Fernández
f7f83ee81c
allow to set labels on docker containers
2015-11-17 14:12:49 +01:00
Carlos Diaz-Padron
77923255b4
Add hostname parameter to Docker driver
2015-11-16 22:44:44 -08:00
Chris Bednarski
bac9bd60dc
Improve logging and DRY some of the port mapping code
2015-11-16 19:55:49 -08:00
Diptanu Choudhury
03847dd65a
Addressed some review comments
2015-11-16 22:29:06 -05:00
Chris Bednarski
714e1b52d1
Change logging port as %d to logging port.Value
2015-11-16 16:05:28 -08:00
Chris Bednarski
9f40143684
Merge branch 'master' into f-port-labels
2015-11-16 16:02:38 -08:00
Alex Dadgar
82f51601db
Track Task State in the client and capture Wait results
2015-11-16 15:14:21 -08:00
Diptanu Choudhury
c5102975e3
Made the code more DRY
2015-11-16 13:10:57 -08:00
Diptanu Choudhury
e40229aed6
Fixed the docker auth config
2015-11-16 13:10:57 -08:00
Diptanu Choudhury
7d44725370
Adding comments to fields in the docker driver config
2015-11-16 13:10:57 -08:00
Alex Dadgar
fa60d86fe5
mapstructure close quotes
2015-11-16 13:10:57 -08:00
Diptanu Choudhury
9d76572831
Making sure that there is only one port_map block in the docker driver config
2015-11-16 13:10:57 -08:00
Diptanu Choudhury
78a0f82bc5
Making the config for drivers public
2015-11-16 13:10:57 -08:00
Diptanu Choudhury
4e05b27111
Implemented port labeling and driver configs
2015-11-16 13:10:57 -08:00
Chris Bednarski
2f05a15aa5
Expose mapped ports
2015-11-12 17:23:04 -08:00
Chris Bednarski
7f3a2595af
Change Docker fingerprinter to INFO and not error when the connection to the daemon fails; we simply assume docker isn't there.
2015-11-10 16:18:52 -08:00
Chris Bednarski
e5688620e4
Changed behavior for Docker ENV
...
- Docker ENV variables now work the same way in production, dev, and test
- Docker ENV variables are *ignored* if docker.endpoint is present in the Nomad config file
- Remote tests now work correctly
2015-11-10 15:54:31 -08:00
Alex Dadgar
bb9f2aa66c
Docker privileged checks if host enabled it
2015-11-06 10:38:54 -08:00
Alex Dadgar
149366b89e
Merge pull request #390 from the-control-group/f-docker-driver-options
...
Expanded docker driver options
2015-11-06 10:32:54 -08:00
Abhishek Chanda
94a4d00f4b
Set a name for the container.
2015-11-06 03:33:57 +00:00
Shiem Edelbrock
5e2430de74
Fix build
...
returned wrong value, and forot a ":" :/
2015-11-05 17:57:51 -08:00
Shiem Edelbrock
1169bef912
Updated `priviliged` option, added client `priviliged` option
...
- Added error checking on priviliged mode.
- Added `docker.privileged.enabled` to client config/fingerprint
2015-11-05 16:40:20 -08:00
Alex Dadgar
f9fd83c696
Merge fix
2015-11-05 13:46:02 -08:00
Shiem Edelbrock
c174f4819b
Added task configuraton options for docker driver
...
- Added `priviliged` option to task config to allow containers to run in
priviliged mode.
- Added `dns-servers` option to task config to allow containers to use
custom DNS servers
- Added `search-domains` option to task config to allow containers to
use custom dns search domains
- Added authentication options (under key namespace `auth.*`) to allow
authentication on a task level for docker remote.
- Updated site docs to reflect changes
2015-11-05 10:47:41 -08:00
Kenjiro Nakayama
1e47dd4c7d
Apply SELinux label to allocate directory of docker driver
2015-11-05 09:06:22 +09:00
Alex Dadgar
c7fd8993c1
Change two helper functions to be methods
2015-10-15 17:47:14 -07:00