Commit Graph

36 Commits

Author SHA1 Message Date
Davanum Srinivas 36164b0ccf Initial cut of standalone docker-machine driver for openstack
* Picked up the openstack driver code from docker/machine
2017-03-16 16:28:21 -04:00
Mathias Nyman bdd3b24cdc Add support for OS_CACERT in Openstack driver
This enables using docker-machine's openstack driver without having to
resort to using the --insecure flag.

Signed-off-by: Mathias Nyman <mathias.nyman@iki.fi>
2016-06-02 16:52:27 +03:00
Wade Tandy c17f42fab5 Expose OpenStack driver's userdata param
This allows a user to pass a script or cloud-config file that can be
used to initialize the server before the server starts up. This
is particularly useful in enterprise cloud environments where the
available images on openstack might not be fully compatible with the
docker-machine provisioners.

Signed-off-by: Wade Tandy <wtandy@bloomberg.net>
2016-04-22 18:06:09 -04:00
Nathan LeClaire 1ffea5ceed Revert "Rackspace/Openstack - Add/enhance --*-net-* create switches."
This reverts commit 07cadc68a53c818bf83806e854bbe6ac1ddeda66.

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2016-02-26 11:24:23 -08:00
Robert Jones c29d944831 Rackspace/Openstack - Add/enhance --*-net-* create switches.
Signed-off-by: Robert Jones <robert@justjones.org>
2016-02-21 11:23:38 -06:00
Fabrizio Soppelsa 7400e6f965 Add --openstack-key-pair and --openstack-private-file-name so to
import and reuse existing nova keypairs.

Signed-off-by: Fabrizio Soppelsa <fsoppelsa@mirantis.com>
2015-12-29 11:43:00 -08:00
Matt Vinall 2f482ac085 Filter openstack floating IPs by tenant ID
Merge j2sol:filter-openstack-floating and fix up for comments in PR #1809.

Signed-off-by: Matt Vinall <matt.vinall@imgtec.com>
2015-12-15 22:30:49 +00:00
Jean-Laurent de Morlhon bae895ef81 Remove withFields
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-12-07 10:34:43 +01:00
Olivier Gambier b153a9c218 Another pass at linting
Signed-off-by: Olivier Gambier <olivier@docker.com>
2015-11-10 16:58:14 +01:00
Olivier Gambier b50d6187d5 Lint
Signed-off-by: Olivier Gambier <olivier@docker.com>
2015-11-05 13:34:07 -08:00
Jeremy White 2abe8969aa feat(openstack): add flag for using nova networks
Signed-off-by: Jeremy White <dudymas@gmail.com>
2015-10-21 16:03:26 -04:00
Christian Mouttet cdb1557cac add default AddressType: Fixed
Signed-off-by: Christian Mouttet <cmouttet@gmail.com>
2015-10-10 17:19:45 +02:00
Hironobu Saitoh 59545198ab Add --openstack-ip-version option
This option allows users to specify IP version.

Signed-off-by: Hironobu Saitoh <hiro@hironobu.org>
2015-10-09 07:29:48 +09:00
Nathan LeClaire 71069cfc1d 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
David Zerulla dec4514e15 openstack: New machine active timeout parameter
* Adds `--openstack-active-timeout` parameter to set the timeout
  until a machine is active. Closes #1632

Signed-off-by: David Zerulla <ddaze@outlook.de>
2015-08-11 17:45:08 +02:00
Nathan LeClaire f589ab90e1 - Re-introduce config migration; fix panics occurring from older configs
- Introduce boilerplate for config.json migrations

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-07-28 15:38:16 -07:00
LingFaKe e10e42cbb7 Add option parameter availability_zone
Signed-off-by: Ling FaKe <lingfake@huawei.com>
2015-06-05 17:37:43 -07:00
Guillaume Giamarchi 641d5bde24 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
Nathan LeClaire b61b772e73 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
Guillaume Giamarchi 9bd93be4e7 Support Keystone v3 domains
Fix #679

Signed-off-by: Guillaume Giamarchi <guillaume.giamarchi@gmail.com>
2015-04-09 17:40:21 +02:00
Ash Wilson 549afa8ac5 Prepend a string to the User-Agent.
For both OpenStack and Rackspace drivers.

