Commit Graph

203 Commits

Author SHA1 Message Date
d11wtq 0c12db06ec Move 'auto_start' option default to Service and add unit tests
Signed-off-by: Chris Corbyn <chris@w3style.co.uk>
2014-06-09 01:31:44 +00:00
d11wtq edf6b56016 Spike: Add --up option to `fig run`
Signed-off-by: Chris Corbyn <chris@w3style.co.uk>
2014-06-09 01:31:43 +00:00
d11wtq 8b4ed0c1a8 Spike: Add 'auto_start' option to fig.yml
Signed-off-by: Chris Corbyn <chris@w3style.co.uk>
2014-06-09 01:31:27 +00:00
Ben Firshman 7a9228ad75 Remove intermediate build containers
Docker does this by default now.
2014-05-08 15:40:53 +01:00
Ben Firshman 257a171c0c Ship 0.4.1 2014-05-08 12:43:09 +01:00
Ben Firshman c3c8395cef Merge pull request #215 from marksteve/docker-0.11
Docker 0.11
2014-05-08 10:10:19 +01:00
Mark Steve Samson 38c008e527 Fix index error when getting ghost state of containers 2014-05-08 12:39:15 +08:00
Jef Mathiot 5878fe3834 Add the ability to configure the project name 2014-05-02 18:00:58 +02:00
Ben Firshman 983337401c Return correct exit code from fig run
Closes #197
2014-05-01 18:17:12 +01:00
Aanand Prasad d1d4f47764 Ship 0.4.0 2014-04-30 11:53:39 +01:00
Aanand Prasad 3abce4259f Fix regression in handling of build errors 2014-04-30 11:53:23 +01:00
Ben Firshman fff5e51426 Make log messages line up with each other 2014-04-29 09:31:57 +01:00
Ben Firshman a724aa5717 Use name without project for log printing 2014-04-29 09:22:20 +01:00
Aanand Prasad 6e932794f7 Fix regression when mounting volumes
Caused by
77fec67c60
2014-04-25 12:28:00 +01:00
Aanand Prasad 9e1dfcfb37 Update docker-py APIError imports 2014-04-23 18:20:33 +01:00
Aanand Prasad 5166b2c1a8 Update docker-py
Using commit:
b31bb4d879
2014-04-23 18:16:35 +01:00
Aanand Prasad 80991f1521 Set "VolumesFrom" when starting containers
This is necessary when working with Docker 0.10.0 and up. Fortunately,
we can set it both when creating and starting, and retain compatibility
with 0.8.x and 0.9.x.

recreate_containers() is now responsible for starting containers, as
well as creating them. This greatly simplifies usage of the Service
class.
2014-04-23 15:46:26 +01:00
Aanand Prasad f8ee52ca2a Fix build output
docker-py now streams us the raw JSON events, so we have to replicate
the Docker client's progress logic.

On the bright side, we now have well-behaved progress bars when pulling
an image during `fig build` (no more ski slopes) and `fig up` (no more
silence).
2014-04-15 10:41:06 +01:00
Ben Firshman 2b245bdf9e Update to docker-py 0.3.1
From 7f55a101f8

This now requires Docker 0.9 or greater.
2014-04-15 10:41:06 +01:00
Ben Firshman d7e01a23f8 Merge pull request #191 from orchardup/fix-one-off-containers-not-linking-to-service
Fix one-off containers not linking to service
2014-04-15 10:40:37 +01:00
Ben Firshman 4e20be9c66 Remove unused imports 2014-04-14 22:39:49 +01:00
Ben Firshman 94e15a9985 Fix one-off containers not linking to service
Closes #185.

