From 453311ddd8bdf346a45cadf7988237b7c07dbeae Mon Sep 17 00:00:00 2001 From: root Date: Sun, 21 Jun 2020 07:44:19 +0000 Subject: [PATCH 1/8] test --- saas/cron_report_minute_monior.yaml | 73 ++++++++++++ saas/cron_report_monior.yaml | 73 ++++++++++++ saas/vpc-aeolus-be_1.yaml | 170 +++++++++++++++++++++++++++ saas/vpc-find-be.yaml | 136 ++++++++++++++++++++++ saas/vpc-push-be.yaml | 155 +++++++++++++++++++++++++ saas/vpc-subscribe-be.yaml | 172 ++++++++++++++++++++++++++++ saas/vpc-vqs-be.yaml | 143 +++++++++++++++++++++++ 7 files changed, 922 insertions(+) create mode 100644 saas/cron_report_minute_monior.yaml create mode 100644 saas/cron_report_monior.yaml create mode 100644 saas/vpc-aeolus-be_1.yaml create mode 100644 saas/vpc-find-be.yaml create mode 100644 saas/vpc-push-be.yaml create mode 100644 saas/vpc-subscribe-be.yaml create mode 100644 saas/vpc-vqs-be.yaml diff --git a/saas/cron_report_minute_monior.yaml b/saas/cron_report_minute_monior.yaml new file mode 100644 index 0000000..78c8a2a --- /dev/null +++ b/saas/cron_report_minute_monior.yaml @@ -0,0 +1,73 @@ +apiVersion: batch/v1beta1 +kind: CronJob +metadata: + name: aeolus-report-minute-monitor + namespace: aeolus +spec: + schedule: "*/10 * * * *" + jobTemplate: + spec: + template: + metadata: + labels: + app: aeolus-cron + spec: + hostNetwork: false + dnsPolicy: Default + containers: + - name: aeolus-report-minute-monitor + image: aeolus.vpc.com/library/aeolus:1.0.20 + imagePullPolicy: IfNotPresent + env: + - name: APP_DEPLOY_ENV + value: AEOLUS_TOB_ENV + - name: DEPLOY_ENV + value: PROD + - name: DB_USER + value: aeolus_db_w + - name: DB_PASSWD + value: ccukDFrkmnQfoy7KPQHKZYC7XzbJsHuS + # 监控报警,分钟级监控标识 + - name: FREQ + value: "1" + # -------邮件服务--------- + # 邮件正文中产品标识 + - name: PRODUCT_NAME + value: DataWind + # 部署服务地址 + # TODO: 部署前必须修改 + - name: PRODUCT_DOMAIN + value: http://218.205.220.74:32000 + - name: PRODUCT_URL_PREFIX + value: bi + - name: SMTP_EMAIL_USERNAME + value: datawind@yeah.net + - name: SMTP_EMAIL_PASSWORD + value: PKACIKCPFPDVPNUB + - name: SMTP_EMAIL_SERVER + value: 123.58.177.131 + - name: SMTP_EMAIL_PORT + value: "465" + # 发件人名称 + - name: SMTP_EMAIL_SIGNATURE + value: DataWind + command: ["/bin/sh"] + args: ["-c", "cd /opt/tiger/toutiao/app/data/aeolus; python -m aeolus.scripts.so_caller.check_monitor"] + volumeMounts: + - name: sock + mountPath: /opt/tmp/sock + - name: hadoop + mountPath: /opt/tiger/yarn_deploy/hadoop + - name: jdk8 + mountPath: /opt/tiger/jdk/jdk1.8.0_181 + volumes: + - name: sock + hostPath: + path: /opt/tmp/sock + - name: hadoop + hostPath: + path: /opt/tiger/yarn_deploy/hadoop + - name: jdk8 + hostPath: + path: /opt/tiger/jdk/jdk1.8.0_181 + restartPolicy: OnFailure diff --git a/saas/cron_report_monior.yaml b/saas/cron_report_monior.yaml new file mode 100644 index 0000000..904e94c --- /dev/null +++ b/saas/cron_report_monior.yaml @@ -0,0 +1,73 @@ +apiVersion: batch/v1beta1 +kind: CronJob +metadata: + name: aeolus-report-monitor + namespace: aeolus +spec: + schedule: "*/10 * * * *" + jobTemplate: + spec: + template: + metadata: + labels: + app: aeolus-cron + spec: + # 非必须 + #nodeSelector: + # node: sub + #hostNetwork: false + #dnsPolicy: Default + containers: + - name: aeolus-report-monitor + image: aeolus.vpc.com/library/xuyi_test:1.0.0.263 + imagePullPolicy: IfNotPresent + env: + - name: APP_DEPLOY_ENV + value: AEOLUS_TOB_ENV + - name: DEPLOY_ENV + value: PROD + - name: DB_USER + value: aeolus_db_w + - name: DB_PASSWD + value: ccukDFrkmnQfoy7KPQHKZYC7XzbJsHuS + # -------邮件服务--------- + # 邮件正文中产品标识 + - name: PRODUCT_NAME + value: DataWind + # 部署服务地址 + # TODO: 部署前必须修改 + - name: PRODUCT_DOMAIN + value: http://218.205.220.74:32000 + - name: PRODUCT_URL_PREFIX + value: bi + - name: SMTP_EMAIL_USERNAME + value: datawind@yeah.net + - name: SMTP_EMAIL_PASSWORD + value: PKACIKCPFPDVPNUB + - name: SMTP_EMAIL_SERVER + value: 123.58.177.131 + - name: SMTP_EMAIL_PORT + value: "465" + # 发件人名称 + - name: SMTP_EMAIL_SIGNATURE + value: DataWind + command: ["/bin/sh"] + args: ["-c", "cd /opt/tiger/toutiao/app/data/aeolus; python -m aeolus.scripts.so_caller.check_monitor"] + volumeMounts: + - name: sock + mountPath: /opt/tmp/sock + - name: hadoop + mountPath: /opt/tiger/yarn_deploy/hadoop + - name: jdk8 + mountPath: /opt/tiger/jdk/jdk1.8.0_181 + volumes: + - name: sock + hostPath: + path: /opt/tmp/sock + - name: hadoop + hostPath: + path: /opt/tiger/yarn_deploy/hadoop + - name: jdk8 + hostPath: + path: /opt/tiger/jdk/jdk1.8.0_181 + restartPolicy: OnFailure diff --git a/saas/vpc-aeolus-be_1.yaml b/saas/vpc-aeolus-be_1.yaml new file mode 100644 index 0000000..b999ca0 --- /dev/null +++ b/saas/vpc-aeolus-be_1.yaml @@ -0,0 +1,170 @@ +# 定义模块命名空间, 每个服务模块对应一个命名空间 +#apiVersion: v1 +#kind: Namespace +#metadata: +# name: aeolus +--- +# 命名空间内实例资源定义 +apiVersion: v1 +kind: LimitRange +metadata: + name: limit-range-aeolus + namespace: aeolus +spec: + limits: + - type: Pod + min: + cpu: 50m + memory: 5Mi + max: + cpu: 1 + memory: 2Gi + - type: Container + defaultRequest: # 默认的内存/cpu请求 + cpu: 500m + memory: 1Gi + default: # 默认的内存/cpu限制 + cpu: 500m + memory: 1Gi +--- +# 命名空间内总体资源限制 +apiVersion: v1 +kind: ResourceQuota +metadata: + name: resource-quota-aeolus + namespace: aeolus +spec: + hard: # 每个容器必须有内存请求和限制,以及 CPU 请求和限制 + requests.cpu: 10 # 所有容器的 CPU 请求总和不能超过2 cpu + requests.memory: 20Gi # 所有容器的内存请求总和不能超过2 GiB + limits.cpu: 20 # 所有容器的 CPU 限制总和不能超过4 cpu + limits.memory: 50Gi # 所有容器的内存限制总和不能超过10 GiB +--- +# Deployment部署方式定义Pod及Container具体参数 +apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 +kind: Deployment +metadata: + name: vpc-aeolus-be + namespace: aeolus +spec: + selector: + matchLabels: + app: vpc-aeolus-be + replicas: 1 # tells deployment to run 2 pods matching the template + template: + metadata: + labels: + app: vpc-aeolus-be + spec: + containers: + - name: vpc-aeolus-be + image: aeolus.vpc.com/library/xuyi_test:1.0.0.263 + imagePullPolicy: IfNotPresent + env: + - name: HADOOP_HOME + value: /opt/tiger/yarn_deploy/hadoop + - name: DB_USER + value: aeolus_db_w + - name: DB_PASSWD + value: ccukDFrkmnQfoy7KPQHKZYC7XzbJsHuS + - name: APP_AUTH_ENV + value: PRIVATE_AUTH_ENV + # -------邮件服务--------- + # 邮件正文中产品标识 + - name: PRODUCT_NAME + value: DataWind + # 部署服务地址 + # TODO: 部署前必须修改 + - name: PRODUCT_DOMAIN + value: http://218.205.220.74:32000 + - name: PRODUCT_URL_PREFIX + value: bi + - name: SMTP_EMAIL_USERNAME + value: datawind@yeah.net + - name: SMTP_EMAIL_PASSWORD + value: PKACIKCPFPDVPNUB + - name: SMTP_EMAIL_SERVER + value: 123.58.177.131 + - name: SMTP_EMAIL_PORT + value: "465" + # 发件人名称 + - name: SMTP_EMAIL_SIGNATURE + value: DataWind + # --------订阅服务---------- + # 内网访问打开浏览器的域名,没有http(s):// + - name: SUBSCRIBE_DOMAIN + value: aeolus-fe.aeolus + # 订阅服务PSM地址 + - name: SUBSCRIBE_PSM + value: data.subscription.sunben.api + command: ["/bin/sh"] + args: ["-c", "/opt/tiger/toutiao/app/data/aeolus/run/tob_prod_run.sh"] + ports: + - containerPort: 12355 + # 可选, 存活探针, 确定何时重启容器 + livenessProbe: + httpGet: + path: /aeolus/api/v2/misc/healthz + port: 12355 + httpHeaders: + - name: Content-type + value: application/json + - name: accept + value: application/json, text/plain, */* + initialDelaySeconds: 5 # 容器启动后第一次执行探测需要等待多少秒 + periodSeconds: 60 # 执行探测的频率. 默认是10秒, 最小1秒 + # 可选, 就绪探针, 确定容器是否已经就绪可以接受流量 + readinessProbe: + httpGet: + path: /aeolus/api/v2/misc/healthz + port: 12355 + httpHeaders: + - name: Content-type + value: application/json + - name: accept + value: application/json, text/plain, */* + initialDelaySeconds: 5 + periodSeconds: 60 + volumeMounts: + - name: sock + mountPath: /opt/tmp/sock + - name: hadoop + mountPath: /opt/tiger/yarn_deploy/hadoop + - name: hive + mountPath: /opt/tiger/hive_deploy + - name: jdk8 + mountPath: /opt/tiger/jdk/jdk1.8.0_181 + volumes: + - name: sock + hostPath: + path: /opt/tmp/sock + - name: hadoop + hostPath: + path: /opt/tiger/yarn_deploy/hadoop + - name: hive + hostPath: + path: /opt/tiger/hive_deploy + - name: jdk8 + hostPath: + path: /opt/tiger/jdk/jdk1.8.0_181 + +--- +# Service资源定义 +apiVersion: v1 +kind: Service +metadata: + name: vpc-aeolus-be + namespace: aeolus + annotations: + consul.register/enabled: "true" + consul.register/service.name: "data.aeolus.api" # service.name 集群内服务自动发现注册至consul用 + consul.register/service.health.ttl: "8640000s" +spec: + # 定义外部访问端口到服务端口映射 + type: NodePort + ports: + - port: 12355 + nodePort: 31001 + targetPort: 12355 + selector: + app: vpc-aeolus-be diff --git a/saas/vpc-find-be.yaml b/saas/vpc-find-be.yaml new file mode 100644 index 0000000..c761a6f --- /dev/null +++ b/saas/vpc-find-be.yaml @@ -0,0 +1,136 @@ +# 定义模块命名空间, 每个服务模块对应一个命名空间 +apiVersion: v1 +kind: Namespace +metadata: + name: find +--- +# 命名空间内实例资源定义 +apiVersion: v1 +kind: LimitRange +metadata: + name: vpc-find-be + namespace: find +spec: + limits: + - type: Pod + min: + cpu: 50m + memory: 5Mi + max: + cpu: 1 + memory: 2Gi + - type: Container + defaultRequest: # 默认的内存/cpu请求 + cpu: 500m + memory: 1Gi + default: # 默认的内存/cpu限制 + cpu: 500m + memory: 1Gi +--- +# 命名空间内总体资源限制 +apiVersion: v1 +kind: ResourceQuota +metadata: + name: resource-quota-find + namespace: find +spec: + hard: # 每个容器必须有内存请求和限制,以及 CPU 请求和限制 + requests.cpu: 10 # 所有容器的 CPU 请求总和不能超过2 cpu + requests.memory: 20Gi # 所有容器的内存请求总和不能超过2 GiB + limits.cpu: 20 # 所有容器的 CPU 限制总和不能超过4 cpu + limits.memory: 10Gi # 所有容器的内存限制总和不能超过10 GiB +--- +# Deployment部署方式定义Pod及Container具体参数 +apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 +kind: Deployment +metadata: + name: vpc-find-be + namespace: find +spec: + selector: + matchLabels: + app: vpc-find-be + replicas: 1 # tells deployment to run 2 pods matching the template + template: + metadata: + labels: + app: vpc-find-be + spec: + hostNetwork: false + dnsPolicy: Default + containers: + - name: vpc-find-be + #image: hub.byted.org/test/find_sass:ff0640e703cba911ca68201af9ef7f3e + #image: aeolus.vpc.com/library/qihang_test:1.0.0.37 + image: aeolus.vpc.com/library/find_saas:1.0.1 + imagePullPolicy: IfNotPresent + command: ["/bin/sh"] + args: ["-c", "/opt/tiger/toutiao/app/data/find/tob_prod_run.sh"] + ports: + - containerPort: 9090 + # 可选, 存活探针, 确定何时重启容器 + # livenessProbe: + # httpGet: + # path: /find/api/v3/healthz + # port: 9090 + # httpHeaders: + # - name: Content-type + # value: application/json + # - name: accept + # value: application/json, text/plain, */* + # initialDelaySeconds: 5 # 容器启动后第一次执行探测需要等待多少秒 + # periodSeconds: 60 # 执行探测的频率. 默认是10秒, 最小1秒 + # 可选, 就绪探针, 确定容器是否已经就绪可以接受流量 + # readinessProbe: + # httpGet: + # path: /find/api/v3/healthz + # port: 9090 + # httpHeaders: + # - name: Content-type + # value: application/json + # - name: accept + # value: application/json, text/plain, */* + # initialDelaySeconds: 5 + # periodSeconds: 60 + volumeMounts: + - name: sock + mountPath: /opt/tmp/sock + - name: hadoop + mountPath: /opt/tiger/yarn_deploy/hadoop + - name: hive + mountPath: /opt/tiger/hive_deploy + - name: jdk8 + mountPath: /opt/tiger/jdk/jdk1.8.0_181 + volumes: + - name: sock + hostPath: + path: /opt/tmp/sock + - name: hadoop + hostPath: + path: /opt/tiger/yarn_deploy/hadoop + - name: hive + hostPath: + path: /opt/tiger/hive_deploy + - name: jdk8 + hostPath: + path: /opt/tiger/jdk/jdk1.8.0_181 +--- +# Service资源定义 +apiVersion: v1 +kind: Service +metadata: + name: vpc-find-be + namespace: find + annotations: + consul.register/enabled: "true" + consul.register/service.name: "data.warehouse.find" # service.name 集群内服务自动发现注册至consul用 + consul.register/service.health.ttl: "8640000s" +spec: + # 定义外部访问端口到服务端口映射 + type: NodePort + ports: + - port: 9090 + nodePort: 31111 + targetPort: 9090 + selector: + app: vpc-find-be diff --git a/saas/vpc-push-be.yaml b/saas/vpc-push-be.yaml new file mode 100644 index 0000000..425236f --- /dev/null +++ b/saas/vpc-push-be.yaml @@ -0,0 +1,155 @@ +# 定义模块命名空间, 每个服务模块对应一个命名空间 +apiVersion: v1 +kind: Namespace +metadata: + name: push +--- +# 命名空间内实例资源定义 +apiVersion: v1 +kind: LimitRange +metadata: + name: limit-range-aeolus + namespace: push +spec: + limits: + - type: Pod + min: + cpu: 50m + memory: 5Mi + max: + cpu: 2 + memory: 8Gi + - type: Container + defaultRequest: # 默认的内存/cpu请求 + cpu: 2 + memory: 8Gi + default: # 默认的内存/cpu限制 + cpu: 2 + memory: 8Gi +--- +# 命名空间内总体资源限制 +apiVersion: v1 +kind: ResourceQuota +metadata: + name: resource-quota-aeolus + namespace: 12355 +spec: + hard: # 每个容器必须有内存请求和限制,以及 CPU 请求和限制 + requests.cpu: 2 # 所有容器的 CPU 请求总和不能超过2 cpu + requests.memory: 8Gi # 所有容器的内存请求总和不能超过2 GiB + limits.cpu: 2 # 所有容器的 CPU 限制总和不能超过4 cpu + limits.memory: 8Gi # 所有容器的内存限制总和不能超过10 GiB +--- +# Deployment部署方式定义Pod及Container具体参数 +apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 +kind: Deployment +metadata: + name: vpc-push-be + namespace: push +spec: + selector: + matchLabels: + app: vpc-push-be + replicas: 1 # tells deployment to run 2 pods matching the template + template: + metadata: + labels: + app: vpc-push-be + spec: + containers: + - name: vpc-push-be + image: aeolus.vpc.com/library/push_tob:1.0.0.2 + imagePullPolicy: IfNotPresent + env: + # webex + - name: WEBEX_TEAMS_ACCESS_TOKEN + value: MmEzZTRmYjUtZTRkYy00OWE4LWI5NDAtMDE2NDAyY2IwM2FmNWViOTkxZDItOTdi_PF84_consumer + # email + - name: EMAIL_HOST + value: smtp.yeah.net + - name: EMAIL_HOST_USER + value: datawind@yeah.net + - name: EMAIL_HOST_PASSWORD + value: PKACIKCPFPDVPNUB + - name: DEFAULT_FROM_EMAIL + value: datawind@yeah.net + - name: EMAIL_PORT + value: "465" + # 数据库配置 + - name: DB_USER + value: aeolus_db_w + - name: DB_PASSWORD + value: ccukDFrkmnQfoy7KPQHKZYC7XzbJsHuS + - name: DB_NAME + value: aeolus_db + command: ["/bin/sh"] + args: ["-c", "/opt/tiger/toutiao/app/data/push/run/tob_prod_run.sh"] + ports: + - containerPort: 12355 + # 可选, 存活探针, 确定何时重启容器 + livenessProbe: + httpGet: + path: /aeolus/notification/api/v2/misc/healthz + port: 12355 + httpHeaders: + - name: Content-type + value: application/json + - name: accept + value: application/json, text/plain, */* + initialDelaySeconds: 5 # 容器启动后第一次执行探测需要等待多少秒 + periodSeconds: 60 # 执行探测的频率. 默认是10秒, 最小1秒 + # 可选, 就绪探针, 确定容器是否已经就绪可以接受流量 + readinessProbe: + httpGet: + path: /aeolus/notification/api/v2/misc/healthz + port: 12355 + httpHeaders: + - name: Content-type + value: application/json + - name: accept + value: application/json, text/plain, */* + initialDelaySeconds: 5 + periodSeconds: 60 + volumeMounts: + - name: sock + mountPath: /opt/tmp/sock + - name: hadoop + mountPath: /opt/tiger/yarn_deploy/hadoop + - name: hive + mountPath: /opt/tiger/hive_deploy + - name: jdk8 + mountPath: /opt/tiger/jdk/jdk1.8.0_181 + volumes: + - name: sock + hostPath: + path: /opt/tmp/sock + - name: hadoop + hostPath: + path: /opt/tiger/yarn_deploy/hadoop + - name: hive + hostPath: + path: /opt/tiger/hive_deploy + - name: jdk8 + hostPath: + path: /opt/tiger/jdk/jdk1.8.0_181 + +--- +# Service资源定义 +apiVersion: v1 +kind: Service +metadata: + name: vpc-push-be + namespace: push + annotations: + consul.register/enabled: "true" + consul.register/service.name: "data.push.api" # service.name 集群内服务自动发现注册至consul用 + consul.register/service.health.ttl: "8640000s" +spec: + # 定义外部访问端口到服务端口映射 + type: NodePort + ports: + - port: 12355 + nodePort: 31688 + targetPort: 12355 + selector: + app: vpc-push-be diff --git a/saas/vpc-subscribe-be.yaml b/saas/vpc-subscribe-be.yaml new file mode 100644 index 0000000..6e81936 --- /dev/null +++ b/saas/vpc-subscribe-be.yaml @@ -0,0 +1,172 @@ +# 定义模块命名空间, 每个服务模块对应一个命名空间 +apiVersion: v1 +kind: Namespace +metadata: + name: subscription-sunben +--- +# 命名空间内实例资源定义 +apiVersion: v1 +kind: LimitRange +metadata: + name: limit-range-aeolus + namespace: subscription-sunben +spec: + limits: + - type: Pod + min: + cpu: 50m + memory: 5Mi + max: + cpu: 2 + memory: 8Gi + - type: Container + defaultRequest: # 默认的内存/cpu请求 + cpu: 2 + memory: 8Gi + default: # 默认的内存/cpu限制 + cpu: 2 + memory: 8Gi +--- +# 命名空间内总体资源限制 +apiVersion: v1 +kind: ResourceQuota +metadata: + name: resource-quota-aeolus + namespace: subscription-sunben +spec: + hard: # 每个容器必须有内存请求和限制,以及 CPU 请求和限制 + requests.cpu: 2 # 所有容器的 CPU 请求总和不能超过2 cpu + requests.memory: 8Gi # 所有容器的内存请求总和不能超过2 GiB + limits.cpu: 2 # 所有容器的 CPU 限制总和不能超过4 cpu + limits.memory: 8Gi # 所有容器的内存限制总和不能超过10 GiB +--- +# Deployment部署方式定义Pod及Container具体参数 +apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 +kind: Deployment +metadata: + name: subscription-for-aeolus + namespace: subscription-sunben +spec: + selector: + matchLabels: + app: subscription-for-aeolus + replicas: 1 # tells deployment to run 2 pods matching the template + template: + metadata: + labels: + app: subscription-for-aeolus + spec: + containers: + - name: subscription-for-aeolus + #image: hub.byted.org/dpfe/dp.subscription:1.0.18 + image: aeolus.vpc.com/library/subscription_sunben:1.1.0 + imagePullPolicy: IfNotPresent + env: + # 风神交互 + - name: USER_INFO_URL + value: psm://data.aeolus.api/aeolus/api/v2/account/getUserName + - name: USER_LOGIN_COOKIE_URL + value: psm://data.aeolus.api/aeolus/api/v2/account/getSessionId + - name: USER_BASIC_AUTHORIZATION + value: 7Ha3KVMjSGcZzeG4NJne1T6wnoIgU6xcjblOfDAATpSTCNU7bdiFpeDI1wdCyoYX + # email + - name: EMAIL_HOST + value: 123.58.177.131 + - name: EMAIL_HOST_USER + value: datawind@yeah.net + - name: EMAIL_HOST_PASSWORD + value: PKACIKCPFPDVPNUB + - name: DEFAULT_FROM_EMAIL + value: datawind@yeah.net + - name: EMAIL_PORT + value: "465" + # 数据库/Redis配置 + - name: DB_PSM + value: vpc.mysql.aeolus_db_write + - name: DB_USER + value: aeolus_db_w + - name: DB_PASSWORD + value: ccukDFrkmnQfoy7KPQHKZYC7XzbJsHuS + - name: DB_NAME + value: aeolus_db + - name: SCREENSHOT_REDIS_PSM + value: redis + # 特殊配置 + # 截图服务URL映射 + - name: SCREENSHOT_URL_HOST_MAPPING + value: https{0,1}://[^\/]*->http://aeolus-fe.aeolus:5000 + # minio + - name: MINIO_PSM + value: vpc.common.minio + command: ["/bin/sh"] + args: ["-c", "/start.sh"] + # args: ["-c", "sleep 100000000s"] + ports: + - containerPort: 8005 + # 可选, 存活探针, 确定何时重启容器 + livenessProbe: + httpGet: + path: /subscription/api/v1/products/xxxxxx/ + port: 8005 + httpHeaders: + - name: Content-type + value: application/json + - name: accept + value: application/json, text/plain, */* + initialDelaySeconds: 5 # 容器启动后第一次执行探测需要等待多少秒 + periodSeconds: 60 # 执行探测的频率. 默认是10秒, 最小1秒 + # 可选, 就绪探针, 确定容器是否已经就绪可以接受流量 + readinessProbe: + httpGet: + path: /subscription/api/v1/products/xxxxxx/ + port: 8005 + httpHeaders: + - name: Content-type + value: application/json + - name: accept + value: application/json, text/plain, */* + initialDelaySeconds: 5 + periodSeconds: 60 + volumeMounts: + - name: sock + mountPath: /opt/tmp/sock + - name: hadoop + mountPath: /opt/tiger/yarn_deploy/hadoop + - name: hive + mountPath: /opt/tiger/hive_deploy + - name: jdk8 + mountPath: /opt/tiger/jdk/jdk1.8.0_181 + volumes: + - name: sock + hostPath: + path: /opt/tmp/sock + - name: hadoop + hostPath: + path: /opt/tiger/yarn_deploy/hadoop + - name: hive + hostPath: + path: /opt/tiger/hive_deploy + - name: jdk8 + hostPath: + path: /opt/tiger/jdk/jdk1.8.0_181 + +--- +# Service资源定义 +apiVersion: v1 +kind: Service +metadata: + name: subscription-for-aeolus + namespace: subscription-sunben + annotations: + consul.register/enabled: "true" + consul.register/service.name: "data.subscription.sunben.api" # service.name 集群内服务自动发现注册至consul用 + consul.register/service.health.ttl: "8640000s" +spec: + # 定义外部访问端口到服务端口映射 + type: NodePort + ports: + - port: 8005 + nodePort: 31668 + targetPort: 8005 + selector: + app: subscription-for-aeolus diff --git a/saas/vpc-vqs-be.yaml b/saas/vpc-vqs-be.yaml new file mode 100644 index 0000000..c489226 --- /dev/null +++ b/saas/vpc-vqs-be.yaml @@ -0,0 +1,143 @@ +# 定义模块命名空间, 每个服务模块对应一个命名空间 +apiVersion: v1 +kind: Namespace +metadata: + name: vqs +--- +# 命名空间内实例资源定义 +apiVersion: v1 +kind: LimitRange +metadata: + name: limit-range-vqs + namespace: vqs +spec: + limits: + - type: Pod + min: + cpu: 50m + memory: 5Mi + max: + cpu: 1 + memory: 2Gi + - type: Container + defaultRequest: # 默认的内存/cpu请求 + cpu: 500m + memory: 1Gi + default: # 默认的内存/cpu限制 + cpu: 500m + memory: 1Gi +--- +# 命名空间内总体资源限制 +apiVersion: v1 +kind: ResourceQuota +metadata: + name: resource-quota-vqs + namespace: vqs +spec: + hard: # 每个容器必须有内存请求和限制,以及 CPU 请求和限制 + requests.cpu: 10 # 所有容器的 CPU 请求总和不能超过2 cpu + requests.memory: 20Gi # 所有容器的内存请求总和不能超过2 GiB + limits.cpu: 20 # 所有容器的 CPU 限制总和不能超过4 cpu + limits.memory: 50Gi # 所有容器的内存限制总和不能超过10 GiB +--- +# Deployment部署方式定义Pod及Container具体参数 +apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 +kind: Deployment +metadata: + name: vpc-vqs-be + namespace: vqs +spec: + selector: + matchLabels: + app: vpc-vqs-be + replicas: 1 # tells deployment to run 2 pods matching the template + template: + metadata: + labels: + app: vpc-vqs-be + spec: + containers: + - name: vpc-vqs-be + #image: hub.byted.org/test/vqs_saas:44f8c770f74e9df6acb51cec0831f565 + image: aeolus.vpc.com/library/xuyi_vqs_test:1.0.1 + imagePullPolicy: IfNotPresent + env: + - name: HADOOP_HOME + value: /opt/tiger/yarn_deploy/hadoop + - name: DB_USER + value: aeolus_db_w + - name: DB_PASSWD + value: ccukDFrkmnQfoy7KPQHKZYC7XzbJsHuS + - name: AEOLUS_API_PSM + value: data.aeolus.api.xuyi + command: ["/bin/sh"] + args: ["-c", "/opt/tiger/toutiao/app/data/vqs/run/tob_prod_run.sh"] + ports: + - containerPort: 12355 + # 可选, 存活探针, 确定何时重启容器 + livenessProbe: + httpGet: + path: /vqs/api/v2/misc/healthz + port: 12355 + httpHeaders: + - name: Content-type + value: application/json + - name: accept + value: application/json, text/plain, */* + initialDelaySeconds: 5 # 容器启动后第一次执行探测需要等待多少秒 + periodSeconds: 60 # 执行探测的频率. 默认是10秒, 最小1秒 + # 可选, 就绪探针, 确定容器是否已经就绪可以接受流量 + readinessProbe: + httpGet: + path: /vqs/api/v2/misc/healthz + port: 12355 + httpHeaders: + - name: Content-type + value: application/json + - name: accept + value: application/json, text/plain, */* + initialDelaySeconds: 5 + periodSeconds: 60 + volumeMounts: + - name: sock + mountPath: /opt/tmp/sock + - name: hadoop + mountPath: /opt/tiger/yarn_deploy/hadoop + - name: hive + mountPath: /opt/tiger/hive_deploy + - name: jdk8 + mountPath: /opt/tiger/jdk/jdk1.8.0_181 + volumes: + - name: sock + hostPath: + path: /opt/tmp/sock + - name: hadoop + hostPath: + path: /opt/tiger/yarn_deploy/hadoop + - name: hive + hostPath: + path: /opt/tiger/hive_deploy + - name: jdk8 + hostPath: + path: /opt/tiger/jdk/jdk1.8.0_181 + +--- +# Service资源定义 +apiVersion: v1 +kind: Service +metadata: + name: vpc-vqs-be + namespace: vqs + annotations: + consul.register/enabled: "true" + consul.register/service.name: "data.vqs.api" # service.name 集群内服务自动发现注册至consul用 + consul.register/service.health.ttl: "8640000s" +spec: + # 定义外部访问端口到服务端口映射 + type: NodePort + ports: + - port: 12355 + nodePort: 31100 + targetPort: 12355 + selector: + app: vpc-vqs-be From e3fe4e18c1895409f06c1740a0309dd211bb0a90 Mon Sep 17 00:00:00 2001 From: ASwordsman <41989688+ASwordsman@users.noreply.github.com> Date: Sun, 21 Jun 2020 15:48:55 +0800 Subject: [PATCH 2/8] Delete cron_report_minute_monior.yaml --- saas/cron_report_minute_monior.yaml | 73 ----------------------------- 1 file changed, 73 deletions(-) delete mode 100644 saas/cron_report_minute_monior.yaml diff --git a/saas/cron_report_minute_monior.yaml b/saas/cron_report_minute_monior.yaml deleted file mode 100644 index 78c8a2a..0000000 --- a/saas/cron_report_minute_monior.yaml +++ /dev/null @@ -1,73 +0,0 @@ -apiVersion: batch/v1beta1 -kind: CronJob -metadata: - name: aeolus-report-minute-monitor - namespace: aeolus -spec: - schedule: "*/10 * * * *" - jobTemplate: - spec: - template: - metadata: - labels: - app: aeolus-cron - spec: - hostNetwork: false - dnsPolicy: Default - containers: - - name: aeolus-report-minute-monitor - image: aeolus.vpc.com/library/aeolus:1.0.20 - imagePullPolicy: IfNotPresent - env: - - name: APP_DEPLOY_ENV - value: AEOLUS_TOB_ENV - - name: DEPLOY_ENV - value: PROD - - name: DB_USER - value: aeolus_db_w - - name: DB_PASSWD - value: ccukDFrkmnQfoy7KPQHKZYC7XzbJsHuS - # 监控报警,分钟级监控标识 - - name: FREQ - value: "1" - # -------邮件服务--------- - # 邮件正文中产品标识 - - name: PRODUCT_NAME - value: DataWind - # 部署服务地址 - # TODO: 部署前必须修改 - - name: PRODUCT_DOMAIN - value: http://218.205.220.74:32000 - - name: PRODUCT_URL_PREFIX - value: bi - - name: SMTP_EMAIL_USERNAME - value: datawind@yeah.net - - name: SMTP_EMAIL_PASSWORD - value: PKACIKCPFPDVPNUB - - name: SMTP_EMAIL_SERVER - value: 123.58.177.131 - - name: SMTP_EMAIL_PORT - value: "465" - # 发件人名称 - - name: SMTP_EMAIL_SIGNATURE - value: DataWind - command: ["/bin/sh"] - args: ["-c", "cd /opt/tiger/toutiao/app/data/aeolus; python -m aeolus.scripts.so_caller.check_monitor"] - volumeMounts: - - name: sock - mountPath: /opt/tmp/sock - - name: hadoop - mountPath: /opt/tiger/yarn_deploy/hadoop - - name: jdk8 - mountPath: /opt/tiger/jdk/jdk1.8.0_181 - volumes: - - name: sock - hostPath: - path: /opt/tmp/sock - - name: hadoop - hostPath: - path: /opt/tiger/yarn_deploy/hadoop - - name: jdk8 - hostPath: - path: /opt/tiger/jdk/jdk1.8.0_181 - restartPolicy: OnFailure From ab19f742681e013128d553655702415d1a6107bf Mon Sep 17 00:00:00 2001 From: ASwordsman <41989688+ASwordsman@users.noreply.github.com> Date: Sun, 21 Jun 2020 15:49:20 +0800 Subject: [PATCH 3/8] Delete cron_report_monior.yaml --- saas/cron_report_monior.yaml | 73 ------------------------------------ 1 file changed, 73 deletions(-) delete mode 100644 saas/cron_report_monior.yaml diff --git a/saas/cron_report_monior.yaml b/saas/cron_report_monior.yaml deleted file mode 100644 index 904e94c..0000000 --- a/saas/cron_report_monior.yaml +++ /dev/null @@ -1,73 +0,0 @@ -apiVersion: batch/v1beta1 -kind: CronJob -metadata: - name: aeolus-report-monitor - namespace: aeolus -spec: - schedule: "*/10 * * * *" - jobTemplate: - spec: - template: - metadata: - labels: - app: aeolus-cron - spec: - # 非必须 - #nodeSelector: - # node: sub - #hostNetwork: false - #dnsPolicy: Default - containers: - - name: aeolus-report-monitor - image: aeolus.vpc.com/library/xuyi_test:1.0.0.263 - imagePullPolicy: IfNotPresent - env: - - name: APP_DEPLOY_ENV - value: AEOLUS_TOB_ENV - - name: DEPLOY_ENV - value: PROD - - name: DB_USER - value: aeolus_db_w - - name: DB_PASSWD - value: ccukDFrkmnQfoy7KPQHKZYC7XzbJsHuS - # -------邮件服务--------- - # 邮件正文中产品标识 - - name: PRODUCT_NAME - value: DataWind - # 部署服务地址 - # TODO: 部署前必须修改 - - name: PRODUCT_DOMAIN - value: http://218.205.220.74:32000 - - name: PRODUCT_URL_PREFIX - value: bi - - name: SMTP_EMAIL_USERNAME - value: datawind@yeah.net - - name: SMTP_EMAIL_PASSWORD - value: PKACIKCPFPDVPNUB - - name: SMTP_EMAIL_SERVER - value: 123.58.177.131 - - name: SMTP_EMAIL_PORT - value: "465" - # 发件人名称 - - name: SMTP_EMAIL_SIGNATURE - value: DataWind - command: ["/bin/sh"] - args: ["-c", "cd /opt/tiger/toutiao/app/data/aeolus; python -m aeolus.scripts.so_caller.check_monitor"] - volumeMounts: - - name: sock - mountPath: /opt/tmp/sock - - name: hadoop - mountPath: /opt/tiger/yarn_deploy/hadoop - - name: jdk8 - mountPath: /opt/tiger/jdk/jdk1.8.0_181 - volumes: - - name: sock - hostPath: - path: /opt/tmp/sock - - name: hadoop - hostPath: - path: /opt/tiger/yarn_deploy/hadoop - - name: jdk8 - hostPath: - path: /opt/tiger/jdk/jdk1.8.0_181 - restartPolicy: OnFailure From cbf736afe88e8486556ca0305ae36baeec079612 Mon Sep 17 00:00:00 2001 From: ASwordsman <41989688+ASwordsman@users.noreply.github.com> Date: Sun, 21 Jun 2020 15:49:32 +0800 Subject: [PATCH 4/8] Delete vpc-aeolus-be_1.yaml --- saas/vpc-aeolus-be_1.yaml | 170 -------------------------------------- 1 file changed, 170 deletions(-) delete mode 100644 saas/vpc-aeolus-be_1.yaml diff --git a/saas/vpc-aeolus-be_1.yaml b/saas/vpc-aeolus-be_1.yaml deleted file mode 100644 index b999ca0..0000000 --- a/saas/vpc-aeolus-be_1.yaml +++ /dev/null @@ -1,170 +0,0 @@ -# 定义模块命名空间, 每个服务模块对应一个命名空间 -#apiVersion: v1 -#kind: Namespace -#metadata: -# name: aeolus ---- -# 命名空间内实例资源定义 -apiVersion: v1 -kind: LimitRange -metadata: - name: limit-range-aeolus - namespace: aeolus -spec: - limits: - - type: Pod - min: - cpu: 50m - memory: 5Mi - max: - cpu: 1 - memory: 2Gi - - type: Container - defaultRequest: # 默认的内存/cpu请求 - cpu: 500m - memory: 1Gi - default: # 默认的内存/cpu限制 - cpu: 500m - memory: 1Gi ---- -# 命名空间内总体资源限制 -apiVersion: v1 -kind: ResourceQuota -metadata: - name: resource-quota-aeolus - namespace: aeolus -spec: - hard: # 每个容器必须有内存请求和限制,以及 CPU 请求和限制 - requests.cpu: 10 # 所有容器的 CPU 请求总和不能超过2 cpu - requests.memory: 20Gi # 所有容器的内存请求总和不能超过2 GiB - limits.cpu: 20 # 所有容器的 CPU 限制总和不能超过4 cpu - limits.memory: 50Gi # 所有容器的内存限制总和不能超过10 GiB ---- -# Deployment部署方式定义Pod及Container具体参数 -apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 -kind: Deployment -metadata: - name: vpc-aeolus-be - namespace: aeolus -spec: - selector: - matchLabels: - app: vpc-aeolus-be - replicas: 1 # tells deployment to run 2 pods matching the template - template: - metadata: - labels: - app: vpc-aeolus-be - spec: - containers: - - name: vpc-aeolus-be - image: aeolus.vpc.com/library/xuyi_test:1.0.0.263 - imagePullPolicy: IfNotPresent - env: - - name: HADOOP_HOME - value: /opt/tiger/yarn_deploy/hadoop - - name: DB_USER - value: aeolus_db_w - - name: DB_PASSWD - value: ccukDFrkmnQfoy7KPQHKZYC7XzbJsHuS - - name: APP_AUTH_ENV - value: PRIVATE_AUTH_ENV - # -------邮件服务--------- - # 邮件正文中产品标识 - - name: PRODUCT_NAME - value: DataWind - # 部署服务地址 - # TODO: 部署前必须修改 - - name: PRODUCT_DOMAIN - value: http://218.205.220.74:32000 - - name: PRODUCT_URL_PREFIX - value: bi - - name: SMTP_EMAIL_USERNAME - value: datawind@yeah.net - - name: SMTP_EMAIL_PASSWORD - value: PKACIKCPFPDVPNUB - - name: SMTP_EMAIL_SERVER - value: 123.58.177.131 - - name: SMTP_EMAIL_PORT - value: "465" - # 发件人名称 - - name: SMTP_EMAIL_SIGNATURE - value: DataWind - # --------订阅服务---------- - # 内网访问打开浏览器的域名,没有http(s):// - - name: SUBSCRIBE_DOMAIN - value: aeolus-fe.aeolus - # 订阅服务PSM地址 - - name: SUBSCRIBE_PSM - value: data.subscription.sunben.api - command: ["/bin/sh"] - args: ["-c", "/opt/tiger/toutiao/app/data/aeolus/run/tob_prod_run.sh"] - ports: - - containerPort: 12355 - # 可选, 存活探针, 确定何时重启容器 - livenessProbe: - httpGet: - path: /aeolus/api/v2/misc/healthz - port: 12355 - httpHeaders: - - name: Content-type - value: application/json - - name: accept - value: application/json, text/plain, */* - initialDelaySeconds: 5 # 容器启动后第一次执行探测需要等待多少秒 - periodSeconds: 60 # 执行探测的频率. 默认是10秒, 最小1秒 - # 可选, 就绪探针, 确定容器是否已经就绪可以接受流量 - readinessProbe: - httpGet: - path: /aeolus/api/v2/misc/healthz - port: 12355 - httpHeaders: - - name: Content-type - value: application/json - - name: accept - value: application/json, text/plain, */* - initialDelaySeconds: 5 - periodSeconds: 60 - volumeMounts: - - name: sock - mountPath: /opt/tmp/sock - - name: hadoop - mountPath: /opt/tiger/yarn_deploy/hadoop - - name: hive - mountPath: /opt/tiger/hive_deploy - - name: jdk8 - mountPath: /opt/tiger/jdk/jdk1.8.0_181 - volumes: - - name: sock - hostPath: - path: /opt/tmp/sock - - name: hadoop - hostPath: - path: /opt/tiger/yarn_deploy/hadoop - - name: hive - hostPath: - path: /opt/tiger/hive_deploy - - name: jdk8 - hostPath: - path: /opt/tiger/jdk/jdk1.8.0_181 - ---- -# Service资源定义 -apiVersion: v1 -kind: Service -metadata: - name: vpc-aeolus-be - namespace: aeolus - annotations: - consul.register/enabled: "true" - consul.register/service.name: "data.aeolus.api" # service.name 集群内服务自动发现注册至consul用 - consul.register/service.health.ttl: "8640000s" -spec: - # 定义外部访问端口到服务端口映射 - type: NodePort - ports: - - port: 12355 - nodePort: 31001 - targetPort: 12355 - selector: - app: vpc-aeolus-be From 307d2c3dd860a2532db6214b612d608bb4e406b5 Mon Sep 17 00:00:00 2001 From: ASwordsman <41989688+ASwordsman@users.noreply.github.com> Date: Sun, 21 Jun 2020 15:49:41 +0800 Subject: [PATCH 5/8] Delete vpc-subscribe-be.yaml --- saas/vpc-subscribe-be.yaml | 172 ------------------------------------- 1 file changed, 172 deletions(-) delete mode 100644 saas/vpc-subscribe-be.yaml diff --git a/saas/vpc-subscribe-be.yaml b/saas/vpc-subscribe-be.yaml deleted file mode 100644 index 6e81936..0000000 --- a/saas/vpc-subscribe-be.yaml +++ /dev/null @@ -1,172 +0,0 @@ -# 定义模块命名空间, 每个服务模块对应一个命名空间 -apiVersion: v1 -kind: Namespace -metadata: - name: subscription-sunben ---- -# 命名空间内实例资源定义 -apiVersion: v1 -kind: LimitRange -metadata: - name: limit-range-aeolus - namespace: subscription-sunben -spec: - limits: - - type: Pod - min: - cpu: 50m - memory: 5Mi - max: - cpu: 2 - memory: 8Gi - - type: Container - defaultRequest: # 默认的内存/cpu请求 - cpu: 2 - memory: 8Gi - default: # 默认的内存/cpu限制 - cpu: 2 - memory: 8Gi ---- -# 命名空间内总体资源限制 -apiVersion: v1 -kind: ResourceQuota -metadata: - name: resource-quota-aeolus - namespace: subscription-sunben -spec: - hard: # 每个容器必须有内存请求和限制,以及 CPU 请求和限制 - requests.cpu: 2 # 所有容器的 CPU 请求总和不能超过2 cpu - requests.memory: 8Gi # 所有容器的内存请求总和不能超过2 GiB - limits.cpu: 2 # 所有容器的 CPU 限制总和不能超过4 cpu - limits.memory: 8Gi # 所有容器的内存限制总和不能超过10 GiB ---- -# Deployment部署方式定义Pod及Container具体参数 -apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 -kind: Deployment -metadata: - name: subscription-for-aeolus - namespace: subscription-sunben -spec: - selector: - matchLabels: - app: subscription-for-aeolus - replicas: 1 # tells deployment to run 2 pods matching the template - template: - metadata: - labels: - app: subscription-for-aeolus - spec: - containers: - - name: subscription-for-aeolus - #image: hub.byted.org/dpfe/dp.subscription:1.0.18 - image: aeolus.vpc.com/library/subscription_sunben:1.1.0 - imagePullPolicy: IfNotPresent - env: - # 风神交互 - - name: USER_INFO_URL - value: psm://data.aeolus.api/aeolus/api/v2/account/getUserName - - name: USER_LOGIN_COOKIE_URL - value: psm://data.aeolus.api/aeolus/api/v2/account/getSessionId - - name: USER_BASIC_AUTHORIZATION - value: 7Ha3KVMjSGcZzeG4NJne1T6wnoIgU6xcjblOfDAATpSTCNU7bdiFpeDI1wdCyoYX - # email - - name: EMAIL_HOST - value: 123.58.177.131 - - name: EMAIL_HOST_USER - value: datawind@yeah.net - - name: EMAIL_HOST_PASSWORD - value: PKACIKCPFPDVPNUB - - name: DEFAULT_FROM_EMAIL - value: datawind@yeah.net - - name: EMAIL_PORT - value: "465" - # 数据库/Redis配置 - - name: DB_PSM - value: vpc.mysql.aeolus_db_write - - name: DB_USER - value: aeolus_db_w - - name: DB_PASSWORD - value: ccukDFrkmnQfoy7KPQHKZYC7XzbJsHuS - - name: DB_NAME - value: aeolus_db - - name: SCREENSHOT_REDIS_PSM - value: redis - # 特殊配置 - # 截图服务URL映射 - - name: SCREENSHOT_URL_HOST_MAPPING - value: https{0,1}://[^\/]*->http://aeolus-fe.aeolus:5000 - # minio - - name: MINIO_PSM - value: vpc.common.minio - command: ["/bin/sh"] - args: ["-c", "/start.sh"] - # args: ["-c", "sleep 100000000s"] - ports: - - containerPort: 8005 - # 可选, 存活探针, 确定何时重启容器 - livenessProbe: - httpGet: - path: /subscription/api/v1/products/xxxxxx/ - port: 8005 - httpHeaders: - - name: Content-type - value: application/json - - name: accept - value: application/json, text/plain, */* - initialDelaySeconds: 5 # 容器启动后第一次执行探测需要等待多少秒 - periodSeconds: 60 # 执行探测的频率. 默认是10秒, 最小1秒 - # 可选, 就绪探针, 确定容器是否已经就绪可以接受流量 - readinessProbe: - httpGet: - path: /subscription/api/v1/products/xxxxxx/ - port: 8005 - httpHeaders: - - name: Content-type - value: application/json - - name: accept - value: application/json, text/plain, */* - initialDelaySeconds: 5 - periodSeconds: 60 - volumeMounts: - - name: sock - mountPath: /opt/tmp/sock - - name: hadoop - mountPath: /opt/tiger/yarn_deploy/hadoop - - name: hive - mountPath: /opt/tiger/hive_deploy - - name: jdk8 - mountPath: /opt/tiger/jdk/jdk1.8.0_181 - volumes: - - name: sock - hostPath: - path: /opt/tmp/sock - - name: hadoop - hostPath: - path: /opt/tiger/yarn_deploy/hadoop - - name: hive - hostPath: - path: /opt/tiger/hive_deploy - - name: jdk8 - hostPath: - path: /opt/tiger/jdk/jdk1.8.0_181 - ---- -# Service资源定义 -apiVersion: v1 -kind: Service -metadata: - name: subscription-for-aeolus - namespace: subscription-sunben - annotations: - consul.register/enabled: "true" - consul.register/service.name: "data.subscription.sunben.api" # service.name 集群内服务自动发现注册至consul用 - consul.register/service.health.ttl: "8640000s" -spec: - # 定义外部访问端口到服务端口映射 - type: NodePort - ports: - - port: 8005 - nodePort: 31668 - targetPort: 8005 - selector: - app: subscription-for-aeolus From 7c7564000adad53c2908291b064a14e338874c36 Mon Sep 17 00:00:00 2001 From: ASwordsman <41989688+ASwordsman@users.noreply.github.com> Date: Sun, 21 Jun 2020 15:49:57 +0800 Subject: [PATCH 6/8] Delete vpc-find-be.yaml --- saas/vpc-find-be.yaml | 136 ------------------------------------------ 1 file changed, 136 deletions(-) delete mode 100644 saas/vpc-find-be.yaml diff --git a/saas/vpc-find-be.yaml b/saas/vpc-find-be.yaml deleted file mode 100644 index c761a6f..0000000 --- a/saas/vpc-find-be.yaml +++ /dev/null @@ -1,136 +0,0 @@ -# 定义模块命名空间, 每个服务模块对应一个命名空间 -apiVersion: v1 -kind: Namespace -metadata: - name: find ---- -# 命名空间内实例资源定义 -apiVersion: v1 -kind: LimitRange -metadata: - name: vpc-find-be - namespace: find -spec: - limits: - - type: Pod - min: - cpu: 50m - memory: 5Mi - max: - cpu: 1 - memory: 2Gi - - type: Container - defaultRequest: # 默认的内存/cpu请求 - cpu: 500m - memory: 1Gi - default: # 默认的内存/cpu限制 - cpu: 500m - memory: 1Gi ---- -# 命名空间内总体资源限制 -apiVersion: v1 -kind: ResourceQuota -metadata: - name: resource-quota-find - namespace: find -spec: - hard: # 每个容器必须有内存请求和限制,以及 CPU 请求和限制 - requests.cpu: 10 # 所有容器的 CPU 请求总和不能超过2 cpu - requests.memory: 20Gi # 所有容器的内存请求总和不能超过2 GiB - limits.cpu: 20 # 所有容器的 CPU 限制总和不能超过4 cpu - limits.memory: 10Gi # 所有容器的内存限制总和不能超过10 GiB ---- -# Deployment部署方式定义Pod及Container具体参数 -apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 -kind: Deployment -metadata: - name: vpc-find-be - namespace: find -spec: - selector: - matchLabels: - app: vpc-find-be - replicas: 1 # tells deployment to run 2 pods matching the template - template: - metadata: - labels: - app: vpc-find-be - spec: - hostNetwork: false - dnsPolicy: Default - containers: - - name: vpc-find-be - #image: hub.byted.org/test/find_sass:ff0640e703cba911ca68201af9ef7f3e - #image: aeolus.vpc.com/library/qihang_test:1.0.0.37 - image: aeolus.vpc.com/library/find_saas:1.0.1 - imagePullPolicy: IfNotPresent - command: ["/bin/sh"] - args: ["-c", "/opt/tiger/toutiao/app/data/find/tob_prod_run.sh"] - ports: - - containerPort: 9090 - # 可选, 存活探针, 确定何时重启容器 - # livenessProbe: - # httpGet: - # path: /find/api/v3/healthz - # port: 9090 - # httpHeaders: - # - name: Content-type - # value: application/json - # - name: accept - # value: application/json, text/plain, */* - # initialDelaySeconds: 5 # 容器启动后第一次执行探测需要等待多少秒 - # periodSeconds: 60 # 执行探测的频率. 默认是10秒, 最小1秒 - # 可选, 就绪探针, 确定容器是否已经就绪可以接受流量 - # readinessProbe: - # httpGet: - # path: /find/api/v3/healthz - # port: 9090 - # httpHeaders: - # - name: Content-type - # value: application/json - # - name: accept - # value: application/json, text/plain, */* - # initialDelaySeconds: 5 - # periodSeconds: 60 - volumeMounts: - - name: sock - mountPath: /opt/tmp/sock - - name: hadoop - mountPath: /opt/tiger/yarn_deploy/hadoop - - name: hive - mountPath: /opt/tiger/hive_deploy - - name: jdk8 - mountPath: /opt/tiger/jdk/jdk1.8.0_181 - volumes: - - name: sock - hostPath: - path: /opt/tmp/sock - - name: hadoop - hostPath: - path: /opt/tiger/yarn_deploy/hadoop - - name: hive - hostPath: - path: /opt/tiger/hive_deploy - - name: jdk8 - hostPath: - path: /opt/tiger/jdk/jdk1.8.0_181 ---- -# Service资源定义 -apiVersion: v1 -kind: Service -metadata: - name: vpc-find-be - namespace: find - annotations: - consul.register/enabled: "true" - consul.register/service.name: "data.warehouse.find" # service.name 集群内服务自动发现注册至consul用 - consul.register/service.health.ttl: "8640000s" -spec: - # 定义外部访问端口到服务端口映射 - type: NodePort - ports: - - port: 9090 - nodePort: 31111 - targetPort: 9090 - selector: - app: vpc-find-be From 6943aa61d8f2f409fa05a93452eeb747442772d6 Mon Sep 17 00:00:00 2001 From: ASwordsman <41989688+ASwordsman@users.noreply.github.com> Date: Sun, 21 Jun 2020 15:50:05 +0800 Subject: [PATCH 7/8] Delete vpc-push-be.yaml --- saas/vpc-push-be.yaml | 155 ------------------------------------------ 1 file changed, 155 deletions(-) delete mode 100644 saas/vpc-push-be.yaml diff --git a/saas/vpc-push-be.yaml b/saas/vpc-push-be.yaml deleted file mode 100644 index 425236f..0000000 --- a/saas/vpc-push-be.yaml +++ /dev/null @@ -1,155 +0,0 @@ -# 定义模块命名空间, 每个服务模块对应一个命名空间 -apiVersion: v1 -kind: Namespace -metadata: - name: push ---- -# 命名空间内实例资源定义 -apiVersion: v1 -kind: LimitRange -metadata: - name: limit-range-aeolus - namespace: push -spec: - limits: - - type: Pod - min: - cpu: 50m - memory: 5Mi - max: - cpu: 2 - memory: 8Gi - - type: Container - defaultRequest: # 默认的内存/cpu请求 - cpu: 2 - memory: 8Gi - default: # 默认的内存/cpu限制 - cpu: 2 - memory: 8Gi ---- -# 命名空间内总体资源限制 -apiVersion: v1 -kind: ResourceQuota -metadata: - name: resource-quota-aeolus - namespace: 12355 -spec: - hard: # 每个容器必须有内存请求和限制,以及 CPU 请求和限制 - requests.cpu: 2 # 所有容器的 CPU 请求总和不能超过2 cpu - requests.memory: 8Gi # 所有容器的内存请求总和不能超过2 GiB - limits.cpu: 2 # 所有容器的 CPU 限制总和不能超过4 cpu - limits.memory: 8Gi # 所有容器的内存限制总和不能超过10 GiB ---- -# Deployment部署方式定义Pod及Container具体参数 -apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 -kind: Deployment -metadata: - name: vpc-push-be - namespace: push -spec: - selector: - matchLabels: - app: vpc-push-be - replicas: 1 # tells deployment to run 2 pods matching the template - template: - metadata: - labels: - app: vpc-push-be - spec: - containers: - - name: vpc-push-be - image: aeolus.vpc.com/library/push_tob:1.0.0.2 - imagePullPolicy: IfNotPresent - env: - # webex - - name: WEBEX_TEAMS_ACCESS_TOKEN - value: MmEzZTRmYjUtZTRkYy00OWE4LWI5NDAtMDE2NDAyY2IwM2FmNWViOTkxZDItOTdi_PF84_consumer - # email - - name: EMAIL_HOST - value: smtp.yeah.net - - name: EMAIL_HOST_USER - value: datawind@yeah.net - - name: EMAIL_HOST_PASSWORD - value: PKACIKCPFPDVPNUB - - name: DEFAULT_FROM_EMAIL - value: datawind@yeah.net - - name: EMAIL_PORT - value: "465" - # 数据库配置 - - name: DB_USER - value: aeolus_db_w - - name: DB_PASSWORD - value: ccukDFrkmnQfoy7KPQHKZYC7XzbJsHuS - - name: DB_NAME - value: aeolus_db - command: ["/bin/sh"] - args: ["-c", "/opt/tiger/toutiao/app/data/push/run/tob_prod_run.sh"] - ports: - - containerPort: 12355 - # 可选, 存活探针, 确定何时重启容器 - livenessProbe: - httpGet: - path: /aeolus/notification/api/v2/misc/healthz - port: 12355 - httpHeaders: - - name: Content-type - value: application/json - - name: accept - value: application/json, text/plain, */* - initialDelaySeconds: 5 # 容器启动后第一次执行探测需要等待多少秒 - periodSeconds: 60 # 执行探测的频率. 默认是10秒, 最小1秒 - # 可选, 就绪探针, 确定容器是否已经就绪可以接受流量 - readinessProbe: - httpGet: - path: /aeolus/notification/api/v2/misc/healthz - port: 12355 - httpHeaders: - - name: Content-type - value: application/json - - name: accept - value: application/json, text/plain, */* - initialDelaySeconds: 5 - periodSeconds: 60 - volumeMounts: - - name: sock - mountPath: /opt/tmp/sock - - name: hadoop - mountPath: /opt/tiger/yarn_deploy/hadoop - - name: hive - mountPath: /opt/tiger/hive_deploy - - name: jdk8 - mountPath: /opt/tiger/jdk/jdk1.8.0_181 - volumes: - - name: sock - hostPath: - path: /opt/tmp/sock - - name: hadoop - hostPath: - path: /opt/tiger/yarn_deploy/hadoop - - name: hive - hostPath: - path: /opt/tiger/hive_deploy - - name: jdk8 - hostPath: - path: /opt/tiger/jdk/jdk1.8.0_181 - ---- -# Service资源定义 -apiVersion: v1 -kind: Service -metadata: - name: vpc-push-be - namespace: push - annotations: - consul.register/enabled: "true" - consul.register/service.name: "data.push.api" # service.name 集群内服务自动发现注册至consul用 - consul.register/service.health.ttl: "8640000s" -spec: - # 定义外部访问端口到服务端口映射 - type: NodePort - ports: - - port: 12355 - nodePort: 31688 - targetPort: 12355 - selector: - app: vpc-push-be From 735526d4db034fa2168aa2c34fe1c416bcae8c43 Mon Sep 17 00:00:00 2001 From: ASwordsman <41989688+ASwordsman@users.noreply.github.com> Date: Sun, 21 Jun 2020 16:32:08 +0800 Subject: [PATCH 8/8] Delete vpc-vqs-be.yaml --- saas/vpc-vqs-be.yaml | 143 ------------------------------------------- 1 file changed, 143 deletions(-) delete mode 100644 saas/vpc-vqs-be.yaml diff --git a/saas/vpc-vqs-be.yaml b/saas/vpc-vqs-be.yaml deleted file mode 100644 index c489226..0000000 --- a/saas/vpc-vqs-be.yaml +++ /dev/null @@ -1,143 +0,0 @@ -# 定义模块命名空间, 每个服务模块对应一个命名空间 -apiVersion: v1 -kind: Namespace -metadata: - name: vqs ---- -# 命名空间内实例资源定义 -apiVersion: v1 -kind: LimitRange -metadata: - name: limit-range-vqs - namespace: vqs -spec: - limits: - - type: Pod - min: - cpu: 50m - memory: 5Mi - max: - cpu: 1 - memory: 2Gi - - type: Container - defaultRequest: # 默认的内存/cpu请求 - cpu: 500m - memory: 1Gi - default: # 默认的内存/cpu限制 - cpu: 500m - memory: 1Gi ---- -# 命名空间内总体资源限制 -apiVersion: v1 -kind: ResourceQuota -metadata: - name: resource-quota-vqs - namespace: vqs -spec: - hard: # 每个容器必须有内存请求和限制,以及 CPU 请求和限制 - requests.cpu: 10 # 所有容器的 CPU 请求总和不能超过2 cpu - requests.memory: 20Gi # 所有容器的内存请求总和不能超过2 GiB - limits.cpu: 20 # 所有容器的 CPU 限制总和不能超过4 cpu - limits.memory: 50Gi # 所有容器的内存限制总和不能超过10 GiB ---- -# Deployment部署方式定义Pod及Container具体参数 -apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 -kind: Deployment -metadata: - name: vpc-vqs-be - namespace: vqs -spec: - selector: - matchLabels: - app: vpc-vqs-be - replicas: 1 # tells deployment to run 2 pods matching the template - template: - metadata: - labels: - app: vpc-vqs-be - spec: - containers: - - name: vpc-vqs-be - #image: hub.byted.org/test/vqs_saas:44f8c770f74e9df6acb51cec0831f565 - image: aeolus.vpc.com/library/xuyi_vqs_test:1.0.1 - imagePullPolicy: IfNotPresent - env: - - name: HADOOP_HOME - value: /opt/tiger/yarn_deploy/hadoop - - name: DB_USER - value: aeolus_db_w - - name: DB_PASSWD - value: ccukDFrkmnQfoy7KPQHKZYC7XzbJsHuS - - name: AEOLUS_API_PSM - value: data.aeolus.api.xuyi - command: ["/bin/sh"] - args: ["-c", "/opt/tiger/toutiao/app/data/vqs/run/tob_prod_run.sh"] - ports: - - containerPort: 12355 - # 可选, 存活探针, 确定何时重启容器 - livenessProbe: - httpGet: - path: /vqs/api/v2/misc/healthz - port: 12355 - httpHeaders: - - name: Content-type - value: application/json - - name: accept - value: application/json, text/plain, */* - initialDelaySeconds: 5 # 容器启动后第一次执行探测需要等待多少秒 - periodSeconds: 60 # 执行探测的频率. 默认是10秒, 最小1秒 - # 可选, 就绪探针, 确定容器是否已经就绪可以接受流量 - readinessProbe: - httpGet: - path: /vqs/api/v2/misc/healthz - port: 12355 - httpHeaders: - - name: Content-type - value: application/json - - name: accept - value: application/json, text/plain, */* - initialDelaySeconds: 5 - periodSeconds: 60 - volumeMounts: - - name: sock - mountPath: /opt/tmp/sock - - name: hadoop - mountPath: /opt/tiger/yarn_deploy/hadoop - - name: hive - mountPath: /opt/tiger/hive_deploy - - name: jdk8 - mountPath: /opt/tiger/jdk/jdk1.8.0_181 - volumes: - - name: sock - hostPath: - path: /opt/tmp/sock - - name: hadoop - hostPath: - path: /opt/tiger/yarn_deploy/hadoop - - name: hive - hostPath: - path: /opt/tiger/hive_deploy - - name: jdk8 - hostPath: - path: /opt/tiger/jdk/jdk1.8.0_181 - ---- -# Service资源定义 -apiVersion: v1 -kind: Service -metadata: - name: vpc-vqs-be - namespace: vqs - annotations: - consul.register/enabled: "true" - consul.register/service.name: "data.vqs.api" # service.name 集群内服务自动发现注册至consul用 - consul.register/service.health.ttl: "8640000s" -spec: - # 定义外部访问端口到服务端口映射 - type: NodePort - ports: - - port: 12355 - nodePort: 31100 - targetPort: 12355 - selector: - app: vpc-vqs-be