Skip to content

Cloud Foundry Ask Me Anything!

This is a first test run of our online and in-person Cloud Foundry Ask Me Anything.

Scott Frederick and Jamie O’Meara from Pivotal will be on-hand to do their best to answer!

Sign up!

This week in Cloud Foundry! (June 12, 2014)

Summary of Cloud Foundry Summit in San Francisco 2014 plus more!

Cloud Foundry Summit + Java and Cloud Foundry meetup by Ben Hale

The Cloud Foundry summit kicks off Monday, June 9, 2014 6:00 PM and is filled with keynotes, breakout sessions, lightning talks, hack nights, Birds of a Feather, panels, and more! Runs through Wed June 11, 2014 evening at the Hilton Union Square in San Francisco, CA (333 O’Farrell St, San Francisco, CA)

It includes Java Applications in the Cloud with Ben Hale, on Tuesday, June 10, 2014
6:00-7:00 pm networking & food
7:00-8:30 pm talk
RSVP for the free meetup!

Register for CF Summit with this 50% off code!
Click on the “Register” button and use this code: CFS2014-Meetup

May 19, 2014 in SF: Cloud Foundry – Open Cloud Deployments FTW with David Stevenson


“Cloud Foundry – Open Cloud Deployments FTW” with David Stevenson

6:00-6:30pm Pizza and Networking 
6:30-8:00pm Talk and Q&A 
8:00-8:30pm Wind down

We’ll start by discussing the grand vision of cloud foundry, and how it attempts to change the way the world deploys software.  Next will be a demo of how end users can use it to push apps and bind services.  Then we’ll cover how operators can run their own CF instances, including some details about BOSH.  Finally there will be a technical rundown about how the distributed system works under the hood, including some details about new components like HM9000, diego, loggregator, and the GoAgent.

David Stevenson has been Director of Engineering on Cloud Foundry for about 16 months.  Before that, his career at Pivotal has now lasted more than 6 years, so he knows the agile software and planning process in and out.  He loves all projects that include large distributed systems with a blend of dev/ops in them, and obviously long walks on the beach.

Mar 6, 2014 in SF: Deploying a multi-tier application to Cloud Foundry with Cornelia Davis

It’s been a bit busy at Pivotal … but now you’ll start seeing the fruits of the hard work in the last 4 months! Here’s one!
If you’re in San Francisco, come see this talk at the Pivotal office!
Register here:

Deploying a multi-tier application to Cloud Foundry with Cornelia Davis
March 6, 2014

5:30-6:30pm Pizza and Networking
6:30-8:00pm Talk and Q&A
8:00-8:30pm Wind down

Cloud Foundry is an open source Platform as a Service (PaaS) that changes the set of things that a devops individual interacts with when developing, deploying and managing cloud-based applications. No longer is that developer concerned with virtual machines, networks and storage, instead they are focused on and working with applications and the services they leverage.

After a brief introduction to the platform, in this meetup we will take a multi-tier application that was originally built for deployment onto physical or virtual machines, necessitating the deployment of numerous prerequisite softwares, and we’ll deploy it to Cloud Foundry, which provides all of those prerequisites out of the box.  Only minor changes were made to the application with major benefits.  We’ll provision services (i.e. database and messaging instances), deploy applications, bind them to those services and start up the app.  The session will be light on slides and heavy on live demo.

The Cloud Foundry PaaS is entirely open sourced, available on Github and can be deployed on any number of IaaS including vSphere, OpenStack and AWS, plus there is an option where you can even run it on your laptop. Pivotal also offers it in the cloud at  If you come with a account and with the cli installed you’ll even be able to follow along and have a working app by the end of the evening.

About the speaker:

A self-proclaimed propeller head, Cornelia Davis works as a Platform Engineer in the Cloud Foundry group of Pivotal. Fundamentally responsible for making developers successful with the Cloud Foundry PaaS, you can generally find her knee deep in the (OSS) code base, writing apps and deploying them onto the PaaS, teaching at a whiteboard, presenting at conferences and passionately driving new features into the product.

When not doing those things you can find her on the yoga mat or in the kitchen.

Barebones app to Cloud Foundry v2 using Spring Tool Suite

We had some new machines that we had to get ready for SpringOne 2GX 2013.

