Commit Graph

94 Commits

Author SHA1 Message Date
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 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
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
Olivier Gambier b6462eb6d0 Remove useless duplication on GetSSHHostname
Signed-off-by: Olivier Gambier <olivier@docker.com>
2015-10-21 13:48:13 -07:00
feelobot 6b7628a175 Use SDK to Validate VpcID with SubnetId
Signed-off-by: feelobot <felix.a.rod@gmail.com>
2015-10-20 12:37:33 -07:00
Dave Henderson 2a6e3dbf40 Fix log.* method calls which meant to be log.*f
Stuff like `log.Debug("foo bar: %s", baz)` really wants to be
`log.Debugf("foo bar: %s", baz)`...

Signed-off-by: Dave Henderson <dhenderson@gmail.com>
2015-10-17 15:59:25 -04: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 94c551b964 Fix broken --storage-path flag
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-10-07 13:31:00 -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
Matt McNaughton a0b9d179b1 Fix Go Vet errors
This commit makes no changes to code execution, but rather resolves some
`go vet` errors, the majority of which relate to `fatal` being used
instead of `fatalf` during testing.

Signed-off-by: Matt McNaughton <mattjmcnaughton@gmail.com>
2015-09-14 22:37:16 -04:00
Rodrigo Reis 04b435c832 Amazon Ec2 - Add the option amazonec2-use-private-address
Signed-off-by: Rodrigo Reis <rodrigo@rodrigoreis.com>
2015-08-11 07:29:13 -04: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
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 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
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 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
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 f82032b28d remove provider
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-05-21 10:41:03 -04: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
Evan Hazlett f29c5fc4dc Merge pull request #1086 from zchee/ec2-add-monitoring-flag
[EC2] Add Monitoring flag
2015-05-13 10:49:14 -04:00
Evan Hazlett 6036c28fa5 Merge pull request #1085 from zchee/update-amazonec2-ami
[EC2] Update AMI to release 20150417
2015-05-01 16:40:57 -04:00
zhee 556060f6db Update AMI to release 20150417
Signed-off-by: Koichi Shiraishi <zcheeee@gmail.com>
2015-05-01 10:47:55 +09:00
zhee 8821e7e5ee [EC2] Add Monitoring flag
Signed-off-by: Koichi Shiraishi <zcheeee@gmail.com>
2015-05-01 10:41:47 +09: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
Simon Thulbourn d0651d0273 Add --amazonec2-private-address-only
Signed-off-by: Simon Thulbourn <simon+github@thulbourn.com>
2015-04-30 16:42:44 +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
Evan Hazlett 460cc02ea5
ec2: update spot instance message
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-04-14 17:03:38 -04:00
Qicong Chen 9b577aabb6 Supports #226
Signed-off-by: Qicong Chen <qicongchen92@gmail.com>

Fix logging problem

Signed-off-by: Qicong Chen <qicongchen92@gmail.com>
2015-04-14 14:48:27 -04:00
wlan0 ee941e979b make ssh username configurable for ec2
Signed-off-by: wlan0 <sidharthamn@gmail.com>
2015-04-07 18:00:06 -07:00
Guillaume Giamarchi fb1362ea05 Remove dead code
Signed-off-by: Guillaume Giamarchi <guillaume.giamarchi@gmail.com>
2015-03-27 19:25:11 +01:00
Nathan LeClaire and Simon Thulborn 49feb33457 Implement majority of provisioning changes
Signed-off-by: Simon Thulborn <simon+github@thulborn.com>
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-03-20 16:30:46 -07:00
Evan Hazlett 5403171328 ec2: fix bug where ip address was not updated upon restart
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-17 11:08:20 -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 645bf8ab90
amazonec2: add SSHUser to driver
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-11 22:04:52 -04:00
Evan Hazlett 3347d1e82f
rename HypervisorType to ProviderType
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-09 16:03:36 -04:00
Evan Hazlett c76d1a253f
revert to GetSSHHostname based on feedback from @nathanleclaire
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-09 15:55:18 -04:00
Evan Hazlett 0577f66f5d
initial work to get amazonec2 and none drivers to upgrade driver interface
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-09 12:50:40 -04:00
Evan Hazlett b8ef936e90
add AuthorizePort and DeauthorizePort
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-09 10:50:48 -04:00
Nathan LeClaire 1e983d5ff6 Introduce universal poll retries function
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-03-04 16:41:48 -08:00
Nathan LeClaire 8d0bf21c6d Fix panic when instance doesn't exist remotely
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-03-03 14:48:04 -08:00
Nathan LeClaire a7d1a70442 Fix IP address not being set correctly due to race
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-03-03 14:47:06 -08:00
Nathan LeClaire 3a030c9ccb Clean up unused function
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-03-03 11:18:08 -08:00
Evan Hazlett 2ea5a976d8
ec2: fix iam test
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-02 17:20:47 -05:00
Evan Hazlett 5f01d4cda5 Merge pull request #449 from sthulb/aws-assign-roles
IRC Req: EC2 IAM Instance Profile
2015-03-02 17:12:27 -05:00
Evan Hazlett 2792f1ec89
ec2: update tests for configuring ip permissions
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-02 16:21:14 -05:00
Simon Thulbourn 2ce70bf5ac adds the ability to set an instance role for ec2 instances
Signed-off-by: Simon Thulbourn <simon+github@thulbourn.com>
2015-03-02 19:01:22 +00:00
Evan Hazlett f0c70ee8ed ec2: do not try to auth swarm port if exists
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-02 13:14:41 -05:00