Commit Graph

109 Commits

Author SHA1 Message Date
Jean-Laurent de Morlhon 03171b8d21 Merge pull request #2727 from soleo/1986-aws-optional-tags
#1986 aws optional tags for AWS EC2
2016-01-04 16:34:00 +01: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
Xinjiang Shao c59c8a60c5 Add --amazonec2-tags for extra tags assignment support. Ref #1986
Signed-off-by: Xinjiang Shao <shaoxinjiang@gmail.com>
2016-01-04 09:19:36 -06: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
ryo nakamaru 28ac085cdd Fixes aws-ec2 initiated shutdown caused by constant DeviceName (/dev/sda1)
Signed-off-by: ryo nakamaru <pottava@gmail.com>
2015-12-28 17:43:41 +09:00
Jean-Laurent de Morlhon 45cf74508a Better naming & cleanup
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-12-24 16:11:46 +01:00
Euan b41ead67ec Remove unneeded 'amz' package
Deprecated by the conversion to the upstream SDK

Signed-off-by: Euan <euank@euank.com>
2015-12-24 15:58:49 +01:00
Euan 8d98d2b7b7 amazonec2: Convert EC2 API calls to official SDK
This does an almost 1-to-1 translation of API calls.

The differences are as follows:
1. Use the SDK waiter for spot instance request fulfillment
2. Uses the toplevel private/public ip fields instead of the
   networkinterface's fields
3. Recognizes the 'Terminated' state as an error explicitly instead of
   implicitly.
4. Uses filters on DescribeSecurityGroups to find the correct one more
   efficiently and to limit to a given VPC.

Other than that, it really should be identical apart from the perhaps
obvious error message differences.

Signed-off-by: Euan <euank@euank.com>
2015-12-24 15:57:02 +01:00
Thomas Recloux 0408378332 AWS : update default images to ubuntu 15.10
Signed-off-by: Thomas Recloux <thomas.recloux@gmail.com>
2015-12-03 14:50:21 +01:00
Jean-Laurent de Morlhon 6d5bc99387 Typo
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-11-30 17:23:11 +01:00
Nathan LeClaire 47da7f8314 Add interfaces for CLI unit testing and env test
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-11-24 18:09:27 -08: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 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