瀏覽代碼

deploy qa/offline-process-charge:v1.0.39 运行环境test

datard 3 年之前
父節點
當前提交
f401cf83e6
共有 3 個文件被更改,包括 41 次插入8 次删除
  1. 6 6
      .drone.yml
  2. 1 1
      Dockerfile
  3. 34 1
      deploy-tmp.yaml

+ 6 - 6
.drone.yml

@@ -23,9 +23,9 @@ steps:
     mirror: https://ci7pm4nx.mirror.aliyuncs.com
     registry: hub.evbj.easou.com
     repo: hub.evbj.easou.com/qa/offline-process-charge
-    tag: v1.0.38
+    tag: v1.0.39
 #    build_args:
-#      - JAR_FILE=offline-process-charge-callback-test.jar
+#      - JAR_FILE=offline-process-charge-test.jar
 #      - SERVER_PORT=8080
 
 - name: deployment
@@ -35,7 +35,7 @@ steps:
   environment:
     JNLP_ENV: qa
     JNLP_REPLICAS: 1
-    JNLP_TAG: v1.0.38
+    JNLP_TAG: v1.0.39
     JNLP_VERSION: v1  # default v1, v2 for canary
     DEPLOY_ENV: k8s-2 # 可以选择把应用部署到集群:k8s-1 or k8s-2
     JNLP_REPO: hub.evbj.easou.com
@@ -70,8 +70,8 @@ steps:
     corpid: ww419ee4063735e1c0
     corp_secret: zpiRBLETH9eLwIMQ4eJ_r_dcm3BPSGeLHvTcft8Ot-M
     agent_id: 1000004
-    title: "Pipeline qa/offline-process-charge:v1.0.38 Success"
-    description: "${DRONE_BUILD_LINK} qa/offline-process-charge:v1.0.38 部署完成"
+    title: "Pipeline qa/offline-process-charge:v1.0.39 Success"
+    description: "${DRONE_BUILD_LINK} qa/offline-process-charge:v1.0.39 部署完成"
     msg_url: ${DRONE_BUILD_LINK}
     btn_txt: "否"
   when:
@@ -84,7 +84,7 @@ steps:
     corpid: ww419ee4063735e1c0
     corp_secret: zpiRBLETH9eLwIMQ4eJ_r_dcm3BPSGeLHvTcft8Ot-M
     agent_id: 1000004
-    title: "Pipeline qa/offline-process-charge:v1.0.38 Failure"
+    title: "Pipeline qa/offline-process-charge:v1.0.39 Failure"
     description: "${DRONE_BUILD_LINK} 部署失败,请检查配置!"
     msg_url: ${DRONE_BUILD_LINK}
     btn_txt: "否"

+ 1 - 1
Dockerfile

@@ -1 +1 @@
-FROM hub.evbj.easou.com/qa/offline-process-charge:v1.0.38
+FROM hub.evbj.easou.com/qa/offline-process-charge:v1.0.39

+ 34 - 1
deploy-tmp.yaml

@@ -1,4 +1,20 @@
 ---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: filebeat-config
+data:
+  filebeat.yml: |
+    filebeat.inputs:
+    - type: log
+      paths:
+        - "/data/logs/app/all.log"
+    setup.template.name: "filebeat"
+    setup.template.pattern: "filebeat-*"
+    output.elasticsearch:
+      hosts: ["{{ .Values.elastricsearch.addr }}"]
+      index: "frontend-filebeat"
+---
 apiVersion: apps/v1
 kind: StatefulSet
 metadata:
@@ -30,7 +46,7 @@ spec:
       #  app.touchrs: touchrs
       containers:
         - name: offline-process-charge
-          image: hub.evbj.easou.com/qa/offline-process-charge:v1.0.38
+          image: hub.evbj.easou.com/qa/offline-process-charge:v1.0.39
           imagePullPolicy: Always
           env:
             - name: JAVA_OPTS
@@ -66,6 +82,23 @@ spec:
               port: 8080
             initialDelaySeconds: 30
             periodSeconds: 15
+        - image: docker.elastic.co/beats/filebeat:6.8.12
+          imagePullPolicy: Always
+          name: filebeat
+          volumeMounts:
+            - name: access-log #日志同时挂载在nginx和filebeat中
+              mountPath: /data
+            - name: filebeat-config
+              mountPath: /usr/share/filebeat/filebeat.yml
+              subPath: filebeat.yml
+      volumes:
+        - name: filebeat-config
+          configMap:
+            name: filebeat-config
+            items:
+              - key: filebeat.yml
+                path: filebeat.yml
+
   volumeClaimTemplates:
     - metadata:
         name: volume