containerd/script/setup
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
..
config-containerd Update Vagrantfile for testing SELinux 2020-08-10 01:55:44 -07:00
config-selinux Update Vagrantfile for testing SELinux 2020-08-10 01:55:44 -07:00
install-cni Small fixes to our Actions CI workflow 2020-04-15 15:19:01 -04:00
install-critools Update Vagrantfile for testing SELinux 2020-08-10 01:55:44 -07:00
install-dev-tools update urfave/cli v1.22.1, go-md2man v2.0.0, blackfriday v2.0.1 2020-07-02 10:48:45 +02:00
install-protobuf vendor protobuf & grpc 2020-02-26 10:57:05 +09:00
install-runc Update Vagrantfile for testing SELinux 2020-08-10 01:55:44 -07:00
install-seccomp Fix incorrect comment from copy/paste of starting script 2020-02-13 11:48:12 -05:00