Commit Graph

147 Commits

Author SHA1 Message Date
Evan Hazlett c6e9849783 vbox: restrict regex matching for msys translated paths
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

vbox: remove tar loading from virtual disk creation

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

tests: use btrfs instead of overlay for custom option test

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-07-24 09:07:01 -04:00
Evan Hazlett e09f2fdd9c vbox: change to get latest released iso instead of pre-release
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

vbox: fix windows share dir for homedir

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

vbox: update tests for b2d

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-07-24 09:07:01 -04:00
Evan Hazlett ab31d52165 update vbox driver to work with new b2d
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

vbox: lock down shared folders to user home dir

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

use env var for user for cross platform

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

vbox: remove sudo from setting ssh key for user

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

wip: use homedir for share

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-07-23 19:40:07 -04:00
Nathan LeClaire 8089e222c3 Remove synthcpu flag for Virtualbox 5 support
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-07-09 10:42:46 -07:00
Evan Hazlett 69dc9fd7f3 Merge pull request #1273 from hairyhenderson/default-driver-impl
refactor: Extracting a base Driver struct
2015-07-09 01:59:05 -06:00
Nathan LeClaire 9053ee24c7 Fix choke when starting from Saved state
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-07-07 14:36:21 -07: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
Evan Hazlett a6a6e16329
vbox: fix vbox race with unregistervm
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-06-15 17:04:46 -04:00
Nathan LeClaire e91c28fad6 Check for IP to be assigned before returning from Start()
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-06-11 14:02:27 -07:00
Evan Hazlett 5a59fa8f12
added deprecation comment
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-06-11 16:24:49 -04:00
Evan Hazlett f26fb12664
vbox: fix panic with custom cidr
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-06-11 14:04:48 -04:00
Evan Hazlett 2f4d8c4237 vbox: refactor random IP allocation to func
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-06-09 11:05:29 -04:00
Evan Hazlett ca5f0738e2 vbox: allow specifying host only adapter cidr
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-06-09 11:05:29 -04:00
Evan Hazlett 3304bf8923 virtualbox: check for hostonly iface and add if needed on start
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-06-09 11:05:29 -04:00
Evan Hazlett 98e38006c0 Merge pull request #1218 from ehazlett/vbox-intel-nic
vbox: use intel driver for nic
2015-05-26 11:04:19 -04:00
Evan Hazlett f82032b28d remove provider
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-05-21 10:41:03 -04:00
Nathan LeClaire 2f78b7f92a Move code to use SSH "backends"
Default to shelling out to SSH when available.

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-05-19 15:02:57 -07:00
Evan Hazlett 76ba5b258e
vbox: use intel driver for nic
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-05-19 09:26:24 -04:00
Evan Hazlett a3e08a010d Merge pull request #1108 from ibuildthecloud/vbox-sleep
Fix issue where GetIP in VirtualBox failes due to no SSH
2015-05-07 13:33:26 -07:00
Evan Hazlett 60be4c292c virtualbox: windows share support
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-05-05 11:31:43 -07:00
Darren Shepherd 8afe967a80 Fix issue where GetIP failes due to no SSH
The main goal of this patch was to make the VirtualBox driver wait for
SSH before trying to get the IP of the VM.  The generic WaitForSSH
method required a Host struct as an arg.  This patch moves most of the
logic to the driver package so that drivers can call WaitForSSH.  The
existing functions in host are just wrappers to the real
implementation in drivers now.

Signed-off-by: Darren Shepherd <darren@rancher.com>
2015-05-05 09:32:45 -07: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
Evan Hazlett 03c245cf4f Merge pull request #1033 from ehazlett/env-shell-selection
shell selection for env
2015-04-30 14:03:23 -04:00
Evan Hazlett 6fe4331fdd
vbox: stop before rm for stability
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-04-30 10:36:59 -04:00
Evan Hazlett 03c1fbadc5 Merge pull request #1073 from ehazlett/vbox-use-single-core
vbox: use single cpu by default
2015-04-29 14:07:17 -04:00
Evan Hazlett 9e1185e06e
vbox: use dns pass through
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-04-29 12:33:10 -04:00
Evan Hazlett e8704b14f1
vbox: use single cpu by default
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-04-29 09:45:33 -04:00
John Fieber f42177983f Remove stray sleep()
This is just a bit of development debris.

