Book Image

Cloud Foundry for Developers

By : Rahul Kumar Jain, Rick Farmer, Wu
Book Image

Cloud Foundry for Developers

By: Rahul Kumar Jain, Rick Farmer, Wu

Overview of this book

Cloud Foundry is the open source platform to deploy, run, and scale applications. Cloud Foundry is growing rapidly and a leading product that provides PaaS (Platform as a Service) capabilities to enterprise, government, and organizations around the globe. Giants like Dell Technologies, GE, IBM, HP and the US government are using Cloud Foundry innovate faster in a rapidly changing world. Cloud Foundry is a developer’s dream. Enabling them to create modern applications that can leverage the latest thinking, techniques and capabilities of the cloud, including: ? DevOps ? Application Virtualization ? Infrastructure agnosticism ? Orchestrated containers ? Automation ? Zero downtime upgrades ? A/B deployment ? Quickly scaling applications out or in This book takes readers on a journey where they will first learn the Cloud Foundry basics, including how to deploy and scale a simple application in seconds. Readers will build their knowledge of how to create highly scalable and resilient cloud-native applications and microservices running on Cloud Foundry. Readers will learn how to integrate their application with services provided by Cloud Foundry and with those external to Cloud Foundry. Readers will learn how to structure their Cloud Foundry environment with orgs and spaces. After that, we’ll discuss aspects of continuous integration/continuous delivery (CI/CD), monitoring and logging. Readers will also learn how to enable health checks, troubleshoot and debug applications. By the end of this book, readers will have hands-on experience in performing various deployment and scaling tasks. Additionally, they will have an understanding of what it takes to migrate and develop applications for Cloud Foundry.
Table of Contents (12 chapters)

What is Pivotal Cloud Foundry?

Pivotal Cloud Foundry™ or Pivotal CF™, commonly referred to as PCF, is currently the leading enterprise PaaS powered by Cloud Foundry. Many of the companies that comprise the Fortune 1000 use Pivotal Cloud Foundry internally as a part of their cloud portfolio offering. Using this particular Cloud Foundry distribution, they build their own cloud-native applications and migrate existing applications so that they can leverage many of the benefits of moving to a PaaS. It is because of this deep enterprise penetration and the higher likelihood of encountering Pivotal Cloud Foundry within the confines of business, government, and organizations that we will discuss some of the additional capabilities Pivotal Cloud Foundry provides above the open source Cloud Foundry release.

Pivotal Cloud Foundry delivers an always-available, turnkey experience for scaling and updating PaaS on multi-cloud public, private, or hybrid infrastructures such as VMware vSphere, Amazon Web Services, Google Cloud Platform, Microsoft Azure, and OpenStack.

As a commercial distribution of Cloud Foundry, it provides several significant additional features and a commitment to support the product that organizations are accustomed to from vendors. For instance, Pivotal Cloud Foundry provides extra tools to simplify installation and administration not included in the open source software product.

For instance, should you want to install a Cloud Foundry distribution on your own infrastructure, you would do the following at a high level:

  1. Set up all external dependencies, such as an IaaS account, external load balancers, DNS records, and any additional components.
  2. Create a manifest to deploy a BOSH Director.
  3. Deploy the BOSH Director.
  4. Create a manifest to deploy Cloud Foundry.
  5. Deploy Cloud Foundry.
Source: Deploying Cloud Foundry at http://docs.cloudfoundry.org/deploying/index.html

This is initially a manual process that requires a good deal of BOSH and platform engineering expertise, although any platform engineer worth their salt would typically begin to automate a good deal of this process. However, it can be very difficult to get the distributed configuration of a large system composed of a variety of multiple VMs, network components, compute, IaaS access, storage, DNS, SSL certificates, and so much more described properly within the manifest file you must define, which BOSH then uses to build the Cloud Foundry foundation. Even getting to the starting line requires creating a manifest to deploy a BOSH Director which can be difficult if you are unfamiliar with the inner workings of BOSH; an interesting topic to be sure, but also deep and complex with a steep learning curve and commitment.

Building upon the foundation provided by the open source Cloud Foundry release (https://github.com/cloudfoundry/cf-release), as one might expect, Pivotal Cloud Foundry adds many features atop of the open source version that have been driven and shaped by the needs of enterprise, government, and organizations to simplify the administration and day operations of Cloud Foundry.

Without belaboring the finer details of the differences between the open source and Pivotal distributions of Cloud Foundry, there are a few differences that are worth highlighting.

As mentioned previously, a good deal of expertise in BOSH is a prerequisite to installing the open source version of Cloud Foundry. Pivotal Cloud Foundry provides a simplified web-based UI for installing and managing the installation of Cloud Foundry and various components, such as the CF Application Runtime, and other services such as RabbitMQ, Redis, MySQL, and so forth as simplified service tiles. Ordinarily, each would require their own BOSH installation and manifest creation to deploy in a coherent way – a rather significant challenge if done manually. This UI is called Ops Manager and enables zero-downtime upgrades for the platform and services, along with simplified maintenance and changes to the deployment configurations underpinning the Pivotal Cloud Foundry Foundation.

A second significant difference between the open source and Pivotal versions of Cloud Foundry is developer-centric. Apps Manager is an administrative UI that enables developers to access many of the capabilities of the Cloud Foundry CLI in a more intuitive way. Apps Manager provides a visual way to configure and manage many of the critical features necessary to handle the daily ins and outs of managing your applications for scale, performance, settings, services, logging, and integrations such as autoscaling that are only available with the Pivotal Cloud Foundry distribution.

The Pivotal Cloud Foundry distribution provides additional support for cloud-native applications via much of the NetFlixOSS functionality under the guise of Spring Cloud and Spring Cloud Services (SCS). This provides common pattern implementations that enhance resilience, ease of configuration, and high availability in the applications you design and deploy to Cloud Foundry, including service coordination and discovery, circuit-breaker patterns to prevent downtime, and other patterns that are particularly useful for microservices.

Another notable feature of the Pivotal distribution is the PCF Metrics dashboard, which presents easy access and visualizations of recent application events, metrics, and logging.

Pivotal Cloud Foundry components glossary

Pivotal Cloud Foundry components and what they do include:

  • Ops Manager: A web interface for installing, configuring, upgrading, and scaling Pivotal CF and Pivotal Services
  • Apps Manager: A web interface for working with Cloud Foundry and managing orgs, spaces, users, apps, services, routes, and so on
  • Pivotal Cloud Foundry Metrics: A dashboard monitoring, event and logging component for applications running in PCF
  • Pivotal Services: Managed services including autoscaling, MySQL, RabbitMQ, Redis, Spring Cloud Services, and so on

Other Cloud Foundry distributions and public providers

In addition to the commercial offering of Pivotal Cloud Foundry, the Cloud Foundry Foundation certifies additional platform providers to ensure consistency in the core Cloud Foundry components to ensure portability. The Cloud Foundry Certified PaaS certification requires certified offerings to actually use the software released by the Foundation’s project teams. For more details on Cloud Foundry Certified Platform Providers, please see https://www.cloudfoundry.org/provider-faq/.

A partial list of provider offerings include:

A comprehensive list of Cloud Foundry Certified Platform Providers and their offerings can be found at https://www.cloudfoundry.org/how-can-i-try-out-cloud-foundry-2016/.