正在显示
100 个修改的文件
包含
212 行增加
和
927 行删除
1 | +apiVersion: v1 | ||
2 | +kind: Service | ||
3 | +metadata: | ||
4 | + name: allied-creation-cooperation | ||
5 | + namespace: <replace-your-k8s-namespace> | ||
6 | + labels: | ||
7 | + k8s-app: allied-creation-cooperation | ||
8 | +spec: | ||
9 | + ports: | ||
10 | + - name: "http" | ||
11 | + port: 80 | ||
12 | + targetPort: 8082 | ||
13 | + selector: | ||
14 | + k8s-app: allied-creation-cooperation | ||
15 | +--- | ||
16 | +apiVersion: extensions/v1beta1 | ||
17 | +kind: Deployment | ||
18 | +metadata: | ||
19 | + name: allied-creation-cooperation | ||
20 | + namespace: <replace-your-k8s-namespace> | ||
21 | + labels: | ||
22 | + k8s-app: allied-creation-cooperation | ||
23 | +spec: | ||
24 | + replicas: 1 | ||
25 | + template: | ||
26 | + metadata: | ||
27 | + labels: | ||
28 | + k8s-app: allied-creation-cooperation | ||
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-bp1djh1xn7taumbue1ze | ||
42 | + - cn-hangzhou.i-bp1djh1xn7taumbue1zd | ||
43 | + - cn-hangzhou.i-bp1euf5u1ph9kbhtndhb | ||
44 | + - cn-hangzhou.i-bp1hyp5oips9cdwxxgxy | ||
45 | + containers: | ||
46 | + - name: allied-creation-cooperation | ||
47 | + image: 192.168.0.243:5000/mmm/allied-creation-cooperation:dev | ||
48 | + imagePullPolicy: Always | ||
49 | + ports: | ||
50 | + - containerPort: 8082 | ||
51 | + volumeMounts: | ||
52 | + - mountPath: /opt/logs | ||
53 | + name: accesslogs | ||
54 | + env: | ||
55 | + - name: LOG_LEVEL | ||
56 | + value: "debug" | ||
57 | + - name: ERROR_BASE_CODE | ||
58 | + value: "1" | ||
59 | + - name: ERROR_BASE_CODE_MULTIPLE | ||
60 | + value: "1000" | ||
61 | + volumes: | ||
62 | + - name: accesslogs | ||
63 | + emptyDir: {} |
deploy/k8s/prd/install.sh
0 → 100644
1 | +#!/bin/bash | ||
2 | +export PATH=/root/local/bin:$PATH | ||
3 | +kubectl -n <replace-your-k8s-namespace> get pods | grep -q allied-creation-cooperation | ||
4 | +if [ "$?" == "1" ];then | ||
5 | + kubectl create -f /tmp/dev/allied-creation-cooperation/allied-creation-cooperation.yaml --record | ||
6 | + kubectl -n <replace-your-k8s-namespace> get svc | grep -q allied-creation-cooperation | ||
7 | + if [ "$?" == "0" ];then | ||
8 | + echo "allied-creation-cooperation service install success!" | ||
9 | + else | ||
10 | + echo "allied-creation-cooperation service install fail!" | ||
11 | + fi | ||
12 | + kubectl -n <replace-your-k8s-namespace> get pods | grep -q allied-creation-cooperation | ||
13 | + if [ "$?" == "0" ];then | ||
14 | + echo "allied-creation-cooperation deployment install success!" | ||
15 | + else | ||
16 | + echo "allied-creation-cooperation deployment install fail!" | ||
17 | + fi | ||
18 | +else | ||
19 | + kubectl delete -f /tmp/dev/allied-creation-cooperation/allied-creation-cooperation.yaml | ||
20 | + kubectl -n <replace-your-k8s-namespace> get svc | grep -q allied-creation-cooperation | ||
21 | + while [ "$?" == "0" ] | ||
22 | + do | ||
23 | + kubectl -n <replace-your-k8s-namespace> get svc | grep -q allied-creation-cooperation | ||
24 | + done | ||
25 | + kubectl -n <replace-your-k8s-namespace> get pods | grep -q allied-creation-cooperation | ||
26 | + while [ "$?" == "0" ] | ||
27 | + do | ||
28 | + kubectl -n <replace-your-k8s-namespace> get pods | grep -q allied-creation-cooperation | ||
29 | + done | ||
30 | + kubectl create -f /tmp/dev/allied-creation-cooperation/allied-creation-cooperation.yaml --record | ||
31 | + kubectl -n <replace-your-k8s-namespace> get svc | grep -q allied-creation-cooperation | ||
32 | + if [ "$?" == "0" ];then | ||
33 | + echo "allied-creation-cooperation service update success!" | ||
34 | + else | ||
35 | + echo "allied-creation-cooperation service update fail!" | ||
36 | + fi | ||
37 | + kubectl -n <replace-your-k8s-namespace> get pods | grep -q allied-creation-cooperation | ||
38 | + if [ "$?" == "0" ];then | ||
39 | + echo "allied-creation-cooperation deployment update success!" | ||
40 | + else | ||
41 | + echo "allied-creation-cooperation deployment update fail!" | ||
42 | + fi | ||
43 | +fi |
1 | +apiVersion: v1 | ||
2 | +kind: Service | ||
3 | +metadata: | ||
4 | + name: allied-creation-cooperation | ||
5 | + namespace: <replace-your-k8s-namespace> | ||
6 | + labels: | ||
7 | + k8s-app: allied-creation-cooperation | ||
8 | +spec: | ||
9 | + ports: | ||
10 | + - name: "http" | ||
11 | + port: 80 | ||
12 | + targetPort: 8082 | ||
13 | + selector: | ||
14 | + k8s-app: allied-creation-cooperation | ||
15 | +--- | ||
16 | +apiVersion: extensions/v1beta1 | ||
17 | +kind: Deployment | ||
18 | +metadata: | ||
19 | + name: allied-creation-cooperation | ||
20 | + namespace: <replace-your-k8s-namespace> | ||
21 | + labels: | ||
22 | + k8s-app: allied-creation-cooperation | ||
23 | +spec: | ||
24 | + replicas: 1 | ||
25 | + template: | ||
26 | + metadata: | ||
27 | + labels: | ||
28 | + k8s-app: allied-creation-cooperation | ||
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-bp1djh1xn7taumbue1ze | ||
42 | + - cn-hangzhou.i-bp1djh1xn7taumbue1zd | ||
43 | + - cn-hangzhou.i-bp1euf5u1ph9kbhtndhb | ||
44 | + - cn-hangzhou.i-bp1hyp5oips9cdwxxgxy | ||
45 | + containers: | ||
46 | + - name: allied-creation-cooperation | ||
47 | + image: 192.168.0.243:5000/mmm/allied-creation-cooperation:dev | ||
48 | + imagePullPolicy: Always | ||
49 | + ports: | ||
50 | + - containerPort: 8082 | ||
51 | + volumeMounts: | ||
52 | + - mountPath: /opt/logs | ||
53 | + name: accesslogs | ||
54 | + env: | ||
55 | + - name: LOG_LEVEL | ||
56 | + value: "debug" | ||
57 | + - name: ERROR_BASE_CODE | ||
58 | + value: "1" | ||
59 | + - name: ERROR_BASE_CODE_MULTIPLE | ||
60 | + value: "1000" | ||
61 | + volumes: | ||
62 | + - name: accesslogs | ||
63 | + emptyDir: {} |
deploy/k8s/test/install.sh
0 → 100644
1 | +#!/bin/bash | ||
2 | +export PATH=/root/local/bin:$PATH | ||
3 | +kubectl -n <replace-your-k8s-namespace> get pods | grep -q allied-creation-cooperation | ||
4 | +if [ "$?" == "1" ];then | ||
5 | + kubectl create -f /tmp/prd/allied-creation-cooperation/allied-creation-cooperation.yaml --record | ||
6 | + kubectl -n <replace-your-k8s-namespace> get svc | grep -q allied-creation-cooperation | ||
7 | + if [ "$?" == "0" ];then | ||
8 | + echo "allied-creation-cooperation service install success!" | ||
9 | + else | ||
10 | + echo "allied-creation-cooperation service install fail!" | ||
11 | + fi | ||
12 | + kubectl -n <replace-your-k8s-namespace> get pods | grep -q allied-creation-cooperation | ||
13 | + if [ "$?" == "0" ];then | ||
14 | + echo "allied-creation-cooperation deployment install success!" | ||
15 | + else | ||
16 | + echo "allied-creation-cooperation deployment install fail!" | ||
17 | + fi | ||
18 | +else | ||
19 | + kubectl delete -f /tmp/prd/allied-creation-cooperation/allied-creation-cooperation.yaml | ||
20 | + kubectl -n <replace-your-k8s-namespace> get svc | grep -q allied-creation-cooperation | ||
21 | + while [ "$?" == "0" ] | ||
22 | + do | ||
23 | + kubectl -n <replace-your-k8s-namespace> get svc | grep -q allied-creation-cooperation | ||
24 | + done | ||
25 | + kubectl -n <replace-your-k8s-namespace> get pods | grep -q allied-creation-cooperation | ||
26 | + while [ "$?" == "0" ] | ||
27 | + do | ||
28 | + kubectl -n <replace-your-k8s-namespace> get pods | grep -q allied-creation-cooperation | ||
29 | + done | ||
30 | + kubectl create -f /tmp/prd/allied-creation-cooperation/allied-creation-cooperation.yaml --record | ||
31 | + kubectl -n <replace-your-k8s-namespace> get svc | grep -q allied-creation-cooperation | ||
32 | + if [ "$?" == "0" ];then | ||
33 | + echo "allied-creation-cooperation service update success!" | ||
34 | + else | ||
35 | + echo "allied-creation-cooperation service update fail!" | ||
36 | + fi | ||
37 | + kubectl -n <replace-your-k8s-namespace> get pods | grep -q allied-creation-cooperation | ||
38 | + if [ "$?" == "0" ];then | ||
39 | + echo "allied-creation-cooperation deployment update success!" | ||
40 | + else | ||
41 | + echo "allied-creation-cooperation deployment update fail!" | ||
42 | + fi | ||
43 | +fi |
1 | -version: v1 | ||
2 | -kind: HttpApi | ||
3 | -metadata: | ||
4 | - service: contractUndertakerFeedback | ||
5 | - path: /contract-undertaker-feedbacks | ||
6 | - endpoints: | ||
7 | - - method: createContractUndertakerFeedback | ||
8 | - route: | ||
9 | - post: / | ||
10 | - - method: updateContractUndertakerFeedback | ||
11 | - route: | ||
12 | - put: /{contractUndertakerFeedbackId} | ||
13 | - - method: getContractUndertakerFeedback | ||
14 | - route: | ||
15 | - get: /{contractUndertakerFeedbackId} | ||
16 | - - method: removeContractUndertakerFeedback | ||
17 | - route: | ||
18 | - delete: /{contractUndertakerFeedbackId} | ||
19 | - - method: searchContractUndertakerFeedback | ||
20 | - route: | ||
21 | - post: /search | ||
22 | - - method: listContractUndertakerFeedback | ||
23 | - route: | ||
24 | - get: / | ||
25 | - params: | ||
26 | - - name: offset | ||
27 | - - name: limit |
1 | -version: v1 | ||
2 | -kind: HttpApi | ||
3 | -metadata: | ||
4 | - service: cooperationApplication | ||
5 | - path: /cooperation-applications | ||
6 | - endpoints: | ||
7 | - - method: applyForCooperation | ||
8 | - route: | ||
9 | - post: /apply-for-cooperation | ||
10 | - - method: agreeCooperationApplication | ||
11 | - route: | ||
12 | - post: /agree-cooperation-application | ||
13 | - - method: rejectCooperationApplication | ||
14 | - route: | ||
15 | - post: /reject-cooperation-application | ||
16 | - - method: createCooperationApplication | ||
17 | - route: | ||
18 | - post: / | ||
19 | - - method: updateCooperationApplication | ||
20 | - route: | ||
21 | - put: /{cooperationApplicationId} | ||
22 | - - method: getCooperationApplication | ||
23 | - route: | ||
24 | - get: /{cooperationApplicationId} | ||
25 | - - method: removeCooperationApplication | ||
26 | - route: | ||
27 | - delete: /{cooperationApplicationId} | ||
28 | - - method: searchCooperationApplication | ||
29 | - route: | ||
30 | - post: /search | ||
31 | - - method: listCooperationApplication | ||
32 | - route: | ||
33 | - get: / | ||
34 | - params: | ||
35 | - - name: offset | ||
36 | - - name: limit |
1 | -version: v1 | ||
2 | -kind: HttpApi | ||
3 | -metadata: | ||
4 | - service: cooperationContractChangeLog | ||
5 | - path: /cooperation-contract-change-logs | ||
6 | - endpoints: | ||
7 | - - method: createCooperationContractChangeLog | ||
8 | - route: | ||
9 | - post: / | ||
10 | - - method: updateCooperationContractChangeLog | ||
11 | - route: | ||
12 | - put: /{cooperationContractChangeLogId} | ||
13 | - - method: getCooperationContractChangeLog | ||
14 | - route: | ||
15 | - get: /{cooperationContractChangeLogId} | ||
16 | - - method: removeCooperationContractChangeLog | ||
17 | - route: | ||
18 | - delete: /{cooperationContractChangeLogId} | ||
19 | - - method: listCooperationContractChangeLog | ||
20 | - route: | ||
21 | - get: / | ||
22 | - params: | ||
23 | - - name: offset | ||
24 | - - name: limit | ||
25 | - - method: searchCooperationContractChangeLog | ||
26 | - route: | ||
27 | - post: /search |
1 | -version: v1 | ||
2 | -kind: HttpApi | ||
3 | -metadata: | ||
4 | - service: cooperationContract | ||
5 | - path: /cooperation-contracts | ||
6 | - endpoints: | ||
7 | - - method: createCooperationContract | ||
8 | - route: | ||
9 | - post: / | ||
10 | - - method: updateCooperationContract | ||
11 | - route: | ||
12 | - put: /{cooperationContractId} | ||
13 | - - method: getCooperationContract | ||
14 | - route: | ||
15 | - get: /{cooperationContractId} | ||
16 | - - method: removeCooperationContract | ||
17 | - route: | ||
18 | - delete: /{cooperationContractId} | ||
19 | - - method: searchCooperationContract | ||
20 | - route: | ||
21 | - post: /search | ||
22 | - - method: searchCooperationContractByUndertaker | ||
23 | - route: | ||
24 | - post: /search-by-undertaker | ||
25 | - - method: listCooperationContract | ||
26 | - route: | ||
27 | - get: / | ||
28 | - params: | ||
29 | - - name: offset | ||
30 | - - name: limit |
1 | -version: v1 | ||
2 | -kind: HttpApi | ||
3 | -metadata: | ||
4 | - service: cooperationMode | ||
5 | - path: /cooperation-modes | ||
6 | - endpoints: | ||
7 | - - method: createCooperationMode | ||
8 | - route: | ||
9 | - post: / | ||
10 | - - method: updateCooperationMode | ||
11 | - route: | ||
12 | - put: /{cooperationModeId} | ||
13 | - - method: getCooperationMode | ||
14 | - route: | ||
15 | - get: /{cooperationModeId} | ||
16 | - - method: removeCooperationMode | ||
17 | - route: | ||
18 | - delete: /{cooperationModeId} | ||
19 | - - method: searchCooperationMode | ||
20 | - route: | ||
21 | - post: /search | ||
22 | - - method: listCooperationMode | ||
23 | - route: | ||
24 | - get: / | ||
25 | - params: | ||
26 | - - name: offset | ||
27 | - - name: limit |
1 | -version: v1 | ||
2 | -kind: HttpApi | ||
3 | -metadata: | ||
4 | - service: cooperationProject | ||
5 | - path: /cooperation-projects | ||
6 | - endpoints: | ||
7 | - - method: releaseCooperationProject | ||
8 | - route: | ||
9 | - post: /release-cooperation-project | ||
10 | - - method: createCooperationProject | ||
11 | - route: | ||
12 | - post: / | ||
13 | - - method: updateCooperationProject | ||
14 | - route: | ||
15 | - put: /{cooperationProjectId} | ||
16 | - - method: getCooperationProject | ||
17 | - route: | ||
18 | - get: /{cooperationProjectId} | ||
19 | - - method: removeCooperationProject | ||
20 | - route: | ||
21 | - delete: /{cooperationProjectId} | ||
22 | - - method: searchCooperationProject | ||
23 | - route: | ||
24 | - post: /search | ||
25 | - - method: checkUndertaker | ||
26 | - route: | ||
27 | - post: /check | ||
28 | - - method: listCooperationProject | ||
29 | - route: | ||
30 | - get: / | ||
31 | - params: | ||
32 | - - name: offset | ||
33 | - - name: limit |
1 | -version: v1 | ||
2 | -kind: HttpApi | ||
3 | -metadata: | ||
4 | - service: creditAccount | ||
5 | - path: /credit-accounts | ||
6 | - endpoints: | ||
7 | - - method: createCreditAccount | ||
8 | - route: | ||
9 | - post: / | ||
10 | - - method: updateCreditAccount | ||
11 | - route: | ||
12 | - put: /{creditAccountId} | ||
13 | - - method: getCreditAccount | ||
14 | - route: | ||
15 | - get: /{creditAccountId} | ||
16 | - - method: removeCreditAccount | ||
17 | - route: | ||
18 | - delete: /{creditAccountId} | ||
19 | - - method: searchCreditAccount | ||
20 | - route: | ||
21 | - post: /search | ||
22 | - - method: payCreditAccount | ||
23 | - route: | ||
24 | - post: /pay | ||
25 | - - method: listCreditAccount | ||
26 | - route: | ||
27 | - get: / | ||
28 | - params: | ||
29 | - - name: offset | ||
30 | - - name: limit |
1 | -version: v1 | ||
2 | -kind: HttpApi | ||
3 | -metadata: | ||
4 | - service: dividendsEstimate | ||
5 | - path: /dividends-estimates | ||
6 | - endpoints: | ||
7 | - - method: createDividendsEstimate | ||
8 | - route: | ||
9 | - post: / | ||
10 | - - method: updateDividendsEstimate | ||
11 | - route: | ||
12 | - put: /{dividendsEstimateId} | ||
13 | - - method: getDividendsEstimate | ||
14 | - route: | ||
15 | - get: /{dividendsEstimateId} | ||
16 | - - method: removeDividendsEstimate | ||
17 | - route: | ||
18 | - delete: /{dividendsEstimateId} | ||
19 | - - method: cancelDividendsEstimate | ||
20 | - route: | ||
21 | - post: /{dividendsEstimateId}/cancel | ||
22 | - - method: searchDividendsEstimate | ||
23 | - route: | ||
24 | - post: /search | ||
25 | - - method: estimateDividendsIncentives | ||
26 | - route: | ||
27 | - post: /estimate-dividends-incentives | ||
28 | - - method: estimateMoneyIncentives | ||
29 | - route: | ||
30 | - post: /estimate-money-incentives | ||
31 | - - method: listMoneyIncentives | ||
32 | - route: | ||
33 | - get: /list-money-incentives | ||
34 | - - method: searchMoneyIncentives | ||
35 | - route: | ||
36 | - post: /search-money-incentives | ||
37 | - - method: listDividendsIncentives | ||
38 | - route: | ||
39 | - get: /list-dividends-incentives | ||
40 | - - method: searchDividendsIncentives | ||
41 | - route: | ||
42 | - post: /search-dividends-incentives | ||
43 | - - method: listDividendsEstimate | ||
44 | - route: | ||
45 | - get: / | ||
46 | - params: | ||
47 | - - name: offset | ||
48 | - - name: limit |
1 | -version: v1 | ||
2 | -kind: HttpApi | ||
3 | -metadata: | ||
4 | - service: dividendsOrder | ||
5 | - path: /dividends-orders | ||
6 | - endpoints: | ||
7 | - - method: createDividendsOrder | ||
8 | - route: | ||
9 | - post: / | ||
10 | - - method: updateDividendsOrder | ||
11 | - route: | ||
12 | - put: /{dividendsOrderId} | ||
13 | - - method: getDividendsOrder | ||
14 | - route: | ||
15 | - get: /{dividendsOrderId} | ||
16 | - - method: removeDividendsOrder | ||
17 | - route: | ||
18 | - delete: /{dividendsOrderId} | ||
19 | - - method: searchDividendsOrder | ||
20 | - route: | ||
21 | - post: /search | ||
22 | - - method: listDividendsOrders | ||
23 | - route: | ||
24 | - get: / | ||
25 | - params: | ||
26 | - - name: offset | ||
27 | - - name: limit |
1 | -version: v1 | ||
2 | -kind: HttpApi | ||
3 | -metadata: | ||
4 | - service: dividendsReturnedOrder | ||
5 | - path: /dividends-returned-orders | ||
6 | - endpoints: | ||
7 | - - method: createDividendsReturnedOrder | ||
8 | - route: | ||
9 | - post: / | ||
10 | - - method: updateDividendsReturnedOrder | ||
11 | - route: | ||
12 | - put: /{dividendsReturnedOrderId} | ||
13 | - - method: getDividendsReturnedOrder | ||
14 | - route: | ||
15 | - get: /{dividendsReturnedOrderId} | ||
16 | - - method: removeDividendsReturnedOrder | ||
17 | - route: | ||
18 | - delete: /{dividendsReturnedOrderId} | ||
19 | - - method: searchDividendsReturnedOrder | ||
20 | - route: | ||
21 | - post: /search | ||
22 | - - method: importDividendsReturnedOrder | ||
23 | - route: | ||
24 | - post: /import | ||
25 | - - method: listDividendsReturnedOrder | ||
26 | - route: | ||
27 | - get: / | ||
28 | - params: | ||
29 | - - name: offset | ||
30 | - - name: limit |
-
请 注册 或 登录 后发表评论