forked from minhlh/Ansible-Fabric-Starter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
hosts_new_org.yml
134 lines (120 loc) · 4.4 KB
/
hosts_new_org.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
---
#
# hosts.yml configuration draft for adding new org (org5)
# to running network brought by ansible-fabric-starter.
#
# This is the hosts_raft.yml
# modifyed example, to show how to add new orgs..
#
all:
hosts:
localhost: # localhost connection parameters, used for storing configuration while transferring it between nodes
ansible_connection: local
vars:
global_domain: example.com
global_chaincode_lang: golang # Programming language of chaincode
global_chaincode_version: 1.0 # Your chaincode version
global_channels:
- name: common # Channel name
particapants: # Organizations, should be included in channel
- org0
- org1
- org2
- org3
- org4 ## Add new org to existing channel, just defining them here
chaincode: # Chaincode params
name: reference
version: "{{ global_chaincode_version }}"
policy: ""
init: '{"Args":["init","a","100","b","100"]}'
- name: bilateral-1 # Channel name
particapants: # Organizations, should be included in channel
- org2
- org3
chaincode: # Chaincode params
name: relationship
version: "{{ global_chaincode_version }}"
policy: ""
init: '{"Args":["init","a","100","b","100"]}'
#
# Completly new channels should be defined to the system in new_channels variable.
#
new_channels:
- name: shiny-new-channel # Channel name
particapants: # Organizations, should be included in channel
- org3
- org4
chaincode: # Chaincode params
name: reference
version: "{{ global_chaincode_version }}"
policy: ""
init: '{"Args":["init","a","100","b","100"]}'
############
############
orderer_count: 4 # Leave untouched, we do not support orderer scaling yet.
newcomers: yes # Define a newcomers flag, to pass safety check.
############
children:
nodes:
hosts:
org0.example.com: # Describes which containers will run on this node
node_roles:
- root_orderer # This node will be used to generate crypto-config for other orderers
- orderer # This node will host an orderer-service
- peer # This node will host peers and api containers for organization
- root_peer # This node will be used to create channels and instantiate chaincode
- explorer # This node will serve hyperledger fabric explorer
org: org0 # Organization name
orderer_id: 0
ansible_host: 18.212.147.220 # Real ip address or domain name of the machine
ansible_user: ubuntu # User with sudo access
#ansible_private_key_file: ~/path-to-private-key # Private key to identify ourselves
ansible_ssh_port: 22 # Specify ssh-port here, if case of it's not defaulted.
# Same structure for any other nodes
org1.example.com:
node_roles:
- orderer # This node will host an orderer-service
- peer # This node will host peers and api containers for organization
- explorer
org: org1
orderer_id: 1 # ID of orderer-service which is running on this host
ansible_host: 54.211.182.66
ansible_user: ubuntu
#ansible_private_key_file: ~/path-to-private-key
ansible_ssh_port: 22
org2.example.com:
node_roles:
- orderer
- peer
- explorer
org: org2
orderer_id: 2
ansible_host: 3.81.75.88
ansible_user: ubuntu
#ansible_private_key_file: ~/path-to-private-key
ansible_ssh_port: 22
org3.example.com: # This node will host only kafka-broker and peer.
node_roles:
- peer
- orderer
- explorer
org: org3
orderer_id: 3
ansible_host: 23.20.192.198
ansible_user: ubuntu
#ansible_private_key_file: ~/path-to-private-key
ansible_ssh_port: 22
#
# New organization defined as usual, but with a newcomer role:
#
###########
org4.example.com:
node_roles:
- peer
- newcomer # Add a 'newcomer' role to each new org.
org: org4
orderer_id: 0
ansible_host: 54.197.194.21
ansible_user: ubuntu
ansible_ssh_port: 22
###########