Commit Graph

50 Commits

Author SHA1 Message Date
David Gageot 6f8a6dd272 FIX #2641 Digital Ocean Custom SSH port
Signed-off-by: David Gageot <david@gageot.net>
2015-12-21 16:16:33 +01:00
Nathan LeClaire 98ca59394a Increase heartbeat interval and timeout
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-12-18 18:53:01 -08:00
Jean-Laurent de Morlhon aa9ff22395 Test distinguish stdout from stderr
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-12-16 16:57:14 +01:00
Jean-Laurent de Morlhon 854219d44a Clearer writer name
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-12-16 16:51:03 +01:00
Nathan LeClaire 06c97cfb17 Fix STDOUT and STDERR direction based on Log.* calls
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-12-15 18:01:42 -08:00
Nathan LeClaire d29a42ebc6 Merge pull request #1299 from hairyhenderson/ssh-agent-support-1291
Allowing generic driver to use ssh-agent to get identities
2015-12-11 17:31:55 -08:00
David Gageot f3775f774c FIX #2553 Fusion Driver is supported only on darwin
Signed-off-by: David Gageot <david@gageot.net>
2015-12-11 15:46:47 +01:00
Jean-Laurent de Morlhon 4f0c24483b bugsnag integration
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-12-10 17:05:05 +01:00
Dave Henderson cf6136fed0 Allowing generic driver to use ssh-agent to get identities
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
2015-12-09 09:36:08 -05:00
David Gageot 92854bd31f Merge pull request #2523 from dgageot/2510-support-dns-names
FIX 2510 Support DNS names
2015-12-08 10:54:40 +01:00
David Gageot eeb568fd27 FIX 2510 Support DNS names
Signed-off-by: David Gageot <david@gageot.net>
2015-12-08 10:11:33 +01:00
Jean-Laurent de Morlhon 4792177b11 Logrus Machine Logger
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-12-07 18:36:48 +01:00
Jean-Laurent de Morlhon 010a1c76e2 Use logrus
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-12-07 11:08:50 +01:00
Jean-Laurent de Morlhon 2e79f67e93 Cleanup stdout/stderr log initialization
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-12-07 10:33:32 +01:00
David Gageot 92ce49b367 Put all core drivers in docker-machine binary
Signed-off-by: David Gageot <david@gageot.net>
2015-12-02 18:48:19 +01:00
Jean-Laurent de Morlhon 225abe05fe Move heartbeat code after getversion
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-12-02 16:29:08 +01:00
Jean-Laurent de Morlhon 88f6fce204 Fix for #2474
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-12-02 16:29:08 +01:00
David Gageot 518e3b8bde Rename to rawDriver
Signed-off-by: David Gageot <david@gageot.net>
2015-11-26 14:08:09 +01:00
Nathan LeClaire 08565fd198 Merge pull request #2396 from allingeek/master
Decoupled RPC Types from API
2015-11-25 22:03:29 -08:00
Jeff Nickoloff c4a72491ec Decoupled RPC Types from API
Added compatibility for both 5.0 and 5.1 RPC plugins.
Addresses #2325

Signed-off-by: Jeff Nickoloff <jeff@allingeek.com>

	modified:   libmachine/drivers/plugin/register_driver.go
	modified:   libmachine/drivers/rpc/client_driver.go
