Commit Graph

34 Commits

Author SHA1 Message Date
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
Evan Hazlett 3c712ae30a
change debug env var to MACHINE_DEBUG
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-09-05 08:57:03 -04:00
Nathan LeClaire fb2e843e99 - 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
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 9196d3e1d4 Fix up some whitespace nits
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-05-07 10:12:21 -07:00
Evan Hazlett b0ae0edd32 Merge pull request #1080 from nathanleclaire/shorter_store_flag
Add short form of --storage-path flag
2015-05-01 14:56:49 -04: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 4e9fc9c248 Add short form of --storage-path flag
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-04-30 11:50:09 -07:00
Dave Henderson 6418fbb3d4 Reformatting command-specific usage message
Signed-off-by: Dave Henderson <Dave.Henderson@ca.ibm.com>
2015-04-28 14:11:01 -04:00
Dave Henderson d9ae6dd871 Reformatting usage message to look more like docker's
Signed-off-by: Dave Henderson <Dave.Henderson@ca.ibm.com>
2015-04-28 12:31:39 -04:00
Dave Henderson 53ef9d7477 Refactoring commands.go into new commands package, with separate file for each subcommand
Signed-off-by: Dave Henderson <Dave.Henderson@ca.ibm.com>
2015-04-15 19:04:44 -04:00
Evan Hazlett d8bd18d3bb add git commit to version info
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-20 14:41:48 -04:00
Evan Hazlett abd43e8d18
fix storage-path bug
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-20 00:08:58 -04:00
Evan Hazlett fe912ae55a
fixed bug with storage-path
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-19 23:19:13 -04:00
Evan Hazlett 27be8cf28e initial pass at internal api
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-19 18:09:30 -04:00
Evan Hazlett 7a101ac92c
refactor directories to machines, certs, cache
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-02-25 12:32:41 -05:00
Evan Hazlett be0cddd2ed
fixes the "unknown" author in the cli help
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-02-09 09:31:40 -05:00
Simon Thulbourn 3d9f1ed8e8 move cert creation to create commandw
Signed-off-by: Simon Thulbourn <simon+github@thulbourn.com>
2015-02-02 15:41:23 +00:00
Evan Hazlett 720c4edfd2
check properly for username on different platforms
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-01-27 10:28:55 -05:00
Evan Hazlett d48c0f4157
use server and username for certificate subject and issuer
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-01-26 17:56:33 -05:00
Evan Hazlett aae6f74f84
use MkdirAll for docker machine config path
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-01-25 23:43:59 -05:00
Evan Hazlett d0fd57a1e5
check for .docker dir and create if necessary
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-01-24 15:10:52 -05:00
Evan Hazlett a60f0e672e add shellinit command for displaying environment for docker client
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-01-23 23:18:38 -05:00
Evan Hazlett b0e329b53e use separate dir for client certs so docker client can use them
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-01-23 22:31:53 -05:00
Evan Hazlett 74f9bcebc7 only create ca and client cert once; create server keys each time; add serverAuth to ext usage
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-01-23 22:31:53 -05:00
Radek Simko 934ae47555 Use binary file name instead of full path
Signed-off-by: Radek Simko <radek.simko@gmail.com>
2015-01-23 15:14:22 +00:00
Evan Hazlett 29c1eb9080 Merge pull request #292 from radeksimko/bin_name_fix
Use actual binary name instead of hardcoding it
2015-01-22 12:44:26 -05:00
Radek Simko 13fd5f07a3 Use actual binary name instead of hardcoding it
Signed-off-by: Radek Simko <radek.simko@gmail.com>
2015-01-17 20:13:31 +00:00
Evan Hazlett 4534944f6a use tls for auth
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-01-15 22:56:24 -05:00
Simon Thulbourn c8b36dfbfc Add unknown command help
Spits out "machine: '<command>' is not a machine command see 'machine
--help'" to be inline with Docker

Signed-off-by: Simon Thulbourn <simon+github@thulbourn.com>
2015-01-09 23:38:59 +00:00
Simon Thulbourn 003c0dd093 Configurable storage path
As per #77, this PR adds --storage-path/MACHINE_STORAGE_PATH (env var)
to allow the user to specify where they want to store the machine db

Signed-off-by: Simon Thulbourn <simon+github@thulbourn.com>
2014-12-26 19:57:48 +00:00
Simon Thulbourn 64c73597e2 adds codegangsta/cli
Signed-off-by: Simon Thulbourn <simon+github@thulbourn.com>
2014-12-12 18:11:17 +00:00
Damien DUPORTAL 8e7e8b924b little typo in the usage strings
Signed-off-by: Damien DUPORTAL <damien.duportal@gmail.com>
2014-12-08 09:44:21 +00:00
Ben Firshman 73d19108bf Initial commit
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2014-12-04 15:05:11 +01:00