Signed-off-by: Ash Wilson <ash.wilson@rackspace.com>
2015-03-23 11:42:24 -04:00
Guillaume Giamarchi b5dd34a90e HTTP configuration it done too late
The HTTP transport configuration should be
done before the authentication request.

Signed-off-by: Guillaume Giamarchi <guillaume.giamarchi@gmail.com>
2015-02-26 09:12:13 -06:00
Ash Wilson bd2bdda827 Use --openstack-insecure to disable TLS checking.
At your own risk!

Signed-off-by: Ash Wilson <ash.wilson@rackspace.com>
2015-02-26 09:12:13 -06:00
Evan Hazlett 4fb5b7be8d common logging for rackspace
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-02-24 10:52:40 -05:00
Evan Hazlett 39b7fc1464 tls fixes to support swarm; test updates; improved provisioning logging
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-02-20 13:07:20 -08:00
Ash Wilson bc00a48dc5 OpenStack driver enhancements
* Log machine creation.
* Typo in an error message 💅
* Shelve docker install output in /var/log.
* Improve the docker installation error message. Also, keep it from interrupting the host creation, so that you can actually run `machine ssh` or `machine rm` on the host afterward.

Signed-off-by: Ash Wilson <ash.wilson@rackspace.com>
2015-01-14 23:15:32 +01:00
Guillaume Giamarchi 9e315f3d5a Support floating IP allocation and assignation
Signed-off-by: Guillaume Giamarchi <guillaume.giamarchi@gmail.com>
2015-01-14 23:11:12 +01:00
Ash Wilson e8f14c66b9 Fix syntax and move init calls to the driver.
Signed-off-by: Ash Wilson <ash.wilson@rackspace.com>
2015-01-14 22:01:32 +01:00
Ash Wilson 5ba750a754 Override GetInstanceIpAddresses for Rackspace.
Signed-off-by: Ash Wilson <ash.wilson@rackspace.com>
2015-01-14 22:01:32 +01:00
Ash Wilson 3589483f0c Fixes on OpenStack and Rackspace drivers
* Use the initialized client
* Fix the endpointType conditional
* Don't die if OS-EXT-IPS is not present
* Only log Openstack creation for Openstack drivers
* There's no option for MachineName, yet

Signed-off-by: Ash Wilson <ash.wilson@rackspace.com>
2015-01-14 22:01:32 +01:00
Ash Wilson 04a68c5ff0 Init methods are no-ops when already initialized.
Signed-off-by: Ash Wilson <ash.wilson@rackspace.com>
2015-01-14 22:01:32 +01:00
Ash Wilson 7ecc0da2d3 Make service init calls into the driver methods.
Otherwise, because of the way Go does method dispatch, derived versions of
those methods will never be called.

Signed-off-by: Ash Wilson <ash.wilson@rackspace.com>
2015-01-14 22:01:32 +01:00
Ash Wilson 8636f77504 Initial cut at a Rackspace driver.
* Wrap openstack.Client in an interface.
* Alternate openstack Driver creation method.
* Register the Rackspace driver in commands.go.

Signed-off-by: Ash Wilson <ash.wilson@rackspace.com>
2015-01-14 22:01:31 +01:00
Vincent Giersch 04b629d8e9 OpenStack: Add inputs flavor, image and network by name
Added parameters:
    --openstack-image-name
    --openstack-flavor-name
    --openstack-net-name

Signed-off-by: Vincent Giersch <vincent.giersch@ovh.net>
2015-01-14 22:01:31 +01:00
Vincent Giersch bd66b4169d OpenStack: Switch some Info log to Debug
Allow to use $(machine url) without having to pipe the
result due to too verbose Info logs.

Signed-off-by: Vincent Giersch <vincent.giersch@ovh.net>
2015-01-14 22:01:31 +01:00
Guillaume Giamarchi 6ce0464a06 Add OpenStack driver
Signed-off-by: Guillaume Giamarchi <guillaume.giamarchi@gmail.com>
2015-01-14 22:01:31 +01:00