feat: support installing chaincode from Docker image using CCAAS
#429 link 429
This PR supports installing and running chaincode from a Docker image (CCaaS mode), rather than a local directory. It’s useful for teams who prefer building and deploying chaincode separately.
lang: "ccaas"is now supported in chaincode definitions- When
langisccaas:imageandportare requireddirectoryis optional
- Lifecycle scripts were updated to handle packaging without source
- Docker Compose now includes services for chaincodes running in CCaaS mode
Example config
{
"name": "chaincode1",
"version": "0.0.1",
"lang": "ccaas",
"channel": "my-channel1",
"image": "realartisan/chaincode-kv-node:latest",
"port": 7052
}
@dpereowei that looks good, have you tested it locally? It would be good to make it as a part of one of pipelines. I think test-04-snapshot.sh is a good fit. The test can be reworked in a wollowing way:
- The config that is used there (
fablo-config-hlf2-1org-1chaincode-raft-explorer.json), could have a chaincode docker image (ccaas) instead from a chaincode from source - The test can build the chaincode docker image before starting the network
This test in CI would allow us to ensure it actually works, and how it behaves when tls is enabled (currently there is hardcoded false in chaincodePackage function).
Also an additional comment - I see you create the chaincode archive in /tmp. I think it's good to keep it in the current directory, or maybe in <pwd>/chaincodes subdirectory.
Hi @dzikowski, I appreciate your feedback and I will get to working on the tests, thanks
@dpereowei please squash these commits
handled in #594