Need to test this more thoroughly. We need a docker-py mock.
2014-04-14 22:29:03 +01:00
Shane Jonas d9782b2dd1 fix issue with utf8 encoding in logger stdout 2014-04-11 11:21:20 -07:00
Ben Firshman 050f81e37c Improve error message when link does not exist 2014-04-04 13:06:52 +01:00
Ben Firshman aecaf665f1 Merge pull request #164 from orchardup/friendlier-build-error
Friendlier build error
2014-03-28 23:05:46 +00:00
Ben Firshman 23a8938809 Merge pull request #165 from orchardup/number-one
Stop 'fig up' when a container exits
2014-03-28 23:03:00 +00:00
sebastianneubauer 352ad7a38c Scaling down removes containers
Squashed version of #162.
Closes #121.
2014-03-26 18:28:10 +00:00
Maurits van Mastrigt 710cd38591 Fix UnicodeEncodeErrors in output of 'build', 'run' and 'up'
Squashed version of #125.
Closes #112.
2014-03-25 13:32:03 +00:00
Aanand Prasad 859d4bb98b Stop 'fig up' when a container exits
Closes #1 ヽ(*・ω・)ノ
2014-03-25 13:19:32 +00:00
Aanand Prasad 168b1909ae Friendlier build error
Hide the backtrace and show a comprehensible message.

Closes #160.
2014-03-25 12:20:05 +00:00
Kevin van Zonneveld 0f5a56b3c2 Add support for privileged containers #123
This is required for mounting external volumes and
addresses errors such as `mount.nfs: Operation not permitted`

