forked from hyperledger-labs/blockchain-analyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
66 lines (58 loc) · 2.91 KB
/
Makefile
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
WHICHOS := $(shell uname)
GOPATH?=$(shell dirname $(shell dirname $(shell dirname ${PWD})))
install:
go get github.com/hyperledger/fabric-sdk-go
cd apps/dummyapp && make install
cd apps/appleapp && make install
basic:
go get github.com/hyperledger/fabric-sdk-go
cd stack && make start
cd network/basic && make start
cd apps/dummyapp && sed -i -e "s/\"channelName\": \"fourchannel\"/\"channelName\": \"mychannel\"/g" config.json && sed -i -e "s/\"connection_profile\": \"..\/..\/network\/multichannel\/connectionProfile.json\"/\"connection_profile\": \"..\/..\/network\/basic\/connectionProfile.json\"/g" config.json
make remove-intermediate
cd apps/dummyapp && make install && make users && make invoke
cd agent/fabricbeat/_meta && rm -rf beat.yml && cp templates/basic-config.yml beat.yml
export PATH=${PATH}:${GOPATH}/bin && cd agent/fabricbeat && make update && make
#Waiting for Kibana
sleep 15
cd agent/fabricbeat && ORG_NUMBER=1 PEER_NUMBER=0 ./fabricbeat -e -d "*"
apple:
go get github.com/hyperledger/fabric-sdk-go
cd stack && make start
cd network/applechain && make start
cd apps/appleapp && make install && make users && make invoke
cd agent/fabricbeat/_meta && rm -rf beat.yml && cp templates/apple-config.yml beat.yml
export PATH=${PATH}:${GOPATH}/bin && cd agent/fabricbeat && make update && make
#Waiting for Kibana
sleep 15
cd agent/fabricbeat && ORG_NUMBER=1 PEER_NUMBER=0 ./fabricbeat -e -d "*"
multichannel:
go get github.com/hyperledger/fabric-sdk-go
cd stack && make start
cd network/multichannel && make start
cd apps/dummyapp && sed -i -e "s/\"channelName\": \"mychannel\"/\"channelName\": \"fourchannel\"/g" config.json && sed -i -e "s/\"connection_profile\": \"..\/..\/network\/basic\/connectionProfile.json\"/\"connection_profile\": \"..\/..\/network\/multichannel\/connectionProfile.json\"/g" config.json
make remove-intermediate
cd apps/dummyapp && make install && make users && make invoke
cd agent/fabricbeat/_meta && rm -rf beat.yml && cp templates/multichannel-config.yml beat.yml
export PATH=${PATH}:${GOPATH}/bin && cd agent/fabricbeat && make update && make
#Waiting for Kibana
sleep 15
cd agent/fabricbeat && ORG_NUMBER=1 PEER_NUMBER=0 ./fabricbeat -e -d "*" &
cd agent/fabricbeat && ORG_NUMBER=1 PEER_NUMBER=1 ./fabricbeat -e -d "*" &
cd agent/fabricbeat && ORG_NUMBER=2 PEER_NUMBER=0 ./fabricbeat -e -d "*"
destroy-basic:
cd stack && make erase
cd network/basic && make destroy
cd agent/fabricbeat/_meta && rm -rf beat.yml && cp templates/default-config.yml beat.yml
destroy-apple:
cd stack && make erase
cd network/applechain && make destroy
cd agent/fabricbeat/_meta && rm -rf beat.yml && cp templates/default-config.yml beat.yml
destroy-multichannel:
cd stack && make erase
cd network/multichannel && make destroy
cd agent/fabricbeat/_meta && rm -rf beat.yml && cp templates/default-config.yml beat.yml
remove-intermediate:
ifeq ($(WHICHOS),Darwin)
cd apps/dummyapp && rm *-e
endif