Cloud Foundry

Cloud Foundry Simplified

by | 31.07.2021 | Engineering

Often while dealing with networks and services, a big question arrives in our heads regarding deployment. It becomes a relevant concern when you have the required product in your hand, but you have no clue how to deploy it and spread it out to the world.

Well, scratch your head no more because here comes Cloud Foundry, which helps customers deploy their apps and services effortlessly. Why wait? Because throughout this article, we will discuss what is Cloud Foundry and how it can help. Without any further due, let’s start.

What is Cloud Foundry?

Cloud Foundry is an open source project developed by Vmware and governed by the Cloud Foundry Foundation. We can also describe cloud foundry as an industry-standard cloud platform. Now, you might be thinking about what is a cloud platform? So, a cloud platform lets anyone deploy their network apps or services and make them available to the world within a very few time.

So, as an industry-standard cloud platform, Cloud Foundry enables you to focus on your apps exclusively without worrying about the underlying infrastructure requires for scaling and deployment. It offers the following:

Open Source Code

The openness and extensibility of the Cloud Foundry platform help the users to get a shared community and prevents them from being locked into a single framework. It means that the users can run any cloud-native application without worrying about the programming language required to write the application. Moreover, the platform also opens the possibility to use all sets of app services or the cloud.

Deployment Automation

Developers can automatically deploy their apps to Cloud Foundry with zero modification to the codes. It means they don’t have to change anything in their codes and tools specifically for the deployment. They can deploy with their existing tools.

Flexible Infrastructure

The flexible infrastructure of Cloud Foundry allows you to deploy the apps on your computing infrastructure or several IaaS (Infrastructure as a Service) platforms such as GCP, AWS, Microsoft Azure, vSphere, etc.

Commercial Option and Community Support

Cloud Foundry allows users to use a PaaS (Platform as a Service) deployment by retail Cloud Foundry cloud provider for commercial purposes. Also, we can get broad community support that contributes to the Cloud Foundry.

Comparison of traditional IT model to Cloud Platform model (Source: Cloud Foundry)

How Cloud Foundry Works?

Cloud Foundry works with the following:

Load Balancing

In the course of making a successful deployment, load balancing plays an important role. In the case of the cloud, we can see that it balance the incoming traffic over multiple machines to prevent failure. A Cloud Foundry installation accomplishes this through the following components:

  • BOSH: BOSH is a project that helps create and deploy virtual machines (VMs) on top of physical computing infrastructure. It then deploys and runs Cloud Foundry on top of that cloud.
  • Cloud Controller: Cloud Controller helps run the apps and other processes on the Cloud VM’s, balancing demand and managing app lifecycles.
  • Gorouter: Gorouter helps in routing the incoming traffic from the world to the VMs running the applications.
cloud foundry architecture
Cloud Foundry Architecture (Source: apriorit)
Loadbalancing Flow Request in Cloud Foundry (Source: Cloud Foundry)

Running Apps

The VMs run your applications in the Cloud Foundry platform. Cloud Foundry helps in packaging the application to run on the VMs. In Cloud Foundry, there are two types of VMs, such as Component VMs, which helps in making up the infrastructure of the platform and Host VMs, which hosts your applications to the outside world.

When running your application in the Cloud Foundry platform, you can see that many cells are already running in the cells section. These cells are known as Diego cells. Now, you might be thinking about what Diego cells are and what does it even mean. So, Cloud Foundry uses the Diego system to manage the app containers, and Diego cells are a part of that system. Diego is a self-healing container management system that attempts to keep the correct number of instances running in Diego cells to avoid network failures and crashes.

Find more about the Diego system here.

cloud foundry architecture
DIEGO Architecture (Source: Cloud Foundry)

Distributing Apps

Cloud Foundry uses a buildpack mechanism to add frameworks, cloud providers, and application service interfaces. Buildpack contains all language, libraries and services that the app uses. While distributing the app to the VMs, Cloud Foundry adds Stack (the operating system on which the app runs) and Buildpack to the app’s source code.

Sometimes, to meet demands, multiple host VMs run duplicate instances of the same app. So, to do that, the app must be portable, and Cloud Foundry distributes app source code with the addition so that VMs have everything when they need to compile and run the app locally.

Other Subsystems

Apart from the three most essential subsystems through which Cloud Foundry can scale and deploy applications, there are other subsystems, too, which also helps in the process. Cloud Foundry manages user accounts through two User Account and Authentication (UAA) servers, which helps in supporting access control as OAuth2 services and can store user information internally or connect to external user stores through authentication protocols like LDAP or SAML. The first UAA server grants access to BOSH, while the second server grants access to the cloud controller.

Again, we see that it communicates internally using HTTP or HTTPS protocol and sending NATS messages directly to each other for component communication. Cloud Foundry also keeps logs from all the components and hosted apps through monitoring and analysis. It also gives access to the developers to use various services through Service Broker API.

