-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
72 changed files
with
93 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,15 +91,80 @@ mv ./bin/* /root/go/bin/ | |
``` | ||
|
||
## ca-server配置 | ||
这一节的操作都在ca服务器上完成 | ||
|
||
caserver的管理员账户密码在fangtu/config/docker-compose-caserver.yaml中指定了,请在第一次启动caserver的容器之前进行修改。否则只能通过ca-client进行修改。默认的caserver的管理员账户为==admin== ,密码为 ==caserver==。 | ||
### 启动ca服务 | ||
|
||
启动ca-server容器,在/root/workspaces/下执行操作 | ||
将我们需要的配置文件拷出来 | ||
|
||
``` | ||
docker-compose -f ./fangtu/config/docker-compose-caserver.yaml up -d | ||
root@fabric-60-21:~/workspaces# cp -r ./fangtu/ca-server ./ | ||
``` | ||
|
||
caserver的管理员账户密码在./ca-server/docker-compose-caserver.yaml中指定了,请在第一次启动caserver的容器之前进行修改。否则只能通过ca-client进行修改。默认的caserver的管理员账户为==admin== ,密码为 ==caserver==。 | ||
|
||
启动ca-server容器,在```/root/workspaces/ca-server/```下执行操作 | ||
|
||
``` | ||
root@fabric-60-21:~/workspaces/ca-server# docker-compose -f docker-compose-caserver.yaml up -d | ||
``` | ||
|
||
如果报错,请删除之前启动的名为fabric-ca-server的容器 | ||
|
||
启动成功之后 ```/root/workspaces/ca-server/fabric-ca-server/```下就是caserver的配置文件以及数据库以及msp。 | ||
|
||
利用我们ca服务默认管理员账户admin和密码caserver生成admin账户的凭证 | ||
|
||
``` | ||
root@fabric-60-21:~/workspaces/ca-server# fabric-ca-client enroll -u http://admin:[email protected]:7054 -H ./fabric-ca-server/admin | ||
``` | ||
### 删除默认的组织结构 | ||
下面的命令中的-H参数代表我们连接ca服务所使用的用户 | ||
|
||
可以看到初始时联盟组织结构如下: | ||
|
||
``` | ||
root@fabric-60-21:~/workspaces/ca-server# fabric-ca-client -H ./fabric-ca-server/admin affiliation list | ||
affiliation: . | ||
affiliation: org2 | ||
affiliation: org2.department1 | ||
affiliation: org1 | ||
affiliation: org1.department1 | ||
affiliation: org1.department2 | ||
``` | ||
|
||
我们现在要删除这些组织结构,然后创建我们自己的组织 | ||
|
||
``` | ||
root@fabric-60-21:~/workspaces/ca-server# fabric-ca-client -H ./fabric-ca-server/admin affiliation remove --force org1 | ||
``` | ||
``` | ||
root@fabric-60-21:~/workspaces/ca-server# fabric-ca-client -H ./fabric-ca-server/admin affiliation remove --force org2 | ||
``` | ||
### 创建自己的组织 | ||
创建自己的组织 | ||
|
||
``` | ||
root@fabric-60-21:~/workspaces/ca-server# fabric-ca-client -H ./fabric-ca-server/admin affiliation add com | ||
``` | ||
``` | ||
root@fabric-60-21:~/workspaces/ca-server# fabric-ca-client -H ./fabric-ca-server/admin affiliation add com.mederahealth | ||
``` | ||
``` | ||
root@fabric-60-21:~/workspaces/ca-server# fabric-ca-client -H ./fabric-ca-server/admin affiliation add com.mederahealth.yiyuan | ||
``` | ||
``` | ||
root@fabric-60-21:~/workspaces/ca-server# fabric-ca-client -H ./fabric-ca-server/admin affiliation add com.mederahealth.shaoyifu | ||
``` | ||
现在的组织结构如下 | ||
|
||
``` | ||
root@fabric-60-21:~/workspaces/ca-server# fabric-ca-client -H ./fabric-ca-server/admin affiliation list | ||
affiliation: com | ||
affiliation: com.mederahealth | ||
affiliation: com.mederahealth.shaoyifu | ||
affiliation: com.mederahealth.yiyuan | ||
``` | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
version: '2' | ||
|
||
volumes: | ||
orderer.mederahealth.com: | ||
|
||
networks: | ||
fangtu: | ||
|
||
|
||
services: | ||
|
||
orderer.example.com: | ||
extends: | ||
file: base/docker-compose-base.yaml | ||
service: orderer.mederahealth.com | ||
container_name: orderer.mederahealth.com | ||
networks: | ||
- fangtu | ||
extra_hosts: | ||
- "orderer.mederahealth.com:10.214.50.115" | ||
- "peer0.org1.mederahealth.com:10.214.50.115" | ||
- "peer1.org1.mederahealth.com:10.214.50.68" |
This file was deleted.
Oops, something went wrong.