2015-11-25 13:02:31 -08:00
Jean-Laurent de Morlhon 67b83f518f Fix #2410
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
Reviewed-by: David Gageot <david@gageot.net>
2015-11-25 18:27:35 +01:00
Nathan LeClaire 19ce7b79bd Revise CommandLine interface to contain libmachine client and store
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-11-23 19:29:20 -08:00
David Gageot 6de1fd13d3 Plugin's stdout shouldn't show `OUT`
Signed-off-by: David Gageot <david@gageot.net>
2015-11-18 16:45:58 +01:00
Jean-Laurent de Morlhon fe37f1fb0d Fix #2204 broken env unset
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-11-12 17:32:27 +01:00
Olivier Gambier 89d9854943 Another pass at linting
Signed-off-by: Olivier Gambier <olivier@docker.com>
2015-11-10 16:58:14 +01:00
Nathan LeClaire bc7da2b0fa Merge pull request #2172 from dgageot/2154-query-virtualbox-serially
FIX #2154 query virtualbox serially
2015-11-09 12:00:03 -08:00
David Gageot 68092b3524 FIX #2154 query virtualbox serially
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-11-07 16:14:25 +01:00
Nathan LeClaire b92a6fd3ce Allow plugins to write to STDOUT
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-11-06 18:21:38 -08:00
Olivier Gambier d2ada6488c Lint
Signed-off-by: Olivier Gambier <olivier@docker.com>
2015-11-05 13:34:07 -08:00
David Gageot 11922080a1 FIX #2171 Fix faulty flag and add tests for SetConfigFromFlags
Signed-off-by: David Gageot <david@gageot.net>
2015-11-05 18:57:03 +01:00
Nathan LeClaire 6be950f1c0 Merge pull request #2117 from dmp42/08-carry-on-2033
Carry on commits from #2033
2015-11-04 16:41:40 -08:00
Nathan LeClaire 47aa16cff4 Merge pull request #2135 from janeczku/plugin-versioning
Fail gracefully when plugin binary implements outdated API
2015-11-04 14:40:54 -08:00
Jan Broer 66ca5b07a2 Fail gracefully when plugin binary implements outdated API
Signed-off-by: Jan Broer <janeczku@yahoo.de>
2015-11-04 14:24:01 +01:00
Nathan LeClaire 9a4bc9a20d Ensure that ls will still work when plugin cannot be found
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-11-03 11:35:30 -08:00
Olivier Gambier ae2d344c2b Carry on commits from #2033
A couple of small cleanup and enhancements that were dropped after the revert.

Signed-off-by: Olivier Gambier <olivier@docker.com>
2015-10-30 16:33:26 -07:00
Nathan LeClaire 3dd578318a Stop heartbeat when there is an issue connecting to the server
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-10-26 12:55:48 -07:00
David Gageot 57dc1156de Revert "Remove duplication over GetIP"
This reverts commit 99aacc7b79.

Signed-off-by: David Gageot <david@gageot.net>
2015-10-26 18:47:03 +01:00
David Gageot a7559fd3a8 Revert "Generic and Base slight cleanups"
This reverts commit 19625def22.

Signed-off-by: David Gageot <david@gageot.net>
2015-10-26 18:46:54 +01:00
Nathan LeClaire 8b9291de64 Merge pull request #2033 from dmp42/03-cleanup
Code cleanup
2015-10-23 11:27:44 -07:00
Olivier Gambier 4bd43d604f Merge pull request #2053 from nathanleclaire/rpc_heartbeat
Add heartbeat / automatic server cleanup code
2015-10-23 10:40:45 -07:00
Olivier Gambier 19625def22 Generic and Base slight cleanups
- tests for GetIP
- extract default values into consts (user & port)
- better error handling (cert permissions change)
- unexport Driver for generic (linting)
- ordering of methods and variables for better readability

Signed-off-by: Olivier Gambier <olivier@docker.com>
2015-10-23 10:38:57 -07:00
Nathan LeClaire 76c7accda0 Add heartbeat / automatic server cleanup code
This replaces the previous method of attempting to clean up servers when
an unexpected exit occurs in the client (e.g. SIGINT or panic) by a
heartbeat protocol.  If the server does not hear from the connecting
client within a certain interval of time (500ms in this commit), it will
de-activate itself.  This prevents dangling Docker Machine server
processes from accumulating.

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-10-22 19:44:35 -07:00
David Gageot 035c0de9e5 Remove dead code
Signed-off-by: David Gageot <david@gageot.net>
2015-10-22 11:02:54 +02:00
Nathan LeClaire 4157dff31c Increase SSH timeout back to five minutes
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-10-21 15:27:20 -07:00
Olivier Gambier 99aacc7b79 Remove duplication over GetIP
+ ip address proper validation

