The Cloud Foundry architecture abstracts away many of the complexities of day-to-day application development to provide a rich and robust environment for deployment. Cloud Foundry handles many of the operational and infrastructural demands behind the scenes in a unified and consistent way so that Cloud Foundry operators and engineers can manage and maintain the platform without downtime in most cases, enabling rolling, zero-downtime upgrades, and patches to the platform without developers noticing anything going down. Scaling Cloud Foundry by adding more infrastructure is baked into the platform to enable growth over time as demand increases.Â
The Cloud Foundry platform is composed of a set of horizontally-scalable, distributed services. It includes tooling which automates and orchestrates the underlying infrastructure, providing an abstraction layer over IaaS platforms.
Cloud Foundry is very robust. It uses what can nominally be called Weak AI because of its narrow focus on maintaining a self-healing feedback loop under the hood via its release engineering and management tooling, called BOSH. For instance, when a virtual machine in Cloud Foundry is misbehaving, it is taken out of service and replaced quickly. This enables failure detection and recovery at any level: application, container, VM, or the entire Cloud Foundry Foundation when configured for high availability (HA). Â
Perhaps the most unusual aspect of Cloud Foundry, from a platform engineer's perspective, is that it is infrastructure agnostic, meaning that an operator can run Cloud Foundry on a variety of IaaSes such as VMware vSphere, Amazon Web Services, Google Cloud Platform, Microsoft Azure, OpenStack, bare-metal servers, and others. This is as revolutionary as the concept of the write once, run anywhere dream of application portability that application developers sought with the slogan created by Sun Microsystems to illustrate the cross-platform benefits of the Java language. Cloud Foundry does this by using an abstraction, called a Cloud Provider Interface (CPI), that translates a common set of infrastructure build commands into an IaaS-specific translation using an open source project called Fog (http://fog.io). Fog enables Cloud Foundry to avoid vendor lock-in, which constrains you to a single IaaS. Interestingly, many IaaS providers are adding support to Fog directly, such as the Google Compute Platform. As they do, Cloud Foundry enjoys this rich inheritance that will enable it to run on an ever-growing list of cloud providers as they become available and supported.
Weak AI versus Strong AI: Weak AI is non-sentient artificial intelligence that focuses on one narrow task, whereas Strong AI is a machine with the ability to apply intelligence to any problem, rather than just one specific problem. Most currently existing systems considered under the umbrella of artificial intelligence are weak AI at most.
The capabilities and the operational aspects of Cloud Foundry are truly remarkable, if not revolutionary, from a system operator's and platform engineering perspective.
BOSH is one of the most interesting components of the Cloud Foundry ecosystem. Although it sits firmly in the domain of the platform engineer, since it automates and directs the deployment of the Cloud Foundry components themselves, it is used to deploy and maintain a Cloud Foundry Foundation (installation).
BOSH is an open source tool chain for release engineering, deployment, and life cycle management of large-scale distributed systems. If you are interested in looking at the operational side of Cloud Foundry, you can find out more about BOSH at https://bosh.io and find the open source code for it at https://github.com/cloudfoundry/bosh.
The Cloud Foundry platform provides key elements such as routing, container management, logging, and metrics, as well as application configuration, service catalog, and messaging built-in.
Cloud Foundry is a polyglot platform, in that you are free to use any programming language of your choosing to develop your application for deployment. It has built-in support for Java, .NET Core, Python, Ruby, Go, Node.js, and PHP and it can support more by adding a variety of buildpacks that contain everything needed for application runtimes in additional languages. Most buildpacks are open source and community-driven. They can be found at https://github.com/cloudfoundry-community/cf-docs-contrib/wiki/Buildpacks#community-created.
A simplified overview of the Cloud Foundry ecosystem:
A high-level overview of the Cloud Foundry ecosystem. More detail can be found at https://cloudfoundry.org/  © 2017 Cloud Foundry, Inc. All Rights Reserved.
Additionally, there are Command Line Interpreter (CLI) and Integrated Development Environment (IDE)Â integrations for popular development tools such as Eclipse, Visual Studio, IntelliJ IDEA, and VS Code, among others.
What about connecting your application to services such as databases, message brokers, object stores, and so on? Most applications have dependencies on these types of externalities. Cloud Foundry addresses this necessity elegantly, providing several ways to address these capabilities, of course. We will discuss this in detail in future chapters.
A simplified overview of the Cloud Foundry platform architecture:
A conceptual overview of the Cloud Foundry platform architecture. More detail can be found at https://cloudfoundry.org/application-runtime/  © 2017 Cloud Foundry, Inc. All Rights Reserved.
The preceding figure shows the stack of infrastructure and BOSH that Cloud Foundry platform engineers use to install, manage, and maintain Cloud Foundry. There is the Cloud Foundry Application Runtime ™ (previously known as Elastic Runtime) inside the big box outline that is comprised of the various components. From the developer's perspective, this is Cloud Foundry. But from the holistic, systems view, it is but one part, albeit a very, very important part. The CF Application Runtime is exactly as the name implies:
The elastically scalable application runtime environment that stitches together the compendium of components needed to stretch across the underlying infrastructure resources to create and manage pools of compute, memory, datastore, blobstore, and networks to support the app-centric view of the world we call application virtualization. This includes all the orchestration, networking, containerization, management and control systems you might imagine are needed to pull together such a complex ballet of dynamic technology.
Primarily, these fall into the following categories:
- Routing
- Authentication
- Application life cycle management
- Application execution
- Platform services
- Messaging, metrics, and logging
- All of these are unified behind the Cloud Controller API, which enables RESTful integration with the CF Application Runtime through the Cloud Foundry CLI (a.k.a. the cf CLI) and other commercial user interfaces (UI) such as Pivotal Cloud Foundry's Application Manager web-based UI
We will unbox these in more detail in future chapters. Further information may be found at https://www.cloudfoundry.org/platform/.