Commit Graph

28 Commits

Author SHA1 Message Date
David Gageot f09bbb8f7f Increase the provisioning timeout
Signed-off-by: David Gageot <david@gageot.net>
2015-12-14 14:15:51 +01:00
Jean-Laurent de Morlhon a55bba3ed2 Move tls-san flag to a local flag for create
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-11-23 12:40:07 +01:00
Sam Alba 5b453e6305 Implemented '--tls-san' global arg for adding extra SANs (subject alt names) to server-side certificates
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2015-11-23 12:17:29 +01:00
David Gageot a618a029cf Merge pull request #2327 from nathanleclaire/netstat_add_flga
Add -n to get port number for netstat
2015-11-18 09:27:10 +01:00
Nathan LeClaire 1bdedc6ea2 Add -n to get port number for netstat
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-11-17 18:24:44 -08:00
Nathan LeClaire a020c3eac7 Delete bridge after powering daemon down
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-11-06 17:49:33 -08:00
Olivier Gambier d2ada6488c Lint
Signed-off-by: Olivier Gambier <olivier@docker.com>
2015-11-05 13:34:07 -08:00
Olivier Gambier 19fc49b58a Lint, step 1
The easy stuff

Signed-off-by: Olivier Gambier <olivier@docker.com>
2015-11-04 14:17:58 -08:00
Dave Goehrig 1df80ba111 Adding localhost to the list of alt_names
When attempting to connect to the docker api from the machine itself,
the TLS verification of the certificate checked against the public
IP address of the primary interface.  This is undesirable on hosts
which have NAT rules that block access to that address by default.

Adding "localhost" to the list of alt_names allows the cert to be
verified and connections to localhost (either 127.0.0.1 or [::1]) to
the port to pass verification. Otherwise one would need to disable
verification just to connect to the local docker instance.

Signed-off-by: David Gageot <david@gageot.net>
2015-10-23 09:57:55 +02:00
Olivier Gambier c60b2cb2f9 Merge pull request #1910 from posita/posita/1880-ssl-cert-snafu
READY FOR REVIEW - Work-around erroneous SSL: CERTIFICATE_VERIFY_FAILED error with some buggy versions of OpenSSL
2015-10-22 09:57:56 -07:00
David Gageot e2b6a832ac Add more debug during certificates validation
Signed-off-by: David Gageot <david@gageot.net>
2015-10-22 11:11:31 +02:00
Matt Bogosian f80dc360c7 Inspired by #1880 (and docker/compose#890 et al.). Make sure `ca.pem` subject is different from `cert.pem` subject to work-around OpenSSL bug.
Signed-off-by: Matt Bogosian <mtb19@columbia.edu>
2015-10-21 17:53:15 -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 9453df4859 Fix Docker daemon wait
Also, a few various cleanups are bundled:

1. Only call GetDriver() once to get the object in provision/utils.go
2. SSH command wrapper will return the error and let the consumer decide
   what to do with it instead of bailing automatically on non-255

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-09-23 15:19:25 -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
Xiaohui 102007b231 separate pkgaction into 'pkgaction' and 'serviceaction'
ignored IntellJ IDEA files

Signed-off-by: Xiaohui Liu <xiaohui.liu@ucloud.cn>
2015-09-17 11:15:38 +08:00
Ryan Grothouse d553a2c757 added support for setting environment variables in docker engines
Signed-off-by: Ryan Grothouse <rgrothouse@gmail.com>
2015-07-16 16:12:06 -04:00
Evan Hazlett cf0aee9fd7
support specifying swarm image and docker versions
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-06-01 16:20:56 -04:00
Nathan LeClaire 47bd262260 Implement configurable Swarm options
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-05-26 10:18:34 -07:00
Evan Hazlett 5707f13689 redhat: update for generic provisioner
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-05-26 12:22:27 -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
Nathan LeClaire 8afddbeab8 Fix cert copying bug
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-05-13 22:19:27 -07:00
Nathan LeClaire 7f6d19ff47 Fix a few issues with certs
- regenerate-certs was busted, because of recent changes I made to
  Provision() method
- checksum was different between local certs and remote certs

This PR fixes both issues and adds tests to verify that both conditions
are checked in the future.

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-05-12 15:11:23 -07: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
Nathan LeClaire 2574c8ba5d Implement configurable engine options
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-04-29 17:58:14 -07:00
Simon Thulbourn 709b0a84e3 Add SSH client
Signed-off-by: Simon Thulbourn <simon+github@thulbourn.com>
2015-04-21 15:37:09 +01:00
Nathan LeClaire 3b2c8f9845 Migrate (swarmConfig) => (swarmOptions)
and (SwarmConfig) => (SwarmOptions)

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>

Migrate (authConfig) => (authOptions)
        (AuthConfig) => (AuthOptions)

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>

Migrate (hostConfig) => (hostOptions)
        (HostConfig) => (HostOptions)

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-03-20 23:20:11 -07: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