PCF Training Repository
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
databases/tracker
gradle/wrapper
scripts
src
.gitignore
.travis.yml
build.gradle
gradlew
gradlew.bat
manifest.yml
pal-tracker-codebase.txt
readme.md
settings.gradle

readme.md

Pal Tracker (January 2019)

This is a sample application built to facilitate learning PCF / CloudFoundary.

Learning Materials

Useful CF Commands

Add --help for docs on any command.

Login:

cf login -a ${CF_API_ENDPOINT}

Get available CF Services, create a service, bind a service:

cf marketplace
cf create-service ${SERVICE} ${PLAN} ${SERVICE_INSTANCE}
cf bind-service ${APP_NAME} ${SERVICE_INSTANCE} # Service info added to VCAP_SERVICES env var

Delete apps and services.

cf delete ${APP_NAME}
cf delete-service ${SERVICE_NAME}

Push your app jar:

cf push -p ${JAR_PATH} # use --random-route to get a random route

Get app health status:

cf app ${APP_NAME}

Get recent logs:

cf logs --recent

Set an environment variable:

cf set-env ${APP_NAME} ${ENV_VAR_NAME} ${ENV_VAR_VALUE}

Restart, restage app container:

cf restart ${APP_NAME} # stops and starts container
cf restage ${APP_NAME} # rebuilds container (droplet)

Scale your app:

cf scale APP -i ${INSTANCES} -k ${DISK_SPACE} -m ${MEMORY}

Handy CF Environment Variables

    PORT
    MEMORY_LIMIT
    CF_INSTANCE_INDEX
    CF_INSTANCE_ADDR

Travis CI: https://travis-ci.org/jamestharpe/pal-tracker/settings