Deploy Java Application To Cloud Foundry In Less Than An Hour
Skand Purohit Apr 11
This article talks about setting up PCF on your Local Workstation with PCF Dev and deploy a Java application.
Time : 45 mins
• Virtual Box 5.0 or higher
• Java JDK 7 or higher
• 4GB Memory
• 10GB Space
• Create account on PCF
Install The CLI
Download and Install Cloud Foundry Command Line Interface (cf cli):
Install The PCF Dev
Download the latest version of PCF Dev, navigate to https://network.pivotal.io/products/pcfdev
Here I have used v0.28.0 for PCF 1.11.0
Unzip the downloaded zip file
Install the PCF Dev Plugin
Start PCF Dev
This Process takes somewhere from 10-20 mins depending on the workstation.
Deploy Java Application
Now that you have PCF Dev Virtual Machine running on your workstation, next step is to deploy the sample Java application.
$ cd spring-music
Login to PCF Dev
Use Gradle to Assemble the app locally
$ ./gradle assemble
Push the App
$ cf push --hostname spring-music
While App gets deployed you would see the route which would be used to access the app from your local browser.
requested state: started
usage: 512M x 1 instances
To View Logs
$ cf logs spring-music –recent
To Check Running App Details
When reasoning about algorithm performance we often look at complexity. Computer architecture however, might matter just as much and can influence the runtime of your implementation in orders of magnitude.