Commit Graph

35 Commits

Author SHA1 Message Date
Stephen J Day 19eecaab12
cmd/dist: POC implementation of dist fetch
With this changeset we introduce several new things. The first is the
top-level dist command. This is a toolkit that implements various
distribution primitives, such as fetching, unpacking and ingesting.

The first component to this is a simple `fetch` command. It is a
low-level command that takes a "remote", identified by a `locator`, and
an object identifier. Keyed by the locator, this tool can identify a
remote implementation to fetch the content and write it back to standard
out. By allowing this to be the unit of pluggability in fetching
content, we can have quite a bit of flexibility in how we retrieve
images.

The current `fetch` implementation provides anonymous access to docker
hub images, through the namespace `docker.io`. As an example, one can
fetch the manifest for `redis` with the following command:

```
$ ./dist fetch docker.io/library/redis latest mediatype:application/vnd.docker.distribution.manifest.v2+json
```

Note that we have provided a mediatype "hint", nudging the fetch
implementation to grab the correct endpoint. We can hash the output of
that to fetch the same content by digest:

```
$ ./dist fetch docker.io/library/redis sha256:$(./dist fetch docker.io/library/redis latest mediatype:application/vnd.docker.distribution.manifest.v2+json | shasum -a256)
```

Note that the hint is now elided, since we have affixed the content to a
particular hash.

If you are not yet entertained, let's bring `jq` and `xargs` into the
mix for maximum fun. The following incantation fetches the same manifest
and downloads all layers into the convenience of `/dev/null`:

```
$ ./dist fetch docker.io/library/redis sha256:a027a470aa2b9b41cc2539847a97b8a14794ebd0a4c7c5d64e390df6bde56c73 | jq -r '.layers[] | .digest' | xargs -n1 -P10 ./dist fetch docker.io/library/redis > /dev/null
```

This is just the beginning. We should be able to centralize
configuration around fetch to implement a number of distribution
methodologies that have been challenging or impossible up to this point.
The `locator`, mentioned earlier, is a schemaless URL that provides a
host and path that can be used to resolve the remote. By dispatching on
this common identifier, we should be able to support almost any protocol
and discovery mechanism imaginable.

When this is more solidified, we can roll these up into higher-level
operations that can be orchestrated through the `dist` tool or via GRPC.

What a time to be alive!

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-01-23 13:27:07 -08:00
Akihiro Suda 7fed38881d rootfs: fix compilation error
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-01-23 08:54:57 +00:00
Akihiro Suda 727f0a536e vendor: sirupsen/logrus -> Sirupsen/logrus
github.com/docker/docker/pkg/archive requires Sirupsen/logrus.
So let's remove sirupsen/logrus at the moment.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-01-23 08:50:08 +00:00
Michael Crosby b895c98358 Update go-runc to afca56d262e694d9056e937a0877a39ab879aeb4
This includes fixes for --console-socket in runc as well as additional
APIs for runc commands.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-01-20 13:42:14 -08:00
Stephen J Day 8b5c7ce901
vendor: include github.com/opencontainers/image-spec
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-01-17 17:08:37 -08:00
Kenfe-Mickael Laventure 2a20ea7daf Vendor github.com/docker/docker/pkg/term
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-01-12 11:24:31 -08:00
Kenfe-Mickael Laventure 478f50fb2e Vendor golang.org/x/sys/unix
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-01-12 11:21:06 -08:00
Akihiro Suda 4a7a8efc2d vendor: add missing deps and remove `go get` in .travis.yml
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-01-12 08:24:48 +00:00
Phil Estes dd9309c15e
Add vendoring to containerd master
Initial vendor list validated with empty $GOPATH
and only master checked out; followed by `make`
and verified that all binaries build properly.
Updates require github.com/LK4D4/vndr tool.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2017-01-11 16:59:06 -05:00
Michael Crosby 1c6ed30a79 Remove vendor and fix go build
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-11-07 13:15:32 -08:00
Mike Danese ea36fe0bb7 vendor: update grpc to v1.0.1-GA
The currently used go-grpc client is rather old (a commit from May).
Since then a GA release has been cut, so let's use that.

