Commit Graph

26 Commits

Author SHA1 Message Date
Akihiro Suda
14f357b90f
CI: update crun to 0.19
Release notes: https://github.com/containers/crun/releases

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-04-12 17:05:11 +09:00
Sebastiaan van Stijn
55a9bbc033
Prevent runc inheriting BUILDTAGS from containerd
Both runc and containerd use BUILDTAGS to customize go build-tags.

When building containerd with custom build-tags, runc inherited
those, causing the default to be overwritten, e.g.;

    make BUILDTAGS=no_btrfs cri-cni-release
    (in script/setup/install-runc)

    HEAD is now at 12644e61 VERSION: release 1.0.0~rc93
    make[1]: Entering directory '/tmp/tmp.ZJzc2KtI0A/runc'
    go build -trimpath "-mod=vendor" "-buildmode=pie"  -tags "no_btrfs" -ldflags "-X main.gitCommit="12644e614e25b05da6fd08a38ffa0cfe1903fdec" -X main.version=1.0.0-rc93 " -o runc .
                                                   ^^^^^^^^^^^^^^^^

This patch brings back the BUILDTAGS make-var in the runc-install
script, which fixates the buildtags to our defaults.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-12 18:37:18 +01:00
Sebastiaan van Stijn
79a51cd16a
move runc version to a separate file for easier consumption
This moves the runc version to build to scripts/setup/runc-version,
which makes it easier for packagers to find the default version
to use.

The RUNC_VERSION environment variable can still be used to override
the version, which can be used (e.g.) to test against different versions
in our CI.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-10 14:28:29 +01:00
Sebastiaan van Stijn
8325ba5d36
Separate runc binary version from libcontainer version
Now that the dependency on runc (libcontaienr) code has been reduced
considerably, it is probbaly ok to cut the version dependency between
libcontainer and the runc binary that is supported.

This patch separates the runc binary version from the version of
libcontainer that is defined in go.mod, and updates the documentation
accordingly.

The RUNC_COMMIT variable in the install-runc script is renamed to
RUNC_VERSION to encourage using tagged versions, and the Dockerfile
in contrib is updated to allow building with a custom version.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-10 13:41:12 +01:00
Sebastiaan van Stijn
b89a63a235
Remove references to apparmor and selinux buildtags for runc
From the runc v1.0.0-rc93 release notes:

> The "selinux" and "apparmor" buildtags have been removed, and now all runc
> builds will have SELinux and AppArmor support enabled. Note that "seccomp"
> is still optional (though we very highly recommend you enable it).

Also adding a note about kmem support.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-10 12:16:54 +01:00
Sebastiaan van Stijn
164573897c
script/setup: use git clone instead of go get -d
`go get -d` uses go modules by default in Go 1.16 and up, which results
in modules being fetched for the "latest" module version, after which we
tried to "git checkout" to `<VERSION>`.

