Commit Graph

55 Commits

Author SHA1 Message Date
Tristan Keen 1b919459e8 Default to port 443 for all vsphere actions, not just creation
Signed-off-by: Tristan Keen <tristan.keen@gmail.com>
2016-03-07 21:31:27 +00:00
Jean-Laurent de Morlhon 8eb22b411b Fix #2029 - local drivers dont run with engine-install-url
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2016-01-28 18:05:58 +01:00
S.Çağlar Onur 0aedfd201d [vmwarevsphere] Start using govmomi provided helpers
Also update govmomi to latest revision and call Logout method when needed

Signed-off-by: S.Çağlar Onur <conur@vmware.com>
2016-01-26 10:24:02 -08:00
David Gageot e143c68cf9 Merge pull request #2732 from dgageot/better-logs
Improve Start/Stop/Kill/Restart lifecycle/logs
2016-01-04 16:24:55 +01:00
David Gageot 9354fed274 Remove some duplication related to swarm
Signed-off-by: David Gageot <david@gageot.net>
2016-01-04 10:40:04 +01:00
David Gageot 855de0741a Logs for Kill
Signed-off-by: David Gageot <david@gageot.net>
2016-01-04 10:38:25 +01:00
David Gageot e9aa75f021 Logs for Restart
Signed-off-by: David Gageot <david@gageot.net>
2016-01-04 10:38:25 +01:00
David Gageot 783d2b124e Logs for Start
Signed-off-by: David Gageot <david@gageot.net>
2016-01-04 10:38:25 +01:00
David Gageot bbe76b5a26 Logs for Stop
Signed-off-by: David Gageot <david@gageot.net>
2016-01-04 10:38:25 +01:00
Fabio Rapposelli 2e90b7cb55 Update vSphere driver to work with govmomi instead of wrapping govc.
Signed-off-by: Fabio Rapposelli <fabio@vmware.com>
2015-12-22 19:00:45 +01:00
David Gageot a7bd9e06d2 Update B2D cache in PreCreateCheck phase
Signed-off-by: David Gageot <david@gageot.net>
2015-12-18 11:14:59 +01:00
Fabio Rapposelli 2dcfcf2b06
Fix for vSphere driver boot2docker ISO issues
Fixes #2279 #2060

Signed-off-by: Fabio Rapposelli <fabio@vmware.com>
2015-12-03 07:24:26 -05:00
Vladimir Varankin 0735f3f447 fix drivers GetUrl to build propper IPv6 addr
Signed-off-by: Vladimir Varankin <nek.narqo+git@gmail.com>
2015-11-13 13:19:15 +03:00
Olivier Gambier 89d9854943 Another pass at linting
Signed-off-by: Olivier Gambier <olivier@docker.com>
2015-11-10 16:58:14 +01:00
David Gageot 6c5dc41e6d Revert "Remove useless duplication on GetSSHHostname"
This reverts commit b6462eb6d0.

Signed-off-by: David Gageot <david@gageot.net>
2015-10-26 18:47:14 +01:00
Nathan LeClaire 8b9291de64 Merge pull request #2033 from dmp42/03-cleanup
Code cleanup
2015-10-23 11:27:44 -07:00
Fabian Ruff 5021ffd2e7 support github enterprise urls for b2d downloads
This commit allows downloading boot2docker releases not only from the official releases url (https://api.github.com/repos/boot2docker/boot2docker/releases) but from arbitrary github repositories that publish releases with a boot2docker.iso artifact. It also supports downloading from github enterprise.

Signed-off-by: Fabian Ruff <fabian@progra.de>
2015-10-22 16:12:21 +02:00
Olivier Gambier b6462eb6d0 Remove useless duplication on GetSSHHostname
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 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 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 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
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
Fabio Rapposelli c4be194d41 Moved `vmwarevsphere` driver to main b2d release tree
Signed-off-by: Fabio Rapposelli <fabio@vmware.com>
2015-05-26 10:06:24 +02:00
Evan Hazlett f82032b28d remove provider
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-05-21 10:41:03 -04:00
Dave Henderson 3739e4d067 Harmonizing drivers so IPAddress property is kept up-to-date
Signed-off-by: Dave Henderson <Dave.Henderson@ca.ibm.com>
2015-04-30 19:59:23 -04: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 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 72f05505fa
vmwarevsphere: update with new driver interface
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-10 00:41:02 -04:00
Fabio Rapposelli 28fff16745 Driver rework to use upcoming boot2docker/boot2docker#747 patch:
- Aligned VMX template to Fusion (vmxnet3, pvscsi)
- Bundle ssh keys in a tar and upload it through vmtools
- Power operations moved to graceful shutdown and restart

Signed-off-by: Fabio Rapposelli <fabio@vmware.com>
2015-03-01 17:46:30 +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 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
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
Evan Hazlett 2a6c39f4ec
set hostname after ssh is active
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-02-04 10:11:25 -05: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 d1ee81453c
add timeout for b2d release check; warn instead of error if cannot check
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-01-29 09:15:15 -05:00
Evan Hazlett d5a4f2f1c4 Merge pull request #402 from ehazlett/single-tls
Update to TLS Certificates
2015-01-26 18:06:43 -05:00
Evan Hazlett 57810b298d This adds a method to the Driver: PreCreateCheck. This can be used
where you want to run some prerequisite checks before attempting to
create
the machine.  In the case of EC2, this is a check for an existing
keypair.  This can be used in the other drivers in the future as well.

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-01-26 11:27:12 -05:00
Evan Hazlett 74f9bcebc7 only create ca and client cert once; create server keys each time; add serverAuth to ext usage
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-01-23 22:31:53 -05:00