87 Commits

Author SHA1 Message Date
Mario Kleinsasser
83812d4275 Fix #4244
Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>

Change fmt

Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>

Correct lint

Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>

Change the subnet check logic

Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>
2017-10-12 18:32:45 -07:00
Mario Kleinsasser
f3af489677 Fix #3976
Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>

Change storage account deletion logic to fix #3976

Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>
2017-10-10 17:01:20 -07:00
Joffrey F
97c1136d1e Remedy updated linter errors
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-10-02 13:44:36 -07:00
Aaron.L.Xu
bfd2546447 fix typos in project scope
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
2017-02-10 13:40:04 +08:00
Nathan LeClaire
19973f2b1b Fix golint errors
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2016-11-15 17:14:17 -08:00
Ahmet Alp Balkan
bb739042d8 drivers/azure: add AzureGermanCloud support
Fixes #3815.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2016-10-18 19:01:15 -07:00
Ahmet Alp Balkan
327b92124d Update azure driver dependencies
In order to address #3815, bringing azure dependencies to
more up-to-date versions. Also fixing some code caused by
breaking changes introduced in Azure SDK.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2016-10-12 15:02:17 -07:00
Ahmet Alp Balkan
1c8df0535a azure: do not reuse service principal accounts for other machines
This prevents --azure-client-id/--azure-client-secret pair provided
for a machine to be reused by other machines created under the same
subscription.

Fixes #3782.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2016-09-29 13:08:01 -07:00
Nathan LeClaire
ab291f8762 Merge pull request #3784 from ahmetalpbalkan/azure-fqdn
azure: add flag for static dns label
2016-09-26 12:54:40 -07:00
André Carvalho
688a6ce708 drivers/azure: fix security rule naming
This removes forbidden characters from the security rule naming,
which prevents the user from creating security rules using
custom protocols.

Signed-off-by: André Carvalho <andre.carvalho@corp.globo.com>
2016-09-24 22:32:31 -03:00
Ahmet Alp Balkan
7e5bda734c azure: add flag for static dns label
Introducing --azure-dns argument which associates a FQDN to the
created public IP resource for the VM.

e.g. a value like 'foo' will be later used as IP 'foo.westus.azure.cloudapp.net'.

Also modifying `ip` subcommand to operate on FQDN, where possible.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2016-09-23 17:19:07 -07:00
André Carvalho
dd6aba6f35 driverutil: removes unused err return
Signed-off-by: André Carvalho <andre.carvalho@corp.globo.com>
2016-08-22 09:42:05 -03:00
André Carvalho
16bf6769ed driverutil: refactor splitPortProto to parse port as str
Signed-off-by: André Carvalho <andre.carvalho@corp.globo.com>
2016-08-22 09:29:51 -03:00
André Carvalho
7539b9154f driver/util: rename util pkg to driverutil
Signed-off-by: André Carvalho <andre.carvalho@corp.globo.com>
2016-08-22 09:22:21 -03:00
André Carvalho
270219e848 azure: add support for custom protocol in --azure-open-port
This makes the --azure-open-port flag behave like
--amazonec2-open-port flag, enabling the user to provide a
protocol for the port, in the format port/protocol.

Signed-off-by: André Carvalho <andre.carvalho@corp.globo.com>
2016-08-20 16:39:52 -03:00
Ahmet Alp Balkan
a750b98c78 azure: increase log level for info statement
This should have been info in the first place.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2016-08-18 11:48:55 -07:00
Ahmet Alp Balkan
1d0c3226ea azure: bump default image to Ubuntu 16.04.0-LTS
Ubuntu 15.10 image is EOL'd and removed from azure.
Closes #3676.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2016-08-18 11:43:39 -07:00
Nathan LeClaire
29494f1661 Merge pull request #3666 from ahmetalpbalkan/azure-xvnet
azure: allow vnets from another resource group
2016-08-16 13:49:15 -07:00
Ahmet Alp Balkan
681272869d azure: allow vnets from another resource group
This change adds support specifying Virtual Networks from another
Resource Group. Most Azure customers already have existing resource
groups and Virtual Network resources that they attach to the new
machines they create.

`--azure-vnet` flag will automatically work with `[group:]name`
format.

Fixes #3656.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2016-08-15 14:24:52 -07:00
Ahmet Alp Balkan
81b76355c6 azure: Service principal authentication
This adds authentication mode for Azure driver that will

