-
Notifications
You must be signed in to change notification settings - Fork 71
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
Upgrade to version3 #497
base: main
Are you sure you want to change the base?
Upgrade to version3 #497
Conversation
Signed-off-by: Sanket Teli <[email protected]>
Signed-off-by: Sanket Teli <[email protected]>
Signed-off-by: Sanket Teli <[email protected]>
Signed-off-by: Sanket Teli <[email protected]>
Signed-off-by: Sanket Teli <[email protected]>
Signed-off-by: Sanket <[email protected]>
Signed-off-by: Sanket <[email protected]>
{ | ||
"groupName": "group1", | ||
"type": "raft", | ||
"instances": 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add at least 3 raft nodes, and also verify them in logs (we need to be sure all raft nodes are able to support the channel)
@@ -213,20 +213,15 @@ export default class SetupDockerGenerator extends Generator { | |||
} | |||
|
|||
_copyUtilityScripts(capabilities: Capabilities): void { | |||
this.fs.copyTpl(this.templatePath("fabric-docker.sh"), this.destinationPath("fabric-docker.sh")); | |||
this.fs.copyTpl(this.templatePath(`fabric-docker.sh`), this.destinationPath("fabric-docker.sh")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.fs.copyTpl(this.templatePath(`fabric-docker.sh`), this.destinationPath("fabric-docker.sh")); | |
this.fs.copyTpl(this.templatePath("fabric-docker.sh"), this.destinationPath("fabric-docker.sh")); |
FABRIC_JAVAENV_VERSION=<%= global.fabricJavaenvVersion %> | ||
FABRIC_NODEENV_VERSION=<%= global.fabricNodeenvVersion %> | ||
RECOMMENDED_NODE_VERSION=<%= global.fabricRecommendedNodeVersion %> | ||
|
||
|
||
FABRIC_JAVAENV_VERSION=3.0-beta | ||
FABRIC_NODEENV_VERSION=2.5 | ||
RECOMMENDED_NODE_VERSION=18 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be taken from global.
<% } else if (global.capabilities.isV3) { -%> | ||
<% channels.forEach((channel) => { -%> | ||
<% channel.orgs.forEach((org, orgNo) => { -%> | ||
<% org.peers.forEach((peer, peerNo) => { -%> | ||
<% if (orgNo == 0 && peerNo == 0) { -%> | ||
printHeadline "Creating '<%= channel.name %>' on <%= org.name %>/<%= peer.name %>" "U1F63B" | ||
<% if (!global.tls) { -%> | ||
docker exec -i <%= org.cli.address %> bash -c <% -%> | ||
"source scripts/channel_fns.sh; createChannelAndJoin '<%= channel.name %>' '<%= org.mspName %>' '<%= peer.fullAddress %>' 'crypto/users/Admin@<%= org.domain %>/msp' '<%= channel.ordererHead.address %>:<%= channel.ordererHead.adminPort %>';" | ||
sleep 5 | ||
docker exec -i <%= org.cli.address %> bash -c <% -%> | ||
"source scripts/channel_fns.sh; fetchChannelAndJoin '<%= channel.name %>' '<%= org.mspName %>' '<%= peer.fullAddress %>' 'crypto/users/Admin@<%= org.domain %>/msp' '<%= channel.ordererHead.fullAddress %>';" | ||
<% } else { -%> | ||
docker exec -i <%= org.cli.address %> bash -c <% -%> | ||
"source scripts/channel_fns.sh; createChannelAndJoinTls '<%= channel.name %>' '<%= org.mspName %>' '<%= peer.fullAddress %>' 'crypto/users/Admin@<%= org.domain %>/msp' 'crypto/users/Admin@<%= org.domain %>/tls' 'crypto-orderer/tlsca.<%= channel.ordererHead.domain %>-cert.pem' '<%= channel.ordererHead.address %>:<%= channel.ordererHead.adminPort %>';" | ||
sleep 5 | ||
docker exec -i <%= org.cli.address %> bash -c <% -%> | ||
"source scripts/channel_fns.sh; fetchChannelAndJoinTls '<%= channel.name %>' '<%= org.mspName %>' '<%= peer.fullAddress %>' 'crypto/users/Admin@<%= org.domain %>/msp' 'crypto/users/Admin@<%= org.domain %>/tls' 'crypto-orderer/tlsca.<%= channel.ordererHead.domain %>-cert.pem' '<%= channel.ordererHead.fullAddress %>';" | ||
<% } %> | ||
<% } else { -%> | ||
printItalics "Joining '<%= channel.name %>' on <%= org.name %>/<%= peer.name %>" "U1F638" | ||
<% if (!global.tls) { -%> | ||
docker exec -i <%= org.cli.address %> bash -c <% -%> | ||
"source scripts/channel_fns.sh; fetchChannelAndJoin '<%= channel.name %>' '<%= org.mspName %>' '<%= peer.fullAddress %>' 'crypto/users/Admin@<%= org.domain %>/msp' '<%= channel.ordererHead.fullAddress %>';" | ||
<% } else { -%> | ||
docker exec -i <%= org.cli.address %> bash -c <% -%> | ||
"source scripts/channel_fns.sh; fetchChannelAndJoinTls '<%= channel.name %>' '<%= org.mspName %>' '<%= peer.fullAddress %>' 'crypto/users/Admin@<%= org.domain %>/msp' 'crypto/users/Admin@<%= org.domain %>/tls' 'crypto-orderer/tlsca.<%= channel.ordererHead.domain %>-cert.pem' '<%= channel.ordererHead.fullAddress %>';" | ||
<% } -%> | ||
<% } -%> | ||
<% }) -%> | ||
<% }) -%> | ||
<% }) -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it misses our changes with multiple orderers
<% if (global.capabilities.isV2) { -%> | ||
<% if (global.peerDevMode) { -%> | ||
<%- include('commands-generated/chaincode-dev-v2.sh', { chaincode }); -%> | ||
<% } else { -%> | ||
local version="<%= chaincode.version %>" | ||
<%- include('commands-generated/chaincode-install-v2.sh', { chaincode, global }); -%> | ||
<% } -%> | ||
<% } -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can decrease identation
printHeadline "Creating new channel config blocks" "U1F537" | ||
<% channels.forEach((channel) => { -%> | ||
<% channel.orgs.forEach((org) => { -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please keep consistent indentation (increase)
<% } else { %> | ||
echo "" | ||
<% } %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove any duplicated lines
I have successfully added the support for version 3, Right now the templates are updated and I am working over updating the test for version 3. Will update the tests in the next commit and it will be ready for merging.