Commit Graph

131 Commits

Author SHA1 Message Date
Justin Cormack
3375f32d51 Merge pull request #9 from riyazdf/docker-api-usage
Use Docker API for part of tool
2017-04-28 11:48:52 +01:00
Riyaz Faizullabhoy
37f57cfa84 Use Docker API for rm, create, export, and inspect
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-27 14:09:17 -07:00
Riyaz Faizullabhoy
fcdfe5c356 vendor new client and api
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-27 13:31:16 -07:00
Justin Cormack
4694f5a7ec Merge pull request #7 from justincormack/makefile
Add a simple Makefile
2017-04-27 14:29:26 +01:00
Justin Cormack
719025a708 Add a simple Makefile
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-27 14:25:07 +01:00
Justin Cormack
7517c830d7 Merge pull request #6 from AkihiroSuda/stdin
build: support reading yaml from stdin
2017-04-27 14:12:34 +01:00
Akihiro Suda
d98f23c2ba build: support reading yaml from stdin
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-04-25 10:26:34 +00:00
Justin Cormack
75a784f74b Merge pull request #3 from justincormack/clean-vendor
Clean vendor directory
2017-04-25 00:07:00 +01:00
Justin Cormack
08e1ca0795 Clean vendor directory
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-25 00:06:11 +01:00
Justin Cormack
3527ecc6d9 Merge pull request #2 from justincormack/license
Add license files
2017-04-24 23:09:21 +01:00
Justin Cormack
ba3d79a258 Add license files
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-24 23:08:30 +01:00
Justin Cormack
8fa71bd1a9 Merge pull request #1 from justincormack/vendor
Add vendoring and move to cmd
2017-04-24 23:07:08 +01:00
Justin Cormack
fa88ca8ede Move src/cmd to cmd
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-24 22:58:37 +01:00
Justin Cormack
81288f9221 Add vendoring
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-24 22:56:08 +01:00
Justin Cormack
8968335e59 Split cli into moby and linuxkit
moby just does the simple `build` cases, while `linuxkit` does
`push` and `run`.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-24 20:03:22 +01:00
Justin Cormack
4e1317d213 Split build and push, and remove push code from run
This currently only changes the `gcp` target, but is the new
model - the `build` command will only do things locally, then
you need to `push` to an image store such as GCP or other ones
in order to `run` for platforms that cannot boot directly from
a local image.

Fix #1618

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-24 17:12:05 +01:00
Dave Tucker
b556f51b47 moby: Add container fallback for moby run qemu
This commit allows moby run qemu to fallback to using a container if
qemu isn't installed on the host OS

Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-24 15:16:57 +01:00
Rolf Neugebauer
9deb9c044d src: Use hyperkit from the the moby org
HyperKit got moved from docker to moby. Update vendoring and
imports.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-24 10:53:59 +01:00
Riyaz Faizullabhoy
c1a5c412fb Merge pull request #1653 from dave-tucker/ltp-ci
Changes required to run LTP tests in CI
2017-04-23 13:22:40 -07:00
Dave Tucker
327138876a moby: add skip-cleanup flag to moby run gcp
This is used as the CI will cleanup after itself

Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-19 16:02:48 +01:00
Daniel Finneran
85b33baf58 Fix for prefix for linuxkit
Signed-off-by: Dan Finneran <daniel.finneran@gmail.com>
2017-04-18 19:00:31 -05:00
solidnerd
bd8017a4e1 Rename package initrd in build.go
This will rename github.com/docker/moby/src/initrd to github.com/linuxkit/linuxkit/src/initrd

Signed-off-by: solidnerd <niclas@mietz.io>
2017-04-18 20:19:21 +02:00
Rolf Neugebauer
49d735bc2f cli: Unify environment variables for GCP run
GCP defines some "standard" environment variables for project and
zone. Use them for 'moby run gcp'. Change the other environment
variables to follow the same pattern.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-15 12:36:46 -05:00
Rolf Neugebauer
481d584659 cli: Update images to use the linuxkit hub org
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-12 21:28:17 +01:00
Ilya Dmitrichenko
31f5a0baa8 Generate VM UUID
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2017-04-12 17:33:26 +01:00
Thomas Gazagnaire
4504e6d386 fix yaml validation for image mounts
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-12 15:28:02 +02:00
Justin Cormack
8f18d92bee Merge pull request #1599 from avsm/packet-net-run
Add `moby run packet` to boot on baremetal Packet.net hosts
2017-04-12 13:40:50 +01:00
Thomas Gazagnaire
b9a964060b better comment in converter for yaml validation
Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-12 14:10:27 +02:00
Anil Madhavapeddy
0175778e83 Add moby run packet to boot on baremetal Packet.net hosts
This uses the Packet.net API and iPXE to boot a Moby host.
There are several enhancements coming soon, such as SSH key
customisation, but this PR is sufficient to boot a host and
then use the web interface to get console access.

