Răsfoiți Sursa

deploy qa/realtime-yuewen-v2:r188799 测试是否能提交

pmrd 1 an în urmă
părinte
comite
dc79278c5b
4 a modificat fișierele cu 17 adăugiri și 13 ștergeri
  1. 7 5
      .drone.yml
  2. 1 1
      Dockerfile
  3. 7 7
      deploy-tmp.yaml
  4. 2 0
      drone.template.yml

+ 7 - 5
.drone.yml

@@ -19,9 +19,9 @@ steps:
   pull: always
   # privileged: true
   environment:
-    JNLP_ENV: pro
+    JNLP_ENV: qa
     JNLP_REPLICAS: 1
-    JNLP_TAG: r188797
+    JNLP_TAG: r188799
     JNLP_VERSION: v1  # default v1, v2 for canary
     DEPLOY_ENV: k8s-1 # 可以选择把应用部署到集群:k8s-1 or k8s-2
     JNLP_REPO: hub.evbj.easou.com
@@ -41,6 +41,8 @@ steps:
   commands:
     # 切换目标集群
     - kubecm s $DEPLOY_ENV
+    # 生成配置YAML文件
+    - python3 /root/tools.py -b
     # 部署服务到kubernetes上
     - python3 /root/tools.py -a
     # 添加dns解析记录,生成访问域名
@@ -52,8 +54,8 @@ steps:
     corpid: ww419ee4063735e1c0
     corp_secret: zpiRBLETH9eLwIMQ4eJ_r_dcm3BPSGeLHvTcft8Ot-M
     agent_id: 1000004
-    title: "Pipeline pro/realtime-yuewen-v2:r188797 Success"
-    description: "${DRONE_BUILD_LINK} pro/realtime-yuewen-v2:r188797 部署完成 测试是否能提交"
+    title: "Pipeline qa/realtime-yuewen-v2:r188799 Success"
+    description: "${DRONE_BUILD_LINK} qa/realtime-yuewen-v2:r188799 部署完成 测试是否能提交"
     msg_url: ${DRONE_BUILD_LINK}
     btn_txt: "否"
   when:
@@ -66,7 +68,7 @@ steps:
     corpid: ww419ee4063735e1c0
     corp_secret: zpiRBLETH9eLwIMQ4eJ_r_dcm3BPSGeLHvTcft8Ot-M
     agent_id: 1000004
-    title: "Pipeline pro/realtime-yuewen-v2:r188797 Failure"
+    title: "Pipeline qa/realtime-yuewen-v2:r188799 Failure"
     description: "${DRONE_BUILD_LINK} 部署失败,请检查配置!测试是否能提交"
     msg_url: ${DRONE_BUILD_LINK}
     btn_txt: "否"

+ 1 - 1
Dockerfile

@@ -1 +1 @@
-FROM hub.evbj.easou.com/pro/realtime-yuewen-v2:r188797
+FROM hub.evbj.easou.com/qa/realtime-yuewen-v2:r188799

+ 7 - 7
deploy-tmp.yaml

@@ -3,7 +3,7 @@ apiVersion: apps/v1
 kind: StatefulSet
 metadata:
   name: realtime-yuewen-v2
-  namespace: pro
+  namespace: qa
   labels:
     app: realtime-yuewen-v2
 spec:
@@ -47,7 +47,7 @@ spec:
       #              topologyKey: kubernetes.io/hostname
       containers:
         - name: realtime-yuewen-v2
-          image: hub.evbj.easou.com/pro/realtime-yuewen-v2:r188794
+          image: hub.evbj.easou.com/qa/realtime-yuewen-v2:r188799
           imagePullPolicy: IfNotPresent
           env:
             - name: MY_NODE_NAME
@@ -67,7 +67,7 @@ spec:
                 fieldRef:
                   fieldPath: metadata.namespace
             - name: JAVA_OPTS
-              value: "-server  -Xmx2g -Xms2g -Xss512k -Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom -Dspring.profiles.active=product"
+              value: "-server  -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8001,suspend=n  -Xmx2g -Xms2g -Xss512k -Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom -Dspring.profiles.active=test"
           ports:
             - containerPort: 8080
               name: port
@@ -127,7 +127,7 @@ apiVersion: v1
 kind: Service
 metadata:
   name: realtime-yuewen-v2-svc
-  namespace: pro
+  namespace: qa
   labels:
     app: realtime-yuewen-v2-svc
 spec:
@@ -143,7 +143,7 @@ apiVersion: networking.k8s.io/v1
 kind: Ingress
 metadata:
   name: realtime-yuewen-v2-ingress
-  namespace: pro
+  namespace: qa
 spec:
   rules:
     - host: ywrealtimev2.appeasou.com
@@ -156,7 +156,7 @@ spec:
                 name: realtime-yuewen-v2-svc
                 port:
                   number: 8080
-    - host: pro-realtime-yuewen-v2.ieasou.cn
+    - host: qa-realtime-yuewen-v2.ieasou.cn
       http:
         paths:
             - path: /
@@ -172,7 +172,7 @@ apiVersion: v1
 kind: ConfigMap
 metadata:
   name: flume-config-realtime-yuewen-v2
-  namespace: pro
+  namespace: qa
 data:
   flume.conf: |
     a1.sources = r1

+ 2 - 0
drone.template.yml

@@ -41,6 +41,8 @@ steps:
   commands:
     # 切换目标集群
     - kubecm s $DEPLOY_ENV
+    # 生成配置YAML文件
+    - python3 /root/tools.py -b
     # 部署服务到kubernetes上
     - python3 /root/tools.py -a
     # 添加dns解析记录,生成访问域名