Signed-off-by: John Fieber <jrf@ursamaris.org>
2015-04-27 16:58:57 -07:00
John Fieber cafad9bb1d Merge remote-tracking branch 'origin/master' into vboxnat
# Conflicts:
#	drivers/virtualbox/virtualbox.go
2015-04-27 10:01:43 -07:00
Evan Hazlett e9491d22dc b2d import: move debug logging to debug
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-04-23 09:38:03 -04:00
Evan Hazlett 33eab99e58 import cpu and memory settings when importing b2d vm
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-04-23 09:38:02 -04:00
Evan Hazlett a01322fa77 fixed ssh generation issue
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-04-23 09:38:02 -04:00
Evan Hazlett 7a4e16e082 virtualbox: add ability to import b2d instances
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-04-23 09:38:02 -04:00
Evan Hazlett 576951e03a wip: b2d import
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-04-23 09:38:02 -04:00
Simon Thulbourn 709b0a84e3 Add SSH client
Signed-off-by: Simon Thulbourn <simon+github@thulbourn.com>
2015-04-21 15:37:09 +01:00
Vincent Bernat 44be16c49f drivers: don't let the driver wait for SSH/Docker
Waiting for SSH to start or Docker to be available is a step done
directly in the framework (in libmachine). There is no need for the
driver to do that.

Signed-off-by: Vincent Bernat <Vincent.Bernat@exoscale.ch>
2015-04-21 07:11:41 +02:00
John Fieber 6ab04a0b51 Extract a wrench accidentally left inside the engine
Signed-off-by: John Fieber <jrf@ursamaris.org>
2015-04-17 12:24:58 -07:00
John Fieber fdaa783597 Virtualbox: move NAT port allocation to machine boot
The host side ssh NAT port was being chosen by the OS
when the VM was crafted in the `Create` method.
There was no accounting for some other process taking
over the port while the VM is shutoff.

This moves the port provisioning to VM start.
On first start, the OS will supply the port.  Subsequent
starts, we see if we can re-use the port, falling back
to delegating the selection to the OS.

Signed-off-by: John Fieber <jrf@ursamaris.org>
2015-04-17 11:49:18 -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
Evan Hazlett 45c8673f13 Merge pull request #920 from nathanleclaire/provisioner_upgrade
Provisioner upgrade
2015-03-31 12:12:51 -04:00
Evan Hazlett cfeffa530f Merge pull request #828 from ehazlett/vbox-tcp-port
vbox: fix race with getting a tcp port
2015-03-31 11:52:25 -04:00
Nathan LeClaire 9b5f395c60 Implement upgrade functionality for boot2docker
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-03-30 16:18:38 -07:00
Evan Hazlett f010a7bb80 Merge pull request #896 from ggiamarchi/dead_code
Remove dead code
2015-03-30 11:38:48 -04:00
Tom Barlow 97cd23f2e5 Added VIRTUALBOX_MEMORY_SIZE and VIRTUALBOX_DISK_SIZE env vars
Signed-off-by: Tom Barlow <tomwbarlow@gmail.com>
2015-03-28 23:07:48 +00:00
Guillaume Giamarchi fb1362ea05 Remove dead code
Signed-off-by: Guillaume Giamarchi <guillaume.giamarchi@gmail.com>
2015-03-27 19:25:11 +01:00
Paul Biggar dde614dbb0 Adds virtualbox-cpu-count - fixes #819
Signed-off-by: Paul Biggar <paul.biggar@gmail.com>
2015-03-25 20:06:22 -07:00
Evan Hazlett f524029d48
virtualbox: add maximum retry for allocating a tcp port
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-25 18:10:54 -07: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 2151492dec fix regression for custom b2d url paths
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-24 15:21:15 -07:00
Evan Hazlett 4e10204b8e
vbox: fix race with getting a tcp port
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-19 15:30:02 -04: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 d2869cbd38 Merge remote-tracking branch 'origin/master' into driver-refactor 2015-03-09 22:53:41 -04:00
Evan Hazlett 52a3019d00
azure: updated to driver interface; refactored common GetSSHCommandFromDriver for those that need it
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-09 22:53:21 -04:00
Evan Hazlett 6e81ba9fe7
virtualbox: finished driver updates
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-09 20:52:53 -04:00
Ken Pepple bfd83eebbe fixes Issue #750 by allowing virtualbox driver
start command to start VMs in saved state and
resume VMs in paused state.

Signed-off-by: Ken Pepple <ken@solinea.com>

converted to switch statement per @nathanleclaire suggestion

Signed-off-by: Ken Pepple <ken@solinea.com>

small typo

Signed-off-by: Ken Pepple <ken@solinea.com>
2015-03-10 00:32:39 +01:00
Evan Hazlett 275cb37602
virtualbox: update to new driver interface
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-09 17:53:30 -04: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
Evan Hazlett e450a75be4
virtualbox: check state before attempting start
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-02-24 09:45:44 -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
Evan Hazlett 9e161fafba
fix bug with attempting to restart vbox instance that is not running
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-02-09 15:36:18 -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 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
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
Simon Thulbourn 1727123214 Remove $ from regexp
The GetState() func now works on Windows hosts

