-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprepare-staging.sh
executable file
·210 lines (197 loc) · 22.3 KB
/
prepare-staging.sh
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
#!/bin/bash
set -ex
docker run --rm -u $(id -u):$(id -g) -v $PWD/hlf/staging:/hlf/staging hyperledger/fabric-tools:2.3 cryptogen generate --config=/hlf/staging/crypto-config.yaml --output=/hlf/staging/generated/crypto-config
docker run --rm -u $(id -u):$(id -g) -v $PWD/hlf/staging:/hlf/staging hyperledger/fabric-tools:2.3 env FABRIC_CFG_PATH=/hlf/staging configtxgen -profile TwoOrgsOrdererGenesis -channelID system-channel -outputBlock /hlf/staging/generated/genesis.block
docker run --rm -u $(id -u):$(id -g) -v $PWD/hlf/staging:/hlf/staging hyperledger/fabric-tools:2.3 env FABRIC_CFG_PATH=/hlf/staging configtxgen -profile TwoOrgsChannel -outputCreateChannelTx /hlf/staging/generated/star.tx -channelID star
docker run --rm -u $(id -u):$(id -g) -v $PWD/hlf/staging:/hlf/staging hyperledger/fabric-tools:2.3 env FABRIC_CFG_PATH=/hlf/staging configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate /hlf/staging/generated/anchor-star-enedis.tx -channelID star -asOrg enedis
docker run --rm -u $(id -u):$(id -g) -v $PWD/hlf/staging:/hlf/staging hyperledger/fabric-tools:2.3 env FABRIC_CFG_PATH=/hlf/staging configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate /hlf/staging/generated/anchor-star-producer.tx -channelID star -asOrg producer
docker run --rm -u $(id -u):$(id -g) -v $PWD/hlf/staging:/hlf/staging hyperledger/fabric-tools:2.3 env FABRIC_CFG_PATH=/hlf/staging configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate /hlf/staging/generated/anchor-star-rte.tx -channelID star -asOrg rte
./hlf/staging/ccp-generate.sh enedis
./hlf/staging/ccp-generate.sh producer
./hlf/staging/ccp-generate.sh rte
./hlf/staging/user-generate.sh enedis
./hlf/staging/user-generate.sh producer
./hlf/staging/user-generate.sh rte
function generate_secrets {
# orderer
echo ---
kubectl create --dry-run=client -o yaml namespace orderer-staging
echo ---
kubectl create secret --dry-run=client -o yaml -n orderer-staging generic hlf--genesis --from-file=./hlf/staging/generated/genesis.block
echo ---
kubectl create secret --dry-run=client -o yaml -n orderer-staging generic hlf--ord-admincert --from-file=cert.pem=./hlf/staging/generated/crypto-config/ordererOrganizations/orderer/users/Admin@orderer/msp/signcerts/[email protected]
echo ---
kubectl create secret --dry-run=client -o yaml -n orderer-staging generic hlf--orderer1-idcert --from-file=./hlf/staging/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer1.orderer/msp/signcerts/orderer1.orderer-cert.pem
echo ---
kubectl create secret --dry-run=client -o yaml -n orderer-staging generic hlf--orderer1-idkey --from-file=./hlf/staging/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer1.orderer/msp/keystore/priv_sk
echo ---
kubectl create secret --dry-run=client -o yaml -n orderer-staging generic hlf--orderer1-cacert --from-file=./hlf/staging/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer1.orderer/msp/cacerts/ca.orderer-cert.pem
echo ---
kubectl create secret --dry-run=client -o yaml -n orderer-staging tls hlf--orderer1-tls --key=./hlf/staging/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer1.orderer/tls/server.key --cert=./hlf/staging/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer1.orderer/tls/server.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n orderer-staging generic hlf--orderer1-tlsrootcert --from-file=cacert.pem=./hlf/staging/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer1.orderer/tls/ca.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n orderer-staging generic hlf--orderer2-idcert --from-file=./hlf/staging/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer2.orderer/msp/signcerts/orderer2.orderer-cert.pem
echo ---
kubectl create secret --dry-run=client -o yaml -n orderer-staging generic hlf--orderer2-idkey --from-file=./hlf/staging/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer2.orderer/msp/keystore/priv_sk
echo ---
kubectl create secret --dry-run=client -o yaml -n orderer-staging generic hlf--orderer2-cacert --from-file=./hlf/staging/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer2.orderer/msp/cacerts/ca.orderer-cert.pem
echo ---
kubectl create secret --dry-run=client -o yaml -n orderer-staging tls hlf--orderer2-tls --key=./hlf/staging/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer2.orderer/tls/server.key --cert=./hlf/staging/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer2.orderer/tls/server.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n orderer-staging generic hlf--orderer2-tlsrootcert --from-file=cacert.pem=./hlf/staging/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer2.orderer/tls/ca.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n orderer-staging generic hlf--orderer3-idcert --from-file=./hlf/staging/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer3.orderer/msp/signcerts/orderer3.orderer-cert.pem
echo ---
kubectl create secret --dry-run=client -o yaml -n orderer-staging generic hlf--orderer3-idkey --from-file=./hlf/staging/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer3.orderer/msp/keystore/priv_sk
echo ---
kubectl create secret --dry-run=client -o yaml -n orderer-staging generic hlf--orderer3-cacert --from-file=./hlf/staging/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer3.orderer/msp/cacerts/ca.orderer-cert.pem
echo ---
kubectl create secret --dry-run=client -o yaml -n orderer-staging tls hlf--orderer3-tls --key=./hlf/staging/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer3.orderer/tls/server.key --cert=./hlf/staging/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer3.orderer/tls/server.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n orderer-staging generic hlf--orderer3-tlsrootcert --from-file=cacert.pem=./hlf/staging/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer3.orderer/tls/ca.crt
# enedis
echo ---
kubectl create --dry-run=client -o yaml namespace enedis-staging
echo ---
kubectl create secret --dry-run=client -o yaml -n enedis-staging generic starchannel --from-file=./hlf/staging/generated/star.tx --from-file=./hlf/staging/generated/anchor-star-enedis.tx
echo ---
kubectl create secret --dry-run=client -o yaml -n enedis-staging generic hlf--ord-tlsrootcert --from-file=cacert.pem=./hlf/staging/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer1.orderer/tls/ca.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n enedis-staging generic hlf--peer1-idcert --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/peers/peer1.enedis/msp/signcerts/peer1.enedis-cert.pem
echo ---
kubectl create secret --dry-run=client -o yaml -n enedis-staging generic hlf--peer1-idkey --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/peers/peer1.enedis/msp/keystore/priv_sk
echo ---
kubectl create secret --dry-run=client -o yaml -n enedis-staging generic hlf--peer1-cacert --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/peers/peer1.enedis/msp/cacerts/ca.enedis-cert.pem
echo ---
kubectl create secret --dry-run=client -o yaml -n enedis-staging tls hlf--peer1-tls --key=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/peers/peer1.enedis/tls/server.key --cert=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/peers/peer1.enedis/tls/server.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n enedis-staging generic hlf--peer1-tlsrootcert --from-file=cacert.pem=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/peers/peer1.enedis/tls/ca.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n enedis-staging tls hlf--peer1-tls-client --key=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/users/Admin@enedis/tls/client.key --cert=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/users/Admin@enedis/tls/client.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n enedis-staging generic hlf--peer1-client-tlsrootcert --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/users/Admin@enedis/tls/ca.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n enedis-staging generic hlf--peer1-admincert --from-file=cert.pem=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/users/Admin@enedis/msp/signcerts/[email protected]
echo ---
kubectl create secret --dry-run=client -o yaml -n enedis-staging generic hlf--peer1-adminkey --from-file=cert.pem=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/users/Admin@enedis/msp/keystore/priv_sk
echo ---
kubectl create secret --dry-run=client -o yaml -n enedis-staging generic hlf--peer2-idcert --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/peers/peer2.enedis/msp/signcerts/peer2.enedis-cert.pem
echo ---
kubectl create secret --dry-run=client -o yaml -n enedis-staging generic hlf--peer2-idkey --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/peers/peer2.enedis/msp/keystore/priv_sk
echo ---
kubectl create secret --dry-run=client -o yaml -n enedis-staging generic hlf--peer2-cacert --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/peers/peer2.enedis/msp/cacerts/ca.enedis-cert.pem
echo ---
kubectl create secret --dry-run=client -o yaml -n enedis-staging tls hlf--peer2-tls --key=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/peers/peer2.enedis/tls/server.key --cert=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/peers/peer2.enedis/tls/server.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n enedis-staging generic hlf--peer2-tlsrootcert --from-file=cacert.pem=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/peers/peer2.enedis/tls/ca.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n enedis-staging tls hlf--peer2-tls-client --key=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/users/Admin@enedis/tls/client.key --cert=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/users/Admin@enedis/tls/client.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n enedis-staging generic hlf--peer2-client-tlsrootcert --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/users/Admin@enedis/tls/ca.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n enedis-staging generic hlf--peer2-admincert --from-file=cert.pem=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/users/Admin@enedis/msp/signcerts/[email protected]
echo ---
kubectl create secret --dry-run=client -o yaml -n enedis-staging generic hlf--peer2-adminkey --from-file=cert.pem=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/users/Admin@enedis/msp/keystore/priv_sk
echo ---
kubectl create secret --dry-run=client -o yaml -n enedis-staging generic star-peer-connection --from-file=connection.yaml=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/connection-enedis.yaml
echo ---
kubectl create secret --dry-run=client -o yaml -n enedis-staging generic star-user-id --from-file=User1.id=./hlf/staging/generated/crypto-config/peerOrganizations/enedis/User1.id
# rte
echo ---
kubectl create --dry-run=client -o yaml namespace rte-staging
echo ---
kubectl create secret --dry-run=client -o yaml -n rte-staging generic starchannel --from-file=./hlf/staging/generated/star.tx --from-file=./hlf/staging/generated/anchor-star-rte.tx
echo ---
kubectl create secret --dry-run=client -o yaml -n rte-staging generic hlf--ord-tlsrootcert --from-file=cacert.pem=./hlf/staging/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer1.orderer/tls/ca.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n rte-staging generic hlf--peer1-idcert --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/rte/peers/peer1.rte/msp/signcerts/peer1.rte-cert.pem
echo ---
kubectl create secret --dry-run=client -o yaml -n rte-staging generic hlf--peer1-idkey --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/rte/peers/peer1.rte/msp/keystore/priv_sk
echo ---
kubectl create secret --dry-run=client -o yaml -n rte-staging generic hlf--peer1-cacert --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/rte/peers/peer1.rte/msp/cacerts/ca.rte-cert.pem
echo ---
kubectl create secret --dry-run=client -o yaml -n rte-staging tls hlf--peer1-tls --key=./hlf/staging/generated/crypto-config/peerOrganizations/rte/peers/peer1.rte/tls/server.key --cert=./hlf/staging/generated/crypto-config/peerOrganizations/rte/peers/peer1.rte/tls/server.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n rte-staging generic hlf--peer1-tlsrootcert --from-file=cacert.pem=./hlf/staging/generated/crypto-config/peerOrganizations/rte/peers/peer1.rte/tls/ca.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n rte-staging tls hlf--peer1-tls-client --key=./hlf/staging/generated/crypto-config/peerOrganizations/rte/users/Admin@rte/tls/client.key --cert=./hlf/staging/generated/crypto-config/peerOrganizations/rte/users/Admin@rte/tls/client.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n rte-staging generic hlf--peer1-client-tlsrootcert --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/rte/users/Admin@rte/tls/ca.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n rte-staging generic hlf--peer1-admincert --from-file=cert.pem=./hlf/staging/generated/crypto-config/peerOrganizations/rte/users/Admin@rte/msp/signcerts/[email protected]
echo ---
kubectl create secret --dry-run=client -o yaml -n rte-staging generic hlf--peer1-adminkey --from-file=cert.pem=./hlf/staging/generated/crypto-config/peerOrganizations/rte/users/Admin@rte/msp/keystore/priv_sk
echo ---
kubectl create secret --dry-run=client -o yaml -n rte-staging generic hlf--ord-tlsrootcert --from-file=cacert.pem=./hlf/staging/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer1.orderer/tls/ca.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n rte-staging generic hlf--peer2-idcert --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/rte/peers/peer2.rte/msp/signcerts/peer2.rte-cert.pem
echo ---
kubectl create secret --dry-run=client -o yaml -n rte-staging generic hlf--peer2-idkey --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/rte/peers/peer2.rte/msp/keystore/priv_sk
echo ---
kubectl create secret --dry-run=client -o yaml -n rte-staging generic hlf--peer2-cacert --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/rte/peers/peer2.rte/msp/cacerts/ca.rte-cert.pem
echo ---
kubectl create secret --dry-run=client -o yaml -n rte-staging tls hlf--peer2-tls --key=./hlf/staging/generated/crypto-config/peerOrganizations/rte/peers/peer2.rte/tls/server.key --cert=./hlf/staging/generated/crypto-config/peerOrganizations/rte/peers/peer2.rte/tls/server.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n rte-staging generic hlf--peer2-tlsrootcert --from-file=cacert.pem=./hlf/staging/generated/crypto-config/peerOrganizations/rte/peers/peer2.rte/tls/ca.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n rte-staging tls hlf--peer2-tls-client --key=./hlf/staging/generated/crypto-config/peerOrganizations/rte/users/Admin@rte/tls/client.key --cert=./hlf/staging/generated/crypto-config/peerOrganizations/rte/users/Admin@rte/tls/client.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n rte-staging generic hlf--peer2-client-tlsrootcert --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/rte/users/Admin@rte/tls/ca.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n rte-staging generic hlf--peer2-admincert --from-file=cert.pem=./hlf/staging/generated/crypto-config/peerOrganizations/rte/users/Admin@rte/msp/signcerts/[email protected]
echo ---
kubectl create secret --dry-run=client -o yaml -n rte-staging generic hlf--peer2-adminkey --from-file=cert.pem=./hlf/staging/generated/crypto-config/peerOrganizations/rte/users/Admin@rte/msp/keystore/priv_sk
echo ---
kubectl create secret --dry-run=client -o yaml -n rte-staging generic star-peer-connection --from-file=connection.yaml=./hlf/staging/generated/crypto-config/peerOrganizations/rte/connection-rte.yaml
echo ---
kubectl create secret --dry-run=client -o yaml -n rte-staging generic star-user-id --from-file=User1.id=./hlf/staging/generated/crypto-config/peerOrganizations/rte/User1.id
# producer
echo ---
kubectl create --dry-run=client -o yaml namespace producer-staging
echo ---
kubectl create secret --dry-run=client -o yaml -n producer-staging generic starchannel --from-file=./hlf/staging/generated/star.tx --from-file=./hlf/staging/generated/anchor-star-producer.tx
echo ---
kubectl create secret --dry-run=client -o yaml -n producer-staging generic hlf--ord-tlsrootcert --from-file=cacert.pem=./hlf/staging/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer1.orderer/tls/ca.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n producer-staging generic hlf--peer1-idcert --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/producer/peers/peer1.producer/msp/signcerts/peer1.producer-cert.pem
echo ---
kubectl create secret --dry-run=client -o yaml -n producer-staging generic hlf--peer1-idkey --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/producer/peers/peer1.producer/msp/keystore/priv_sk
echo ---
kubectl create secret --dry-run=client -o yaml -n producer-staging generic hlf--peer1-cacert --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/producer/peers/peer1.producer/msp/cacerts/ca.producer-cert.pem
echo ---
kubectl create secret --dry-run=client -o yaml -n producer-staging tls hlf--peer1-tls --key=./hlf/staging/generated/crypto-config/peerOrganizations/producer/peers/peer1.producer/tls/server.key --cert=./hlf/staging/generated/crypto-config/peerOrganizations/producer/peers/peer1.producer/tls/server.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n producer-staging generic hlf--peer1-tlsrootcert --from-file=cacert.pem=./hlf/staging/generated/crypto-config/peerOrganizations/producer/peers/peer1.producer/tls/ca.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n producer-staging tls hlf--peer1-tls-client --key=./hlf/staging/generated/crypto-config/peerOrganizations/producer/users/Admin@producer/tls/client.key --cert=./hlf/staging/generated/crypto-config/peerOrganizations/producer/users/Admin@producer/tls/client.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n producer-staging generic hlf--peer1-client-tlsrootcert --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/producer/users/Admin@producer/tls/ca.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n producer-staging generic hlf--peer1-admincert --from-file=cert.pem=./hlf/staging/generated/crypto-config/peerOrganizations/producer/users/Admin@producer/msp/signcerts/[email protected]
echo ---
kubectl create secret --dry-run=client -o yaml -n producer-staging generic hlf--peer1-adminkey --from-file=cert.pem=./hlf/staging/generated/crypto-config/peerOrganizations/producer/users/Admin@producer/msp/keystore/priv_sk
echo ---
kubectl create secret --dry-run=client -o yaml -n producer-staging generic hlf--peer2-idcert --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/producer/peers/peer2.producer/msp/signcerts/peer2.producer-cert.pem
echo ---
kubectl create secret --dry-run=client -o yaml -n producer-staging generic hlf--peer2-idkey --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/producer/peers/peer2.producer/msp/keystore/priv_sk
echo ---
kubectl create secret --dry-run=client -o yaml -n producer-staging generic hlf--peer2-cacert --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/producer/peers/peer2.producer/msp/cacerts/ca.producer-cert.pem
echo ---
kubectl create secret --dry-run=client -o yaml -n producer-staging tls hlf--peer2-tls --key=./hlf/staging/generated/crypto-config/peerOrganizations/producer/peers/peer2.producer/tls/server.key --cert=./hlf/staging/generated/crypto-config/peerOrganizations/producer/peers/peer2.producer/tls/server.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n producer-staging generic hlf--peer2-tlsrootcert --from-file=cacert.pem=./hlf/staging/generated/crypto-config/peerOrganizations/producer/peers/peer2.producer/tls/ca.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n producer-staging tls hlf--peer2-tls-client --key=./hlf/staging/generated/crypto-config/peerOrganizations/producer/users/Admin@producer/tls/client.key --cert=./hlf/staging/generated/crypto-config/peerOrganizations/producer/users/Admin@producer/tls/client.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n producer-staging generic hlf--peer2-client-tlsrootcert --from-file=./hlf/staging/generated/crypto-config/peerOrganizations/producer/users/Admin@producer/tls/ca.crt
echo ---
kubectl create secret --dry-run=client -o yaml -n producer-staging generic hlf--peer2-admincert --from-file=cert.pem=./hlf/staging/generated/crypto-config/peerOrganizations/producer/users/Admin@producer/msp/signcerts/[email protected]
echo ---
kubectl create secret --dry-run=client -o yaml -n producer-staging generic hlf--peer2-adminkey --from-file=cert.pem=./hlf/staging/generated/crypto-config/peerOrganizations/producer/users/Admin@producer/msp/keystore/priv_sk
echo ---
kubectl create secret --dry-run=client -o yaml -n producer-staging generic star-peer-connection --from-file=connection.yaml=./hlf/staging/generated/crypto-config/peerOrganizations/producer/connection-producer.yaml
echo ---
kubectl create secret --dry-run=client -o yaml -n producer-staging generic star-user-id --from-file=User1.id=./hlf/staging/generated/crypto-config/peerOrganizations/producer/User1.id
}
generate_secrets > secrets-staging.yaml