Explorar o código

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

datard %!s(int64=3) %!d(string=hai) anos
pai
achega
85ed22d0fc
Modificáronse 3 ficheiros con 29 adicións e 31 borrados
  1. 6 6
      .drone.yml
  2. 1 1
      Dockerfile
  3. 22 24
      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.40
+    tag: v1.0.41
 #    build_args:
-#      - JAR_FILE=
+#      - 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.40
+    JNLP_TAG: v1.0.41
     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.40 Success"
-    description: "${DRONE_BUILD_LINK} qa/offline-process-charge:v1.0.40 部署完成"
+    title: "Pipeline qa/offline-process-charge:v1.0.41 Success"
+    description: "${DRONE_BUILD_LINK} qa/offline-process-charge:v1.0.41 部署完成"
     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.40 Failure"
+    title: "Pipeline qa/offline-process-charge:v1.0.41 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.40
+FROM hub.evbj.easou.com/qa/offline-process-charge:v1.0.41

+ 22 - 24
deploy-tmp.yaml

@@ -30,7 +30,7 @@ spec:
       #  app.touchrs: touchrs
       containers:
         - name: offline-process-charge
-          image: hub.evbj.easou.com/qa/offline-process-charge:v1.0.40
+          image: hub.evbj.easou.com/qa/offline-process-charge:v1.0.41
           imagePullPolicy: Always
           env:
             - name: JAVA_OPTS
@@ -52,10 +52,10 @@ spec:
               path: /actuator/health
               port: 8080
               httpHeaders:
-              - name: Custom-Header
-                value: Awesome
-              - name: Custom-Header
-                value: Awesome
+                - name: Custom-Header
+                  value: Awesome
+                - name: Custom-Header
+                  value: Awesome
             initialDelaySeconds: 30        #60s后启动第一次探测
             periodSeconds: 10              # 每隔10s启动一次探测
             timeoutSeconds: 3              # 超时时间3s
@@ -69,19 +69,6 @@ spec:
         - image: docker.elastic.co/beats/filebeat:6.8.12
           imagePullPolicy: Always
           name: filebeat
-          env:
-          - name: ELASTICSEARCH_HOST
-            value: elasticsearch
-          - name: ELASTICSEARCH_PORT
-            value: "9200"
-          - name: ELASTICSEARCH_USERNAME
-            value: elastic
-          - name: ELASTICSEARCH_PASSWORD
-            value: changeme
-          - name: KIBANA_HOST
-            value: kibana
-          - name: KIBANA_PORT
-            value: "5601"
           volumeMounts:
             - name: volume #日志同时挂载在nginx和filebeat中
               mountPath: /data
@@ -154,18 +141,29 @@ data:
       multiline.negate: true
       multiline.match: after
       multiline.timeout: 30
+      fields:
+          log_topic: offline-process-charge
+      fields_under_root: true
       paths:
-        - "/data/logs/app/all.log"
+        - "/data/logs/app/*.log"
         - "/data/logs/*.log"
     setup.template.enabled: true
     setup.template.name: offline-process-charge
     setup.template.pattern: offline-process-charge*
     setup.dashboards.enabled: true
-    output.elasticsearch:
-      username: elastic
-      password: changeme
-      hosts: ['elasticsearch:9200']
-      index: "offline-process-charge"
+    output.kafka:
+      version: 0.10.2.1
+      enable: true
+      # initial brokers for reading cluster metadata
+      hosts: ["kafka-0.kafka-svc.qa.svc.cluster.local:9093", "kafka-1.kafka-svc.qa.svc.cluster.local:9093", "kafka-2.kafka-svc.qa.svc.cluster.local:9093"]
+      # message topic selection + partitioning
+      # topic: '%{[fields.log_topic]}'
+      topic: 'offline-process-topic'
+      partition.round_robin:
+        reachable_only: false
+      required_acks: 0
+      compression: gzip
+      max_message_bytes: 1000000
     setup.kibana:
       host: 'qa-kibana.ieasou.cn:80'
 #       host: 'kibana-svc:80'