From 11bfa2cbc540e36c64df221b7fd79ab13d971553 Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Mon, 25 Sep 2023 17:28:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BB=BB=E5=8A=A1=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: f496fcbe25f56a6eed64d8fbd5c9659e988906a8 --- api/internal/validate/validation.go | 16 ++++++++++++++ examples/ai/modelArts.yaml | 12 +++++++++++ examples/cloud/nginx.yaml | 33 +++++++++++++++++++++++++++++ examples/hpc/ac.yaml | 21 ++++++++++++++++++ examples/hpc/th.yaml | 8 +++++++ 5 files changed, 90 insertions(+) create mode 100644 api/internal/validate/validation.go create mode 100644 examples/ai/modelArts.yaml create mode 100644 examples/cloud/nginx.yaml create mode 100644 examples/hpc/ac.yaml create mode 100644 examples/hpc/th.yaml diff --git a/api/internal/validate/validation.go b/api/internal/validate/validation.go new file mode 100644 index 00000000..ff649336 --- /dev/null +++ b/api/internal/validate/validation.go @@ -0,0 +1,16 @@ +package validate + +type cloud struct { + participantId int64 + namespace string + name string + kind string +} + +type IValidate interface { + Validate() +} + +func (c *cloud) Validate() { + +} diff --git a/examples/ai/modelArts.yaml b/examples/ai/modelArts.yaml new file mode 100644 index 00000000..e5e579fd --- /dev/null +++ b/examples/ai/modelArts.yaml @@ -0,0 +1,12 @@ +description: modelArts +strategy: 策略 +synergy: 协同状态 +name: modelArts +tasks: + - serviceName: modelArts + metadata: + projectId: 0a62ffb0d48026c12fbfc011b8d23f0b + name: demo3 + command: echo hello;sleep 100;echo hello;sleep 100;echo hello + flavorId: modelarts.p3.large.public.free + imageUrl: jcce/nginx:v1 \ No newline at end of file diff --git a/examples/cloud/nginx.yaml b/examples/cloud/nginx.yaml new file mode 100644 index 00000000..0c25eed0 --- /dev/null +++ b/examples/cloud/nginx.yaml @@ -0,0 +1,33 @@ +description: 0901 +strategy: 策略 +synergy: 协同状态 +name: myapp-0901 +tasks: + - taskType: cloud + participantId: 1694303450734530560 + matchLabels: + nudt: hpc + metadata: + apiVersion: apps/v1 + kind: Deployment + metadata: + name: myapp-0901 + namespace: zw + spec: + replicas: 2 + selector: + matchLabels: + app: myapp + version: v1 + template: + metadata: + labels: + app: myapp + version: v1 + spec: + containers: + - image: nginx + imagePullPolicy: IfNotPresent + name: myapp + ports: + - containerPort: 80 \ No newline at end of file diff --git a/examples/hpc/ac.yaml b/examples/hpc/ac.yaml new file mode 100644 index 00000000..07f02230 --- /dev/null +++ b/examples/hpc/ac.yaml @@ -0,0 +1,21 @@ +description: ac_01 +strategy: 策略 +synergy: 协同状态 +name: ac_01 +tasks: + - taskType: hpc + matchLabels: + hpc: shuguang + metadata: + cardCount: 1 + name: ac_01 + workDir: /public/home/zhijiang/test/testjob1 + wallTime: 00:10:00 + cmdScript: sleep 300 + appType: BASIC + appName: BASE + queue: debug2 + nNode: "1" + submitType: cmd + stdOutFile: /public/home/zhijiang/test/testjob1/std.out.%j + stdErrFile: /public/home/zhijiang/test/testjob1/std.err.%j \ No newline at end of file diff --git a/examples/hpc/th.yaml b/examples/hpc/th.yaml new file mode 100644 index 00000000..4da1fd0b --- /dev/null +++ b/examples/hpc/th.yaml @@ -0,0 +1,8 @@ +description: th1 task +name: th1 demo +tasks: + - serviceName: th + metadata: + cardCount: 1 + name: tianhe1 demo + cmdScript: srun sleep 500