-
Notifications
You must be signed in to change notification settings - Fork 445
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CE-332]Add connection profile and composer playground
This patch set added the function to create composer connection profile based on the fabric network configuration. It also sets up composer playground to make sure that composer playground will be working with the real fabric network, not the browser based backend. It installs the car auction business network by default, it can also install additional business networks based on bna file. Also remove few files no longer needed Change-Id: Id88ba663eba58ee990c0e5cb9346f3fa302d1f86 Signed-off-by: Tong Li <litong01@us.ibm.com>
- Loading branch information
Tong Li
committed
Apr 2, 2018
1 parent
d8624d9
commit e59cde5
Showing
16 changed files
with
321 additions
and
241 deletions.
There are no files selected for viewing
160 changes: 0 additions & 160 deletions
160
src/agent/ansible/roles/deploy_compose/certgen/tasks/apply.yml
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
src/agent/ansible/roles/deploy_compose/certgen/tasks/destroy.yml
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
src/agent/ansible/roles/deploy_compose/certgen/templates/crypto-config.j2
This file was deleted.
Oops, something went wrong.
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
83 changes: 83 additions & 0 deletions
83
src/agent/ansible/roles/deploy_compose/certsetup/templates/connection.j2
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,83 @@ | ||
{ | ||
"name": "{{ item }}-network", | ||
"x-type": "hlfv1", | ||
"version": "1.0.0", | ||
"client": { | ||
"organization": "{{ item }}", | ||
"connection": { | ||
"timeout": { | ||
"peer": { "endorser": "300", "eventHub": "300", "eventReg": "300"}, | ||
"orderer": "300" | ||
} | ||
} | ||
}, | ||
"channels": { | ||
"firstchannel": { | ||
"orderers": [ | ||
{% for orderer in orderers %} | ||
"{{ orderer.name }}"{{ '' if loop.last else ',' }} | ||
{% endfor %} | ||
], | ||
"peers": { | ||
{% for peer in peers %} | ||
"{{ peer.name }}": { | ||
"endorsingPeer": true, "chaincodeQuery": true, "eventSource": true | ||
}{{ '' if loop.last else ',' }} | ||
{% endfor %} | ||
} | ||
} | ||
}, | ||
"organizations": { | ||
{% for org in allorgs %} | ||
"{{ org }}": { | ||
"mspid": "{{ org }}", | ||
"peers": [ | ||
{% for peer in peers|selectattr('org', 'equalto', org)|list %} | ||
"{{ peer.name }}"{{ '' if loop.last else ',' }} | ||
{% endfor %} | ||
], | ||
"certificateAuthorities": [ | ||
{% for ca in cas|selectattr('org', 'equalto', org)|list %} | ||
"{{ ca.name }}"{{ '' if loop.last else ',' }} | ||
{% endfor %} | ||
] | ||
}{{ '' if loop.last else ',' }} | ||
{% endfor %} | ||
}, | ||
"orderers": { | ||
{% for orderer in orderers %} | ||
"{{ orderer.name }}": { | ||
"url": "{{ fabric.tls|ternary('grpcs','grpc') }}://{{ orderer.name }}:7050", | ||
"grpcOptions": { | ||
"ssl-target-name-override": "{{ orderer.name }}" | ||
}, | ||
"tlsCACerts": { | ||
"pem": "{{ fabricworkdir+'/run/keyfiles/'+orderer.org+'/orderers/'+orderer.name+'.'+orderer.org+'/tls/ca.crt' }}" | ||
} | ||
}{{ '' if loop.last else ',' }} | ||
{% endfor %} | ||
}, | ||
"peers": { | ||
{% for peer in peers %} | ||
"{{ peer.name }}": { | ||
"url": "{{ fabric.tls|ternary('grpcs','grpc') }}://{{ peer.name }}:7051", | ||
"eventUrl": "{{ fabric.tls|ternary('grpcs','grpc') }}://{{ peer.name }}:7053", | ||
"grpcOptions": { | ||
"ssl-target-name-override": "{{ peer.name }}" | ||
}, | ||
"tlsCACerts": { | ||
"pem": "{{ fabricworkdir+'/run/keyfiles/'+peer.org+'/tlsca/tlsca.'+peer.org+'-cert.pem' }}" | ||
} | ||
}{{ '' if loop.last else ',' }} | ||
{% endfor %} | ||
}, | ||
"certificateAuthorities": { | ||
{% for ca in cas %} | ||
"{{ ca.name }}": { | ||
"url": "{{ fabric.tls|ternary('https','http') }}://{{ca.name}}:7054", | ||
"caName": "{{ ca.name }}", | ||
"httpOptions": {"verify": false} | ||
}{{ '' if loop.last else ',' }} | ||
{% endfor %} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/agent/ansible/roles/deploy_compose/certsetup/templates/policy.j2
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,14 @@ | ||
{ | ||
"identities": [ | ||
{% for org in peerorgs %} | ||
{"role": { "name": "member", "mspId": "{{ org }}" } }{{ '' if loop.last else ',' }} | ||
{% endfor %} | ||
], | ||
"policy": { | ||
"{{ peerorgs | length }}-of": [ | ||
{% for org in peerorgs %} | ||
{"signed-by": {{ loop.index0 }} }{{ '' if loop.last else ',' }} | ||
{% endfor %} | ||
] | ||
} | ||
} |
Oops, something went wrong.