-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcfpu.sh
executable file
·64 lines (36 loc) · 1.15 KB
/
cfpu.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
#!/usr/bin/env bash
set -euxo pipefail
cd /tmp
curl -LO https://github.com/mamachanko/cfpush/releases/download/v0.1/cfpush.zip
unzip cfpush.zip -d cfpush
cd cfpush
cf version
cf help
cf push --help # or
cf help push
cf create-space -o mbrauer-personal cfpush-tutorial
cf target -s cfpush-tutorial
cf push chat-app -p builds/chat-app.zip -b staticfile_buildpack --random-route
cf app chat-app
CHAT_APP_HOSTNAME=$(cf app chat-app | awk '/routes/ {gsub(/.cfapps.io/, ""); print $2}')
cf push message-service -p builds/message-service.jar --no-route -m 650M
cf routes
cf map-route message-service cfapps.io --hostname ${CHAT_APP_HOSTNAME} --path /api
# mvp 1
cf apps
cf routes
cf scale chat-app -m 64M -k 128M -f
cf scale message-service -i 3
cf marketplace
cf marketplace -s elephantsql
cf create-service elephantsql turtle database
cf service database
cf bind-service message-service database
cf env message-service
cf restage message-service
# mvp 2
cf logs --recent message-service | grep 'APP\/PROC\/WEB'
cf delete chat-app -f -r
cf delete message-service -f -r
cf push --var chat-app-hostname=${CHAT_APP_HOSTNAME}
cf delete-space cfpush-tutorial -f