From f1e6bb2a48c98e826c1f942b31376de129d14fc6 Mon Sep 17 00:00:00 2001 From: JooYoung Park Date: Tue, 5 Mar 2024 15:11:27 +0800 Subject: [PATCH] fix gh runner gvisor cri test Signed-off-by: JooYoung Park --- .../firecracker/helloworld.yaml | 17 +++++++++++++++++ .../firecracker/helloworldSerial.yaml | 18 ++++++++++++++++++ .../firecracker/helloworld_local.yaml | 17 +++++++++++++++++ .../knative_workloads/firecracker/pyaes.yaml | 17 +++++++++++++++++ .../knative_workloads/gvisor/helloworld.yaml | 17 +++++++++++++++++ .../gvisor/helloworldSerial.yaml | 18 ++++++++++++++++++ configs/knative_workloads/gvisor/pyaes.yaml | 17 +++++++++++++++++ scripts/github_runner/setup_cri_test_env.sh | 10 +++------- 8 files changed, 124 insertions(+), 7 deletions(-) create mode 100644 configs/knative_workloads/firecracker/helloworld.yaml create mode 100644 configs/knative_workloads/firecracker/helloworldSerial.yaml create mode 100644 configs/knative_workloads/firecracker/helloworld_local.yaml create mode 100644 configs/knative_workloads/firecracker/pyaes.yaml create mode 100644 configs/knative_workloads/gvisor/helloworld.yaml create mode 100644 configs/knative_workloads/gvisor/helloworldSerial.yaml create mode 100644 configs/knative_workloads/gvisor/pyaes.yaml diff --git a/configs/knative_workloads/firecracker/helloworld.yaml b/configs/knative_workloads/firecracker/helloworld.yaml new file mode 100644 index 000000000..0fd82885d --- /dev/null +++ b/configs/knative_workloads/firecracker/helloworld.yaml @@ -0,0 +1,17 @@ +apiVersion: serving.knative.dev/v1 +kind: Service +metadata: + namespace: default +spec: + template: + spec: + containers: + - image: crccheck/hello-world:latest # Stub image. See https://github.com/vhive-serverless/vhive/issues/68 + ports: + - name: h2c # For GRPC support + containerPort: 50051 + env: + - name: GUEST_PORT # Port on which the firecracker-containerd container is accepting requests + value: "50051" + - name: GUEST_IMAGE # Container image to use for firecracker-containerd container + value: "ghcr.io/ease-lab/helloworld:var_workload" diff --git a/configs/knative_workloads/firecracker/helloworldSerial.yaml b/configs/knative_workloads/firecracker/helloworldSerial.yaml new file mode 100644 index 000000000..5ab24e7f1 --- /dev/null +++ b/configs/knative_workloads/firecracker/helloworldSerial.yaml @@ -0,0 +1,18 @@ +apiVersion: serving.knative.dev/v1 +kind: Service +metadata: + namespace: default +spec: + template: + spec: + containerConcurrency: 1 + containers: + - image: crccheck/hello-world:latest # Stub image. See https://github.com/vhive-serverless/vhive/issues/68 + ports: + - name: h2c # For GRPC support + containerPort: 50051 + env: + - name: GUEST_PORT # Port on which the firecracker-containerd container is accepting requests + value: "50051" + - name: GUEST_IMAGE # Container image to use for firecracker-containerd container + value: "ghcr.io/ease-lab/helloworld:var_workload" diff --git a/configs/knative_workloads/firecracker/helloworld_local.yaml b/configs/knative_workloads/firecracker/helloworld_local.yaml new file mode 100644 index 000000000..a0037df85 --- /dev/null +++ b/configs/knative_workloads/firecracker/helloworld_local.yaml @@ -0,0 +1,17 @@ +apiVersion: serving.knative.dev/v1 +kind: Service +metadata: + namespace: default +spec: + template: + spec: + containers: + - image: crccheck/hello-world:latest # Stub image. See https://github.com/vhive-serverless/vhive/issues/68 + ports: + - name: h2c # For GRPC support + containerPort: 50051 + env: + - name: GUEST_PORT # Port on which the firecracker-containerd container is accepting requests + value: "50051" + - name: GUEST_IMAGE # Container image to use for firecracker-containerd container + value: "docker-registry.registry.svc.cluster.local:5000/vhiveease/helloworld:var_workload" diff --git a/configs/knative_workloads/firecracker/pyaes.yaml b/configs/knative_workloads/firecracker/pyaes.yaml new file mode 100644 index 000000000..bba9d722c --- /dev/null +++ b/configs/knative_workloads/firecracker/pyaes.yaml @@ -0,0 +1,17 @@ +apiVersion: serving.knative.dev/v1 +kind: Service +metadata: + namespace: default +spec: + template: + spec: + containers: + - image: crccheck/hello-world:latest # Stub image. See https://github.com/vhive-serverless/vhive/issues/68 + ports: + - name: h2c # For GRPC support + containerPort: 50051 + env: + - name: GUEST_PORT # Port on which the firecracker-containerd container is accepting requests + value: "50051" + - name: GUEST_IMAGE # Container image to use for firecracker-containerd container + value: "ghcr.io/ease-lab/pyaes:var_workload" diff --git a/configs/knative_workloads/gvisor/helloworld.yaml b/configs/knative_workloads/gvisor/helloworld.yaml new file mode 100644 index 000000000..80f60754e --- /dev/null +++ b/configs/knative_workloads/gvisor/helloworld.yaml @@ -0,0 +1,17 @@ +apiVersion: serving.knative.dev/v1 +kind: Service +metadata: + namespace: default +spec: + template: + spec: + containers: + - image: ghcr.io/ease-lab/helloworld:var_workload + ports: + - name: h2c # For GRPC support + containerPort: 50051 + env: + - name: GUEST_PORT # Port on which the firecracker-containerd container is accepting requests + value: "50051" + - name: GUEST_IMAGE # Container image to use for firecracker-containerd container + value: "ghcr.io/ease-lab/helloworld:var_workload" diff --git a/configs/knative_workloads/gvisor/helloworldSerial.yaml b/configs/knative_workloads/gvisor/helloworldSerial.yaml new file mode 100644 index 000000000..c25c8f5b0 --- /dev/null +++ b/configs/knative_workloads/gvisor/helloworldSerial.yaml @@ -0,0 +1,18 @@ +apiVersion: serving.knative.dev/v1 +kind: Service +metadata: + namespace: default +spec: + template: + spec: + containerConcurrency: 1 + containers: + - image: ghcr.io/ease-lab/helloworld:var_workload + ports: + - name: h2c # For GRPC support + containerPort: 50051 + env: + - name: GUEST_PORT # Port on which the firecracker-containerd container is accepting requests + value: "50051" + - name: GUEST_IMAGE # Container image to use for firecracker-containerd container + value: "ghcr.io/ease-lab/helloworld:var_workload" diff --git a/configs/knative_workloads/gvisor/pyaes.yaml b/configs/knative_workloads/gvisor/pyaes.yaml new file mode 100644 index 000000000..f1379d54f --- /dev/null +++ b/configs/knative_workloads/gvisor/pyaes.yaml @@ -0,0 +1,17 @@ +apiVersion: serving.knative.dev/v1 +kind: Service +metadata: + namespace: default +spec: + template: + spec: + containers: + - image: ghcr.io/ease-lab/pyaes:var_workload + ports: + - name: h2c # For GRPC support + containerPort: 50051 + env: + - name: GUEST_PORT # Port on which the firecracker-containerd container is accepting requests + value: "50051" + - name: GUEST_IMAGE # Container image to use for firecracker-containerd container + value: "ghcr.io/ease-lab/pyaes:var_workload" diff --git a/scripts/github_runner/setup_cri_test_env.sh b/scripts/github_runner/setup_cri_test_env.sh index 0a4dda005..fe83ccfd4 100755 --- a/scripts/github_runner/setup_cri_test_env.sh +++ b/scripts/github_runner/setup_cri_test_env.sh @@ -45,11 +45,7 @@ $VHIVE_ROOT/scripts/setup_tool -vhive-repo-dir $VHIVE_ROOT setup_zipkin # FIXME (gh-709) #source etc/profile && go run $VHIVE_ROOT/examples/registry/populate_registry.go -imageFile $VHIVE_ROOT/examples/registry/images.txt -sudo KUBECONFIG=/etc/kubernetes/admin.conf kn service apply helloworld -f $VHIVE_ROOT/configs/knative_workloads/helloworld.yaml -# FIXME (gh-709) -#KUBECONFIG=/etc/kubernetes/admin.conf sudo kn service apply helloworldlocal -f $VHIVE_ROOT/configs/knative_workloads/helloworld_local.yaml -# ^^^^^^^ This WILL NOT work because ${KUBECONFIG} would not be set in the context when executing `kn` - -sudo KUBECONFIG=/etc/kubernetes/admin.conf kn service apply helloworldserial -f $VHIVE_ROOT/configs/knative_workloads/helloworldSerial.yaml -sudo KUBECONFIG=/etc/kubernetes/admin.conf kn service apply pyaes -f $VHIVE_ROOT/configs/knative_workloads/pyaes.yaml +sudo KUBECONFIG=/etc/kubernetes/admin.conf kn service apply helloworld -f $VHIVE_ROOT/configs/knative_workloads/$SANDBOX/helloworld.yaml +sudo KUBECONFIG=/etc/kubernetes/admin.conf kn service apply helloworldserial -f $VHIVE_ROOT/configs/knative_workloads/$SANDBOX/helloworldSerial.yaml +sudo KUBECONFIG=/etc/kubernetes/admin.conf kn service apply pyaes -f $VHIVE_ROOT/configs/knative_workloads/$SANDBOX/pyaes.yaml sleep 30s