The user must currently upload the built artefacts to a public
URL and specify it via --base-url, e.g.:
moby run packet --api-key <key> --project-id <id> \
  --base-url http://recoil.org/~avsm/ipxe --hostname test-moby packet

See #1424 #1245 for related issues.

Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-04-12 12:59:05 +01:00
Thomas Gazagnaire
02038f512d Add Yaml validation
Fix #1292

Transform the Yaml struct to JSON and validate it against a JSON schema.

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2017-04-12 13:42:15 +02:00
Justin Cormack
c9c6d20a45 Merge pull request #1596 from thebsdbox/qemu_raw_disk
Fixed qemu argument typo and also correct use of raw disk
2017-04-12 12:03:33 +01:00
thebsdbox
f7210ab4b4 Fixed qemu argument typo and also correct use of raw disk
Signed-off-by: Dan Finneran <daniel.finneran@gmail.com>
2017-04-12 11:19:58 +01:00
Dave Tucker
d5264ac9e7 moby: Add system disk and disk size parameter to GCP
This makes gcp behave in a similar way to the qemu backend.
The minimum size on GCP 1GB, whereas qemu uses 256MB.
Without this, the LTP tests fail on GCP.

Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-12 00:52:01 +01:00
Dave Tucker
52f62bb30c moby: enable internet access for GCP VM's
Adds an "access config" with a type of "ONE_TO_ONE_NAT" that
allows an instance to obtain an ephemeral IP address and access the
internet

Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-11 23:36:31 +01:00
thebsdbox
b6e8d4fd63 Added Linux $PATH support and fixed FlagSet typo
Signed-off-by: Dan Finneran <daniel.finneran@gmail.com>
2017-04-11 11:48:51 +01:00
Anil Madhavapeddy
eae5422a0d tweak moby run CLI help to reflect that it supports GCP as well
Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-04-11 11:18:55 +01:00
Justin Cormack
5527a3b6a1 Merge pull request #1577 from riyazdf/errchecking
catch and handle errors in src/cmd/moby
2017-04-10 21:48:41 +01:00
Riyaz Faizullabhoy
37adb881f7 catch and handle errors in src/cmd/moby
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-10 13:36:46 -07:00
Riyaz Faizullabhoy
0aaeb92a44 qemu: catch error on disk create and exit with message
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-10 12:09:54 -07:00
Justin Cormack
d11a78982a Merge pull request #1571 from dave-tucker/panic
Fix panic in gcp code
2017-04-10 17:37:52 +01:00
Dave Tucker
7d519cb9b8 moby: use type assertion to avoid panic in gcp code
Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-10 17:29:59 +01:00
Rolf Neugebauer
650d9011f4 cli: Adjust run_hyperkit to changed API
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-10 15:56:20 +01:00
Justin Cormack
66467544be Merge pull request #1521 from thebsdbox/qemu
CLI: Added qemu backend
2017-04-09 13:56:09 +01:00
thebsdbox
3446edbd0b CLI: Added qemu backend
Signed-off-by: Dan Finneran <daniel.finneran@gmail.com>
2017-04-09 13:49:00 +01:00
Riyaz Faizullabhoy
bd2211b645 trust: clean up logic for digests and orgs
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-08 17:25:18 -07:00
Justin Cormack
8176403426 system → onboot daemon → services
As suggested by @shykes these are clearer

- onboot for things that are run at boot time to completion
- services for persistent services

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-08 16:56:47 +01:00
Riyaz Faizullabhoy
68d8788e3b Enforce content trust with trust key and yaml subkeys for image and org
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-07 16:29:25 -07:00
Dave Tucker
799879d76d moby: Add -img-name flag to moby run gcp
This allows overriding the name used of the file in google storage,
image name or instance name. This will vary depending on how much `moby
run` is doing which is goverened by whether the positional argument
contains an `.img.tar.gz` or not.

For example:

`moby run gcp -img-name test-ea34d1 test` creates an instance called
`test-ea34d1` from the image `test`

`moby run gcp -img-name test-ea34d1` test.img.tar.gz` will upload the
file as `test-ea34d1.tar.gz`, create image `test-ea34d1` and create an
instance called `test-ea34d1`.

The use case for this is for CI to be able to spawn many concurrent test
machines and provide it's own name for them.

Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-07 15:35:54 +01:00
Dave Tucker
0d8850d5d1 moby: Allow combination of env vars and flags for gcp
Signed-off-by: Dave Tucker <dt@docker.com>
2017-04-07 15:22:27 +01:00
Justin Cormack
7e1f2088d3 Make init accept a list of images not just a single one.
fix #1527

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-07 14:25:28 +01:00