Here are some basics to pushing a hello world app to the new Cloud Foundry v2 using Spring Tool Suite. These are the steps I followed to install on a new MacBook Pro (OSX 10.7.5).

1. Go to

2. In my case, I downloaded and installed “spring-tool-suite-3.3.0.RELEASE-e4.3-macosx-cocoa-installer.dmg”

3. Next to the Dashboard tab, there should be an “Extensions” tab. Click on that and search for “cloud foundry” and select the extension for Pivotal.

If you don’t see the extension for Cloud Foundry, click on the “Find Updates” button near the Dashboard and Extensions tab. You should see a pop-up for Cloud Foundry. Select it, agree to the T&C’s, and then restart STS when prompted.

4. Once back in STS, place your cursor above the Servers box, which is usually located in the bottom left corner. Right click and choose New>Server.

You should see Pivotal>Cloud Foundry as an option. Choose that and click “Next”.

5. Enter your Cloud Foundry account information. If you have not created a Cloud Foundry account, go to and enter an email address and “preshavedyak” as your promo code. Check your email and follow the steps to create a password.

6. Back in STS, enter your email address and password. Click on the button “Validate”. Make sure that it has confirmed that your account is valid.

7. Now we will create a barebones app. Click on the Dashboard tab, and then, under “Create,” click on Spring Project link.

8. Select Spring MVC Project and enter a Project Name. Click on the Next Button. Click the “Yes” button to proceed with the download.

9. Specify a top-level package such as “” and then click the “Finish” button.

10. If you happen to have an error with your pom.xml file (as I did this time), go to your terminal (by clicking on the search icon on the top right corner of your screen and typing “Terminal”), and delete the Maven repository. To do this, go into the Users directory and type “cd [user name]/.m2″ at the prompt. There should be a directory “repository” which you can delete. (“ls” to list your files in a directory and “cd ..” to go up a level in a directory until you see :Users. Type “rm -r repository” to remove the repository). Create a new Spring MVC Project and try again.

11. Once you have successfully created the Spring MVC Project, you can open the home.jsp file (from the Package Explorer box usually in the top left corner, src>main>webapp>WEB-INF>views) and you will see a basic Hello World. Instead of hello world, you can create other content. For instance, I pasted the following:

<title>Cart Cats on Cloud Foundry v2 using STS</title>
<h1>Cart Cats on Cloud Foundry v2 using STS</h1>
<img src="">

(You can go to and view the page source, and copy and paste it if you have trouble with the formatting here).

12. To push your app to Cloud Foundry, drag and drop the ENTIRE folder in the Package Explorer box onto your Server called “Pivotal Cloud Foundry,”

13. For Name, make sure to give it a unique name (not “Hello” for instance because this will be the prefix to your url).
Allocate at least 512 M of memory and click Finish.

14. Monitor the console to make sure that the app has pushed. This may take about a minute. Once you see “initialization complete in __ ms” your app should be live.

If you click on the grey arrow to the left of your server, “Pivotal Cloud Foundry,” you should see your app listed. If you click on your app, you will see more information on the status of your app. You will also see your new url and can click on it to see your app live.

You should see something like

If you are pushing your app from one of our laptops at SpringOne 2GX or other event, make sure to right click on “Pivotal Cloud Foundry” server and select Delete. This will not delete your account, but will log you out of that machine. :)

Easy Ruby 1.9.3 Install

Easy Ruby 1.9.3 Install
We have noticed some hiccups even with Mac users because Ruby 1.9.3 is not preinstalled. This is my very personal path to installing Ruby 1.9.3 on a rental MacBook Pro that I had to prepare for Cloud Foundry.

