Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install chaincode from docker image #429

Open
dzikowski opened this issue Jan 5, 2024 · 5 comments
Open

Install chaincode from docker image #429

dzikowski opened this issue Jan 5, 2024 · 5 comments

Comments

@dzikowski
Copy link
Contributor

Right now Fablo requires a path to chaincode directory. We can additionally support passing chaincode docker image.

@Nova38
Copy link

Nova38 commented Mar 15, 2024

I would find this feature very helpful. What all would need to be changed in-order to support it

@dzikowski
Copy link
Contributor Author

Currently this is the place where we have functions handling chaincode lifecycle (build, install, approve and commit): fabric-docker/scripts/chaincode-functions-v2.sh.

And this is the place where we use the functions: fabric-docker/commands-generated/chaincode-install-v2.sh (it uses https://ejs.co/ template engine).

And this is how our current config looks like: src/types/FabloConfigJson.ts (look for: ChaincodeJson for chaincode config). Then it is normalized/extended to become src/types/FabloConfigExtended.ts, which is used in templates.

Now, the feature requires to allow the chaincode config fablo-config.json (so ChaincodeJson) to accept either directory?: string; (the current way) or image?: string; parameter (for Docker image). Then, Fablo should validate and pass it to FabloConfigExtended. Then, the template (chaincode-install-v2.sh) should decide whether to call installation from source or from the Docker image, and call relevant functions from chaincode-functions-v2.sh (it needs function to handle installing chaincode from Docker image).

For local testing/evaluation you can create your own fablo-config.json file, use fablo-build.sh script to rebuild Fablo locally from source, and use fablo.sh from source for executing methods.

@Nova38
Copy link

Nova38 commented Apr 2, 2024

Should the default option be to deploy the chain code as a caas image? It would make extending it out to the kubernetes version easier as the bevel fabric operators default way is to deploy it as caas

@dzikowski
Copy link
Contributor Author

Yes, exactly. I think that's the best approach.

@Gmin2
Copy link

Gmin2 commented Apr 6, 2024

Hey @dzikowski working on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants