-
Notifications
You must be signed in to change notification settings - Fork 59
/
tools.sh
executable file
·91 lines (71 loc) · 2.06 KB
/
tools.sh
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
#!/usr/bin/env bash
set -o errexit
set -o verbose
set -o xtrace
set -o nounset
function recreate_agent_image {
docker-compose create --build --force-recreate agent
docker-compose create --build --force-recreate agent2
}
case "$1" in
demo)
docker-compose up --build --force-recreate
;;
agent)
recreate_agent_image
docker-compose run --service-ports agent ./agent.sh run
;;
agent2)
recreate_agent_image
docker-compose run --service-ports agent2 ./agent.sh run
;;
agent-docs)
recreate_agent_image
docker-compose run agent ./agent.sh docs
;;
agent-test)
recreate_agent_image
docker-compose run agent ./agent.sh test
;;
agent-web)
docker-compose run --service-ports agent-web ./agent-web.sh run
;;
geth)
docker-compose run --service-ports geth geth --datadir=/geth-data --metrics --shh --rpc --rpcaddr 0.0.0.0 --ws --wsaddr 0.0.0.0 --nat none --verbosity 5 --vmdebug --dev --maxpeers 0 --gasprice 0 --debug --pprof
;;
solc)
docker-compose run --service-ports geth solc --help
;;
parity)
docker-compose run --service-ports parity
;;
truffle)
docker-compose run --service-ports truffle
;;
ipfs)
docker-compose run --service-ports ipfs daemon
;;
clean)
docker-compose down --rmi all --remove-orphans
;;
hard-clean)
docker-compose down --rmi all --remove-orphans
docker ps -q | xargs -r docker kill
docker ps -a -q | xargs -r docker rm
docker images -q | xargs -r docker rmi
docker volume ls -qf dangling=true | xargs -r docker volume rm
;;
create-web-cookie)
docker-compose run agent-web-cookie
;;
gen-ssl)
openssl genrsa -des3 -passout pass:x -out server.pass.key 2048
openssl rsa -passin pass:x -in server.pass.key -out server.key
rm server.pass.key
openssl req -new -key server.key -out server.csr -subj "/C=UK/ST=Warwickshire/L=Leamington/O=OrgName/OU=IT Department/CN=example.com"
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
;;
*) echo 'No operation specified'
exit 0;
;;
esac