Commit Graph

53 Commits

Author SHA1 Message Date
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
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
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
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 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
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
Ben Firshman 56c6efdfce Add scale command
Closes #9
2014-01-16 18:09:46 +00:00
Aanand Prasad 9bd54d7be2 Merge pull request #19 from orchardup/use-docker-host-variable
Use DOCKER_HOST environment variable to find Docker daemon
2014-01-16 09:03:37 -08:00
Aanand Prasad 5c8fac5993 Merge pull request #18 from orchardup/shorten-long-commands-in-ps
Shorten long commands in ps
2014-01-16 08:47:25 -08:00
Aanand Prasad 3e2fd6a2a1 Use DOCKER_HOST environment variable to find Docker daemon
Removed all "smart" connection logic. Fig either uses the DOCKER_HOST
environment variable if it's present, or passes `None` to docker-py,
which does the "right thing" (i.e. falls back to the Unix socket).

This means we no longer know at URL-deciding time whether we can connect
to the Docker daemon, so we wrap `dispatch` in a `try/except` which
catches `requests.exceptions.ConnectionError`.
2014-01-16 16:40:55 +00:00
Aanand Prasad af1b0ed088 Account for length of the ellipsis string when truncating commands 2014-01-16 14:07:17 +00:00
Aanand Prasad feafea2c6d LogPrinter uses regular `attach()`, not websocket
Fixes #7.
2014-01-16 14:04:10 +00:00
Ben Firshman c4f5ed839f Shorten long commands in ps 2014-01-16 14:02:52 +00:00
Ben Firshman b4c905dc83 Merge pull request #14 from orchardup/vendor-docker-py
Vendor docker-py
2014-01-16 05:49:15 -08:00
Aanand Prasad 804e2cdcb1 Merge pull request #16 from orchardup/add-help-command
Add help command
2014-01-16 05:40:48 -08:00
Aanand Prasad 21528f08d4 Vendor docker-py
From 9dc03c5737
2014-01-16 13:30:01 +00:00
Ben Firshman b1e7f548f4 Add help command 2014-01-16 13:26:25 +00:00
Ben Firshman cdcea98290 Copy readme commands docs to CLI docstrings 2014-01-16 13:17:00 +00:00
Aanand Prasad 5db6c9f51b Rework 'fig up' to use recreate_containers() 2014-01-16 12:32:15 +00:00
Aanand Prasad a8e275a432 Implement UserError __unicode__ method 2014-01-16 12:32:04 +00:00
Ben Firshman d4000e07a9 Switch order of connection logic so TCP is tried first 2014-01-16 00:58:46 +00:00
Aanand Prasad b92e998929 'fig logs' shows output for stopped containers 2014-01-14 12:42:30 +00:00
Aanand Prasad 059d240824 Fix line buffering when there's UTF-8 in a container's output 2014-01-09 16:19:22 +00:00
Aanand Prasad 7a4b69edc0 Remove compat texttable module - breaks on Python 2.7 2014-01-09 15:32:59 +00:00
Aanand Prasad 892677a9d3 Very basic CLI smoke test
See #8.
2014-01-09 15:32:24 +00:00
Christopher Grebs 31f0907732 Add unicode_literals to main module 2014-01-06 17:58:50 +00:00
Christopher Grebs f600fa8bf3 More future imports for safety 2014-01-06 17:58:50 +00:00
Christopher Grebs c6e91db32f Add texttable compat module that is py3k compatible 2014-01-06 17:58:50 +00:00
Christopher Grebs b101118d1e Add future import for print function 2014-01-06 17:58:50 +00:00
Christopher Grebs 30ea4508c3 Use print function 2014-01-06 17:58:50 +00:00
Christopher Grebs 3c91315426 Fix exception alias syntax 2014-01-06 17:58:49 +00:00
Christopher Grebs 93b9b6fd9f First version with python3 support.
* Moved requirements*.txt files to proper spec definitions in setup.py
 * Added a new fig.compat module to store some compatibility code
2014-01-06 17:58:49 +00:00
Tom Stuart 490742b892 Emit a friendly error when fig.yml is missing
I keep doing this by accident, so I'd rather not see the stack trace.
2014-01-03 11:59:03 +00:00
Ben Firshman 36002f95ed Try connecting to localdocker:4243
See https://github.com/noplay/docker-osx/pull/22
2014-01-02 20:51:35 +00:00
Ben Firshman 9b289b6f3b Stop "fig up" containers gracefully
With double ctrl-c force.
2014-01-02 19:18:08 +00:00
Ben Firshman 6d0702e607 Send log output to stderr 2014-01-02 18:31:00 +00:00
Ben Firshman a39db86651 Add "fig build" command 2014-01-02 15:28:33 +00:00
Ben Firshman 770e78fdce Make usage alphabetical 2014-01-02 15:00:16 +00:00
Aanand Prasad c0676e3fa3 Add confirmation prompt to 'fig rm' 2013-12-31 13:42:58 +00:00
Aanand Prasad d4f3ed1840 Fix 'fig up' behaviour
- For each service, creates a container if there are none (stopped OR
  started)
- Attaches to all containers (unless -d is passed)
- Starts all containers
- On ^C, kills all containers (unless -d is passed)
2013-12-31 13:02:08 +00:00
Aanand Prasad 9ed6538693 Extract docker URL logic, use it in tests as well 2013-12-31 12:37:17 +00:00
Aanand Prasad ff65a3e1b0 Check default socket and localhost:4243 for Docker daemon 2013-12-31 12:18:27 +00:00