Advantages of Cloud Foundry

Cloud Foundry has a lot of advantages. These are the following:

Open-Source Format

Although we can see that there are several commercial versions of Cloud Foundry available, the entire project is still open source. As a result, we get a large community base with the best knowledge, which helps in many tutorials and bug fixes.

Several Programming Languages Support

One of the significant advantages of Cloud Foundry is that it supports multiple languages. It helps developers to go with any primary programming language like Python, Go, .Net, etc.

Multi-vendor Support

The platform gives multi-vendor cloud support, which is healthy. It helps you choose from several vendors of your choice, so you don’t need to worry about vendor lock-in when you start using the PaaS.

Application Portability

The platform gives extensive portability to the deployed applications. You can easily migrate from a private data centre to a public cloud and from one IaaS provider to another.

Role-based Access for Deployed Application

The platform improves the security of the deployed applications by ensuring that only a select group of people have access to application data.

Ease of Application Deployment

Easy deployment of the application is one of the significant advantages of Cloud Foundry. We can deploy code by executing just a single line from the CLI. Also, the platform’s CLI includes a wide variety of commands for allowing various operations on application instances.

Horizontal and Vertical Scaling

The platform supports both horizontal and vertical scaling through which you can add up Virtual Machines running instances and disk space and memory, respectively.

Software Vulnerability Management

Cloud Foundry platform releases security updates regularly to patch the latest security issues and ensure a high level of protection for your applications.

Disadvantages of Cloud Foundry

Although there are not many disadvantages for Cloud Foundry, we see some points that act as drawbacks for the platform. Let us have a look at those.

Logging Issues

The platform supports showing logs but doesn’t persist it. It becomes a significant issue for the investigation if there are any notable failures or crashes.

Lack of focus on Operational Processes

The platform doesn’t take off the loads from the operations teams as the platform focuses on developers for manual handling of the project.

Complexity of Configuration

We now know that the configuration of the platform depends on projects like BOSH and Diego. Working with them can be challenging if you have less experience.

Following of Twelve-Factor App Standards

Though Cloud Foundry claims to be a platform that supports universal frameworks and programming languages, it works best for apps that follow the twelve-factor methodology in their building.

Conclusion

By now, we have seen how cloud foundry works, its advantages along with disadvantages and many more. We see that working with Cloud Foundry is quite simple as it’s easy to use PaaS. If you have an application and want to deploy it in Foundry, import the repositories and use the desired commit to deploy the application. Lastly, you customize the quota, buildpack and route.

And, the best thing is you can deploy Foundry on top of Kubernetes. How awesome is that?

Don’t forget to sign up for our newsletter for superb articles like these delivered to you weekly!

Happy Learning!

CommunityNew

The DevOps Awareness Program

Subscribe to the newsletter

Join 100+ cloud native ethusiasts

#wearep3r

Join the community Slack

Discuss all things Kubernetes, DevOps and Cloud Native

Related articles6

Startup speed, enterprise quality

Startup speed, enterprise quality

Liebe Kunden, Partner und Kollegen,2021 ist vorbei und uns alle erwarten neue Herausforderungen und Ziele in 2022.In den letzten 3 Jahren hat sich p3r von einer One-Man-Show zu einer festen Größe im deutschen Cloud-Sektor entwickelt. Mit inzwischen 11...

Introduction to GitOps

Introduction to GitOps

GitOps serves to make the process of development and operations more developer-centric. It applies DevOps practices with Git as a single source of truth for infrastructure automation and deployment, hence the name “Git Ops.” But before getting deeper into what is...

Kaniko: How Users Can Make The Best Use of Docker

Kaniko: How Users Can Make The Best Use of Docker

Whether you love or hate containers, there are only a handful of ways to work with them properly that ensures proper application use with Docker. While there do exist a handful of solutions on the web and on the cloud to deal with all the needs that come with running...

Cilium: A Beginner’s Guide To Improve Security

Cilium: A Beginner’s Guide To Improve Security

A continuation from the previous series on eBPF and security concerns; it cannot be reiterated enough number of times how important it is for developers to ensure the safety and security of their applications. With the ever expanding reach of cloud and software...

How to clean up disk space occupied by Docker images?

How to clean up disk space occupied by Docker images?

Docker has revolutionised containers even if they weren't the first to walk the path of containerisation. The ease and agility docker provide makes it the preferred engine to explore for any beginner or enterprise looking towards containers. The one problem most of...

Parsing Packages with Porter

Parsing Packages with Porter

Porter works as a containerized tool that helps users to package the elements of any existing application or codebase along with client tools, configuration resources and deployment logic in a single bundle. This bundle can be further moved, exported, shared and distributed with just simple commands.