-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·58 lines (50 loc) · 1006 Bytes
/
run.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
#!/bin/bash
set -e
tunnel () {
set -x
./ngrok-env/run.sh start
direnv allow
}
keys () {
set -x
mkdir -p keys/web keys/worker
ssh-keygen -t rsa -f ./keys/web/tsa_host_key -N ''
ssh-keygen -t rsa -f ./keys/web/session_signing_key -N ''
ssh-keygen -t rsa -f ./keys/worker/worker_key -N ''
cp ./keys/worker/worker_key.pub ./keys/web/authorized_worker_keys
cp ./keys/web/tsa_host_key.pub ./keys/worker
}
start () {
set -x
docker-compose up -d
docker-compose ps
}
stop () {
set -x
docker-compose stop
}
all () {
set -x
tunnel
keys
start
}
usage () {
cat <<EOF
Usage:
tunnel|t start tunnel
keys|k generate keys
start|sta start concourse
stop|sto stop concourse
all|a start tunnel, generate keys, and start concourse
* see usage
EOF
}
case $1 in
tunnel|t) tunnel ;;
keys|k) keys ;;
start|sta) start ;;
stop|sto) stop ;;
all|a) all ;;
*) usage ;;
esac