Commit Graph

63 Commits

Author SHA1 Message Date
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
Marcel Harkema db9363ef46 Fix config drive support in VMware Fusion driver
Signed-off-by: Marcel Harkema <marcel@harkema.name>
2015-10-10 16:10:11 +02: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
Nathan LeClaire b91c117238 Merge pull request #1816 from frapposelli/fusion-fuse-mount
Adding FUSE HGFS mount option
2015-09-16 16:07:31 -07:00
Nathan LeClaire b52fa33056 Merge pull request #1479 from mschygulla/enhanced-vmwarefusion-driver
[Enhancement] VMware Fusion driver
2015-09-11 14:26:30 -07:00
Nathan LeClaire 5ba35ac2de Merge pull request #1812 from jclagache/master
1434-Added homebrew cask support for VMware Fusion
2015-09-11 14:21:39 -07:00
jclagache ebbc45abea 1434-Added homebrew cask support for VMware Fusion
This aims to lookup for Vmware Fusion required binaries (vmrun and vmware-vdiskmanager) in the system path first before falling back in the default Vmware Fusion installing path.
Thereby, the vmwarefusion docker-machine driver can now be used even if Vmware Fusion is not installed in its default location (with brew cask for example).
Signed-off-by: Jean-Christophe Lagache <jclagache@gmail.com>
2015-09-08 13:39:56 +02:00
Fabio Rapposelli c3ed882b76 Adding FUSE HGFS mount option
Signed-off-by: Fabio Rapposelli <fabio@vmware.com>
2015-09-07 17:31:21 +02:00
Evan Hazlett 3c712ae30a
change debug env var to MACHINE_DEBUG
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-09-05 08:57:03 -04:00
Fabio Rapposelli ffe1a7940b [GH-1740] Fix cpu allocation bug
Signed-off-by: Fabio Rapposelli <fabio@vmware.com>
2015-08-20 15:40:06 +02:00
Nathan LeClaire 8ba5a57072 Revert "Merge pull request #1552 from ehazlett/b2d-next"
This reverts commit 736ebb14fb, reversing
changes made to c6660bf62c.

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-08-03 14:46:52 -07:00
Evan Hazlett 0b03589187
fusion: use mkdir -p for home dir mount
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-07-24 17:34:07 -04:00
Evan Hazlett 5f972ad759
fusion: @tianon to the rescue <3; shared folders work again
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-07-24 12:31:36 -04:00
Evan Hazlett cb80c434ac b2d: use direct urls until release; devicemapper for engine opts tests
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

b2d-ng: use driver names for iso versions

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-07-24 09:07:01 -04:00
Evan Hazlett 95c9b622dd fusion: update for b2d-ng
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-07-24 09:07:01 -04:00
Martin Schygulla 6726ce915e Merge branch 'master' into enhanced-vmwarefusion-driver 2015-07-11 22:40:50 +02:00
Dave Henderson 3d002187fe Refactoring drivers to embed drivers.DefaultDriver
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
2015-07-07 11:24:00 -04:00
Martin Schygulla 66114abb0d Improved handling of boot delays until VM comes online
Signed-off-by: Martin Schygulla <martin.schygulla@gmail.com>
2015-07-07 04:18:49 +02:00
Martin Schygulla e7e68149e5 Enhanced driver for VMWare Fusion to support configuration data for cloud-init.
The userdata is injected into the VM as an ISO via the cdrom.

Signed-off-by: Martin Schygulla <martin.schygulla@gmail.com>
2015-07-06 00:44:59 +02:00
Fabio Rapposelli 4c1217aec8 Move `vmwarefusion` to the official boot2docker release.
Signed-off-by: Fabio Rapposelli <fabio@vmware.com>
2015-05-26 10:36:02 +02:00
Evan Hazlett 7f3bfb3e87 Merge pull request #1206 from miketheman/vmwarefusion_1168
Address vmwarefusion driver hang condition
2015-05-22 09:57:17 -04:00
Evan Hazlett f82032b28d remove provider
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-05-21 10:41:03 -04:00
Mike Fiedler 67a5018999 Get machine state before looking up URL in vmwarefusion
- Add a call to GetState() in GetIP() to bail if the machine is stopped,
  similar to how it is done in the virtualbox driver.
- Add tests for `url` and `env` commands.

Fixes #1168

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
2015-05-20 23:40:07 -04:00
Fabio Rapposelli 13c1006f3b CPU count fixes to `vmwarefusion`
- Added `--vmwarefusion-cpu-count` parameter
- Defaults to 1 Virtual CPU

Signed-off-by: Fabio Rapposelli <fabio@vmware.com>
2015-05-07 02:16:20 +02:00
Nathan LeClaire 142ffadc2c Refactor logging to focus on simple STDOUT/STDERR
This also lays the foundation for the possibility of log drivers in the
future, if it is decided that is a direction to pursue.

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-04-30 12:04:52 -07:00
Sascha Hanse 567e19b8ad unbreak the darwin build, last rebase added some old variable names again
Signed-off-by: Sascha Hanse <shanse@gmail.com>
2015-04-24 21:17:41 +02:00
Sascha Hanse 6e0aecb2ee clean up the vmware drivers
Signed-off-by: Sascha Hanse <shanse@gmail.com>

