Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit 1b8ccb9

Browse files
committed
Fix missing var in CF upgrade script and remove login
Removing the login makes it easier to use e.g. SSO-only foundations. Also includes the file rename suggested by @mamachenko.
1 parent 0d94c0c commit 1b8ccb9

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

deployment/INSTRUCTIONS.md deployment/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ So you're ready to set Postfacto up, choose names for your web and API apps. We'
3737
1. Run the PCF deployment script from the `pcf` directory:
3838

3939
```bash
40-
./deploy.sh <web-app-name> <api-app-name> <cf-api-endpoint> <pcf-url>
40+
./deploy.sh <web-app-name> <api-app-name> <pcf-url>
4141
```
4242
1. Log in to the admin dashboard (email: `[email protected]` and password: `password`) to check everything has worked at `api-app-name.{{pcf-url}}/admin`
4343
1. Create a retro for yourself by clicking on 'Retros' and the 'New Retro'
@@ -48,7 +48,7 @@ So you're ready to set Postfacto up, choose names for your web and API apps. We'
4848

4949
1. Presuming the steps in the Initial deployment section have been completed, run the upgrade script from the `pcf` directory:
5050
```bash
51-
./upgrade.sh <web-app-name> <api-app-name>
51+
./upgrade.sh <web-app-name> <api-app-name> <pcf-url>
5252
```
5353

5454

deployment/deploy-cf.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@ set -e
44

55
WEB_HOST=$1
66
API_HOST=$2
7-
API_ENDPOINT=${3:-https://api.run.pivotal.io}
8-
APP_DOMAIN=${4:-cfapps.io}
7+
APP_DOMAIN=${3:-cfapps.io}
98
SESSION_TIME=${SESSION_TIME:-'""'}
109

1110
# The directory in which this script is located
1211
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
1312
ASSETS_DIR="$SCRIPT_DIR"/assets
1413
CONFIG_DIR="$SCRIPT_DIR"/config
1514

16-
cf login -a "${API_ENDPOINT}"
15+
cf target \
16+
|| (echo 'You need to have the CF CLI installed and be logged in' \
17+
&& exit 1)
1718

1819
cf push -f "$CONFIG_DIR"/manifest-api.yml -p "$ASSETS_DIR"/api --var api-app-name=$API_HOST --var web-app-name=$WEB_HOST --var pcf-url=${APP_DOMAIN} --var session-time=$SESSION_TIME
1920
cf run-task $API_HOST '[email protected] ADMIN_PASSWORD=password rake admin:create_user'

deployment/upgrade-cf.sh

+5-4
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@ set -e
44

55
WEB_HOST=$1
66
API_HOST=$2
7-
API_ENDPOINT=${3:-https://api.run.pivotal.io}
8-
APP_DOMAIN=${4:-cfapps.io}
7+
APP_DOMAIN=${3:-cfapps.io}
98
SESSION_TIME=${SESSION_TIME:-'""'}
109

1110
# The directory in which this script is located
1211
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
1312
ASSETS_DIR="$SCRIPT_DIR"/assets
1413
CONFIG_DIR="$SCRIPT_DIR"/config
1514

16-
cf login -a $API_ENDPOINT
15+
cf target \
16+
|| (echo 'You need to have the CF CLI installed and be logged in' \
17+
&& exit 1)
1718

18-
cf push -f "$CONFIG_DIR"/manifest-api.yml -p "$ASSETS_DIR"/api --var api-app-name=$API_HOST --var web-app-name=$WEB_HOST --var pcf-url=$CF_URL --var session-time=$SESSION_TIME
19+
cf push -f "$CONFIG_DIR"/manifest-api.yml -p "$ASSETS_DIR"/api --var api-app-name=$API_HOST --var web-app-name=$WEB_HOST --var pcf-url=${APP_DOMAIN} --var session-time=$SESSION_TIME
1920

2021
sed \
2122
-e "s/{{api-app-name}}/${API_HOST}/" \

humans.txt

+3
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,6 @@ Contact: [email protected]
4949

5050
Engineer: Mike Kenyon
5151
52+
53+
Engineer: Max Brauer
54+
Contact: github.com/mamachanko

package.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ cp -r web/build package/heroku/assets/web/public_html
5454

5555
# Docs
5656

57-
cp deployment/INSTRUCTIONS.md package
57+
cp deployment/README.md package
5858

5959
# Zip
6060

0 commit comments

Comments
 (0)