Signed-off-by: Simon Thulbourn <simon+github@thulbourn.com>
2015-01-28 15:41:47 +00: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
Evan Hazlett 090e3328c8 refactor b2d retrieval for fusion/vbox
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-01-15 22:56:25 -05:00
Evan Hazlett fbce999d22 updated godeps; fixed cert issue date bug
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-01-15 22:56:25 -05:00
Evan Hazlett 9664d68889 rebase and updated fusion to work with standard docker b2d 1.4.1
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-01-15 22:56:24 -05:00
Evan Hazlett fc2e5f278b configure opts for b2d
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-01-15 22:56:24 -05:00
Evan Hazlett 4a47ce01fe updated google driver; added StartDocker and StopDocker to driver
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-01-15 22:56:24 -05:00
Evan Hazlett 4534944f6a use tls for auth
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-01-15 22:56:24 -05:00
Evan Hazlett c2f1fea9dc Merge pull request #219 from sthulb/hostnames
Hostnames
2015-01-14 09:31:43 -05:00
Evan Hazlett 37afa24a8e Merge pull request #276 from sthulb/vbox-store
Move VirtualBox configuration file to be inside the data store
2015-01-14 09:15:08 -05:00
Simon Thulbourn 916e6fcad8 Move VirtualBox configuration file to be inside the data store
It turns out, that we only stored the actual disk inside the data store,
this brings it back inline with vmware

Signed-off-by: Simon Thulbourn <simon+github@thulbourn.com>
2015-01-14 12:10:36 +00:00
Evan Hazlett 8d40d8219c
fixes #229: wait for docker before adding to known_hosts
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-01-12 15:20:03 -05:00
Simon Thulbourn 861b16dba9 add machine name to VM name and hostname
This work sets the machine name in the Cloud API or Hypervisor. As well
as setting the hostname inside the VM.

I've added the machine name to the NewDriver func to allow for
identification by Cloud APIs and for the driver package.

Each driver will attempt to set the hostname for the VM, except for
Azure, which sets it based on the DNS name.

Signed-off-by: Simon Thulbourn <simon+github@thulbourn.com>
2015-01-12 16:46:00 +00:00
Evan Hazlett b0936b1b53 automatically add host fingerprint to known hosts
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-01-02 15:40:11 -05:00
Evan Hazlett 41644ceaac use 1.4.1 identity build
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2014-12-31 01:09:21 -05:00
Evan Hazlett cd7d47074c
update b2d iso url
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2014-12-30 12:52:11 -05:00
Ben Firshman ba213b9042 Merge pull request #111 from ehazlett/persist-b2d-keys
fixes #108: persist identity keys in b2d
2014-12-30 14:35:03 +00:00
Nathan LeClaire 154d71ee9c Make more robust based on feedback from @ehazlett
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2014-12-16 16:24:48 -08:00
Evan Hazlett 02c38dcda7 fixes #108: persist identity keys in b2d
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2014-12-16 19:20:52 -05:00
Nathan LeClaire fb0407ecdc Only download boot2docker.iso one time
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2014-12-16 15:30:57 -08:00
Damien DUPORTAL eda8bbd2bd Moving path to filepath dependency
Signed-off-by: Damien DUPORTAL <damien.duportal@gmail.com>

Conflicts:
	drivers/azure/azure.go
	store.go
	store_test.go
2014-12-12 11:09:43 -08:00
Simon Thulbourn 64c73597e2 adds codegangsta/cli
Signed-off-by: Simon Thulbourn <simon+github@thulbourn.com>
2014-12-12 18:11:17 +00:00
Ben Firshman 1d83284129 Fix test for VBoxManage
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2014-12-09 16:15:47 -08:00
Ben Firshman 415c3f2c0c Don't use boot2docker ISO on disk
This was a hack for the DockerCon demo. We do want some way of
caching the boot2docker image, but this certainly isn't the way.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2014-12-08 16:26:57 -08:00
Ben Firshman fa4b7ddfd0 Document VBoxManage check
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2014-12-08 10:30:03 -08:00
Simon Thulbourn 773e8252dd bails out of virtualbox driver if VBoxManage doesn't exist
Signed-off-by: Simon Thulbourn <simon+github@thulbourn.com>
2014-12-07 19:47:05 +00:00
Simon Thulbourn b8fe0bc347 bails out of virtualbox driver quickly if it doesn't exist.
Signed-off-by: Simon Thulbourn <simon+github@thulbourn.com>
2014-12-07 19:46:25 +00:00
Ben Firshman 73d19108bf Initial commit
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2014-12-04 15:05:11 +01:00