Signed-off-by: Olivier Gambier <olivier@docker.com>
2015-10-21 13:48:13 -07:00
Olivier Gambier c2589c8099 Trivial cleanup / ordering / inline doc
Signed-off-by: Olivier Gambier <olivier@docker.com>
2015-10-21 13:48:13 -07:00
Olivier Gambier bf3cd8b8f4 Remove useless duplication on PreCreateCheck
Signed-off-by: Olivier Gambier <olivier@docker.com>
2015-10-21 13:48:13 -07:00
Nathan LeClaire c8edb33ecd Move towards using external binaries / RPC plugins
- First RPC steps

- Work on some flaws in RPC model

- Remove unused TLS settings from Engine and Swarm options

- Add code to correctly encode data over the network

- Add client driver for RPC

- Rename server driver file

- Start to make marshal make sense

- Fix silly RPC method args and add client

- Fix some issues with RPC calls, and marshaling

- Simplify plugin main.go

- Move towards 100% plugin in CLI

- Ensure that plugin servers are cleaned up properly

- Make flag parsing for driver flags work properly

Includes some work carried from @dmp42 updating the build process and
tests to use the new method.

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-10-16 16:34:56 -07:00
Nathan LeClaire 9453df4859 Fix Docker daemon wait
Also, a few various cleanups are bundled:

1. Only call GetDriver() once to get the object in provision/utils.go
2. SSH command wrapper will return the error and let the consumer decide
   what to do with it instead of bailing automatically on non-255

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-09-23 15:19:25 -07:00
Nathan LeClaire b5927f10c4 Make libmachine usable by outside world
- Clear out some cruft tightly coupling libmachine to filestore

- Comment out drivers other than virtualbox for now

- Change way too many things

- Mostly, break out the code to be more modular.

- Destroy all traces of "provider" in its current form.  It will be
brought back as something more sensible, instead of something which
overlaps in function with both Host and Store.

- Fix mis-managed config passthru

- Remove a few instances of state stored in env vars

- This should be explicitly communicated in Go-land, not through the
shell.

- Rename "store" module to "persist"

- This is done mostly to avoid confusion about the fact that a concrete
instance of a "Store" interface is oftentimes referred to as "store" in
the code.

- Rip out repetitive antipattern for getting store

- This replaces the previous repetive idiom for getting the cert info, and
consequently the store, with a much less repetitive idiom.

- Also, some redundant methods in commands.go for accessing hosts have
either been simplified or removed entirely.

- First steps towards fixing up tests

- Test progress continues

- Replace unit tests with integration tests

- MAKE ALL UNIT TESTS PASS YAY

- Add helper test files

- Don't write to disk in libmachine/host

- Heh.. coverage check strikes again

- Fix remove code

- Move cert code around

- Continued progress: simplify Driver

- Fixups and make creation work with new model

- Move drivers module inside of libmachine

- Move ssh module inside of libmachine

- Move state module to libmachine

- Move utils module to libmachine

- Move version module to libmachine

- Move log module to libmachine

- Modify some constructor methods around

- Change Travis build dep structure

- Boring gofmt fix

- Add version module

- Move NewHost to store

- Update some boring cert path infos to make API easier to use

- Fix up some issues around the new model

- Clean up some cert path stuff

- Don't use shady functions to get store path :D

- Continue artifact work

- Fix silly machines dir bug

- Continue fixing silly path issues

- Change up output of vbm a bit

- Continue work to make example go

- Change output a little more

- Last changes needed to make create finish properly

- Fix config.go to use libmachine

- Cut down code duplication and make both methods work with libmachine

- Add pluggable logging implementation

- Return error when machine already in desired state

- Update example to show log method

- Fix file:// bug

- Fix Swarm defaults

- Remove unused TLS settings from Engine and Swarm options

- Remove spurious error

- Correct bug detecting if migration was performed

- Fix compilation errors from tests

- Fix most of remaining test issues

- Fix final silly bug in tests

- Remove extraneous debug code

- Add -race to test command

- Appease the gofmt

- Appease the generate coverage

- Making executive decision to remove Travis coverage check

In the early days I thought this would be a good idea because it would
encourage people to write tests in case they added a new module.  Well,
in fact it has just turned into a giant nuisance and made refactoring
work like this even more difficult.

- Move Get to Load
- Move HostListItem code to CLI

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-09-23 12:30:15 -07:00