1. RVM vs Homebrew: Many people prefer RVM, and I see the benefits. However, I was hitting too many roadblocks and remember my last install using Homebrew. I recall that it was a pretty smooth process. That is what I will use here.
2. About my Mac: I happen to be using a rental MacBook Pro with Mac OS X 10.7.5 (Lion)
3. Download Ruby: Scroll down to the section, “Compiling Ruby – Source code”. In my case, I downloaded and opened the link “Ruby 1.9.3-p448″
4. Install Xcode: If you don’t have Xcode, go the AppStore and search “Xcode”. Complete the free install. I installed Xcode 4.6.3
5. Update the Xcode Command Line Tools: Open Xcode and choose “Preferences” from the Xcode drop down menu in the top left of your screen. When the preferences window opens, select “Downloads” from the top menu of icons. You should see a line that says “Command Line Tools”. Click the button to the right that says “Install”. Wait for it to complete.
6. Install Homebrew: Go to and follow the instructions at the bottom of the page under “Install Homebrew”. If you have never opened your Terminal before, go to the search (magnifying glass) icon at the top right corner of the your Mac screen, click on it, and type in “Terminal”. You should find and be able to click on the option “Terminal” which will have a black screen icon.
At the Terminal prompt $, type or paste in
ruby -e "$(curl -fsSL"
as instructed on the website.
I followed the instructions that appeared and entered
$ brew doctor
In my case, it suggested that I enter
$ sudo mv /opt/local ~/macports
6. Install ruby 1.9.3: I found this site useful:
Under the section “Installing rbenv”, he indicates that you have to install GCC.
7. Install GCC: I followed Sam Roon’s instructions and went to I selected GCC-10.7-v2.pkg. Download it, open it, and click on the yellow box icon to install it.
8. Complete Ruby 1.9.3 Install: Followed the next steps on
$ brew update
$ brew install rbenv
$ brew install ruby-build
$ rbenv install 1.9.3-p448
Finally, I followed the instructions to make ruby 1.9.3 my default version by entering
$ rbenv global 1.9.3-p448

9. Install Cloud Foundry Gem / Potential Write Problems: To install the cf gem, I continued with gem install cf as mentioned on this post:
$ gem install cf
However, with my rental laptop, I hit the problem “You don’t have write permissions into … (Gems directory)
I found this solved the problem:
$ sudo gem install cf --pre
and it worked.
Now I’m ready to cf login and push my app!
10. Pushing your first app to Cloud Foundry! Here is a summary of my previous post. Check this post in case  you hit any of the same errors that I got.
Step 1: Create a new account. Go to
Click on the “free trial” button
Enter email address and Promo code (you can use “preshavedyak”)
Check your email and click on the link in the email from Cloud Foundry
Create a password

Step 2: Update your gems, target, and then log in.
I followed the steps on
$ gem install cf
$ cf target
$ cf login

From the option listed, I chose “1” (development)

Step 3: Set up for your ruby sinatra app.
You don’t have to push a ruby sinatra app. Cloud Foundry supports Java, Spring, Groovy and Grails, Scala, Ruby on Rails, Node and other languages and runtimes, but I happen to have a ruby sinatra app.
So I decided to read further on
It told me to go to
I followed these steps:
a) $ gem install bundler
b) Create doc “Gemfile” (no extension to the file) and save this text in the file:
source ''
gem 'sinatra'
ruby '1.9.3'

Save this file in the folder with my baconpancakesv2.rb app

$ bundle install
This creates the Gemfile.lock file

c) Update the baconpancakes.rb app

I renamed it baconpancakesv2.rb
I followed the steps on

Here is the code for baconpancakesv2.rb:
class YakApp < Sinatra::Base
get '/' do
def youtube_embed(youtube_url)
if youtube_url[/youtu\.be\/([^\?]*)/]
youtube_id = $1
# Regex from #
youtube_id = $5
"<h1>Bacon Pancakes from Cloud Foundry</h1>"+youtube_embed('')

d) Create

Return to
Follow instructions to create file.
Also follow the instructions on
So the file will include:
require 'sinatra'
require 'sinatra/base'
require './baconpancakesv2'
map '/' do
run YakApp

Step 4: Push your app.
So now you should have a directory that has these 4 files:

  • rb app
  • Gemfile
  • Gemfile.lock

From your Terminal window, make sure you are in the directory with these files.
Now do the cf push from that directory.
$ cf push
Name> baconpancakesv2
Memory Limit>256M
Create services for application?>n
Save configurations?>n

You should be able to push your app to Cloud Foundry. If you used my app, it should look like this:

Of course, this is a limited case. Please consult the Cloud Foundry documentation for further info.
Also check out Andy Piper’s github repo for this same app:
Thanks to Andy for his help!

Step 6: Manage your account in the browser.
Once you have your account. Don’t forget to check out your new account console in the browser. Pretty nice!


Get every new post delivered to your Inbox.