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 #445

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

sroopsai
Copy link
Contributor

@sroopsai sroopsai commented May 7, 2024

No description provided.

sroopsai added 4 commits May 7, 2024 18:13
Signed-off-by: roopsai surampudi <roopsai@outlook.in>
Signed-off-by: roopsai surampudi <roopsai@outlook.in>
Signed-off-by: roopsai surampudi <roopsai@outlook.in>
Signed-off-by: roopsai surampudi <roopsai@outlook.in>
sroopsai added 2 commits May 7, 2024 13:09
Signed-off-by: roopsai surampudi <roopsai@outlook.in>
Signed-off-by: roopsai surampudi <roopsai@outlook.in>
@@ -12,64 +12,69 @@ dockerPullIfMissing() {
chaincodeBuild() {
Copy link
Contributor

@Hejwo Hejwo May 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend to split it into two functions:
chaincodeBuildDirPath, chaincodeBuildImage It would simplify the logic chaincode-install-v2 and would mean that we don't need to make if checks inside script

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok 😊

"<%= chaincode.lang %>" <% -%>
"<%= chaincode.image %>"
"<%= global.fabricRecommendedNodeVersion %>"
<% } -%>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I've written below, having two independent functions chaincodeBuildDirPath, chaincodeBuildImage would simplify this logic, thanks to it we don't need to have if statements inside functions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, to be considered - maybe it is even possible to do build->package->install if we have directory, and just a single step if we have docker image. The flow might be slightly different

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flow for deploying Chaincode-as-a-Service is build/pull a Docker Image -> Package A Chaincode (only contains connection details) -> Install -> Run the Chaincode-as-a-service Containers.

@Hejwo
Copy link
Contributor

Hejwo commented May 7, 2024

Reminder for later: Remember about adding snapshots when you'll finish the task.

@sroopsai sroopsai marked this pull request as draft May 14, 2024 16:06
sroopsai added 6 commits May 14, 2024 21:38
Signed-off-by: roopsai surampudi <roopsai@outlook.in>
Signed-off-by: roopsai surampudi <roopsai@outlook.in>
Signed-off-by: roopsai surampudi <roopsai@outlook.in>
Signed-off-by: roopsai surampudi <roopsai@outlook.in>
Signed-off-by: roopsai surampudi <roopsai@outlook.in>
Signed-off-by: roopsai <roopsai@outlook.in>
@sroopsai sroopsai marked this pull request as ready for review May 23, 2024 16:37
sroopsai added 2 commits May 23, 2024 16:58
Signed-off-by: roopsai surampudi <roopsai@outlook.in>
Signed-off-by: roopsai surampudi <roopsai@outlook.in>
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

Successfully merging this pull request may close these issues.

3 participants