Commit Graph

410 Commits

Author SHA1 Message Date
Evan Hazlett
89e6530528 Merge pull request #1501 from nathanleclaire/bail_on_failed_ssh
Bail on failed SSH command with information about what failed
2015-07-21 17:52:15 -04:00
Nathan LeClaire
6db82141f0 Bail on failed SSH command with information about what failed
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-07-21 14:49:24 -07: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
Vincent Bernat
6a0e3ee0a5 exoscale: reuse "SecurityGroup" variable in "struct Driver"
Since the content of `struct Driver` is serialized to disk, any change
is problematic. A workaround is to keep using the `SecurityGroup` member
as a string (a comma-separated list of security groups).

Signed-off-by: Vincent Bernat <Vincent.Bernat@exoscale.ch>
2015-06-30 11:09:13 +02:00
Vincent Bernat
4ec3f206b4 exoscale: use StringSlice to specify security groups
This mean that the option has to be repeated to specify multiple
security groups.

Signed-off-by: Vincent Bernat <Vincent.Bernat@exoscale.ch>
2015-06-30 10:59:23 +02:00
Vincent Bernat
5ba232227e exoscale: ability to specify multiple security groups on instance creation
Without this feature, when a user needs a specific security group (i.e
most of the time if they want to expose a service to Internet), they
need to copy the rules needed for Docker itself into each custom
group. With this feature, they can spawn new instances with
`--exoscale-security-group docker-machine,my-custom-group`.

Signed-off-by: Vincent Bernat <Vincent.Bernat@exoscale.ch>
2015-06-30 10:59:23 +02:00
Nathan LeClaire
0694c0da81 Show requests made to AWS API in debug mode
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-06-17 17:29:00 -07: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
LingFaKe
c1b9ef6743 Add option parameter availability_zone
Signed-off-by: Ling FaKe <lingfake@huawei.com>
2015-06-05 17:37:43 -07:00
Evan Hazlett
f6a6a1f8c8 Merge pull request #1222 from zchee/update-amazonec2-ami
Update AMI to release 20150603
2015-06-05 10:30:57 -04:00
Koichi Shiraishi
0dc1cc0ff3 Update AMI to release 20150603
Signed-off-by: Koichi Shiraishi <zcheeee@gmail.com>
2015-06-05 05:33:06 +09:00
Vincent Bernat
3c16a870ac exoscale: move job waiting into a separate function
Waiting for a job to complete is split into a dedicated function,
outside of `waitForVM()`. Functions only waiting for the job to complete
will use this new function instead. The "job is done" testing logic is
also casted into a separate function.

The original `waitForVM()` function is now waiting for the job to
complete, then retrieve the VM. This introduces an extra API call which
could be avoided by having a `waitForJob()` return the last response but
this makes the code simpler for other users and adding a special variant
just for that seems to be overkill.

Signed-off-by: Vincent Bernat <Vincent.Bernat@exoscale.ch>
2015-06-03 09:33:17 +02:00
Vincent Bernat
2d25f56ff7 exoscale: use the new utils.WaitForSpecificOrError function to wait for job to finish
Instead of using a custom loop, use the newly introduced
`utils.WaitForSpecificOrError` function. Beware that on success, we use
the successful response to get the VM object (outside the loop).

Signed-off-by: Vincent Bernat <Vincent.Bernat@exoscale.ch>
2015-06-03 09:09:07 +02:00
Vincent Bernat
2a60a4ea32 exoscale: ensure we sleep a bit while waiting for the VM to be ready
Otherwise, the timeout is reached far too soon: instead of waiting for
the VM for two minutes, we wait only for a couple of seconds.

Signed-off-by: Vincent Bernat <Vincent.Bernat@exoscale.ch>
2015-06-03 09:09:07 +02:00
Vincent Bernat
a6c58534ca exoscale: add the appropriate port to make Swarm work
Signed-off-by: Vincent Bernat <Vincent.Bernat@exoscale.ch>
2015-06-02 11:44:18 +02:00
Evan Hazlett
3cd44ec4ef Merge pull request #1277 from ggiamarchi/openstack/bug#1269
Openstack / Stop polling the instance when status is ERROR
2015-06-01 08:40:59 -04:00
Guillaume Giamarchi
de817cfe46 Stop polling the instance when status is ERROR
Fix #1269

Signed-off-by: Guillaume Giamarchi <guillaume.giamarchi@gmail.com>
2015-06-01 00:49:23 +02:00
Dave Henderson
904acb914a Amazon EC2 - Fixing how the Monitoring.Enabled field is set for spot requests
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
2015-05-30 22:25:36 -04:00
Evan Hazlett
be7c110dfd Merge pull request #1247 from ehazlett/redhat-tty-fix
redhat: fix tty provision bug
2015-05-27 13:57:44 -04:00
Evan Hazlett
512f403bb2 Merge pull request #1244 from frapposelli/vcloudair-fix-catalogitem
Fix for the default vCloud Air catalog item.
2015-05-27 11:42:18 -04:00
Evan Hazlett
ec5edb0354 redhat: fix tty provision bug
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-05-27 10:56:43 -04:00
Evan Hazlett
e8cdc30549 Merge pull request #1215 from janeczku/driver-exoscale
exoscale: fix driver hanging on failed VM operation
2015-05-27 10:04:15 -04:00
Fabio Rapposelli
850e21c3dc Fix for the default vCloud Air catalog item.
Signed-off-by: Fabio Rapposelli <fabio@vmware.com>
2015-05-27 15:17:26 +02:00
Evan Hazlett
7c2a4ac12c Merge pull request #1231 from frapposelli/move-vsphere-to-main-b2d
Moved VMware vSphere driver to main b2d release tree
2015-05-26 13:05:26 -04:00
Evan Hazlett
74de38d97f Merge pull request #1232 from frapposelli/move-fusion-to-main-b2d
[PR for 1.7.0] Move VMware Fusion driver to the official boot2docker release.
2015-05-26 12:26:34 -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
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
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
Jan Broer
bbbaa8952e exoscale: fixed 2 mins wait loop on failed operation
Signed-off-by: Jan Broer <janeczku@yahoo.de>
2015-05-23 06:09:01 +02:00
Evan Hazlett
19d3bdd389 Merge pull request #1208 from exoscale/fix/exoscale-ssh-keypair
exoscale: destroy the SSH keypair when removing the machine
2015-05-22 09:58:59 -04: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
Evan Hazlett
91c618fd06 Merge pull request #1174 from nathanleclaire/ssh_backends
Move to using SSH shellout by default, and Go native impl as a backup
2015-05-21 10:22:45 -04:00
Vincent Bernat
d05a889c96 exoscale: simplify if/err pattern
Compact the if/err forms that can be compacted.

Signed-off-by: Vincent Bernat <Vincent.Bernat@exoscale.ch>
2015-05-21 14:34:42 +02:00
Vincent Bernat
b772e66394 exoscale: destroy the SSH keypair when removing the machine
Otherwise, when recreating a machine with the same name, we would get an
error about this SSH keypair already existing.

To avoid any confusion, let's say that machine will handle all keypairs
and the user cannot provide its own. Therefore, move the keypairs into
their own "namespace" and remove the option to specify a keypair.

Signed-off-by: Vincent Bernat <Vincent.Bernat@exoscale.ch>
2015-05-21 14:34:42 +02: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
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
Dave Henderson
fe4652b21d Defaulting SoftLayer hostname to machine name
Signed-off-by: Dave Henderson <Dave.Henderson@ca.ibm.com>
2015-05-18 16:07:59 -04:00
Nathan LeClaire
8afddbeab8 Fix cert copying bug
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-05-13 22:19:27 -07:00
Evan Hazlett
cb6eb6bb77 amazonec2: instance profile env var
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-05-13 15:00:52 -04:00