Skip to content

Commit

Permalink
fix docs: Chaincode-as-a-service tutorial (hyperledger#663)
Browse files Browse the repository at this point in the history
This PR fixes the followings to run the tutorial.
- Add an instruction to set PATH to call the `peer` command.
- Correct an option for `deployCCAAS` to debug Chaincode.

Signed-off-by: Yuki Kondo <[email protected]>
  • Loading branch information
yukiknd authored Mar 9, 2022
1 parent 2f3e9ff commit 70cce45
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test-network/CHAINCODE_AS_A_SERVICE_TUTORIAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export CORE_PEER_LOCALMSPID="Org1MSP"
export CORE_PEER_TLS_ROOTCERT_FILE=${PWD}/organizations/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem
export CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/org1.example.com/users/[email protected]/msp
export CORE_PEER_ADDRESS=localhost:7051
export PATH=${PWD}/../bin:$PATH
export FABRIC_CFG_PATH=${PWD}/../config

# invoke the function
Expand Down Expand Up @@ -111,12 +112,12 @@ For Node.js (JavaScript or TypeScript) chaincode, typically the `package.json` h

Running in the '-as-a-service' mode offers options, similar to how the Fabric 'dev' mode works on debugging code. The restrictions of the 'dev' mode don't apply.

There is an option `-ccaasdr false` that can be provided on the `deployCCAAS` command. This will _not_ build the docker image or start a docker container. It does output the commands it would have run.
There is an option `-ccaasdocker false` that can be provided on the `deployCCAAS` command. This will _not_ build the docker image or start a docker container. It does output the commands it would have run.

Run this command, and you'll see similar output

```bash
./network.sh deployCCAAS -ccn basicj -ccp ../asset-transfer-basic/chaincode-java -ccaasdr false
./network.sh deployCCAAS -ccn basicj -ccp ../asset-transfer-basic/chaincode-java -ccaasdocker false
#....
Not building docker image; this the command we would have run
docker build -f ../asset-transfer-basic/chaincode-java/Dockerfile -t basicj_ccaas_image:latest --build-arg CC_SERVER_PORT=9999 ../asset-transfer-basic/chaincode-java
Expand Down

0 comments on commit 70cce45

Please sign in to comment.