|
98 | 98 | # apparmor provides apparmor_parser, needed by the critest AppArmor |
99 | 99 | # specs; it must be present before containerd starts, as containerd |
100 | 100 | # probes AppArmor support once at startup. |
101 | | - sudo apt-get install -y git wget build-essential libseccomp-dev pkg-config bc make apparmor |
| 101 | + sudo apt-get install -y git wget build-essential libseccomp-dev pkg-config bc make apparmor qemu-system-x86 |
102 | 102 |
|
103 | 103 | - name: Install runc |
104 | 104 | env: |
@@ -164,15 +164,33 @@ jobs: |
164 | 164 | syslog = true |
165 | 165 | EOT |
166 | 166 |
|
167 | | - - name: Configure containerd with the urunc runtime handler |
| 167 | + - name: Configure containerd with the urunc runtime handlers |
168 | 168 | run: | |
| 169 | + sudo mkdir -p /usr/local/bin/scripts |
| 170 | + sudo cp script/dm_create.sh /usr/local/bin/scripts/dm_create.sh |
| 171 | + sudo chmod 755 /usr/local/bin/scripts/dm_create.sh |
| 172 | + sudo /usr/local/bin/scripts/dm_create.sh |
169 | 173 | sudo mkdir -p /etc/containerd/ |
170 | 174 | sudo containerd config default | sudo tee /etc/containerd/config.toml > /dev/null |
| 175 | + sudo sed -i "/\[plugins\.'io\.containerd\.snapshotter\.v1\.devmapper'\]/,/^$/d" /etc/containerd/config.toml |
| 176 | + # Two handlers: "urunc" (default snapshotter) exercises the full |
| 177 | + # generic suite on the runc-delegation path, "urunc-devmapper" |
| 178 | + # provides the block rootfs the guest VM images need. |
171 | 179 | sudo tee -a /etc/containerd/config.toml > /dev/null <<'EOT' |
| 180 | + [plugins.'io.containerd.snapshotter.v1.devmapper'] |
| 181 | + pool_name = "containerd-pool" |
| 182 | + root_path = "/var/lib/containerd/io.containerd.snapshotter.v1.devmapper" |
| 183 | + base_image_size = "10GB" |
| 184 | + fs_type = "ext2" |
172 | 185 | [plugins.'io.containerd.cri.v1.runtime'.containerd.runtimes.urunc] |
173 | 186 | runtime_type = "io.containerd.urunc.v2" |
174 | 187 | container_annotations = ["com.urunc.unikernel.*"] |
175 | 188 | pod_annotations = ["com.urunc.unikernel.*"] |
| 189 | + [plugins.'io.containerd.cri.v1.runtime'.containerd.runtimes.urunc-devmapper] |
| 190 | + runtime_type = "io.containerd.urunc.v2" |
| 191 | + container_annotations = ["com.urunc.unikernel.*"] |
| 192 | + pod_annotations = ["com.urunc.unikernel.*"] |
| 193 | + snapshotter = "devmapper" |
176 | 194 | EOT |
177 | 195 | sudo systemctl restart containerd |
178 | 196 | sleep 3 |
@@ -204,6 +222,22 @@ jobs: |
204 | 222 | --ginkgo.junit-report "$PWD/critest-report/junit.xml" \ |
205 | 223 | --ginkgo.timeout 40m |
206 | 224 |
|
| 225 | + - name: Run critest against the urunc VM path (qemu Linux guest) |
| 226 | + run: | |
| 227 | + # The web-server specs boot a real guest VM: critest's web server |
| 228 | + # image is swapped for urunc's qemu Linux nginx image, so the |
| 229 | + # port-mapping specs curl an nginx served from inside the guest. |
| 230 | + tee /tmp/urunc-test-images.yaml > /dev/null <<'EOT' |
| 231 | + webServerTestImage: harbor.nbfc.io/nubificus/urunc/nginx-qemu-linux-raw:latest |
| 232 | + EOT |
| 233 | + sudo /usr/local/bin/critest \ |
| 234 | + --runtime-endpoint unix:///run/containerd/containerd.sock \ |
| 235 | + --runtime-handler urunc-devmapper \ |
| 236 | + --test-images-file /tmp/urunc-test-images.yaml \ |
| 237 | + --ginkgo.focus='port mapping' \ |
| 238 | + --ginkgo.junit-report "$PWD/critest-report/junit-vmpath.xml" \ |
| 239 | + --ginkgo.timeout 20m |
| 240 | +
|
207 | 241 | - name: Upload critest report |
208 | 242 | if: always() |
209 | 243 | uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 |
|
0 commit comments