Signed-off-by: Mike Danese <mikedanese@google.com>
2016-09-12 11:36:39 -07:00
Alexander Morozov d5f9910cee Add grpc health check service
Also, block on dial in integration tests

Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>
2016-09-09 13:14:47 -07:00
Kenfe-Mickael Laventure dfb626dccc Use protobuf Timestamp type instead of uint64
This will ensure nanoseconds are taken in account.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-07-01 09:37:21 -07:00
Michael Crosby d307ab6fa2 Bump runc to 85873d917e86676e44ccb80719fcb47a79467
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-06-13 12:50:23 -07:00
Kenfe-Mickaël Laventure 8040df4e89 New oom sync (#257)
* Vendor in runc afaa21f79ade3b2e99a68f3f15e7219155aa4662

This updates the Dockerfile to use go 1.6.2 and install pkg-config are
both are now needed by runc.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>

* Add support for runc create/start operation

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>

* Remove dependency on runc state directory for OOM handler

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>

* Add OOM test

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-09 13:33:26 -07:00
Amit Krishnan 62e1370f91 containerd build clean on Solaris (#203)
* containerd build clean on Solaris

Signed-off-by: Amit Krishnan <krish.amit@gmail.com>

* Vendor golang.org/x/sys

Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
2016-05-19 10:12:50 -07:00
Michael Crosby 614df93b92 Update grpc and protobufs dep (#243)
* Update grpc and protobufs dep

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

* Fix grpc error check

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-05-18 09:16:55 -07:00
Kenfe-Mickael Laventure 2f69e11b1a Vendor in runc d49ece5a83da3dcb820121d6850e2b61bd0a5fbe
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-05-09 08:53:43 -07:00
Michael Crosby 3062918899 Merge pull request #230 from amitkris/uprev_solaris_deps
uprev dependencies required for build clean on Solaris
2016-05-06 10:48:49 -07:00
Michael Crosby 4a341841c5 Update runc to 89c3c97a8482f3a57cd4bb683df1a7b2c61405d8
Fixes #211

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-05-04 11:36:07 -07:00
Amit Krishnan aff023c8a2 Uprev docker/docker/pkg/term and runc/libcontainer
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
2016-05-02 13:40:23 -07:00
Michael Crosby 7a1d28e42b Bump runc and runtime-specs deps
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-26 13:38:36 -07:00
Aleksa Sarai 20ef099321 vendor: pull in requirements for docker/pkg/listeners
Since we're using the docker "library" for socket activation (and
dealing with sockets in general), we need to vendor the requirements for
the library. Also, include go-winio even though Windows isn't a
supported target at the moment.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-04-23 02:17:25 +10:00
Michael Crosby d7fb9f0538 Bump runc to e87436998478d222be209707503c27f6f91be
Fixes for cgroup memory updates and process labeling.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-21 17:49:52 -07:00
Kenfe-Mickael Laventure 9992d2e1bd Vendor go-check in
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-03-25 11:03:48 -07:00
Kenfe-Mickael Laventure 00358ec939 Update vendor.sh to use fix hashes
This ensure that users can reproduce a containerd build exactly as it
was done during release.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-03-24 19:05:29 -07:00
Tonis Tiigi 918728900a vendor: update runc
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-03-22 21:08:21 -07:00
Tonis Tiigi 85202e62bf vendor: clean runs unused files
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-03-22 21:08:15 -07:00
Michael Crosby b4c901f34a Revert "Switch to new vendor directory layout"
This reverts commit d5742209d3.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-17 16:10:24 -07:00
Marcos Lilljedahl d5742209d3 Switch to new vendor directory layout
Fixes #113

Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
2016-03-16 01:56:22 -03:00
Michael Crosby 2db0341e38 Update runc and specs vendor deps
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-15 11:19:21 -07:00
Michael Crosby a46c45d05d Update specs and runc dependencies
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-07 10:30:59 -08:00
Michael Crosby 532697f32f Add all pids to state output
Also update libcontainer dep

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-11 14:07:34 -08:00
Michael Crosby cf28969328 Fix tty and io permission for userns
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-11 11:23:35 -08:00
Alexander Morozov e17cf1ad4f Vendor dependencies
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-01-05 14:56:27 -08:00