Skip to content

Commit

Permalink
Merge pull request hyperledger-caliper#126 from aklenik/fix-hardcoded…
Browse files Browse the repository at this point in the history
…-cert-paths

Fixed hardcoded domain names
  • Loading branch information
HaojunZhou authored Jul 13, 2018
2 parents d250698 + 5a9ebab commit a003718
Show file tree
Hide file tree
Showing 113 changed files with 1,697 additions and 9 deletions.
45 changes: 45 additions & 0 deletions benchmark/simple/config-custom-domain.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"blockchain": {
"type": "fabric",
"config": "benchmark/simple/fabric-custom-domain.json"
},
"command" : {
"start": "docker-compose -f network/fabric/customdomain/docker-compose.yaml up -d",
"end" : "docker-compose -f network/fabric/customdomain/docker-compose.yaml down;docker rm $(docker ps -aq);docker rmi $(docker images dev* -q)"
},
"test": {
"name": "simple",
"description" : "This is an example benchmark for caliper, to test the backend DLT's performance with simple account opening & querying transactions",
"clients": {
"type": "local",
"number": 5
},
"rounds": [{
"label" : "open",
"txNumber" : [1000, 1000, 1000],
"rateControl" : [{"type": "fixed-rate", "opts": {"tps" : 50}}, {"type": "fixed-rate", "opts": {"tps" : 100}}, {"type": "fixed-rate", "opts": {"tps" : 150}}],
"arguments": { "money": 10000 },
"callback" : "benchmark/simple/open.js"
},
{
"label" : "query",
"txNumber" : [5000, 5000],
"rateControl" : [{"type": "fixed-rate", "opts": {"tps" : 100}}, {"type": "fixed-rate", "opts": {"tps" : 200}}],
"callback" : "benchmark/simple/query.js"
}]
},
"monitor": {
"type": ["docker", "process"],
"docker":{
"name": ["all"]
},
"process": [
{
"command" : "node",
"arguments" : "local-client.js",
"multiOutput" : "avg"
}
],
"interval": 1
}
}
106 changes: 106 additions & 0 deletions benchmark/simple/fabric-custom-domain.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"fabric": {
"cryptodir": "network/fabric/customdomain/crypto-config",
"network": {
"orderer": {
"url": "grpcs://localhost:7050",
"mspid": "OrdererMSP",
"domain": "mydomain.com",
"user": {
"key": "network/fabric/customdomain/crypto-config/ordererOrganizations/mydomain.com/users/[email protected]/msp/keystore/1435ca4590754efaefc6963ee97fd9d0b256516e11c07490b7f307b88599c42e_sk",
"cert": "network/fabric/customdomain/crypto-config/ordererOrganizations/mydomain.com/users/[email protected]/msp/signcerts/[email protected]"
},
"server-hostname": "orderer.mydomain.com",
"tls_cacerts": "network/fabric/customdomain/crypto-config/ordererOrganizations/mydomain.com/orderers/orderer.mydomain.com/tls/ca.crt"
},
"org1": {
"name": "peerOrg1",
"mspid": "org1MSP",
"domain": "org1.mydomain.com",
"user": {
"key": "network/fabric/customdomain/crypto-config/peerOrganizations/org1.mydomain.com/users/[email protected]/msp/keystore/d1868001e58970697ab964b00087e2a7895d499cbb1a45ae5f4d3ac9936017e6_sk",
"cert": "network/fabric/customdomain/crypto-config/peerOrganizations/org1.mydomain.com/users/[email protected]/msp/signcerts/[email protected]"
},
"ca": {
"url": "https://localhost:7054",
"name": "ca-org1"
},
"peer1": {
"requests": "grpcs://localhost:7051",
"events": "grpcs://localhost:7053",
"server-hostname": "peer0.org1.mydomain.com",
"tls_cacerts": "network/fabric/customdomain/crypto-config/peerOrganizations/org1.mydomain.com/peers/peer0.org1.mydomain.com/tls/ca.crt"
},
"peer2": {
"requests": "grpcs://localhost:7057",
"events": "grpcs://localhost:7059",
"server-hostname": "peer1.org1.mydomain.com",
"tls_cacerts": "network/fabric/customdomain/crypto-config/peerOrganizations/org1.mydomain.com/peers/peer1.org1.mydomain.com/tls/ca.crt"
}
},
"org6": {
"name": "peerOrg6",
"mspid": "org6MSP",
"domain": "org6.mydomain.com",
"ca": {
"url": "https://localhost:8054",
"name": "ca-org6"
},
"peer1": {
"requests": "grpcs://localhost:8051",
"events": "grpcs://localhost:8053",
"server-hostname": "peer0.org6.mydomain.com",
"tls_cacerts": "network/fabric/customdomain/crypto-config/peerOrganizations/org6.mydomain.com/peers/peer0.org6.mydomain.com/tls/ca.crt"
},
"peer2": {
"requests": "grpcs://localhost:8057",
"events": "grpcs://localhost:8059",
"server-hostname": "peer1.org6.mydomain.com",
"tls_cacerts": "network/fabric/customdomain/crypto-config/peerOrganizations/org6.mydomain.com/peers/peer1.org6.mydomain.com/tls/ca.crt"
}
}
},
"channel": [
{
"name": "mychannel",
"config": "network/fabric/customdomain/mychannel.tx",
"organizations": ["org1", "org6"],
"deployed": false
}
],
"chaincodes": [{"id": "simple", "path": "src/contract/fabric/simple/node", "language":"node", "version": "v0", "channel": "mychannel"}],
"endorsement-policy": {
"identities": [
{
"role": {
"name": "member",
"mspId": "org1MSP"
}
},
{
"role": {
"name": "member",
"mspId": "org6MSP"
}
},
{
"role": {
"name": "admin",
"mspId": "org1MSP"
}
}
],
"policy": { "2-of": [{"signed-by": 0}, {"signed-by": 1}]}
},
"context": {
"open": "mychannel",
"query": "mychannel"
}
},
"info" : {
"Version": "1.1.0",
"Size": "4 Peers",
"Orderer": "Solo",
"Distribution": "Single Host, Custom Orgs"
}
}
3 changes: 3 additions & 0 deletions benchmark/simple/fabric-node.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"orderer": {
"url": "grpcs://localhost:7050",
"mspid": "OrdererMSP",
"domain": "example.com",
"user": {
"key": "network/fabric/simplenetwork/crypto-config/ordererOrganizations/example.com/users/[email protected]/msp/keystore/be595291403ff68280a724d7e868521815ad9e2fc8c5486f6d7ce6b62d6357cd_sk",
"cert": "network/fabric/simplenetwork/crypto-config/ordererOrganizations/example.com/users/[email protected]/msp/signcerts/[email protected]"
Expand All @@ -15,6 +16,7 @@
"org1": {
"name": "peerOrg1",
"mspid": "Org1MSP",
"domain": "example.com",
"user": {
"key": "network/fabric/simplenetwork/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/keystore/0d2b2fc385b10fa59003217e1bb5af2d24a3d762266e287867a1bc290eb44657_sk",
"cert": "network/fabric/simplenetwork/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/signcerts/[email protected]"
Expand All @@ -39,6 +41,7 @@
"org2": {
"name": "peerOrg2",
"mspid": "Org2MSP",
"domain": "example.com",
"ca": {
"url": "https://localhost:8054",
"name": "ca-org2"
Expand Down
3 changes: 3 additions & 0 deletions benchmark/simple/fabric-remote.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
"orderer": {
"url": "grpcs://10.229.42.159:7050",
"mspid": "OrdererMSP",
"domain": "example.com",
"msp": "network/fabric/simplenetwork/crypto-config/ordererOrganizations/example.com/msp/",
"server-hostname": "orderer.example.com",
"tls_cacerts": "network/fabric/simplenetwork/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt"
},
"org1": {
"name": "peerOrg1",
"mspid": "Org1MSP",
"domain": "example.com",
"msp": "network/fabric/simplenetwork/crypto-config/peerOrganizations/org1.example.com/msp/",
"ca": {
"url": "https://10.229.42.159:7054",
Expand All @@ -33,6 +35,7 @@
"org2": {
"name": "peerOrg2",
"mspid": "Org2MSP",
"domain": "example.com",
"msp": "network/fabric/simplenetwork/crypto-config/peerOrganizations/org2.example.com/msp/",
"ca": {
"url": "https://10.229.42.159:8054",
Expand Down
3 changes: 3 additions & 0 deletions benchmark/simple/fabric.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"orderer": {
"url": "grpcs://localhost:7050",
"mspid": "OrdererMSP",
"domain": "example.com",
"user": {
"key": "network/fabric/simplenetwork/crypto-config/ordererOrganizations/example.com/users/[email protected]/msp/keystore/be595291403ff68280a724d7e868521815ad9e2fc8c5486f6d7ce6b62d6357cd_sk",
"cert": "network/fabric/simplenetwork/crypto-config/ordererOrganizations/example.com/users/[email protected]/msp/signcerts/[email protected]"
Expand All @@ -15,6 +16,7 @@
"org1": {
"name": "peerOrg1",
"mspid": "Org1MSP",
"domain": "example.com",
"user": {
"key": "network/fabric/simplenetwork/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/keystore/0d2b2fc385b10fa59003217e1bb5af2d24a3d762266e287867a1bc290eb44657_sk",
"cert": "network/fabric/simplenetwork/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/signcerts/[email protected]"
Expand All @@ -39,6 +41,7 @@
"org2": {
"name": "peerOrg2",
"mspid": "Org2MSP",
"domain": "example.com",
"ca": {
"url": "https://localhost:8054",
"name": "ca-org2"
Expand Down
79 changes: 79 additions & 0 deletions network/fabric/customdomain/configtx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

---

Organizations:
- &OrdererOrg
Name: OrdererMSP
ID: OrdererMSP
MSPDir: crypto-config/ordererOrganizations/mydomain.com/msp
AdminPrincipal: Role.MEMBER

- &Org0
Name: org1MSP
ID: org1MSP
MSPDir: crypto-config/peerOrganizations/org1.mydomain.com/msp
AdminPrincipal: Role.ADMIN
AnchorPeers:
- Host: peer0.org1.mydomain.com
Port: 7051
- Host: peer1.org1.mydomain.com
Port: 7051

- &Org6
Name: org6MSP
ID: org6MSP
MSPDir: crypto-config/peerOrganizations/org6.mydomain.com/msp
AdminPrincipal: Role.ADMIN
AnchorPeers:
- Host: peer0.org6.mydomain.com
Port: 7051
- Host: peer1.org6.mydomain.com
Port: 7051

Orderer: &OrdererDefaults
OrdererType: solo
Addresses:
- orderer.mydomain.com:7050
BatchTimeout: 1s
BatchSize:
MaxMessageCount: 500
AbsoluteMaxBytes: 999 MB
PreferredMaxBytes: 5 MB
MaxChannels: 0
Organizations:

Application: &ApplicationDefaults
Organizations:

Profiles:

TwoOrgsOrdererGenesis:
Orderer:
<<: *OrdererDefaults
Organizations:
- *OrdererOrg
Consortiums:
SampleConsortium:
Organizations:
- *Org0
- *Org6
TwoOrgsChannel:
Consortium: SampleConsortium
Application:
<<: *ApplicationDefaults
Organizations:
- *Org0
- *Org6
32 changes: 32 additions & 0 deletions network/fabric/customdomain/crypto-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

OrdererOrgs:
- Name: Orderer
Domain: mydomain.com
Specs:
- Hostname: orderer

PeerOrgs:
- Name: org1
Domain: org1.mydomain.com
Template:
Count: 2
Users:
Count: 1

- Name: org6
Domain: org6.mydomain.com
Template:
Count: 2
Users:
Count: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-----BEGIN PRIVATE KEY-----
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgOhEhPxLIs/nLImjV
MCIBB+rEcZ6ZckwAUUgIBWTFczKhRANCAATs62BSp7kfkU2moCK0lPoP7KfXON2+
Mw7zZuYPiDWuGTS1bhklIMtBRIaqE09+xxSw1mW6aiUgrqZwDNyWp577
-----END PRIVATE KEY-----
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-----BEGIN CERTIFICATE-----
MIICMzCCAdqgAwIBAgIRAJoeOGi0vTqssujts1051LMwCgYIKoZIzj0EAwIwazEL
MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG
cmFuY2lzY28xFTATBgNVBAoTDG15ZG9tYWluLmNvbTEYMBYGA1UEAxMPY2EubXlk
b21haW4uY29tMB4XDTE4MDcxMjE0NTUwNVoXDTI4MDcwOTE0NTUwNVowazELMAkG
A1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu
Y2lzY28xFTATBgNVBAoTDG15ZG9tYWluLmNvbTEYMBYGA1UEAxMPY2EubXlkb21h
aW4uY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE7OtgUqe5H5FNpqAitJT6
D+yn1zjdvjMO82bmD4g1rhk0tW4ZJSDLQUSGqhNPfscUsNZlumolIK6mcAzclqee
+6NfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1UdJQQIMAYGBFUdJQAwDwYDVR0TAQH/
BAUwAwEB/zApBgNVHQ4EIgQgPGGkm2cx584G3Jjml+df3tnK/qbwR10Wu8t8c8ge
bzkwCgYIKoZIzj0EAwIDRwAwRAIgMqn0E51F0FKNyXJyg3ACh7EfxpMRFPNg3iW6
3EAqy3QCIEc2wNx8rnZSqSJgjddvC2xmu6VAIeVfwMjlOR6/5nav
-----END CERTIFICATE-----
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-----BEGIN CERTIFICATE-----
MIICDDCCAbOgAwIBAgIQEcuy+I5n0T1H16LetOOE4zAKBggqhkjOPQQDAjBrMQsw
CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy
YW5jaXNjbzEVMBMGA1UEChMMbXlkb21haW4uY29tMRgwFgYDVQQDEw9jYS5teWRv
bWFpbi5jb20wHhcNMTgwNzEyMTQ1NTA1WhcNMjgwNzA5MTQ1NTA1WjBXMQswCQYD
VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5j
aXNjbzEbMBkGA1UEAwwSQWRtaW5AbXlkb21haW4uY29tMFkwEwYHKoZIzj0CAQYI
KoZIzj0DAQcDQgAEyUWQlGnBaBAPSYxGce+K+j74fbY0wt2Ql2m/DiIIQQxskyFZ
Hv43GSMMEIqbX/B7uF4UErM1+BdT2qm44Z7gHqNNMEswDgYDVR0PAQH/BAQDAgeA
MAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgPGGkm2cx584G3Jjml+df3tnK/qbw
R10Wu8t8c8gebzkwCgYIKoZIzj0EAwIDRwAwRAIgLa10Wn5gQVTbjCL2Uog291hY
/zGETpO5gEP109LIHJECIA8uMyKQckKMQihTpFr6uAIzzA2lryiO2eq+NC9nUwCz
-----END CERTIFICATE-----
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-----BEGIN CERTIFICATE-----
MIICMzCCAdqgAwIBAgIRAJoeOGi0vTqssujts1051LMwCgYIKoZIzj0EAwIwazEL
MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG
cmFuY2lzY28xFTATBgNVBAoTDG15ZG9tYWluLmNvbTEYMBYGA1UEAxMPY2EubXlk
b21haW4uY29tMB4XDTE4MDcxMjE0NTUwNVoXDTI4MDcwOTE0NTUwNVowazELMAkG
A1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu
Y2lzY28xFTATBgNVBAoTDG15ZG9tYWluLmNvbTEYMBYGA1UEAxMPY2EubXlkb21h
aW4uY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE7OtgUqe5H5FNpqAitJT6
D+yn1zjdvjMO82bmD4g1rhk0tW4ZJSDLQUSGqhNPfscUsNZlumolIK6mcAzclqee
+6NfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1UdJQQIMAYGBFUdJQAwDwYDVR0TAQH/
BAUwAwEB/zApBgNVHQ4EIgQgPGGkm2cx584G3Jjml+df3tnK/qbwR10Wu8t8c8ge
bzkwCgYIKoZIzj0EAwIDRwAwRAIgMqn0E51F0FKNyXJyg3ACh7EfxpMRFPNg3iW6
3EAqy3QCIEc2wNx8rnZSqSJgjddvC2xmu6VAIeVfwMjlOR6/5nav
-----END CERTIFICATE-----
Loading

0 comments on commit a003718

Please sign in to comment.