Monday, April 27, 2015

Creating Your First Cloud Foundry Application - A Tutorial

This post will give you a tutorial approach to create a simple Cloud Foundry application. Let us start with the the basics.

What is Cloud Foundry?
Cloud Foundry (CF) is an open source cloud computing platform as a service (PaaS) originally developed by VMware and now owned by Pivotal Software - a joint venture by EMC, VMware and General Electric. You can learn more about Pivotal Cloud Foundry (PCF) here. Both PCF and IBM's Bluemix are based on CF. You may want to learn about the Cloud Foundry Foundation as well, which is trying to drive "fierce collaboration" around CF.

In order to follow along with this exercise, you can create a free account at run.pivotal.io
You do not need a credit card to create an account. However, you need a valid email address and a US-based cell phone number that can receive your activation code. It is a 60-day free trial account.


Once you have the account for PCF, login to your account to get to the console. It is shows as below. You will also create your org.


In this workshop, I will use the reference material shared by Dave Nielsen during the CF Workshop conducted by the East Bay CF Meetup group. You can download the handout here

This will guide you through the first "Hello Cloud" application! You will have to download the “Hello Cloud” app created for this exercise from http://cloudworkshop.org/cloudfoundry

Once you unzip the “hellocloud.zip” archive into any directory you want (such as c:/workshop (or ~/workshop):

  • Navigate to the new hellocloud app folder (such as c:/workshop/hellocloud (or ~/workshop/hellocloud). 
  • Modify the text in the manifest.yml file and change host: property from cf-node-hellocloud-dcn to a unique hostname with your initials. For example, you might change the last three letters to that of your own initials, such as ‘xyz’ (such as cf-node-hellocloud-xyz).
  • The above step will make sure that you are using a unique name/url, in the applicable namespace.
You will need to download the CLI (command line interface) from the Cloud Foundry CLI: http://github.com/cloudfoundry/cli

Install the CLI and test it using  cf –help
Once you have confirmed your installation, you can run commands like
> cf orgs 
> cf spaces
to check the details of your org and spaces. Now you are ready to Push your first app  to PCF!

Run 
> cf push 
command from within your hellocloud app folder (where you unzipped it). You should be able to monitor the steps as it deploys.

It may take a couple of minutes. Once it is completed, you should be able to see "App started" and the health of the app.



The console will show you the url where there you can go to verify your application via the browser.

You can navigate to the web interface, to locate your deployed application and add services to it.


The services can be from the marketplace such as database service (MySQL database). The Contact Form is the other sample that Dave has included in his workshop, that can be used for this exercise. You should try it out.

Sunday, April 5, 2015

Predix is the "OS" for Industrial Internet

Checkout the new site for Predix Predix is a Platform-As-a-Service (PaaS) offering for Industrial Internet. Its flagship offering would be Asset Performance Management (APM). Check how Gartner defines APM

More to come..