Be gentle, I don't normally use Python :)
2014-03-13 14:31:05 +01:00
Aanand Prasad 13c7380113 Only `fig run` containers link back to the service they're part of
Fixes #107.
2014-03-06 18:59:24 +00:00
Ben Firshman 2595f89519 Ship 0.3.2 2014-03-05 14:33:32 +00:00
Ben Firshman a058c40dfb Merge pull request #143 from orchardup/expose-option
Support 'expose' config option, like docker's --expose
2014-03-05 14:30:17 +00:00
Mark Steve Samson 59cc9c9b68 Add option to remove container in `docker run` (Closes #137) 2014-03-05 09:03:06 +08:00
Aanand Prasad 5f5fbb3ea4 Display unpublished ports in 'fig ps' 2014-03-04 18:07:06 +00:00
Aanand Prasad 2d98071e55 Support 'expose' config option, like docker's --expose
Exposes ports to linked services without publishing them to the world.
2014-03-04 18:06:52 +00:00
Ben Firshman 4fbad941cb Ship 0.3.1 2014-03-04 11:40:39 +00:00
Ben Firshman f430b82b43 Fix ps on Docker 0.8.1 when there is no command
Fixes #138
2014-03-04 11:27:55 +00:00
Ben Firshman 5be8a37b7e Pass through standard remove_container options 2014-03-04 11:00:09 +00:00
Ben Firshman 2ca0e7954a Add --force option to fig rm 2014-03-04 11:00:06 +00:00
Mark Steve Samson 96a92a73f1 Fix KeyError when `-v` is not specified in `fig rm` 2014-03-04 13:13:23 +08:00
Ben Firshman 6e9983fc6a Ship 0.3.0 2014-03-03 18:51:03 +00:00
Aanand Prasad a00ec9d1f8 Fix: image-defined entrypoint not overridden by intermediate container
This was causing recreation to hang.
2014-03-03 18:06:06 +00:00
Ben Firshman 3e7360c2c6 Improve error when service is not a dict
Fixes #127
2014-03-03 16:21:42 +00:00
Aanand Prasad c07e96cf2b Merge pull request #120 from marksteve/link-name
Add custom link names (Closes #72)
2014-03-03 11:22:57 +00:00
Ben Firshman c2cd55e010 Merge pull request #113 from orchardup/alternate-fig-file
Alternate fig file can be specified with -f
2014-03-03 11:12:09 +00:00
Mark Steve Samson 41bacae171 Provide option to remove volumes in `fig rm` 2014-03-03 17:55:00 +08:00
Mark Steve Samson c709251f21 Add custom link names (Closes #72) 2014-03-02 00:17:19 +08:00
Aanand Prasad 9d1383ba26 Alternate fig file can be specified with -f 2014-03-01 11:29:23 +00:00
Ben Firshman 75c430635b Vendorise six.py
Because pyinstaller adds an old version to the path:

http://www.pyinstaller.org/ticket/773
2014-02-28 19:16:32 +00:00
Aanand Prasad ff1496a6a5 Indent string literals 2014-02-26 16:34:45 +00:00
Aanand Prasad d7c714e1c6 Move "Can't find fig.yml" error into errors.py 2014-02-26 15:44:06 +00:00
Aanand Prasad d7e2a77907 Refactor connection errors
Makes command.py a lot more readable.
2014-02-26 15:31:14 +00:00
Ben Firshman 05e15e27ef Use sys.exit instead of global 2014-02-19 22:42:21 +00:00
Ben Firshman d368e2fca9 Ship 0.2.2 2014-02-17 21:37:31 +00:00
Ben Firshman b9c8e3e057 Fix scale not binding ports 2014-02-17 21:33:05 +00:00
Ben Firshman 4a6897ef3b Merge pull request #91 from barnybug/master
Implement topological sort using Cormen/Tarjan algorithm to handle a->b->c dependencies and detect a->b->c->a cycles.
2014-02-12 19:39:08 +00:00
Aanand Prasad fbff8983e4 Merge pull request #83 from dustinlacewell/print-logs-during-attach
Tell fig up to print logs before attaching
2014-02-12 11:35:24 -08:00
Barnaby Gray 6431d52a2e Implement topological sort using Cormen/Tarjan algorithm to handle a->b->c dependencies and detect a->b->c->a cycles. 2014-02-12 09:09:55 +00:00
Ben Firshman 4723345473 Stop projects in reverse order to starting 2014-02-09 16:01:13 -08:00
Dustin Lacewell 511a9beede Tell fig up to print logs before attaching 2014-02-05 17:19:18 -08:00
Aanand Prasad 6bad9484be Ship 0.2.1 2014-02-04 18:14:19 -08:00
Ben Firshman d52f73b29a Merge pull request #79 from orchardup/strict-config
Throw an error if you specify an unrecognised option in `fig.yml`
2014-02-04 18:10:42 -08:00
Aanand Prasad edf8f14ac0 Throw an error if you specify an unrecognised option in `fig.yml`
Closes #27.
2014-02-04 17:46:04 -08:00
Aanand Prasad 2b89494405 Fix Ubuntu check - forgot to actually inspect the distro 2014-02-04 15:31:05 -08:00
Aanand Prasad 2bac1c10b0 Show installation instructions if it looks like Docker isn't installed 2014-02-04 15:19:50 -08:00
Aanand Prasad 5126649de4 Friendlier connection error for docker-osx users 2014-02-04 14:42:55 -08:00
Ben Firshman f94ce7767c Ship 0.2.0 2014-01-31 10:52:57 +00:00
Ben Firshman 62607f4f04 Merge pull request #67 from orchardup/link-services-to-themselves
Link services to themselves
2014-01-31 02:46:52 -08:00
Ben Firshman e4e9f0bc19 Link services to themselves
E.g. `fig run db ...` will be able to access the db service.
2014-01-30 13:11:23 +00:00
Cameron Maske ae7573b9b8 Fix for #48.
Rework of how services are sorted based on dependencies using a topological sort.
Includes error handling to detect circular/self imports (should raise a DependecyError).
Added in logging to the CLI to log out any DependencyErrors.
Removed the compact module as it is no longer used.
2014-01-29 18:38:25 +00:00
Ben Firshman 21837ac132 Update docker-py
From 2014572941
2014-01-28 14:51:19 +00:00
Ben Firshman 303e0cfd86 Update docker-py
From b79fee71ce
2014-01-28 13:34:40 +00:00
Ben Firshman 8b75f7c7d3 Merge pull request #58 from mrchrisadams/load_yaml_as_well_as_yml
Support loading in Figfiles with .yaml extension
2014-01-28 03:35:25 -08:00
Chris Adams 239da2ef69 Add missing return value for filename check
Oh my, how embarrassing.
2014-01-28 09:51:33 +00:00
Chris Adams 1d18d747a5 Support loading in Figfiles with .yaml extension
Add basic boilerplate text - feel free to change
2014-01-28 00:43:23 +00:00
Ben Firshman 5035a10cbe Ship 0.1.4 2014-01-27 17:57:02 +00:00
Ben Firshman 3e7e6e7656 Add link alias without project name
REDIS_1_PORT_6379_TCP_ADDR instead of
FIGTEST_REDIS_1_PORT_6379_TCP_ADDR.

Ref #37
2014-01-27 15:32:16 +00:00
Ben Firshman 1bab14213d Update docker-py
From 0a9512d008
2014-01-27 15:29:31 +00:00
Ben Firshman 33aada05a4 Bump version to 0.1.3 2014-01-23 11:58:48 +00:00
Aanand Prasad e8472be6d5 Fig bug in split_buffer where input was being discarded
Also, write some tests for it.
2014-01-22 17:44:04 +00:00
Aanand Prasad df9f66d437 Allow ports to be specified in '1234/tcp' format 2014-01-22 17:01:10 +00:00
Aanand Prasad ae67d55bf2 Fix bug where too many '/tcp' suffixes were added to port config 2014-01-22 16:52:42 +00:00
Ben Firshman deb7f3c5b6 Bump to version 0.1.2 2014-01-22 13:37:37 +00:00
Aanand Prasad 65071aafb0 Make sure attach() is called as soon as LogPrinter is initialized
Fixes #35.
2014-01-22 13:12:51 +00:00
Aanand Prasad 977ec7c941 Remove unused import 2014-01-20 19:25:28 +00:00
Aanand Prasad 40d04a076c Fix lag when using cursor keys in an interactive 'fig run' 2014-01-20 19:23:50 +00:00
Ben Firshman 8773bad99a Merge pull request #34 from orchardup/better-tty-handling-for-fig-run
Add option to disable pseudo-tty on fig run
2014-01-20 10:19:13 -08:00
Aanand Prasad 084db337a0 Update docker-py
Brought in changes from https://github.com/dotcloud/docker-py/pull/145
2014-01-20 18:09:25 +00:00
Ben Firshman 7e2d86c510 Use Container.create to recreate containers
self.create_container might do unexpected things.
2014-01-20 16:10:54 +00:00
Aanand Prasad 405079f744 Use raw socket in 'fig run', simplify _attach_to_container 2014-01-20 15:52:07 +00:00
Ben Firshman fc1bbb45b1 Add option to disable pseudo-tty on fig run
Also disable tty if stdin is not a tty.
2014-01-19 20:33:06 +00:00
Cameron Maske 62bba1684b Updated recreate_containers to attempt to base intermediate container's the previous container's image.
Added in additional functionality to reset any entrypoints for the intermediate container and pull/retry handling if the image does not exist.
Updated test coverage to check if an container is recreated with an entrypoint it is handled correctly.
2014-01-19 18:40:21 +00:00
Ben Firshman 07f3c78369 Update docker-py
From 4bc5d27e51
2014-01-19 16:50:08 +00:00
Ben Firshman b428988ef6 Bump to version 0.1.1 2014-01-17 19:14:48 +00:00
Aanand Prasad c6e19e34f7 Fix external port config
When exposing a port externally, it seems Docker only actually exposes it
if you specify the *internal* port as `xxxx/tcp`. So add that on if it's
not there.
2014-01-17 18:01:27 +00:00
Aanand Prasad 74fb400fef Version 0.1.0 2014-01-16 18:18:01 +00:00
Ben Firshman 56c6efdfce Add scale command
Closes #9
2014-01-16 18:09:46 +00:00
Ben Firshman 8ed86ed551 Add number to container 2014-01-16 18:05:59 +00:00