Skip to content

Commit

Permalink
rename alpha folder to sfhackfest
Browse files Browse the repository at this point in the history
Reference patch: https://gerrit.hyperledger.org/r/#/c/4981/

Change-Id: I1f221dec215ba2549c6cdd3bfaf1b32542dd8332
Signed-off-by: rameshbabu79 <rameshbabu.thoomu@gmail.com>
  • Loading branch information
rameshthoomu committed Jan 30, 2017
1 parent 271538d commit a1bad66
Show file tree
Hide file tree
Showing 46 changed files with 670 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/sfhackfest/ccenv/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM rameshthoomu/fabric-ccenv-x86_64:x86_64-0.7.0-snapshot-3ee280e

32 changes: 32 additions & 0 deletions examples/sfhackfest/channel_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/sh

#create
echo "Creating channel on Orderer"
CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp/sampleconfig CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer:7050 peer channel create -c myc1 >>log.txt 2>&1
grep -q "Serializing identity" log.txt
if [ $? -ne 0 ]; then
echo "ERROR on CHANNEL CREATION" >> results.txt
exit 1
fi
echo "SUCCESSFUL CHANNEL CREATION" >> results.txt
sleep 5
TOTAL_PEERS=3
i=0
while test $i -lt $TOTAL_PEERS
do
echo "###################################### Joining peer$i"
CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer:7050 CORE_PEER_ADDRESS=peer$i:7051 peer channel join -b myc1.block >>log.txt 2>&1
echo '-------------------------------------------------'
grep -q "Join Result: " log.txt
if [ $? -ne 0 ]; then
echo "ERROR on JOIN CHANNEL" >> results.txt
exit 1
fi
echo "SUCCESSFUL JOIN CHANNEL on PEER$i" >> results.txt
echo "SUCCESSFUL JOIN CHANNEL on PEER$i"
i=$((i+1))
sleep 10
done
echo "Peer0 , Peer1 and Peer2 are added to the channel myc1"
cat log.txt
exit 0
169 changes: 169 additions & 0 deletions examples/sfhackfest/docker-compose-gettingstarted.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
version: '2'
networks:
bridge:

services:

ccenv_latest:
container_name: ccenv_latest
build: ./ccenv
image: hyperledger/fabric-ccenv:latest
volumes:
- ./ccenv:/opt/gopath/src/github.com/hyperledger/fabric/orderer/ccenv

ccenv_snapshot:
container_name: ccenv_snapshot
build: ./ccenv
image: hyperledger/fabric-ccenv:x86_64-0.7.0-snapshot-3ee280e
volumes:
- ./ccenv:/opt/gopath/src/github.com/hyperledger/fabric/orderer/ccenv

ca:
image: rameshthoomu/fabric-ca-x86_64:x86_64-0.7.0-snapshot-f5291e7
ports:
- "7054:7054"
environment:
- CA_CERTIFICATE=peerOrg0_cert.pem
- CA_KEY_CERTIFICATE=peerOrg0_pk.pem
volumes:
- ./tmp/ca:/.fabric-ca
command: sh -c 'sleep 10; fabric-ca server start -ca /.fabric-ca/$$CA_CERTIFICATE -ca-key /.fabric-ca/$$CA_KEY_CERTIFICATE -config /etc/hyperledger/fabric-ca/server-config.json -address "0.0.0.0"'
container_name: ca


orderer:
container_name: orderer
image: rameshthoomu/fabric-orderer-x86_64:x86_64-0.7.0-snapshot-3ee280e
environment:
- ORDERER_GENERAL_LEDGERTYPE=ram
- ORDERER_GENERAL_BATCHTIMEOUT=10s
- ORDERER_GENERAL_BATCHSIZE_MAXMESSAGECOUNT=10
- ORDERER_GENERAL_MAXWINDOWSIZE=1000
- ORDERER_GENERAL_ORDERERTYPE=solo
- ORDERER_GENERAL_LOGLEVEL=debug
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_LISTENPORT=7050
- ORDERER_RAMLEDGER_HISTORY_SIZE=100
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer
volumes:
- ./tmp/orderer:/etc/hyperledger/fabric/orderer
command: orderer
ports:
- 7050:7050
networks:
- bridge

peer0:
container_name: peer0
image: rameshthoomu/fabric-peer-x86_64:x86_64-0.7.0-snapshot-3ee280e
environment:
- CORE_PEER_ADDRESSAUTODETECT=true
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_LOGGING_LEVEL=DEBUG
- CORE_PEER_NETWORKID=peer0
- CORE_NEXT=true
- CORE_PEER_ENDORSER_ENABLED=true
- CORE_PEER_ID=peer0
- CORE_PEER_PROFILE_ENABLED=true
- CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer:7050
- CORE_PEER_GOSSIP_ORGLEADER=true

