diff --git a/k8s/template-yaml-aim/k8s-10gen.yaml b/k8s/template-yaml-aim/k8s-10gen.yaml new file mode 100644 index 00000000..f9ae8b2f --- /dev/null +++ b/k8s/template-yaml-aim/k8s-10gen.yaml @@ -0,0 +1,36 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ci4s-gen-deployment + namespace: ci4s-test +spec: + replicas: 1 + selector: + matchLabels: + app: ci4s-gen + template: + metadata: + labels: + app: ci4s-gen + spec: + containers: + - name: ci4s-gen + image: ${k8s-10gen-image} + ports: + - containerPort: 9202 + +--- +apiVersion: v1 +kind: Service +metadata: + name: ci4s-gen-service + namespace: ci4s-test +spec: + type: NodePort + ports: + - port: 9202 + nodePort: 31211 + protocol: TCP + selector: + app: ci4s-gen + diff --git a/k8s/template-yaml-aim/k8s-11visual.yaml b/k8s/template-yaml-aim/k8s-11visual.yaml new file mode 100644 index 00000000..d479429e --- /dev/null +++ b/k8s/template-yaml-aim/k8s-11visual.yaml @@ -0,0 +1,36 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ci4s-visual-deployment + namespace: ci4s-test +spec: + replicas: 1 + selector: + matchLabels: + app: ci4s-visual + template: + metadata: + labels: + app: ci4s-visual + spec: + containers: + - name: ci4s-visual + image: ${k8s-11visual-image} + ports: + - containerPort: 9100 + +--- +apiVersion: v1 +kind: Service +metadata: + name: ci4s-visual-service + namespace: ci4s-test +spec: + type: NodePort + ports: + - port: 9100 + nodePort: 31212 + protocol: TCP + selector: + app: ci4s-visual + diff --git a/k8s/template-yaml-aim/k8s-12front.yaml b/k8s/template-yaml-aim/k8s-12front.yaml new file mode 100644 index 00000000..82d9dd26 --- /dev/null +++ b/k8s/template-yaml-aim/k8s-12front.yaml @@ -0,0 +1,36 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ci4s-front-deployment + namespace: argo +spec: + replicas: 1 + selector: + matchLabels: + app: ci4s-front + template: + metadata: + labels: + app: ci4s-front + spec: + containers: + - name: ci4s-front + image: ccr.ccs.tencentyun.com/somunslotus/ci4s-front:20241024-arm + ports: + - containerPort: 8000 + +--- +apiVersion: v1 +kind: Service +metadata: + name: ci4s-front-service + namespace: argo +spec: + type: NodePort + ports: + - port: 8000 + nodePort: 31213 + protocol: TCP + selector: + app: ci4s-front + diff --git a/k8s/template-yaml-aim/k8s-3nacos.yaml b/k8s/template-yaml-aim/k8s-3nacos.yaml new file mode 100644 index 00000000..225c6b23 --- /dev/null +++ b/k8s/template-yaml-aim/k8s-3nacos.yaml @@ -0,0 +1,71 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + namespace: argo + name: nacos-ci4s + labels: + app: nacos-ci4s +spec: + replicas: 1 + selector: + matchLabels: + app: nacos-ci4s + template: + metadata: + labels: + app: nacos-ci4s + spec: + containers: + - name: nacos-ci4s + image: nacos/nacos-server:v2.2.0 + env: + - name: SPRING_DATASOURCE_PLATFORM + value: mysql + - name: MODE + value: standalone + - name: MYSQL_SERVICE_HOST + value: mysql.argo.svc + - name: MYSQL_SERVICE_PORT + value: "3306" + - name: MYSQL_SERVICE_DB_NAME + value: nacos-ci4s-config + - name: MYSQL_SERVICE_USER + value: root + - name: MYSQL_SERVICE_PASSWORD + value: qazxc123456. + ports: + - containerPort: 8848 + - containerPort: 9848 + - containerPort: 9849 + initContainers: + - name: init-mydb + image: busybox:1.31 + command: [ 'sh', '-c', 'nc -zv mysql.argo.svc 3306' ] + restartPolicy: Always + +--- + +apiVersion: v1 +kind: Service +metadata: + namespace: argo + name: nacos-ci4s + labels: + app: nacos-ci4s +spec: + type: NodePort + selector: + app: nacos-ci4s + ports: + - port: 8848 + targetPort: 8848 + nodePort: 31203 + name: web + - port: 9848 + targetPort: 9848 + nodePort: 32203 + name: podsa + - port: 9849 + targetPort: 9849 + nodePort: 32204 + name: tcp-9849 \ No newline at end of file diff --git a/k8s/template-yaml-aim/k8s-4gateway.yaml b/k8s/template-yaml-aim/k8s-4gateway.yaml new file mode 100644 index 00000000..fa597f65 --- /dev/null +++ b/k8s/template-yaml-aim/k8s-4gateway.yaml @@ -0,0 +1,36 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ci4s-gateway-deployment + namespace: argo +spec: + replicas: 1 + selector: + matchLabels: + app: ci4s-gateway + template: + metadata: + labels: + app: ci4s-gateway + spec: + containers: + - name: ci4s-gateway + image: ccr.ccs.tencentyun.com/somunslotus/ci4s-gateway:20241024-arm + ports: + - containerPort: 8082 + +--- +apiVersion: v1 +kind: Service +metadata: + name: ci4s-gateway-service + namespace: argo +spec: + type: NodePort + ports: + - port: 8082 + nodePort: 31205 + protocol: TCP + selector: + app: ci4s-gateway + diff --git a/k8s/template-yaml-aim/k8s-5auth.yaml b/k8s/template-yaml-aim/k8s-5auth.yaml new file mode 100644 index 00000000..6951aaae --- /dev/null +++ b/k8s/template-yaml-aim/k8s-5auth.yaml @@ -0,0 +1,36 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ci4s-auth-deployment + namespace: argo +spec: + replicas: 1 + selector: + matchLabels: + app: ci4s-auth + template: + metadata: + labels: + app: ci4s-auth + spec: + containers: + - name: ci4s-auth + image: ccr.ccs.tencentyun.com/somunslotus/ci4s-auth:20241024-arm + ports: + - containerPort: 9200 + +--- +apiVersion: v1 +kind: Service +metadata: + name: ci4s-auth-service + namespace: argo +spec: + type: NodePort + ports: + - port: 9200 + nodePort: 31206 + protocol: TCP + selector: + app: ci4s-auth + diff --git a/k8s/template-yaml-aim/k8s-6system.yaml b/k8s/template-yaml-aim/k8s-6system.yaml new file mode 100644 index 00000000..acecac99 --- /dev/null +++ b/k8s/template-yaml-aim/k8s-6system.yaml @@ -0,0 +1,36 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ci4s-system-deployment + namespace: argo +spec: + replicas: 1 + selector: + matchLabels: + app: ci4s-system + template: + metadata: + labels: + app: ci4s-system + spec: + containers: + - name: ci4s-system + image: ccr.ccs.tencentyun.com/somunslotus/ci4s-system:20241024-arm + ports: + - containerPort: 9201 + +--- +apiVersion: v1 +kind: Service +metadata: + name: ci4s-system-service + namespace: argo +spec: + type: NodePort + ports: + - port: 9201 + nodePort: 31207 + protocol: TCP + selector: + app: ci4s-system + diff --git a/k8s/template-yaml-aim/k8s-7management.yaml b/k8s/template-yaml-aim/k8s-7management.yaml new file mode 100644 index 00000000..fc5c3fd1 --- /dev/null +++ b/k8s/template-yaml-aim/k8s-7management.yaml @@ -0,0 +1,54 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ci4s-management-platform-deployment + namespace: argo +spec: + replicas: 1 + selector: + matchLabels: + app: ci4s-management-platform + template: + metadata: + labels: + app: ci4s-management-platform + spec: + containers: + - name: ci4s-management-platform + image: ccr.ccs.tencentyun.com/somunslotus/ci4s-managent:20241024-arm + env: + - name: TZ + value: Asia/Shanghai + - name: JAVA_TOOL_OPTIONS + value: "-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:5005" + ports: + - containerPort: 9213 + volumeMounts: + - name: resource-volume + mountPath: /home/resource/ + subPath: mini-model-platform-data + volumes: + - name: resource-volume + hostPath: + path: /platform-data +--- +apiVersion: v1 +kind: Service +metadata: + name: ci4s-management-platform-service + namespace: argo +spec: + type: NodePort + ports: + - name: http + port: 9213 + nodePort: 31208 + protocol: TCP + - name: debug + nodePort: 31219 + port: 5005 + protocol: TCP + targetPort: 5005 + selector: + app: ci4s-management-platform + diff --git a/k8s/template-yaml-aim/k8s-8file.yaml b/k8s/template-yaml-aim/k8s-8file.yaml new file mode 100644 index 00000000..bcd2fd01 --- /dev/null +++ b/k8s/template-yaml-aim/k8s-8file.yaml @@ -0,0 +1,36 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ci4s-file-deployment + namespace: ci4s-test +spec: + replicas: 1 + selector: + matchLabels: + app: ci4s-file + template: + metadata: + labels: + app: ci4s-file + spec: + containers: + - name: ci4s-file + image: ${k8s-8file-image} + ports: + - containerPort: 9300 + +--- +apiVersion: v1 +kind: Service +metadata: + name: ci4s-file-service + namespace: ci4s-test +spec: + type: NodePort + ports: + - port: 9300 + nodePort: 31209 + protocol: TCP + selector: + app: ci4s-file + diff --git a/k8s/template-yaml-aim/k8s-9job.yaml b/k8s/template-yaml-aim/k8s-9job.yaml new file mode 100644 index 00000000..1a262cab --- /dev/null +++ b/k8s/template-yaml-aim/k8s-9job.yaml @@ -0,0 +1,36 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ci4s-job-deployment + namespace: ci4s-test +spec: + replicas: 1 + selector: + matchLabels: + app: ci4s-job + template: + metadata: + labels: + app: ci4s-job + spec: + containers: + - name: ci4s-job + image: ${k8s-9job-image} + ports: + - containerPort: 9203 + +--- +apiVersion: v1 +kind: Service +metadata: + name: ci4s-job-service + namespace: ci4s-test +spec: + type: NodePort + ports: + - port: 9203 + nodePort: 31210 + protocol: TCP + selector: + app: ci4s-job + diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/utils/RedisUtil.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/utils/RedisUtil.java new file mode 100644 index 00000000..be68766a --- /dev/null +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/utils/RedisUtil.java @@ -0,0 +1,26 @@ +package com.ruoyi.platform.utils; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; +import redis.clients.jedis.Jedis; + +@Component +public class RedisUtil { + + @Value("${spring.redis.host}") + private String redisHost; + @Value("${spring.redis.port}") + private Integer redisPort; + @Value("${spring.redis.password}") + private Integer redisPassword; + + public Jedis getJedis() { + Jedis jedis = new Jedis(redisHost, redisPort); + String response = jedis.auth(redisPassword); + if ("OK".equals(response)) { + return jedis; + } else { + throw new IllegalStateException("redis密码错误"); + } + } +}