Commit Graph

237 Commits

Author SHA1 Message Date
Stephen J Day
157cfb1ad2
api, linux/runcopts: ensure output is current
Ensure that the descriptors are re-generated on the CI and block merges
that don't include updates. We also enable the `check-protos` check as
part of this process. The installation process for protobufs has been
fixed to support protobuild.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-09-06 14:51:53 -07:00
Kenfe-Mickael Laventure
700120c066
Don't build binaries when running make vet
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-29 08:27:44 -07:00
Kunal Kushwaha
1c989588c0 Breaking Makefile into platform specific files
Fixed #1270

Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2017-08-22 13:57:12 +09:00
Akihiro Suda
f8b1f4f6dc stress -> containerd-stress
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-08-15 14:54:20 +00:00
Kenfe-Mickael Laventure
eb0970bbd1
Mark relevant tests as elligible for parallelism
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-14 14:43:43 -07:00
Michael Crosby
fd75f1e52f Add stress test tool
This adds a `stress` binary to help stress test containerd.  It is
different from a benchmarking tool as it only gives a simple summary at
the end.

It is built to run long, multi hour/day stress tests across builds of
containerd.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-10 15:46:10 -04:00
Stephen J Day
7717eb6feb
Makefile: simplify installation from tar file
By moving the binaries to be rooted at `bin/` in the tar file,
installation can be done from a tar file in one fell swoop:

```console
$ make release
$ sudo tar -C /usr/local -xvf releases/containerd-1.0.0-alpha3-72-ge6ba48f2.m.linux-amd64.tar.gz
```

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-08-09 18:35:29 -07:00
Edward Pilatowicz
56c1f5c184 Add solaris build support
Signed-off-by: Edward Pilatowicz <edward.pilatowicz@oracle.com>
2017-08-07 12:40:21 -07:00
Stephen Day
dd7642fc1c Merge pull request #1196 from mlaventure/update-windows-runtime
Update windows runtime
2017-07-21 15:12:53 -07:00
Derek McGowan
a621185855 Merge pull request #1179 from AkihiroSuda/makefile-i
Makefile: `go build -i` -> `go build`
2017-07-21 10:02:22 -07:00
Kenfe-Mickael Laventure
eb4e0b5fb1
Add AppVeyor configuration
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-07-21 18:19:51 +02:00
Kenfe-Mickael Laventure
79d04ded4e
Make integration a bit more verbose
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-07-21 18:19:51 +02:00
Stephen J Day
88656970c5
Makefile: add release target
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-07-19 16:03:43 -07:00
Stephen J Day
e3a07b5673
Makefile: no need to build protos binary
For the standard make target, there is no need to build the protoc
plugin binary. This can be built automatically in response to the `make
protos` target.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-07-18 17:16:03 -07:00
Stephen J Day
98f6deb50e cmd/dist: completely remove dist command
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-07-14 15:48:39 -07:00
Stephen J Day
6c925924db
protobuild: replace protobuild command
To make the protobuild tool broadly useful, it has been broken out into
a separate project. This PR replaces the command with a configuration
file.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-07-14 14:10:06 -07:00
Akihiro Suda
f72e97dbf8 Makefile: go build -i -> go build
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-07-13 10:31:49 +00:00
Akihiro Suda
eeb74d4e23 *_test.go: fix test conditions
- add `testutil.RequiresRoot()` to TestMain
- moved `if testing.Short{ t.Skip() }` from each of the tests into a
common `newClient()`

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-06-30 04:00:59 +00:00
Akihiro Suda
2c293429f3 Makefile: fix INTEGRATION_PACKAGE
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-06-29 06:50:36 +00:00
Michael Crosby
bcb04540fa Merge pull request #1074 from stevvooe/whale-no-more
Makefile: replace whale with D
2017-06-23 11:08:27 -07:00
Michael Crosby
99160a7ac0 Merge pull request #854 from AkihiroSuda/lookup-mountinfo
mountinfo: add Lookup for ease of implementing snapshotters
2017-06-22 20:14:39 -07:00
Stephen J Day
e3f919f1d2
Makefile: replace whale with D
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-06-22 19:25:01 -07:00
Michael Crosby
268ab7c053 Benchmark container create and task start
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-15 10:43:59 -07:00
Akihiro Suda
0ab2227377 mount: add mount.Lookup for ease of implementing snapshotters
`func Lookup(dir string) (Info, error)` returns the mount
info that corresponds to the dir

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-06-06 09:27:53 +00:00
Michael Crosby
b3f891b09f Add integration tests for running containers
Add travis support for running integration tests with the client package
and go test framework

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-05-26 15:50:01 -07:00
Michael Crosby
d7af92e00c Move Mount into mount pkg
This moves both the Mount type and mountinfo into a single mount
package.