forgot gofmt

Signed-off-by: Sascha Hanse <shanse@gmail.com>
2015-04-23 20:12:07 +02:00
Fabio Rapposelli 25583edbb3 Update VMware Fusion and vSphere driver to run boot2docker 1.6.0
- Update custom ISO to docker 1.6.0.
- Shared folder support for VMware Fusion.
- Updated bats test for Fusion.

Signed-off-by: Fabio Rapposelli <fabio@vmware.com>
2015-04-20 10:34:13 -07:00
Vincent Bernat 91d12d06ec drivers: remove unneeded `GetDockerConfigDir()` and `dockerConfigDir` const
This method is not part of the driver interface anymore.

Signed-off-by: Vincent Bernat <Vincent.Bernat@exoscale.ch>
2015-04-10 17:03:11 +02:00
Guillaume Giamarchi fb1362ea05 Remove dead code
Signed-off-by: Guillaume Giamarchi <guillaume.giamarchi@gmail.com>
2015-03-27 19:25:11 +01:00
Ke Zhu f92f57cd4d keep global b2d iso cache when using custom b2d iso
Signed-off-by: Ke Zhu <kzhu@us.ibm.com>
2015-03-24 15:21:15 -07:00
Evan Hazlett bde6ad3fac fixed b2d url bug with fusion / vsphere
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-24 15:21:15 -07:00
Evan Hazlett bc6b66c122
drivers: specify defaults if values are missing; i.e. config updates
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-11 22:59:28 -04:00
Evan Hazlett 9e27af64e3
vmwarefusion: update with new driver interface
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-10 00:27:11 -04:00
Evan Hazlett 26d09cf300 add hyperv and softlayer tests
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-02-27 12:32:00 -05:00
Fabio Rapposelli 9410b5b208 Add automatic assignments of vCPUs based on host CPUs.
Fixes #535

Signed-off-by: Fabio Rapposelli <fabio@vmware.com>
2015-02-27 17:40:09 +01:00
Fabio Rapposelli 193e2b1613 Major rework, changes include:
- Use new iso from boot2docker/boot2docker#747
- Make ssh keys persistent across reboots
- Create a tar bundle of ssh keys just like Virtualbox
- Seed ssh keys using VMware Tools
- Added informative messages on stop/start/restart/remove
- Stop command is now gracefully shutting down the VM
- Fixed StopDocker() script
- Added a "not supported" message to upgrade operation

Fixes #507 #542 #430 #532

Signed-off-by: Fabio Rapposelli <fabio@vmware.com>
2015-02-27 17:40:09 +01:00
Fabio Rapposelli 3442f8e063 Moved VMX options around, major changes:
- Moved to a paravirtualized driver for disk (pvscsi)
- Moved to an enhanced paravirtualized nic (vmxnet3)
- Moved CDROM to SATA
- Reverted default power operations to "soft"

Signed-off-by: Fabio Rapposelli <fabio@vmware.com>
2015-02-27 17:40:08 +01:00
Evan Hazlett 7a101ac92c
refactor directories to machines, certs, cache
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-02-25 12:32:41 -05:00
Simon Thulbourn 52782250d3 Move images dir to stop polluting the docker path
Signed-off-by: Simon Thulbourn <simon+github@thulbourn.com>
2015-02-24 14:11:18 +00:00
Evan Hazlett 3a3ef6f45e add discovery to machine config; show swarm membership
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-02-20 13:07:21 -08:00
Evan Hazlett a949e12b6e store swarm config in driver; vendor Godeps; generate swarm token
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-02-20 13:07:21 -08:00
Fabio Rapposelli 13b60b19f7 Updated custom ISOs for B2D w/ vmtoolsd and format-blank-drive patches.
Signed-off-by: Fabio Rapposelli <frapposelli@vmware.com>
2015-02-18 11:26:11 +01:00
Evan Hazlett b8ab9300e1 Merge pull request #453 from nathanleclaire/coverage
Add structure to generate code coverage representation
2015-02-16 14:19:01 -08:00
Evan Hazlett 1198cb539a
use custom vmware b2d iso for fusion and vsphere
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-02-08 15:36:39 -05:00
Evan Hazlett a3cfab1675
only show fusion on darwin
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-02-06 08:57:57 -05:00
Jeff Mendoza d47000ea3b Update Boot2docker download, and consolitate util functions.
Signed-off-by: Jeff Mendoza <jeffmendoza@live.com>
2015-02-06 08:48:36 -05:00
Nathan LeClaire d1fdc87f54 Add structure to generate code coverage representation
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-02-02 13:41:42 -08:00
Evan Hazlett da64d92a74 tests for utils/b2d.go
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-02-02 15:46:24 -05:00
Evan Hazlett dcf58cfc2d host tests; refactor util functions to support testing
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-02-02 15:44:35 -05:00