Pivotal CF (Cloud Foundry) Tutorial Part 1

Here’s a tutorial on how to get started with Pivotal CF. In part 1 we will focus on deploying a pre-built app to the cloud.

Before you begin

Download the “CF” command line tool from: https://console.run.pivotal.io/tools

Download the sample Java app that we will be using for this exercise: booking-mvc.war.zip

Unzip the file

1. set your target API to the api address of the cloud foundry interface. In this case our domain is cf.mattzwol.com

> cf api api.cf.mattzwol.com

note: you may need an extra command here in the line above to skip ssl verification. It will tell you if you do. In this case use > cf api  api.cf.mattzwol.com –skip-ssl-validation

2. Log in

> cf login your login_email_addrees

3. If you need to, set the org and the space. In this case set the org to “matts org” and the space to “development”

4. Check the orgs with

> cf orgs

5. Check the spaces with

> cf spaces

6. If you need to change the org or spaces, use

> cf target –o “matts org”

> cf target –s development

7. Type this for help

> cf –help

8. Check for deployed apps

> cf apps

9. Push a war file if you have one

> cf push —help

> cf push an_app_name_you_choose –i 1 -m 512M –p booking-mvc.war

10. Load the app in a browser


11. Go to the web console and manage your environment


12. Explore.