- allow users to authenticate clients without browser window
  (recommended for headless applications) (fixes #3201, fixes #3493,
  fixes #3199)
- allow clients to have long-lived credentials (as opposed to current
  model that expires every 2 weeks and requires interactive auth again)

Added azure argument `--azure-client-id` & `--azure-client-secret`
and updated docs accordingly.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2016-08-15 12:56:29 -07:00
Amir Mohammad Saied
a122156437 Add custom-data support to Azure driver (#3592)
Add custom-data support to Azure driver

Signed-off-by: Amir Mohammad Saeid <amirsaied@gmail.com>
2016-08-01 16:10:29 -07:00
Nathan LeClaire
73199a4e40 Merge pull request #3550 from ahmetalpbalkan/azure-storage-type
azure: add --azure-storage-type flag
2016-07-28 11:54:57 -07:00
Ahmet Alp Balkan
af44041f28 azure: another cross-fs tempfile moving fix
Actually fixes #3313.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2016-07-08 10:04:05 -07:00
Ahmet Alp Balkan
2cd6d1f043 azure: add --azure-storage-type flag
This allows users to specify type of Azure Storage account
to be used to run the machine’s disk and enables users to create
SSD-backed machines.

Fixes #3542.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2016-06-27 18:51:29 -07:00
Xavier Ziemba
10b2b9f3be Fix Default Address Space for Azure VNets
RFC 1918 specifies 10.0.0.0/8, not 10.0.0.0/6, as part of the private
network address space. This fixes what appears to be a typo.

Signed-off-by: Xavier Ziemba <xy.ziemba@gmail.com>
2016-04-20 16:11:15 -07:00
Ahmet Alp Balkan
6c3faf7d05 azure: more accurate messages for resources created
Addresses #3250. We now print 'Configuring' instead of
'Creating' for upsert operations.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2016-04-03 17:23:29 -07:00
Ahmet Alp Balkan
8a0e6946b5 driver/azure: atomic write for tenant ID file
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2016-03-30 13:14:50 -07:00
Ahmet Alp Balkan
500d7d20c5 driver/azure: Performance improvements
Making Azure operation polling intervals more frequent to
detect completions faster (and thus making machine creations
faster).

Reduce one Azure API call for each machine command by caching
the discovered Azure Active Directory tenant ID of the user’s
Azure subscription into a local file. This also makes Azure
driver commands faster.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2016-03-30 12:26:23 -07:00
Ahmet Alp Balkan
b898c07ad6 azure: Add --azure-static-public-ip flag
This flag creates Azure VMs with static public IPs that don’t
get released when the VM is deallocated.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2016-03-14 21:47:51 -07:00
Ahmet Alp Balkan
44200e7a04 Case-insensitive Azure Resource Provider matching
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2016-03-12 18:18:53 -08:00
Ahmet Alp Balkan
ce3cb54482 Update default image to Ubuntu 15.10
- Default image now is ubuntu server 15.10. This ensures consistency with
  other cloud drivers.
- Better error message when virtual machine already exists.
- Change default SSH user from `ubuntu` to `docker-user`.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2016-03-10 16:36:21 -08:00
Ahmet Alp Balkan
7b96160454 Friendly deprecation notice for old driver VMs
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2016-03-09 15:43:49 -08:00
Ahmet Alp Balkan
ed95f3baab New Microsoft Azure docker-machine driver
The new driver uses Azure Resource Manager APIs and offers a lot
more functionality compared to the old Azure driver. It is also
easier to authenticate and does not require user to create and place
certificate files. It only has a single required argument.

This is a breaking change: The new driver cannot work with machines
created with the older Azure driver and vice versa (as the APIs are
entirely different and resources are not shared between old/new azure
APIs).

The new driver addresses many issues about the azure driver reported
so far.

This resolves #2742, resolves #1368, resolves #1142, resolves #2236,
resolves #2408, resolves #1126, resolves #774.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2016-03-07 19:55:51 -08:00
Ahmet Alp Balkan
b53f020c90 Remove azure driver temporarily
This commit temporarily removes Azure driver and its dependencies
from the source tree and adds dependencies for the new Azure driver
(so that Azure driver PR will not have godeps changes and will be
easier to review).

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2016-03-07 13:34:09 -08:00
David Gageot
ffb9cbed7a FIX #3056 ls timeout when instance is stopped
Signed-off-by: David Gageot <david@gageot.net>
2016-02-17 18:09:39 +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
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
Thomas Recloux
977fa7e48f Azure : update default image to ubuntu 15.10
Signed-off-by: Thomas Recloux <thomas.recloux@gmail.com>
2015-12-03 19:14:08 +01: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
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
Olivier Gambier
b6462eb6d0 Remove useless duplication on GetSSHHostname
Signed-off-by: Olivier Gambier <olivier@docker.com>
2015-10-21 13:48:13 -07: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
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
Anurag Gupta
938290f773 removed extra code and fixed code formatting in azure addDockerEndpoint
Signed-off-by: Anurag Gupta <agup006@gmail.com>
2015-08-06 18:32:30 +00:00
Anurag Gupta
99544a4cb0 Add Azure Swarm Master Port endpoint configuration when using docker machine.
Signed-off-by: Anurag Gupta <agup006@gmail.com>
2015-08-05 08:17:51 +00: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