Skip to main content

What is Cloud Foundry? Key Benefits and a Real Use Case

Unlike most other cloud computing platform services — which are tied to particular cloud providers — Cloud Foundry is available as a stand-alone software package. If desired, you can deploy it on AWS, but you can also host it yourself on your own OpenStack server, or through HP Helion or VMware vSphere.

In this article, we’ll cover the basics of Cloud Foundry, but you can learn more about similar DevOps principles using Cloud Academy’s DevOps Playbook Learning Path.

DevOps Learning Path

What is a cloud computing platform?

Broadly speaking, three major categories of cloud computing:

  • Infrastructure-as-a-Service (IaaS), which provides only a base infrastructure, leaving the end user responsible for the platform and environment configurations necessary to deploy applications. Amazon Web Services and Microsoft Azure are prime examples of IaaS.
  • Software-as-a-Service (SaaS), which provide a finished product for end users, such as Gmail or Salesforce.
  • Platform-as-a-Service (PaaS), which helps to reduce application development overhead (i.e. environment configuration) by providing a ready-to-use platform. PaaS services can be hosted on top of infrastructure provided by an IaaS.

The three categories of cloud computing platforms: IaaS, PaaS, and SaaS

Since it’s easy to become a bit confused when thinking about cloud platforms, it’s important to be able to visualize exactly which elements of the compute ecosystem are which party’s responsibilities. While there is no precise definition, it’s reasonable to say that a platform requires only that you take care of your applications.

With that in mind, the platform layer should be able to provide the following features:

  • A suitable environment to run an application.
  • Application life cycle management.
  • Self-healing capacity.
  • Centralized management of applications.
  • A distributed environment.
  • Easy integration.
  • Easy maintenance (such as upgrades, patches, etc.).

What is Cloud Foundry?

Cloud Foundry is an open source cloud computing platform originally developed in-house at VMware. It is now owned by Pivotal Software, which is a joint venture made up of VMware,  EMC, and General Electric.

Cloud Foundry is optimized to deliver:

  • Fast application development and deployment.
  • Highly scalable and available architecture.
  • DevOps-friendly workflows.
  • A reduced chance of human error.
  • Multi-tenant compute efficiencies.

Not only can Cloud Foundry lighten developer workloads, but because Cloud Foundry handles so much of an application’s resource management it can also greatly reduce the overhead burden on your operations team, freeing your resources for development.

Cloud Foundry’s architectural structure includes components and a high-enough level of interoperability to permit:

  • Integration with development tools.
  • Application deployment.
  • Application lifecycle management.
  • Integration with various cloud providers.
  • Application execution.

For more information, read Cloud Foundry:Understanding the Core Components .

Although Cloud Foundry supports many languages and frameworks, including Java, js, Go, PHP, Python, and Ruby, not all applications will make a good fit. As with all modern software applications, your project should attempt to follow the Twelve-Factor App standards.

What are the key benefits of Cloud Foundry?

  • Application portability.
  • Application auto-scaling.
  • Centralized platform administration.
  • Centralized logging.
  • Dynamic routing.
  • Application health management.
  • Integration with external logging components like Elasticsearch and Logstash.
  • Role-based access for deployed applications.
  • Provision for vertical and horizontal scaling.
  • Infrastructure security.
  • Support for various IaaS providers.

Getting started with Cloud Foundry

Before deciding whether Cloud Foundry is for you, you’ll have to try actually deploying a real application. As already mentioned, to set up a suitable environment you will first need an infrastructure layer. As of June 2019, Cloud Foundry runs on AWS, Azure, Google Compute Platform (GCP), OpenStack, VMware vSphere, SoftLayer, and others. For a first step, we’ll look at some basics of setting up Cloud Foundry with Pivotal Web Services (PWS).

PWS provides “Cloud Foundry as a web service,” deployed on top of AWS. You’ll just need to create an account and you’ll automatically get a free trial. Getting started isn’t a big deal at all.

Hosting static files in Cloud Foundry

Once you’ve created your account and set up the command line interface tool (CLI), you’ll be ready to deploy your application. We’re going to use some static files, which means we’ll need one folder and a few html files. Make sure there’s an index.html file among them.

Normally, deploying static files requires a webserver like Apache or Nginx. But we’re not going to have to worry about that — the platform will automatically take care of any internet-facing configuration we’ll need. You only need to push your application files to the Cloud Foundry environment and everything else will be taken care of.

Now, copy the folder with your files to the machine where you’ve installed the CLI and log in to the CLI using this API endpoint:

cf login -a https://api.run.pivotal.io

You may need to provide some information:

  1. Username (the username you used to log in to your PWS account).
  2. Password (the PWS password you created).
  3. Organization name (any name will work).
  4. Space (select any space where you want your application to be deployed).

Once successfully logged in you will be able to run Cloud Foundry commands using cf. Start with cf help to check all available commands.

cf help

Now go to your application folder and create a file called Staticfile using:

touch Staticfile

Push the application using:

cf push <<application file name>>

You will want to verify that the app is running by using the URL generated from the output of the previous step. There’s more information on hosting a sample static file in Cloud Foundry.

That’s it! You’ve gotten started with Cloud Foundry and can continue to explore how it frees you and your teams from infrastructure overhead.

Avatar

Written by

Vineet Badola

Working as a cloud professional for last 6 years in various organizations, I have experience in three of the most popular cloud platforms, AWS IaaS, Microsoft Azure and Pivotal Cloud Foundry PaaS platform. Having around 10 years of IT experience in various roles and I take great interest in learning and sharing my knowledge on newer technologies. Wore many hats as developer, lead, architect in cloud technologies implementation. During Leisure time I enjoy good soothing music, playing TT and sweating out in Gym. I believe sharing knowledge is my way to make this world a better place.

Related Posts

Avatar
Chandan Patra
— November 4, 2015

Pivotal Cloud Foundry: Set Up a Backup Strategy

Pivotal Cloud Foundry deployments can be complicated. Learn how to properly create and restore from backups. Pivotal Cloud Foundry (PCF) is an open source platform based on Cloud Foundry and offered as a collaboration between Pivotal, EMC, and GE. Pivotal Cloud Foundry runs on almost a...

Read more
  • AWS
  • Cloud Foundry
Avatar
Vineet Badola
— October 30, 2015

Cloud Foundry: Understanding the Core Components

Explore the key components you'll need to build an entire Cloud Foundry architecture. In a recent post, I spoke about some of Cloud Foundry's main features. Now I will explore in greater depth the components you'll need to build an entire Cloud Foundry architecture. This is a good repr...

Read more
  • Cloud Foundry