For runc, this means that (possibly incorrectly), `go get` will download
runc `v0.1.1` (most recent non-"pre-release", which caused failures (e.g
the old `Sirupsen/logrus` being downloaded).

In addition, some of the dependencies we're installing use vendoring, and
thus would not require the modules to be downloaded (and vendored files
will be ignored when using `go get` with modules).

This patch switches several uses `go get -d` to use a regular
git clone, after which the desired version is checked out,
and the binaries are built.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Phil Estes <estesp@amazon.com>
2021-03-03 15:34:54 -05:00
Akihiro Suda
80243b8667
CI: update crun to 0.17
https://github.com/containers/crun/releases/tag/0.17

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-01-22 20:51:14 +09:00
Shengjing Zhu
553a369158 Fix reference to vendor.conf in scripts
Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2020-12-01 01:34:10 +08:00
Akihiro Suda
a67dbdee79
CI: update crun to 0.16
Changes since 0.15:
- https://github.com/containers/crun/releases/tag/0.16
- https://github.com/containers/crun/releases/tag/0.15.1

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-11-30 18:10:24 +09:00
Sebastiaan van Stijn
1edeea7663
install-runc: remove unused USESUDO variable
This is no longer needed, as the script is already run with sudo.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-10 12:49:21 +01:00
Akihiro Suda
c385d1102b
CI: update crun to v0.15
Changes: https://github.com/containers/crun/releases/tag/0.15

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-09-29 17:12:23 +09:00
Derek McGowan
d2472ecc59
Add CRI release build
Add installation scripts needed to generate CRI + CNI tar package on
release.
Update Github action release script to generate CRI release tarballs for
Linux and Windows.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2020-08-11 09:16:38 -07:00
Jacob Blain Christen
b4376e9865 Update Vagrantfile for testing SELinux
`vagrant up` will build and install containerd and all dependencies,
setting up proper SELinux contexts on the runc and containerd binaries.
The VM is configured to be SELinux Enforcing by default but this gets
changed during various CI passes via a matrix param to Disabled and
Permissive before running tests. I have an open PR to fix the
container-selinux policy for containerd at
https://github.com/containers/container-selinux/pull/98 which once
accepted we will want to update the CI matrix to use Enforcing mode
instead of Permissive.

All tests currently pass in SELinux permissive mode with containerd
configured with `enable_selinux=true`. To see which tests are failing
with SELinux enforcing and an already spun up VM:
`SELINUX=Enforcing vagrant up --provision-with=selinux,test-cri`
To test SELinux enforcing in a new VM:
`vagrant destroy -force; SELINUX=Enforcing vagrant up --provision-with=shell,selinux,test-cri`

The `selinux` shell provisioner, parameterized by the SELINUX envvar,
will configure the system as you would expect, with the side effect that
containerd is configured with `enable_selinux=true` via
`/etc/containerd/config.toml` for Permissive or Enforcing modes and
`enable_selinux=false` when SELINUX=Disabled.

Provided that virtualization is suported, this Vagrantfile and provisioners
make it easy to test containerd/cri for conformance under SELinux on
non-SELinux systems.

Signed-off-by: Jacob Blain Christen <jacob@rancher.com>
2020-08-10 01:55:44 -07:00
Akihiro Suda
c041970e99
update crun to v0.14
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-07-03 12:59:04 +09:00
Akihiro Suda
af131d7258 cgroup2 CI
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-05-22 01:15:12 +09:00
fahedouch
24b331ad1e omit sudo when EUID eqto 0
Signed-off-by: fahedouch <fahed.dorgaa@gmail.com>

omit sudo when EUID eqto 0

Signed-off-by: fahedouch <fahed.dorgaa@gmail.com>

omit sudo when EUID eqto 0

Signed-off-by: fahedouch <fahed.dorgaa@gmail.com>

omit sudo when EUID eqto 0

Signed-off-by: fahedouch <fahed.dorgaa@gmail.com>

use gosu to omit sudo in GA

Signed-off-by: fahedouch <fahed.dorgaa@gmail.com>

use gosu to omit sudo in GA

Signed-off-by: fahedouch <fahed.dorgaa@gmail.com>

set working-dir for <<Setup gosu>> step

Signed-off-by: fahedouch <fahed.dorgaa@gmail.com>

fix job permissions

Signed-off-by: fahedouch <fahed.dorgaa@gmail.com>
2020-05-05 20:13:27 +02:00
Phil Estes
74ceb35f50
Small fixes to our Actions CI workflow
Integration tests were running with latest Go release rather than the
version used everywhere else. Also, we don't need to install protoc from
tarball and also apt-get the package for Ubuntu when used as a
dependency for criu build.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2020-04-15 15:19:01 -04:00
Davanum Srinivas
7a252f3ca1
Build runc with selinux support
docker-ce seems to be building runc with selinux support, let us follow
the same pattern here please:
https://github.com/docker/docker-ce/search?p=1&q=RUNC_BUILDTAGS&unscoped_q=RUNC_BUILDTAGS

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-04-14 15:24:31 -04:00
Akihiro Suda
067a66b90a
.travis.yml: run test with crun
Relates to #3727

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-01-06 16:29:06 -08:00
Joakim Roubert
499fbb0337 Improve install scripts
* Only use bash where needed (scripts with pipes that use -o pipefail)
* Make string comparisons POSIX compatible
* Handle whitespace(s) in GOPATH
* Remove superfluous quotes in variable assignments

Change-Id: If1ea55f06f402ded646b5085d4837c0996f90fab
Signed-off-by: Joakim Roubert <joakimr@axis.com>
2019-12-12 13:25:25 +01:00
Sebastiaan van Stijn
55ea3dc9b1
vendor.conf: reformat to use columns
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-11-29 13:33:32 +01:00
Derek McGowan
5bd99af7db
Merge pull request #2097 from Random-Liu/vendor-cri-plugin
Vendor cri plugin into containerd.
2018-02-23 13:55:13 -08:00
Kunal Kushwaha
b12c3215a0 Licence header added
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2018-02-19 10:32:26 +09:00
Lantao Liu
809a99a39e Vendor cri plugin and add critest
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-02-16 23:23:47 +00:00
Christopher Jones
a8c5ff57e5
Cleanup loop devices after test failure
Cleans up loop devices if part of the test or mount process fails.

Also increases btrfs default file size to 650MB to accommodate
minimum btrfs size on ppc64le and s390x

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2018-01-30 14:44:36 -05:00
Christopher Jones
051ac5dd63
running tests in a container
This provides a dockerfile for building a container to run the containerd tests

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2018-01-30 14:44:30 -05:00