File tree Expand file tree Collapse file tree 6 files changed +20
-4
lines changed Expand file tree Collapse file tree 6 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 1212 - uses : actions/checkout@v2
1313 - name : Run containerd-driver integration tests
1414 run : |
15+ sudo modprobe bridge
1516 mkdir -p /home/runner/go/src/github.com/hashistack4u
1617 ln -s /home/runner/work/nomad-driver-containerd/nomad-driver-containerd /home/runner/go/src/github.com/hashistack4u/nomad-driver-containerd
1718 cd /home/runner/go/src/github.com/hashistack4u/nomad-driver-containerd
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ Vagrant.configure("2") do |config|
2323 apt-get install -y unzip gcc runc jq make
2424 echo "export GOPATH=/home/vagrant/go" >> /home/vagrant/.bashrc
2525 echo "export PATH=$PATH:/usr/local/go/bin" >> /home/vagrant/.bashrc
26- echo "export CONTAINERD_NAMESPACE=nomad" >> /home/vagrant/.bashrc
26+ echo "export CONTAINERD_NAMESPACE=nomad.slice " >> /home/vagrant/.bashrc
2727 source /home/vagrant/.bashrc
2828 # without keeping HOME env, 'sudo make test' will try to find files under /root/go/
2929 echo "Defaults env_keep += HOME" | sudo tee /etc/sudoers.d/keep_home
Original file line number Diff line number Diff line change 11log_level = " INFO"
22data_dir = " /tmp/nomad"
33
4+ advertise {
5+ http = " 127.0.0.1"
6+ rpc = " 127.0.0.1"
7+ serf = " 127.0.0.1"
8+ }
9+
410plugin "containerd-driver" {
511 config {
612 enabled = true
@@ -30,4 +36,7 @@ client {
3036 path = " /tmp/host_volume/s1"
3137 read_only = false
3238 }
39+ options {
40+ " driver.allowlist" = " containerd-driver"
41+ }
3342}
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ test_redis_nomad_job() {
5050 fi
5151
5252 echo " INFO: Check if memory and memory_max are set correctly in the cgroup filesystem."
53- task_name=$( sudo CONTAINERD_NAMESPACE=nomad ctr containers ls| awk ' NR!=1' | cut -d' ' -f1)
53+ task_name=$( sudo CONTAINERD_NAMESPACE=nomad.slice ctr containers ls| awk ' NR!=1' | cut -d' ' -f1)
5454 memory_soft_limit=$( sudo cat /sys/fs/cgroup/memory/nomad/$task_name /memory.soft_limit_in_bytes)
5555 if [ $memory_soft_limit != " $(( 256 * 1024 * 1024 )) " ]; then
5656 echo " ERROR: memory should be 256 MB. Found ${memory_soft_limit} ."
Original file line number Diff line number Diff line change 22
33set -eo pipefail
44
5- export NOMAD_VERSION=1.9.5
5+ export NOMAD_VERSION=1.9.6
66export CONTAINERD_VERSION=1.7.25
7+ export RUNC_VERSION=1.2.4
78export PATH=$PATH :/usr/local/go/bin
89export PATH=$PATH :/usr/local/bin
910if [ -e /home/runner ]; then
@@ -89,6 +90,11 @@ setup() {
8990 sudo tar -C /usr/local -xzf containerd-${CONTAINERD_VERSION} -linux-amd64.tar.gz
9091 rm -f containerd-${CONTAINERD_VERSION} -linux-amd64.tar.gz
9192
93+ # Install runc
94+ curl -L -o runc https://github.com/opencontainers/runc/releases/download/v${RUNC_VERSION} /runc.amd64
95+ chmod 0755 runc
96+ sudo mv runc /usr/local/bin/
97+
9298 # Drop containerd systemd unit file into /lib/systemd/system.
9399 cat << EOF > containerd.service
94100# /lib/systemd/system/containerd.service
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ is_container_active() {
2626 i=" 0"
2727 while test $i -lt 5
2828 do
29- sudo CONTAINERD_NAMESPACE=nomad ctr task ls| grep -q RUNNING
29+ sudo CONTAINERD_NAMESPACE=nomad.slice ctr task ls| grep -q RUNNING
3030 if [ $? -eq 0 ]; then
3131 echo " INFO: ${job_name} container is up and running"
3232 if [ " $is_sleep " = true ]; then
You can’t perform that action at this time.
0 commit comments