@@ -155,9 +155,10 @@ These commands will clone Azure HLF client application code from public GitHub r
155
155
### Setup environment variables
156
156
157
157
> [ !NOTE]
158
- > All environmental variables follow the Azure resource naming convention
159
- > ** Set below environment variables for orderer organization client**
160
- > OrdererOrgName and PeerOrgName are the ABS resource names used to set up Orderer Service > or Peer Org respectively
158
+ > All environmental variables follow the Azure resource naming convention.
159
+
160
+
161
+ ** Set below environment variables for orderer organization client**
161
162
162
163
163
164
``` bash
@@ -167,7 +168,7 @@ ORDERER_ORG_NAME=<ordererOrgName>
167
168
ORDERER_ADMIN_IDENTITY=" admin.$ORDERER_ORG_NAME "
168
169
CHANNEL_NAME=< channelName>
169
170
```
170
- Set the below environment variables for peer organization client
171
+ ** Set the below environment variables for peer organization client**
171
172
172
173
``` bash
173
174
PEER_ORG_SUBSCRIPTION=< peerOrgSubscritpion>
@@ -208,8 +209,10 @@ az storage share create --account-name $STORAGE_ACCOUNT --account-key $STORAGE
208
209
Follow below steps for generating Azure file share connection string
209
210
210
211
``` bash
212
+ STORAGE_KEY=$( az storage account keys list --resource-group $STORAGE_RESOURCE_GROUP --account-name $STORAGE_ACCOUNT --query " [0].value" | tr -d ' "' )
211
213
SAS_TOKEN=$( az storage account generate-sas --account-key $STORAGE_KEY --account-name $STORAGE_ACCOUNT --expiry ` date -u -d " 1 day" ' +%Y-%m-%dT%H:%MZ' ` --https-only --permissions lruwd --resource-types sco --services f | tr -d ' "' )
212
- AZURE_FILE_CONNECTION_STRING=" https://$STORAGE_ACCOUNT .file.core.windows.net/$STORAGE_FILE_SHARE ?$SAS_TOKEN "
214
+ AZURE_FILE_CONNECTION_STRING=https://$STORAGE_ACCOUNT .file.core.windows.net/$STORAGE_FILE_SHARE ? $SAS_TOKEN
215
+
213
216
```
214
217
215
218
### Import organization connection profile, admin user identity, and MSP
@@ -242,6 +245,21 @@ From orderer organization client, issue command to create a new channel. This co
242
245
``` bash
243
246
./azhlf channel create -c $CHANNEL_NAME -u $ORDERER_ADMIN_IDENTITY -o $ORDERER_ORG_NAME
244
247
```
248
+
249
+ From peer organization client, issue below command to set anchor peer(s) for the peer organization on the specified channel.
250
+
251
+ > [ !NOTE]
252
+ > Before executing this command, ensure that peer organization is added in the channel using Consortium management commands.
253
+
254
+ ``` bash
255
+ ./azhlf channel setAnchorPeers -c $CHANNEL_NAME -p < anchorPeersList> -o $PEER_ORG_NAME -u $PEER_ADMIN_IDENTITY
256
+ ```
257
+
258
+ ` <anchorPeersList> ` is a space separated list of peer nodes to be set as an anchor peer. For example,
259
+
260
+ - Set ` <anchorPeersList> ` as “peer1” if you want to set only peer1 node as anchor peer.
261
+ - Set ` <anchorPeersList> ` as “peer1” “peer3” if you want to set both peer1 and peer3 node as anchor peer.
262
+
245
263
### Consortium management commands
246
264
247
265
> [ !NOTE]
@@ -286,17 +304,17 @@ Similarly, to add more peer organizations in the channel, update peer environmen
286
304
287
305
``` bash
288
306
# peer organization name where chaincode operation is to be performed
289
- ORGNAME=< ABS resource name for the Peer Org >
307
+ ORGNAME=< PeerOrgName >
290
308
USER_IDENTITY=" admin.$ORGNAME "
291
- # If you are using chaincode_example02 then set CC_NAME=” chaincode_example02”
309
+ # If you are using chaincode_example02 then set CC_NAME=“ chaincode_example02”
292
310
CC_NAME=< chaincodeName>
293
- # If you are using chaincode_example02 then set CC_VERSION=” 1” for validation
311
+ # If you are using chaincode_example02 then set CC_VERSION=“ 1” for validation
294
312
CC_VERSION=< chaincodeVersion>
295
313
# Language in which chaincode is written. Supported languages are 'node', 'golang' and 'java'
296
314
# Default value is 'golang'
297
315
CC_LANG=< chaincodeLanguage>
298
316
# CC_PATH contains the path where your chaincode is place.
299
- # If you are using chaincode_example02 to validate then CC_PATH=” /home/<username>/azhlfTool/chaincode/src/chaincode_example02”
317
+ # If you are using chaincode_example02 to validate then CC_PATH=“ /home/<username>/azhlfTool/chaincode/src/chaincode_example02/go ”
300
318
CC_PATH=< chaincodePath>
301
319
# Channel on which chaincode is to be instantiated/invoked/queried
302
320
CHANNEL_NAME=< channelName>
0 commit comments