Mazz Mosley
e1c1a4c0aa
Scale restarts stopped containers
...
This is existing behaviour and should be kept.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-21 15:41:22 +01:00
Mazz Mosley
da650e9cfd
Refactor parallel execute
...
Refactored parallel execute and execute create into a single function
parallel_execute that can now handle both cases. This helps untangle it
from being so tightly coupled to the container.
Updated all the relevant operations to use the refactored function.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-21 11:56:59 +01:00
Mazz Mosley
5c29ded6ac
Parallelise scale
...
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-20 16:33:04 +01:00
Aanand Prasad
89f6caf871
Allow any volume mode to be specified
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-17 16:14:09 +01:00
Aanand Prasad
ced94a3504
Make smart recreate the default
...
Add --force-recreate flag to enable the old default behaviour of
recreating everything.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-17 11:28:02 +01:00
Aanand Prasad
9d0bbdf8dd
Make scale timeout configurable, default to 10
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-16 16:39:38 +01:00
Mazz Mosley
a68ca199a2
Execute container commands in parallel
...
Commands able to use this parallelisation are `stop`, `kill` and `rm`.
We're using a backported function from python 3, to allow us to make
the most of a pool of threads without having to write the low level
code for managing this ourselves.
A default value for number of threads is a low enough number so it
shouldn't cause performance problems but if someone knows the
capability of their system and wants to increase it, they can via
an environment variable DEFAULT_MAX_WORKERS
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-15 11:02:50 +01:00
Aanand Prasad
81707ef1ad
Merge pull request #1643 from aanand/warn-about-legacy-one-off-containers
...
Show an error on 'run' when there are legacy one-off containers
2015-07-08 14:48:03 +01:00
Aanand Prasad
8b033d3946
Merge pull request #1665 from mnowster/1648-support-log-opt
...
1648 support log opt
2015-07-07 17:08:04 +01:00
Mazz Mosley
6f31e8ebe9
Add support for log_opt
...
When specifying a log_driver you want to specify some options for
the logger as per the docker run --log-opt option. The logger
options are key value pairs.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-07 16:26:43 +01:00
Aanand Prasad
531265bc84
Fix smart recreate when 'image' is changed to something nonexistent
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-07 16:01:44 +01:00
Aanand Prasad
e98caf5cf9
Show an error on 'run' when there are legacy one-off containers
...
Also warn the user about the one-off containers in the standard error
message about legacy containers.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-06 14:45:17 +01:00
Aanand Prasad
f42fd6a3ad
Merge pull request #1642 from aanand/fix-1573
...
Fix bug where duplicate container is leftover after 'up' fails
2015-07-03 16:25:53 +01:00
Aanand Prasad
62b47224f0
Fix bug where duplicate container is leftover after 'up' fails
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-03 10:46:07 +01:00
Mazz Mosley
f33f673b49
Allow _.- chars in service names
...
As VALID_CHARS is shared with project names, these chars are also
now allowed within project names.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-01 17:57:50 +01:00
Aanand Prasad
4f83a18912
Merge pull request #1570 from aanand/fix-build-pull
...
Explicitly set pull=False when building
2015-06-21 17:25:46 -07:00
Aanand Prasad
c22cc02df5
Don't set network mode when none is specified
...
Setting a value overrides the new default network option.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-06-19 15:22:13 -07:00
Aanand Prasad
bef0926c58
Explicitly set pull=False when building
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-06-18 17:43:16 -07:00
Daniel Nephin
06db577105
Move converge() to a test module, and use a short timeout for tests.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-06-14 17:18:27 -04:00
Travis Thieman
c24d5380e6
Extend up -t to pass timeout to stop running containers
...
Signed-off-by: Travis Thieman <travis.thieman@gmail.com>
2015-06-14 16:45:28 -04:00
Aanand Prasad
08bc4b830b
Fix volume binds de-duplication
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-06-12 16:57:22 -04:00
Aanand Prasad
7995fc2ed2
Reorder service.py utility methods
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-06-11 11:44:13 -04:00
Daniel Nephin
38a11c4c28
Merge pull request #1526 from aanand/remove-start-or-create-containers
...
Remove Service.start_or_create_containers()
2015-06-08 12:49:32 -04:00
Aanand Prasad
db2d02dc0b
Remove Service.start_or_create_containers()
...
It's only used in a single test method.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-06-08 10:59:03 -04:00
Aanand Prasad
f59b43ac27
Fix duplicate logging on up/run
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-06-08 10:52:15 -04:00
André Martins
ae63d35660
Modified scale awareness from exception to warning
...
Signed-off-by: André Martins <martins@noironetworks.com>
2015-05-26 23:59:45 +01:00
Aanand Prasad
4795fd874f
Fix regression in `docker-compose up`
...
When an upstream dependency (e.g. a db) has a container but a downstream
service (e.g. a web app) doesn't, a web container is not created on
`docker-compose up`.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-05-26 16:01:05 +01:00
Daniel Nephin
889d3636f4
Merge pull request #1440 from aanand/legacy-fixes
...
Legacy fixes
2015-05-24 12:42:14 -05:00
Aanand Prasad
30c9e7323a
Fix missing logging on container creation
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-05-21 20:06:25 +01:00
Aanand Prasad
0fdb8bf814
Refactor migration logic
...
- Rename `migration` module to `legacy` to make its legacy-ness explicit
- Move `check_for_legacy_containers` into `legacy` module
- Fix migration test so it can be run in isolation
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-05-21 18:21:09 +01:00
Aanand Prasad
3080244c0b
Rename migrate_to_labels -> migrate-to-labels
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-05-21 14:54:41 +01:00
Ben Firshman
f79eb7b9ad
Merge pull request #1382 from lsowen/security_opt
...
Add security_opt as a docker-compose.yml option
2015-05-20 13:40:42 +01:00
lsowen
ea7ee301c0
Add security_opt as a docker-compose.yml option
...
Signed-off-by: Logan Owen <lsowen@s1network.com>
2015-05-19 13:47:41 -04:00
Harald Albers
41315b32cb
Fix #1426 - migrate_to_labels not found
...
Signed-off-by: Harald Albers <github@albersweb.de>
2015-05-19 16:37:50 +02:00
Aanand Prasad
ef4eb66723
Implement smart recreate behind an experimental CLI flag
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-05-18 18:39:18 +01:00
Aanand Prasad
82bc7cd5ba
Remove override_options arg from recreate_container(s)
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-05-18 17:42:09 +01:00
Aanand Prasad
3304c68891
Only set AttachStdin/out/err for one-off containers
...
If we're just streaming logs from `docker-compose up`, we don't need
to set AttachStdin/out/err, and doing so results in containers with
different configuration depending on whether `up` or `run` were invoked
with `-d` or not.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-05-18 17:41:04 +01:00
Daniel Nephin
62059d55e6
Add migration warning and option to migrate to labels.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-05-18 10:55:12 -04:00
Daniel Nephin
ed50a0a3a0
Resolves #1066 , use labels to identify containers
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-05-18 10:47:26 -04:00
Daniel Nephin
417d9c2d51
Use individual volumes for recreate instead of volumes_from
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-05-11 13:01:43 -04:00
delbert@umn.edu
df87bd91c8
Added devices configuration option
...
Signed-off-by: Dan Elbert <dan.elbert@gmail.com>
2015-05-11 10:50:58 -05:00
Daniel Nephin
6829efd4d3
Resolves #874 , Rename instead of use an intermediate.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-05-07 21:53:41 -04:00
Daniel Nephin
0f2f9db6d8
Merge pull request #1388 from vdemeester/1303-log-driver-support
...
Add support for log-driver as a docker-compose.yml option
2015-05-07 12:00:42 -04:00
Vincent Demeester
f626fc5ce8
Add support for log-driver in docker-compose.yml
...
Closes #1303
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-05-06 13:18:58 +02:00
CJ
b06294399a
See #1335 : Added --read-only
...
Signed-off-by: CJ <lim@chernjie.com>
2015-05-02 23:39:39 +08:00
Aanand Prasad
4f366d8355
Make sure the build path we pass to docker-py is a binary string
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-04-30 11:57:46 +01:00
Aanand Prasad
1a77feea3f
Close connection before attaching on 'up' and 'run'
...
This ensures that the connection is not recycled, which can cause the
Docker daemon to complain if we've already performed another streaming
call such as doing a build.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-04-29 18:42:03 +01:00
Aanand Prasad
7e0ab0714f
Merge pull request #1344 from dnephin/fix_pull_with_sha
...
Support image with ids instead of names
2015-04-29 16:46:34 +01:00
Daniel Nephin
3dd860f0ba
Fix #923 , support image with ids instead of names.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-04-29 10:13:18 -04:00
Daniel Nephin
a89bc304f6
Merge pull request #1075 from KyleJamesWalker/master
...
Support alternate Dockerfile name.
2015-04-27 10:06:43 -04:00