This also opens up the root of the repo to hold the containerd client
implementation.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-05-22 16:41:12 -07:00
Stephen J Day
cb68150a2f
protos: remove need for customname on ID fields
Credit to Aaron Lehmann for the implementation from SwarmKit.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-05-18 18:50:59 -07:00
Justin Cormack
508ff6e9c3 Allow adding additional ldflags and other build flags
For LinuxKit we build Go executables as static pie binaries, so
need to be able to add extra build and link flags.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-18 15:52:32 +01:00
Phil Estes
385f56b678
Add buildtag capability to Makefile
Add the ability to set buildtags and make note in README.md about the
btrfs build tag to turn off building the btrfs snapshot support.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2017-05-12 09:53:57 -05:00
Stephen Day
e4945164b0 Merge pull request #776 from AkihiroSuda/introspection
new service: version (WAS: introspection)
2017-05-11 16:49:16 -07:00
Michael Crosby
cc62edb4d6 Revert "Only build shim on Linux"
This reverts commit 296ad66d2d.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-05-11 10:56:49 -07:00
Akihiro Suda
2562aca1a3 new service: version
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-05-11 09:07:43 +00:00
Stephen Day
d553fab079 Merge pull request #822 from AkihiroSuda/fix-vet
fix `make vet` failures, and enable `make vet` on CI
2017-05-10 11:42:24 -07:00
Justin Cormack
296ad66d2d Only build shim on Linux
Currently does not build on any other platform, so add them in when
it builds.

With this Darwin builds without any errors.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-05-10 11:51:16 +01:00
Akihiro Suda
837205005f fix make vet failures, and enable make vet on CI
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-05-10 04:36:41 +00:00
Vincent Batts
ac28fee304
Makefile: fix sudo make install
When there isn't a `go` outside of the user's PATH

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-04-12 14:47:38 -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
Michael Crosby
75705d26d1 Add DCO check to travis
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-04-03 15:28:07 -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
Phil Estes
81c6e437d5 Remove no longer applicable TODO
After the version PR, this TODO message no longer applies.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2017-02-22 16:58:14 -05: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
Stephen J Day
83e7610194
cmd/ctrd-protobuild: create proper command for building protos
After trying to explain the complexities of developing with protobuf, I
have now created a command that correctly calculates the import paths
for each package and runs the protobuf command.

