[英]Adding member to existing hyperledger Fabric 1.2 network on amazonmanaged blockchain
I am exploring amazon managed blockchain.我正在探索亚马逊管理的区块链。 Network (Hyperledger Fabric 1.2) is created, first member is added, peer node is added and VPC Service endpoint is also created.创建网络(Hyperledger Fabric 1.2),添加第一个成员,添加对等节点并创建 VPC 服务端点。 A sample chainnode is invoked and I am also able to query the chain node.调用示例链节点,我还可以查询链节点。 Now I want to add another member in the existing network, but I am unable to do so.现在我想在现有网络中添加另一个成员,但我无法这样做。 Instead of using amazon managed blockchain dashboard, I am using AWS CLI and using below command.我没有使用亚马逊托管的区块链仪表板,而是使用 AWS CLI 并使用以下命令。
Using username "ec2-user".
Authenticating with public key "imported-openssh-key"
__| __|_ )
_| ( / Amazon Linux 2 AMI
___|\___|___|
https://aws.amazon.com/amazon-linux-2/
aws managedblockchain create-network --network-configuration Name='nmynetwork, Description=mynetwork, Framework=HYPERLEDGER_FABRIC,FrameworkVersion=1.2' --member-configuration 'Name=mynetworkmember2, Description=mynetworkmember2, FrameworkConfiguration={Fabric={AdminUsername=adminxxxx, AdminPassword=Adminxxxx}}'
But CLI is showing below error.但是 CLI 显示以下错误。
An error occurred (ResourceLimitExceededException) when calling the CreateNetwork operation (reached max retries: 4): You cannot create a new network. You at any given time.
Then I tried to add member in a new network.然后我尝试在新网络中添加成员。 But error is similar.但错误是相似的。
aws managedblockchain create-network --network-configuration Name='newnetwork, Description=mynetwork, Framework=HYPERLEDGER_FABRIC,FrameworkVersion=1.2' --member-configuration 'Name=mynetworkmember2, Description=mynetworkmember2, FrameworkConfiguration={Fabric={AdminUsername=adminxxx, AdminPassword=Adminxxx}}'
Result结果
An error occurred (ResourceLimitExceededException) when calling the CreateNetwork operation (reached max retries: 4): You cannot create a new network. You at any given time.
I have also checked AWS documentation, they have also mentioned same "create-network" command to create a network and add member in the network.我还检查了 AWS 文档,他们还提到了相同的“create-network”命令来创建网络并在网络中添加成员。
When you create the network, you also must create the first member in the network using the --member-configuration option.创建网络时,还必须使用 --member-configuration 选项创建网络中的第一个成员。 Because Managed Blockchain creates a certificate authority (CA) with each member that handles authenticating users, you must provide a user name and password for the administrator.由于托管区块链为每个处理用户身份验证的成员创建了一个证书颁发机构 (CA),因此您必须为管理员提供用户名和密码。 You specify these using the AdminUsername and AdminPassword properties.您可以使用 AdminUsername 和 AdminPassword 属性指定这些。 The password you use must be a minimum of 8 characters, and contain at least one number and one capital letter.您使用的密码必须至少为 8 个字符,并且至少包含一个数字和一个大写字母。 Remember the user name and password.记住用户名和密码。 You need them later any time you create users and resources that need to authenticate.以后每次创建需要进行身份验证的用户和资源时都需要它们。
Create the network using an AWS CLI command similar to the following:使用类似于以下内容的 AWS CLI 命令创建网络:
aws managedblockchain create-network
Can anyone assist me in this regard?任何人都可以在这方面帮助我吗? Thanks in advance.提前致谢。
You know that amazon managed block chain is in preview at this stage and only available in 1 region us-east-1.您知道亚马逊托管的区块链在此阶段处于预览阶段,并且仅在 us-east-1 的 1 个区域可用。 AWS is only allowing one network per AWS account. AWS 只允许每个 AWS 账户使用一个网络。 See limitations highlighted by AWS.请参阅 AWS 强调的限制。 known-issues-limits 已知问题限制
Availability is limited to us-east-1.
Hyperledger Fabric is the only supported blockchain framework.
The maximum number of networks per AWS account is 1.
The maximum number of networks that an AWS account can be a member of is 1.
The maximum number of members per network is 5.
The maximum number of peer nodes per member is 1.
Peer nodes are limited to the bc.t3.small instance type.
Instead of using create-network(as you can not create more than one network in one AWS account), you need to use create-member command in AWS CLI.您需要在 AWS CLI 中使用 create-member 命令,而不是使用 create-network(因为您不能在一个 AWS 账户中创建多个网络)。 Here is the SYNOPSIS of create-member command.这是 create-member 命令的概要。
NAME
create-member -
DESCRIPTION
Creates a member within the blockchain network.
See also: AWS API Documentation
See 'aws help' for descriptions of global parameters.
SYNOPSIS
create-member
[--client-request-token <value>]
--network-id <value>
--member-configuration <value>
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]
OPTIONS
--client-request-token (string)
An idempotency token. Set to an arbitrary unique value.
--network-id (string)
The unique identifier of the network in which the member is created.
--member-configuration (structure)
Member configuration parameters.
Shorthand Syntax:
Name=string,Description=string,FrameworkConfiguration={Fabric={AdminUsername=string,AdminPassword=string}}
JSON Syntax:
{
"Name": "string",
"Description": "string",
"FrameworkConfiguration": {
"Fabric": {
"AdminUsername": "string",
"AdminPassword": "string"
}
}
}
--cli-input-json (string) Performs service operation based on the JSON
string provided. The JSON string follows the format provided by --gen-
erate-cli-skeleton. If other arguments are provided on the command
line, the CLI values will override the JSON-provided values. It is not
possible to pass arbitrary binary values using a JSON-provided value as
the string will be taken literally.
--generate-cli-skeleton (string) Prints a JSON skeleton to standard
output without sending an API request. If provided with no value or the
value input, prints a sample input JSON that can be used as an argument
for --cli-input-json. If provided with the value output, it validates
the command inputs and returns a sample output JSON for that command.
See 'aws help' for descriptions of global parameters.
OUTPUT
MemberId -> (string)
The unique identifier of the member.
Alternatively, you can use aws managed blockchain dashboard to add member in existing network.或者,您可以使用 aws 托管区块链仪表板在现有网络中添加成员。 See attached screenshot.见附件截图。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.