working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
ports:
- 7051:7051
- 7053:7053
links:
- orderer:orderer
volumes:
- /var/run/:/host/var/run/
- ./tmp/peer0:/etc/hyperledger/fabric/msp/sampleconfig
networks:
- bridge

peer1:
container_name: peer1
image: rameshthoomu/fabric-peer-x86_64:x86_64-0.7.0-snapshot-3ee280e
environment:
- CORE_PEER_ADDRESSAUTODETECT=true
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_LOGGING_LEVEL=DEBUG
- CORE_PEER_NETWORKID=peer0
- CORE_NEXT=true
- CORE_PEER_ENDORSER_ENABLED=true
- CORE_PEER_ID=peer1
- CORE_PEER_PROFILE_ENABLED=true
- CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer:7050
- CORE_PEER_GOSSIP_ORGLEADER=true
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
ports:
- 8051:7051
command: peer node start --peer-defaultchain=false
links:
- orderer:orderer
- peer0:peer0
volumes:
- /var/run/:/host/var/run/
- ./tmp/peer1:/etc/hyperledger/fabric/msp/sampleconfig
networks:
- bridge

peer2:
container_name: peer2
image: rameshthoomu/fabric-peer-x86_64:x86_64-0.7.0-snapshot-3ee280e
environment:
- CORE_PEER_ADDRESSAUTODETECT=true
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_LOGGING_LEVEL=DEBUG
- CORE_PEER_NETWORKID=peer0
- CORE_NEXT=true
- CORE_PEER_ENDORSER_ENABLED=true
- CORE_PEER_ID=peer2
- CORE_PEER_PROFILE_ENABLED=true
- CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer:7050
- CORE_PEER_GOSSIP_ORGLEADER=true
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer

ports:
- 9051:7051
command: peer node start --peer-defaultchain=false
links:
- orderer:orderer
- peer0:peer0
- peer1:peer1
volumes:
- /var/run/:/host/var/run/
- ./tmp/peer2:/etc/hyperledger/fabric/msp/sampleconfig
networks:
- bridge