The Makefile has been updated accordingly, expect we now no longer use
`go generate`. A new target `protos` has been defined. We alias the two,
for the lazy. We leave `go generate` in place for cases where we will
actually use `go generate`.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-02-15 12:05:27 -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
Gábor Lipták
19ca156c91 Enable codecov.io
Signed-off-by: Gábor Lipták <gliptak@gmail.com>
2017-01-26 06:31:38 -05:00
Samuel Karp
cacda40317 snapshot: Separate tests using root from non-root
Signed-off-by: Samuel Karp <skarp@amazon.com>
2017-01-25 17:13:29 -08:00
Kunal Kushwaha
2a5f51ecf9 Adding dist to Makefiley
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2017-01-24 13:26:19 +09:00
Michael Crosby
61e7fbde4c Remove check for binaries
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-01-19 11:09:27 -08:00
Akihiro Suda
5fb38ce49c Makefile: allow make install without go
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-01-19 11:05:52 -08:00
Akihiro Suda
bcfb5e7cee Revert "Makefile: remove FORCE dependency"
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-01-19 01:28:43 +00:00
Akihiro Suda
029265f67c Makefile: remove FORCE dependency
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-01-16 08:58:20 +00:00
Akihiro Suda
3793d19bfe Makefile: new variable: TESTFLAGS
e.g.

    $ TESTFLAGS="-race -v -parallel 16" make test

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-01-13 04:28:24 +00: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
Kenfe-Mickael Laventure
3cb57fa2d6 Add containerd-shim binary
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-01-12 10:29:37 -08:00
Michael Crosby
f651e60a3c Make make work
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-12-12 10:32:54 -08:00
Stephen J Day
4d1a30ff41
api: protos now pass lint checks
Generation is likely broken, but the Makefile linter now passes. Another
pass will have a fully working toolchain.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-12-01 12:22:05 -08:00
Stephen J Day
2507ee35bb
Makefile: remove all references to gomock
We won't make the mistake of using gomock in this project.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-12-01 12:11:47 -08:00
Stephen J Day
ab088af2a6
cmd, Makefile: add initial build structure
This adds Makefile and cmd/protoc-gen-gogoctrd for generating protobufs.
More adjustments are required and the default target has been stubbed
out for now.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-12-01 12:04:23 -08: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
Kenfe-Mickael Laventure
dd71165fc6 Fix position of $(TESTFLAGS) in Makefile
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-09-07 10:30:02 -07:00
K3A
403ccb155b Update Makefile (#303)
adding LDFLAGS for "shim" target as well.

Signed-off-by: Mario Hros <spam@k3a.me>
2016-08-26 10:55:21 -07:00
Julio Montes
0227e9fb94 Micro Benchmarks: multiples runtimes (#268)
* Micro benchmarks: use container.Runtime to kill container

Signed-off-by: Julio Montes <julio.montes@intel.com>

* Micro benchmarks: add support for multiples runtimes

Signed-off-by: Julio Montes <julio.montes@intel.com>
2016-06-16 14:39:19 -07:00
Kenfe-Mickaël Laventure
5624732128 Add golint to test (#255)
* Add a new lint rule to the Makefile

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

* Fix linter errors

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

* Allow replacing the default apt mirror

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-03 15:00:49 -07:00
Anusha Ragunathan
24144682a0 Micro benchmarks for containerd. (#244)
This is the first in a series of micro benchmarks for containerd.
Performance measurement will use containerd objects and methods
that are not dependent on the grpc API and dont require the daemon
to the running. Test will require containerd-shim and runc.

The motivation is to understand the baseline performance at the lowest
containerd layer. A natural extension to this effort would be to write
macro benchmarks which would include API and daemon.

Note:
- Currently measures only one workload (busybox sh) start times. Will
add other bundles and args soon.
- Can use integration-test utils for bundle processing. However, json
marshal/unmarshal is currently timing out standard benchmark times. So
going with default spec for now.

Sample run:
BenchmarkBusyboxSh-4    / # / # / #        2     576013841 ns/op
ok      github.com/docker/containerd/runtime    1.800s

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-05-27 10:35:42 -07:00
Kenfe-Mickaël Laventure
cdbe1d05f8 Merge pull request #242 from mYmNeo/uninstall
Add uninstall target
2016-05-18 09:24:00 -07:00
thomassong
1f4c441d17 add uninstall target
Signed-off-by: thomassong <thomassong@tencent.com>
2016-05-18 09:19:45 +08:00
Kenfe-Mickael Laventure
496007897f Remove unneeded compilation when running test
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-05-13 11:44:33 -07:00
Michael Crosby
8dbbb0fa05 Remove govet
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-07 10:40:09 -07:00
Michael Crosby
6f18acda73 Remove dep on larger packages
This removes most of the deps on the larger packages for the shim and
reduces the binary size and memory footprint from a 7.1mb binary to a
2.6mb binary.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-06 11:21:49 -07:00
Kenfe-Mickael Laventure
20ee648540 Add per test and suite timeout values to Makefile
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-03-28 11:35:16 -07:00
Kenfe-Mickael Laventure
cb69ab45ee Add initial integration tests framework
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-03-25 12:08:51 -07:00
Kenfe-Mickael Laventure
20313cb0a5 Add missing GIT_BRANCH variable to Makefile
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-03-21 13:47:13 -07:00
Ken Cochrane
d4efc0411a Add a static build target to Makefile
This allows us to build a static binary for all three binaries, from the make file using ``make static``.

Signed-off-by: Ken Cochrane <KenCochrane@gmail.com>
2016-03-21 15:50:40 -04:00
Kenfe-Mickael Laventure
febace3633 Add the git commit to the output version
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-03-18 15:29:22 -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
Michael Crosby
a21a956a2d Revert "Check for minimum golang version"
This reverts commit c6680da78b.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-03-17 16:10:15 -07:00
Marcos Lilljedahl
c6680da78b Check for minimum golang version
Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
2016-03-16 17:16:46 -03: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
fe38efda50 Add shim for reattach of processes
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Remove runtime files from containerd

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

Update supervisor for orphaned containers

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

Remove ctr/container.go back to rpc calls

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

Add attach to loaded container

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

Add monitor based on epoll for process exits

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

Convert pids in containerd to string

This is so that we no longer care about linux or system level pids and
processes in containerd have user defined process id(pid) kinda like the
exec process ids that docker has today.

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

Add reaper back to containerd

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

Implement list containers with new process model

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

Implement restore of processes

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

Add NONBLOCK to exit fifo open

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

Implement tty reattach

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

Fix race in exit pipe creation

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

Add delete to shim

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

Update shim to use pid-file and not stdout

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-02 16:00:22 -08:00
Michael Crosby
fe506d51ef Remove vet and lint in validate
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-01-22 10:47:06 -08:00
Michael Crosby
b4a53af927 Merge pull request #65 from LK4D4/vendor
Vendor dependencies
2016-01-22 10:46:16 -08:00
Alexander Morozov
bba05d5748 Update Makefile to use vendor dir
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-01-22 08:30:39 -08:00
Phil Estes
03177bf053 Add dependency on the container build for steps doing "run"
Make sure that the container is actually built before commands in the
Makefile that require doing `docker run` on the devel container.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2016-01-12 14:56:07 -08:00
Jessica Frazelle
5b3f41c244
add dockerfile/makefile additions for ci
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-12-18 09:18:14 -08:00
Michael Crosby
15080cda61 Add logging to runc runtime
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-11 13:59:19 -08:00
Alexander Morozov
59a595c69f Add protoc target to makefile
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-12-11 12:08:02 -08:00
Michael Crosby
e87f8336c4 Add more client methods
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-08 13:31:20 -08:00
Michael Crosby
c0263b6b70 Make root makefile
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-08 11:37:55 -08:00