forked from OpenBlockMesh/OBM-Fabric-GKE-HL-v0.6
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dep-hl-vp2.yml
134 lines (121 loc) · 4.19 KB
/
dep-hl-vp2.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# Kubernetes Manifest file to create a Hyperledger Validating Peer - vp2
# Date : 28-10-2016
# Version 0.3
# Author : James Buckett ([email protected])
# Commissioned by ANZ Bank under direction of Ben Smillie ([email protected])
apiVersion: extensions/v1beta1
kind: Deployment
# A Deployment provides declarative updates for Pods and Replica Sets (the next-generation Replication Controller).
metadata:
name: dep-pod-hl-vp2
namespace: hyperledger-06
labels:
# Label of this Deployment Pod
app: hl-vp2
# city: singapore
# Replica Specifications
spec:
# One copy of the fabric in case of consistency issues
replicas: 1
selector:
matchLabels:
app: hl-vp2
city: singapore
template:
metadata:
labels:
app: hl-vp2
tier: validating-peer
version: "0.6"
environment: development
provider: gke
node: "node-vp2"
city: "singapore"
# Container Specifications
spec:
containers:
- name: vp2
# Fabric Peer docker image for Hyperledger Project
# https://github.com/hyperledger/fabric
# image: hyperledger/fabric-peer:latest
image: jackyhuang/fabric-peer:latest
imagePullPolicy: Always
# Readiness Check
# Due to size of Hyperledger images allow some time for image download
# The readiness probe will not be called until 60 seconds after the all containers in the pod are created.
# The readiness probe must respond within the 5 second timeout.
readinessProbe:
httpGet:
# Ready Check via REST interface to /chain
path: "/chain"
port: 7050
initialDelaySeconds: 60
timeoutSeconds: 5
# Start as peer node
command:
- "peer"
args:
- "node"
- "start"
# Environment
env:
# Set this validating node - vp2
- name: CORE_PEER_ID
value: "vp2"
# Root Node Service Location
- name: CORE_PEER_DISCOVERY_ROOTNODE
# value: "svc-hl-vp0.default.svc.cluster.local:7051"
value: "svc-hl-vp0.hyperledger-06.svc.cluster.local:7051"
- name: CORE_PEER_ADDRESSAUTODETECT
value: "false"
# Service name for the vp2
- name: CORE_PEER_ADDRESS
# value: "svc-hl-vp2.default.svc.cluster.local:7051"
value: "svc-hl-vp2.hyperledger-06.svc.cluster.local:7051"
- name: CORE_PEER_NETWORKID
value: "dev"
- name: CORE_LOGGING_LEVEL
# value: "debug"
value: chaincode=debug:vm=debug:main=info
# Enable pbft consensus
- name: CORE_PEER_VALIDATOR_CONSENSUS_PLUGIN
value: "pbft"
- name: CORE_PBFT_GENERAL_MODE
value: "batch"
- name: CORE_PBFT_GENERAL_BATCHSIZE
value: "2"
# Four nodes minimum for pbft protocol
- name: CORE_PBFT_GENERAL_N
value: "4"
- name: CORE_PBFT_GENERAL_TIMEOUT_REQUEST
value: "10s"
- name: CORE_CHAINCODE_STARTUPTIMEOUT
value: "10000"
- name: CORE_CHAINCODE_DEPLOYTIMEOUT
value: "120000"
# Location for Chain Code Docker Engine
# Change this value to match your environment
- name: CORE_VM_ENDPOINT
value: "http://svc-core-vm-endpoint:2375"
# Health Check
livenessProbe:
httpGet:
# Health Check via REST interface to /chain
path: "/chain"
port: 7050
initialDelaySeconds: 30
timeoutSeconds: 1
# Communication Ports
ports:
# Peer service listening port
- containerPort: 7051
# CLI process use it for callbacks from chain code
- containerPort: 7052
# Event service on validating node
- containerPort: 7053
# REST service listening port
- containerPort: 7050
# Assign this pod to node-vp2 for node resilence
nodeSelector:
node: node-vp2
# city: singapore