Merge branch 'master' of http://gitlab.fjmaimaimai.com/allied-creation/sumifcc-bchart
正在显示
4 个修改的文件
包含
105 行增加
和
2 行删除
| @@ -14,11 +14,11 @@ JwtAuth: | @@ -14,11 +14,11 @@ JwtAuth: | ||
| 14 | Expire: 360000 | 14 | Expire: 360000 |
| 15 | 15 | ||
| 16 | Redis: | 16 | Redis: |
| 17 | - Host: 192.168.0.243:6379 | 17 | + Host: 192.168.0.243:30379 |
| 18 | Type: node | 18 | Type: node |
| 19 | Pass: | 19 | Pass: |
| 20 | DB: | 20 | DB: |
| 21 | - DataSource: host=114.55.200.59 user=postgres password=eagle1010 dbname=sumifcc-bchart-prd port=31543 sslmode=disable TimeZone=Asia/Shanghai | 21 | + DataSource: host=114.55.200.59 user=postgres password=eagle1010 dbname=sumifcc-bchart-prd port=31544 sslmode=disable TimeZone=Asia/Shanghai |
| 22 | 22 | ||
| 23 | ByteMetadata: | 23 | ByteMetadata: |
| 24 | Name: ApiByteMetadata | 24 | Name: ApiByteMetadata |
deploy/k8s/prd/.gitkeep
0 → 100644
deploy/k8s/prd/install.sh
0 → 100644
| 1 | +#!/bin/bash | ||
| 2 | +export PATH=/root/local/bin:$PATH | ||
| 3 | +kubectl -n mmm-suplus-prd get pods | grep -q sumifcc-bchart | ||
| 4 | +if [ "$?" == "1" ];then | ||
| 5 | + kubectl create -f /tmp/prd/sumifcc-bchart/sumifcc-bchart.yaml --record | ||
| 6 | + kubectl -n mmm-suplus-prd get svc | grep -q sumifcc-bchart | ||
| 7 | + if [ "$?" == "0" ];then | ||
| 8 | + echo "sumifcc-bchart service install success!" | ||
| 9 | + else | ||
| 10 | + echo "sumifcc-bchart service install fail!" | ||
| 11 | + fi | ||
| 12 | + kubectl -n mmm-suplus-prd get pods | grep -q sumifcc-bchart | ||
| 13 | + if [ "$?" == "0" ];then | ||
| 14 | + echo "sumifcc-bchart deployment install success!" | ||
| 15 | + else | ||
| 16 | + echo "sumifcc-bchart deployment install fail!" | ||
| 17 | + fi | ||
| 18 | +else | ||
| 19 | + kubectl delete -f /tmp/prd/sumifcc-bchart/sumifcc-bchart.yaml | ||
| 20 | + kubectl -n mmm-suplus-prd get svc | grep -q sumifcc-bchart | ||
| 21 | + while [ "$?" == "0" ] | ||
| 22 | + do | ||
| 23 | + kubectl -n mmm-suplus-prd get svc | grep -q sumifcc-bchart | ||
| 24 | + done | ||
| 25 | + kubectl -n mmm-suplus-prd get pods | grep -q sumifcc-bchart | ||
| 26 | + while [ "$?" == "0" ] | ||
| 27 | + do | ||
| 28 | + kubectl -n mmm-suplus-prd get pods | grep -q sumifcc-bchart | ||
| 29 | + done | ||
| 30 | + kubectl create -f /tmp/prd/sumifcc-bchart/sumifcc-bchart.yaml --record | ||
| 31 | + kubectl -n mmm-suplus-prd get svc | grep -q sumifcc-bchart | ||
| 32 | + if [ "$?" == "0" ];then | ||
| 33 | + echo "sumifcc-bchart service update success!" | ||
| 34 | + else | ||
| 35 | + echo "sumifcc-bchart service update fail!" | ||
| 36 | + fi | ||
| 37 | + kubectl -n mmm-suplus-prd get pods | grep -q sumifcc-bchart | ||
| 38 | + if [ "$?" == "0" ];then | ||
| 39 | + echo "sumifcc-bchart deployment update success!" | ||
| 40 | + else | ||
| 41 | + echo "sumifcc-bchart deployment update fail!" | ||
| 42 | + fi | ||
| 43 | +fi |
deploy/k8s/prd/sumifcc-bchart.yaml
0 → 100644
| 1 | +apiVersion: v1 | ||
| 2 | +kind: Service | ||
| 3 | +metadata: | ||
| 4 | + name: sumifcc-bchart | ||
| 5 | + namespace: mmm-suplus-prd | ||
| 6 | + labels: | ||
| 7 | + k8s-app: sumifcc-bchart | ||
| 8 | +spec: | ||
| 9 | + ports: | ||
| 10 | + - name: "http" | ||
| 11 | + port: 80 | ||
| 12 | + targetPort: 8080 | ||
| 13 | + selector: | ||
| 14 | + k8s-app: sumifcc-bchart | ||
| 15 | +--- | ||
| 16 | +apiVersion: extensions/v1beta1 | ||
| 17 | +kind: Deployment | ||
| 18 | +metadata: | ||
| 19 | + name: sumifcc-bchart | ||
| 20 | + namespace: mmm-suplus-prd | ||
| 21 | + labels: | ||
| 22 | + k8s-app: sumifcc-bchart | ||
| 23 | +spec: | ||
| 24 | + replicas: 1 | ||
| 25 | + template: | ||
| 26 | + metadata: | ||
| 27 | + labels: | ||
| 28 | + k8s-app: sumifcc-bchart | ||
| 29 | + spec: | ||
| 30 | + affinity: | ||
| 31 | + nodeAffinity: | ||
| 32 | + preferredDuringSchedulingIgnoredDuringExecution: | ||
| 33 | + - preference: {} | ||
| 34 | + weight: 100 | ||
| 35 | + requiredDuringSchedulingIgnoredDuringExecution: | ||
| 36 | + nodeSelectorTerms: | ||
| 37 | + - matchExpressions: | ||
| 38 | + - key: kubernetes.io/hostname | ||
| 39 | + operator: In | ||
| 40 | + values: | ||
| 41 | + - cn-hangzhou.i-bp1djh1xn7taumbue1zd | ||
| 42 | + containers: | ||
| 43 | + - name: sumifcc-bchart | ||
| 44 | + image: 192.168.0.243:5000/mmm/sumifcc-bchart:master | ||
| 45 | + imagePullPolicy: Always | ||
| 46 | + ports: | ||
| 47 | + - containerPort: 8080 | ||
| 48 | + volumeMounts: | ||
| 49 | + - mountPath: /opt/logs | ||
| 50 | + name: accesslogs | ||
| 51 | + env: | ||
| 52 | + - name: LOG_LEVEL | ||
| 53 | + value: "debug" | ||
| 54 | + - name: ERROR_BASE_CODE | ||
| 55 | + value: "1" | ||
| 56 | + - name: ERROR_BASE_CODE_MULTIPLE | ||
| 57 | + value: "1000" | ||
| 58 | + volumes: | ||
| 59 | + - name: accesslogs | ||
| 60 | + emptyDir: {} |
-
请 注册 或 登录 后发表评论