-
Notifications
You must be signed in to change notification settings - Fork 1
/
14-instantiate-chaincode.yaml
45 lines (44 loc) · 1.32 KB
/
14-instantiate-chaincode.yaml
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
---
apiVersion: batch/v1
kind: Job
metadata:
name: chaincode-instantiate
namespace: ledger
spec:
backoffLimit: 1
template:
metadata:
name: chaincode-instantiate
spec:
restartPolicy: "Never"
containers:
- name: chaincodeinstantiate
image: hyperledger/fabric-tools:1.4.3
imagePullPolicy: Always
command: ["sh", "-c", "peer chaincode instantiate -o orderer:31010 -C ${CHANNEL_NAME} -n ${CHAINCODE_NAME} -v ${CHAINCODE_VERSION} -c '{\"Args\":[\"InitLedger\"]}'"]
env:
- name: CHANNEL_NAME
value: library
- name: CHAINCODE_NAME
value: "bookstore"
- name: CHAINCODE_VERSION
value: "1.0"
- name: FABRIC_CFG_PATH
value: /etc/hyperledger/fabric
- name: CORE_PEER_MSPCONFIGPATH
value: /fabric/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp
- name: CORE_PEER_LOCALMSPID
value: Org1MSP
- name: CORE_PEER_ADDRESS
value: org1peer1:30110
- name: GODEBUG
value: "netdns=go"
volumeMounts:
- mountPath: /fabric
name: fabricfiles
serviceAccountName: fabric
volumes:
- name: fabricfiles
nfs:
server: nfs-server.ledger.svc.cluster.local
path: "/"