Subhasish Sahu
Deploy App in PCF(Pivotal Cloud Foundry)
Updated: Jun 27, 2020
Download CLI from https://login.run.pivotal.io/login

Install CLI by clicking on the .exe

Download Sample ( Spring Boot) app from GIT using GIT BASH
git clone https://github.com/cloudfoundry-samples/cf-sample-app-spring.git
Navigate to App Directory
$ cd cf-sample-app-spring/

$ cf login -a https://api.run.pivotal.io –u <pivotal login user id> -p <pivotal login password>

Sometime creation of org does not happen through command line, you might get the below error:

So you may use the Pivotal Site to create one as below. Signup for Free Trial and then go to Pivotal Web Services.

Claim your Free Trial and then Create a ORG

ORG Created

Check the ORG created under your ID

Click on + Add a Space and Space is created

Create a Target using above ORG and SPACE

Push Code to Cloud using command : cf push


It is deployed to PCF now

It is up and running and you can hit the url in any browser

Miscellaneous Command :
Views logs in Console
Recent logs : cf logs cf-spring –recent
Live stream : cf logs cf-spring
Horizontal Scaling
cf scale cf-spring -i 2
Check the status of app
cf app cf-spring

Increase the memory limit for each app instance:
cf scale cf-spring -m 1G
Increase the disk limit for each app instance:
cf scale cf-spring -k 512M