cli:
container_name: cli
image: rameshthoomu/fabric-peer-x86_64:x86_64-0.7.0-snapshot-3ee280e
tty: true
environment:
- GOPATH=/opt/gopath
- CORE_PEER_ADDRESSAUTODETECT=true
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_LOGGING_LEVEL=DEBUG
- CORE_NEXT=true
- CORE_PEER_ID=cli
- CORE_PEER_ENDORSER_ENABLED=true
- CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer:7050
- CORE_PEER_ADDRESS=peer0:7051
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
command: sh -c './channel_test.sh; sleep 10000'
# command: /bin/sh
links:
- orderer:orderer
- peer0:peer0
- peer1:peer1
- peer2:peer2
volumes:
- /var/run/:/host/var/run/
#in the "- <HOST>:/opt/gopath/src/github.com/hyperledger/fabric/examples/" mapping below, the HOST part
#should be modified to the path on the host. This will work as is in the Vagrant environment
- ./src/github.com/example_cc/example_cc.go:/opt/gopath/src/github.com/hyperledger/fabric/examples/example_cc.go
- ./tmp/peer3/:/etc/hyperledger/fabric/msp/sampleconfig
- ./channel_test.sh:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel_test.sh
networks:
- bridge
Binary file added examples/sfhackfest/sfhackfest.tar.gz
Binary file not shown.
8 changes: 8 additions & 0 deletions examples/sfhackfest/tmp/ca/ordererOrg0_cert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-----BEGIN CERTIFICATE-----
MIIBFDCBuwICA+gwCgYIKoZIzj0EAwIwFjEUMBIGA1UEAwwLb3JkZXJlck9yZzAw
HhcNMTcwMTI0MTk1NTQ0WhcNMTgwMTI0MTk1NTQ0WjAWMRQwEgYDVQQDDAtvcmRl
cmVyT3JnMDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABIfmaSgUCSF+J4tkg4fT
6NPAC2YxjK376ke9HiepVGdiiCuWO1V1aEhvVyd0ApcV0tS6S5e0mGCHuHCWUw8X
1zkwCgYIKoZIzj0EAwIDSAAwRQIhAP+kb4Li7RU3VlAvLwmbR6fXy+qTiH4nypoE
VGG3KPh9AiA8K2+A1/jtSSpaeoGoNhJiT19/BQ32mMwlzC19utDsxg==
-----END CERTIFICATE-----
5 changes: 5 additions & 0 deletions examples/sfhackfest/tmp/ca/ordererOrg0_pk.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIFXZ3gJdH/5CqgYEnzX7r3rv0YFo4zzi9PtUsYOsqvUmoAoGCCqGSM49
AwEHoUQDQgAEh+ZpKBQJIX4ni2SDh9Po08ALZjGMrfvqR70eJ6lUZ2KIK5Y7VXVo
SG9XJ3QClxXS1LpLl7SYYIe4cJZTDxfXOQ==
-----END EC PRIVATE KEY-----
8 changes: 8 additions & 0 deletions examples/sfhackfest/tmp/ca/peerOrg0_cert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-----BEGIN CERTIFICATE-----
MIIBDTCBtQICA+gwCgYIKoZIzj0EAwIwEzERMA8GA1UEAwwIcGVlck9yZzAwHhcN
MTcwMTI0MTk1NTQ1WhcNMTgwMTI0MTk1NTQ1WjATMREwDwYDVQQDDAhwZWVyT3Jn
MDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABOPl4xOwQok0p6QXyOOez3QQDvlf
f/zbdp+2MC/2B/gLxfxXCmY4xU2autGOBWDNcRVWUnwV+Kb1bFmICpgRbAIwCgYI
KoZIzj0EAwIDRwAwRAIgWI7c1ETv5d1Whmp47hA/Vu7OEBHL0RZ/YOpBJVCIPRYC
IF+1fvl9HiboCx1pHaT7YUXoRmFgVTkEaI2ususgcGF4
-----END CERTIFICATE-----
5 changes: 5 additions & 0 deletions examples/sfhackfest/tmp/ca/peerOrg0_pk.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEILaZVh57gUYYwvw9se2/aHAdISMhhkdVU5ZUVNcXED+4oAoGCCqGSM49
AwEHoUQDQgAE4+XjE7BCiTSnpBfI457PdBAO+V9//Nt2n7YwL/YH+AvF/FcKZjjF
TZq60Y4FYM1xFVZSfBX4pvVsWYgKmBFsAg==
-----END EC PRIVATE KEY-----
8 changes: 8 additions & 0 deletions examples/sfhackfest/tmp/ca/peerOrg1_cert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-----BEGIN CERTIFICATE-----
MIIBDjCBtQICA+gwCgYIKoZIzj0EAwIwEzERMA8GA1UEAwwIcGVlck9yZzEwHhcN
MTcwMTI0MTk1NTQ1WhcNMTgwMTI0MTk1NTQ1WjATMREwDwYDVQQDDAhwZWVyT3Jn
MTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABPi8WnwoK2C3n+vDktN1jPan9Ac8
TeL9qQynMFZ15fdD8eOlhi2pk1koX8dfWfJuG3FU1cCvBM8YCNbqaNFYU2YwCgYI
KoZIzj0EAwIDSAAwRQIgaSOImd20mKZeddceGMrgtBU12mE1oQl3zt6xyJcV5PQC
IQCXmOyvtyRqiVop3BOVXAbnFvWTHjNs9UFRk7Hpc2vWAA==
-----END CERTIFICATE-----
5 changes: 5 additions & 0 deletions examples/sfhackfest/tmp/ca/peerOrg1_pk.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIIG5DQbXui6s2ikCnobfbsXE6XHSu+r/3Nu78tZdTtMzoAoGCCqGSM49
AwEHoUQDQgAE+LxafCgrYLef68OS03WM9qf0BzxN4v2pDKcwVnXl90Px46WGLamT
WShfx19Z8m4bcVTVwK8EzxgI1upo0VhTZg==
-----END EC PRIVATE KEY-----
8 changes: 8 additions & 0 deletions examples/sfhackfest/tmp/ca/peerOrg2_cert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-----BEGIN CERTIFICATE-----
MIIBDjCBtQICA+gwCgYIKoZIzj0EAwIwEzERMA8GA1UEAwwIcGVlck9yZzIwHhcN
MTcwMTI0MTk1NTQ1WhcNMTgwMTI0MTk1NTQ1WjATMREwDwYDVQQDDAhwZWVyT3Jn
MjBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABIxt6qYrDdVgPARlI8xa1Mnlevxt
vfeAIfZSCIGsUk7puu7QYDWBHLBq/YBVqFHTmtdJeFNlPzGOapx5nRUCjCkwCgYI
KoZIzj0EAwIDSAAwRQIgc3tR6Nmq4FgVO53Hgy0BFp9QQ3vrzmidgs6K9jKBMQgC
IQCs2Ncj/RRL8ak/64qFx1GFLgLKvD6tV2OVXVfTnTg6DQ==
-----END CERTIFICATE-----
5 changes: 5 additions & 0 deletions examples/sfhackfest/tmp/ca/peerOrg2_pk.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIIkp0auAZDqj1jnbk9NiQFHFvzlp2LGzyf2KiRcrx0XNoAoGCCqGSM49
AwEHoUQDQgAEjG3qpisN1WA8BGUjzFrUyeV6/G2994Ah9lIIgaxSTum67tBgNYEc
sGr9gFWoUdOa10l4U2U/MY5qnHmdFQKMKQ==
-----END EC PRIVATE KEY-----
Binary file added examples/sfhackfest/tmp/orderer/genesis_file
Binary file not shown.
Loading

0 comments on commit a1bad66

Please sign in to comment.