Commit Graph

68 Commits

Author SHA1 Message Date
Phil Estes 62918511f3 Merge pull request #712 from crosbymichael/sysunix
Replace syscall with /x/sys/unix in execution code
2017-04-10 16:30:32 -04:00
Michael Crosby 3db1ea8d07 [bin] Replace syscall with /x/sys/unix
Replace syscall usage with /sys/unix in the binaries and their packages

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-04-10 12:01:33 -07:00
Vincent Batts f58f047b7f
containerd: revert the auto config creation
rather than automagically doing this, it is the user's responsibility to
review the output of `containerd config default` and create the config
themselves.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-04-10 14:54:36 -04:00
Vincent Batts 741c471753
containerd: make a config subcommand
For the purpose of reviewing the default config

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-04-10 14:33:29 -04:00
Kenfe-Mickael Laventure c5843b7615 Initial windows runtime work
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-04-07 09:20:44 -07:00
Derek McGowan e2b042e7c1 Merge pull request #675 from stevvooe/images-service
api/services/images: define images metadata service
2017-04-04 16:10:54 -07:00
Vincent Batts 93417d446c
containerd: missing config creates a default
This fixes silently ignore the config file not existing as well.

```bash
sudo ./bin/containerd --config farts
$ sudo ./bin/containerd --config farts
INFO[0000] config "farts" does not exist. Creating it.   module=containerd
INFO[0000] starting containerd boot...                   module=containerd
INFO[0000] starting debug API...                         debug="/run/containerd/debug.sock" module=containerd
INFO[0000] loading monitor plugin "cgroups"...           module=containerd
INFO[0000] loading runtime plugin "linux"...             module=containerd
INFO[0000] loading snapshot plugin "snapshot-overlay"...  module=containerd
INFO[0000] loading grpc service plugin "content-grpc"...  module=containerd
INFO[0000] loading grpc service plugin "metrics-grpc"...  module=containerd
INFO[0000] loading grpc service plugin "runtime-grpc"...  module=containerd
INFO[0000] loading grpc service plugin "healthcheck-grpc"...  module=containerd
INFO[0000] loading grpc service plugin "rootfs-grpc"...  module=containerd
INFO[0000] starting GRPC API server...                   module=containerd
INFO[0000] containerd successfully booted in 0.001465s   module=containerd
^C$ cat farts
state = "/run/containerd"
root = "/var/lib/containerd"
snapshotter = "overlay"
subreaper = false

[grpc]
  socket = "/run/containerd/containerd.sock"
  uid = 0
  gid = 0

[debug]
  socket = "/run/containerd/debug.sock"
  level = "info"

[metrics]
  address = ""
```

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-04-04 17:32:05 -04:00
Vincent Batts 28d012ea00
containerd: add access to default config
when wanting to craft a custom config, but based on the default config,
add a route to output the containerd config to a tempfile.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-04-04 16:32:12 -04:00
Stephen J Day 8c74da3983
cmd/dist, cmd/ctr: move image store access to GRPC
With this changeset, image store access is now moved to completely
accessible over GRPC. No clients manipulate the image store database
directly and the GRPC client is fully featured. The metadata database is
now managed by the daemon and access coordinated via services.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-04-04 10:35:55 -07:00
Michael Crosby 4f2b443a27 Rewrite imports for new github org
This rewrites the Go imports after switching to the new github org.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-04-03 14:05:44 -07:00
unclejack 7b4d238ee3 archive,cmd,images: clean up some code
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2017-03-30 11:41:22 +03:00
unclejack d2a6630658 utils: remove utils & migrate code to sys
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2017-03-29 21:25:02 +03:00
Michael Crosby 5e5479718c Merge pull request #619 from crosbymichael/no-shim
Add `no_shim` config for not running with a shim
2017-03-22 13:49:03 -07:00
Michael Crosby f36feb2ed4 Add prometheus container level metrics
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-03-22 11:44:25 -07:00
Michael Crosby ddbeb9f936 Add monitor plugin loading
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-03-22 11:44:05 -07:00
Derek McGowan 38a6f90f2b
Add rootfs command to dist
Commands allows preparing a rootfs from a manifest hash

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-03-15 16:32:21 -07:00
Derek McGowan ead425f426
Add rootfs service
Add rootfs service to allow creation of rootfs from layer array

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-03-15 16:32:21 -07:00
Michael Crosby f9212348e4 Add grpc prometheus metrics
This provideds generic grpc metrics via prometheus

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-03-14 16:16:49 -07:00
Qiang Huang e663cbddf5 Add grpc health check service
Fixes: #615

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2017-03-14 15:39:29 +08:00
Michael Crosby 1d7fa45403 Add `no_shim` config for not running with a shim
This reuses the exiting shim code and services to let containerd run as
the reaper for all container processes without the use of a shim.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-03-10 15:28:21 -08:00
Michael Crosby 61263bd77e Set containerd as subreaper
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-03-09 16:26:14 -08:00
Michael Crosby 9f3240364f Implement reaper with runc support in shim
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-03-09 16:11:57 -08:00
Michael Crosby df48983fe7 Add reaper code for daemon
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-03-09 16:07:35 -08:00
Michael Crosby fc45d9c119 Chown grpc socket based on config
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-03-08 11:42:36 -08:00
Derek McGowan a4247e2aa9 Add snapshot plugin type
Update existing snapshot drivers to register as plugins.
Load snapshot driver at containerd startup.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-03-07 14:55:36 -08:00
Derek McGowan 0b44e24c07 Move plugin registration to separate package
Only compile in plugin support on non-windows 1.8.
Re-enable go 1.7.x tests.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-03-06 17:23:00 -08:00
Stephen J Day 0c00d4a64c
cmd/containerd: set correct module on interceptor for content
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-02-28 16:47:41 -08:00
Michael Crosby e693cad926 Change linux runtime(w shim) to builtin
Because of the plugin findings and having the default runtime builtin
this makes it much better for development and testing.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-02-24 15:50:59 -08:00
Phil Estes a463ba33fc Merge pull request #561 from stevvooe/correct-versioning
version: finish version setup
2017-02-22 13:48:05 -08:00
Stephen J Day 935144fadd
version: finish version setup
This setup will now correctly set the version number from the git tag.
When using `--version`, we will see the binary name, the package it was
built from and a git hash based on the tag:

```console
$./bin/dist -v
./bin/dist github.com/docker/containerd 0b45d91.m
```

Note that in the above example, if we set a tag of `v1.0.0-dev`, that
will show up in the version number, as follows:

```console
$./bin/dist -v
./bin/dist github.com/docker/containerd v1.0.0-dev
```

Once commits are made past that tag, the version number will be
expressed relative to that tag and include a git hash:

```console
$./bin/dist -v
./bin/dist github.com/docker/containerd v1.0.0-dev-1-g7953e96.m
```

Some these examples include a `.m` postfix. This indicates that the
binary was build from a source tree with local modifications.

We can add a dev tag to start getting 1.0 version numbers for test
builds.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-02-22 13:16:06 -08:00
Michael Crosby 3101be93bc Load runtimes dynamically via go1.8 plugins
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Add registration for more subsystems via plugins

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

Move content service to separate package

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-02-21 16:29:46 -08:00
Stephen J Day baa307cd4b
cmd/containerd: remove cli.Context dependence for content.Store
We've moved to using the config, directly. This removes the argument and
gets rid of a few extra lines of code.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-02-21 15:27:12 -08:00
Stephen J Day e6efb397cf
cmd/dist: port commands over to use GRPC content store
Following from the rest of the work in this branch, we now are porting
the dist command to work directly against the containerd content API.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-02-21 13:10:31 -08:00
Michael Crosby f01434283c Merge pull request #553 from crosbymichael/config
Add config file
2017-02-21 11:52:08 -08:00
Michael Crosby a9950aedcf Add config file
This adds a config file for containerd configuration.  It is hard to
have structure data on cli flags and the config file should be used for
the majority of fields when configuring containerd.

There are still a few flags on the daemon that override config file
values but flags should take a back seat going forward and should be
kept at a minimum.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-02-21 11:22:08 -08:00
Qiang Huang 7206427df4 Fix interceptor handler parameter
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2017-02-21 08:41:31 -08:00
Qiang Huang d42dfcba23 Delete default log-level value
It's duplicate with --log-level, and since --log-level
takes advantage of --debug and it has default value,
--debug never works now.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2017-02-18 21:14:58 +08:00
Michael Crosby ab8586b7c5 Remove bundles from API
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-02-15 13:56:41 -08:00
Akihiro Suda bf8abef70f api: introduce api/{types,services} for deduplication of API definition
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-02-14 02:42:13 +00:00
Michael Crosby 89f62d4fae Merge pull request #515 from fate-grand-order/branch
Use errors.New() directly to output the error message
2017-02-10 13:55:10 -08:00
Phil Estes 43e42b4222 Merge pull request #503 from jmzwcn/master
Allow specifying the log level
2017-02-10 12:35:14 -08:00
Daniel Zhang ca52365780 Allow specifying the log level
Signed-off-by: Daniel Zhang <jmzwcn@gmail.com>
2017-02-10 17:29:06 +08:00
fate-grand-order af86cd4d2f Use error.New () directly to output the error message
Signed-off-by: fate-grand-order <chenjg@harmonycloud.cn>
2017-02-10 14:31:49 +08:00
Michael Crosby 42a17f9391 Merge pull request #501 from mlaventure/new-shim-continued
New shim continued
2017-02-07 15:52:08 -08:00
Kunal Kushwaha 1191b209ae closing http connection
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2017-02-07 14:57:44 +09:00
Kenfe-Mickael Laventure 78d7e8b256 supervisor: implement monitoring
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-02-06 15:16:55 -08:00
Kenfe-Mickael Laventure 6f9eda1134 api/execution: remove ProcessID from rpc calls
Now that the shim handles all container's processes the system pid is
sufficient.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-02-02 15:36:10 -08:00
Michael Crosby f187da9485 Port over supervisor to use grpc shim
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-02-01 16:01:53 -08:00
Kunal Kushwaha 6af4f5fee8 Exposing pprof and expvars interfaces on default containerd socket
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2017-02-01 11:05:55 +09:00
Ed King 89607a10db os.MkdirAll the containerd root dir
Signed-off-by: Ed King <ed@teddyking.co.uk>
2017-01-28 15:47:51 +00:00