Understanding the concepts of PCF (Pivotal Cloud Foundry) Skip to main content

Understanding the concepts of PCF (Pivotal Cloud Foundry)


Cloud Computing

In the previous article, we have talked about Cloud Computing and why it is so popular nowadays. We have also talked about how Amazon Web Services is different from Cloud Foundry. Now let’s see how PCF is related to Cloud Foundry and why it is so popular.

 

What is PCF?

Pivotal Cloud Foundry abbreviated as PCF is a commercial cloud platform, a product built by Pivotal on top of the open source Cloud Foundry. Hence, it is Platform as a Service (PaaS) and can be deployed on any of the IaaS (Infrastructure as a Service) platforms including AWS, GCP, OpenStack, VMware vSphere and others.

PCF
 

Why go for PCF?

The advantage of using a PaaS platform is the ability for the development teams to deploy quickly the new features of the application they are working on with ease. With faster deployment, the productivity of the deployment teams will increase as now, development process will be more focused on the implementation of the features or bugs o be delivered and not worry about the steps to deploy and manage the environment.

On top of the above generic features of PaaS, PCF offers a lot of additional support. Let’s discuss few of them.

  • Deploy and Scale your application automatically: PCF provides a REST API to deploy, operate and scale applications. The PCF Command Line Interface is used by the application developers to send instructions to this API. While the application is getting uploaded onto the cloud, PCF automatically installs the runtime, the required libraries/frameworks, etc., without the intervention of any manual instructions.
  • View Application Logs: From a developer’s point of view, it is very important to track the logs of the application. It is especially beneficial to get the root cause if an error occurs in the application. PCF provides a CLI to stream and sort the log messages from the application’s instance to the developer’s terminal. Further the developer can also specify a syslog endpoint for each application where the log messages are stored persistently.
  • View Resource Utilization: PCF provides an overview of how much resources such as RAM, CPU are being used by each of the application instances at any moment of time. The team can track the time when the resources are being utilized the maximum and plan the downtime accordingly.
  • Health Management: One of the most worrisome moment of the development and DevOps team is when an application crashes due to memory failure or any other issue. PCF makes that trouble go off with its ability to restart that crashed instance automatically. Hence, none of the teams have to worry about the inconvenience the Customers have to face because of system crashes.
  • Service Marketplace: We all love to have add-ons on top of a service we are getting based on our requirements. PCF does provide such offerings wherein there are third party systems to meet some custom needs such as Data Management, DevOps Tooling, Micro-services Management and many more. This serves the requirement of the user for a particular service that they want in addition to the offerings that PCF provides.

 

PCF User Types

As we went through all the offerings that Pivotal Cloud Foundry provides, we saw that there are different types of services being provided. Now based on those services that can be used in PCF, there are three types of Users.

Operators: They are the admins of the of the Cloud infrastructure who have the highest level permission and basically manages the operations. They are also referred as Ops Managers or PAS Admins.

PAS Users: Apart from admins, PCF is also used by different types of users who have different types of operations to perform. For example, App Developers might need to know the resource utilization of the app that is being run, or it might be Managers who need to know the bill amount that has been generated the current month. For these specific roles, each users will have their own access of functionality provided by the Operators.

End Users: They are the users who uses the application that is being hosted in PCF and perform various activities on it.

 

PCF – Getting Started

Till now we have talked about the basics, now if we want to try its features, Pivotal offers a trial credit of $87 free of cost. Any user can sign up on the website and try out the features and host their own website.

Once the User signs up on Pivotal platform, they will see the following screen. To start hosting a site, click on Pivotal Web Services.

PCF Homescreen

In the next page, the User will get to see the following screen. On the left side, there are few menus. The Org is the project for which the application is to be hosted. Now for an Organization, there will be multiple projects which are managed by different teams. So here, each team can have their own space and those will be listed under Org.

PCF Main Page


Under Spaces, different environment can be setup, for example Dev, QA, Prod and others. Each space will have its own container where the applications will be hosted independently. Here I have only one space, which is by default the “development” space.

The Marketplace is another useful feature offered by PCF where third party applications are used to ease managing the applications or provide some extra information for the hosted apps. The free space that the user gets on signing up is 2GB.

Now in order to host your application in PCF, you need to install the Cloud Foundry Command Line Interface (cf CLI). The instructions for setting up in your local can be found from this page. Once it is setup properly, open command prompt and login using username and password. If authenticated, the command prompt will show the details of your current site.

PCF CLI


For my demo, I have created a sample “Hello World” program in php and want to host it. So just go to the folder through the command prompt and type “cf push <filename>”. The cf CLI will automatically detect the language and framework, and will download all the dependencies to run the program on your site.

PCF host app

Once uploaded successfully, go to your space and you will see the app running.

PCF app manager


Click on the link provided on the right side of the name and you will get to see your program running.

PCF first app

In the View App, you can check the RAM and disk utilization by the application as well as the uptime and other details. There is also a feature there called Autoscaling turned on/off by a toggle. If turned on, PCF will manage the application based on its usage. For example, if there are a lot of requests coming for the app, it will automatically increase the CPU or create more instances so that there is no site crash.


Cf CLI provides a very easy way to manage your application with just few commands. Foer example, to increase the instances of your running app, type “cf scale <app-name> -i <no of instances>”, and to increase the CPU memory just type “cf scale <app-name> -m <memory-usage>”.

PCF CLI commands

 

Conclusion:

Pivotal Cloud Foundry (PCF) is Platform as a Service that offers a great solution to lessen burden on Development as well as DevOps teams by providing easy solutions to their apps hosted with just a single click or few commands. With Marketplace, users can select various facilities being offered by third party to manage their applications efficiently. With Cloud solutions providing pay-as-you-go, users have to pay just for what they are using.


Comments

Popular posts from this blog

YouTube vs TikTok: The war we are worried about... Should we?

So we have come to an era where we are fighting for or against two different apps without much of a reason because some "social influencers" are taking on each other trying to prove why they are the best!    YouTube and TikTok YouTube and TikTok are one of the leading social media platforms where anyone can create videos, upload them on the applications and share it publicly. YouTube was created in the year 2005 and pre-installed in all the Android devices while TikTok is relatively newer application created in the year 2012. YouTube has an estimated of 2 billion users worldwide, while TikTok has an estimated 800 million users. Where this "war" of the two worlds started? The world was suffering from Corona and was concentrated over it when a YouTuber Elvish Yadav suddenly thought of bringing some new idea for his content and roasted TikTok vidoes and stated them as cringe, he further added that that these videos are very easy to make since they don't really hav...

Is it time to introduce some regulations on the OTT platforms in India?

OTT platforms have emerged as a key player in the entertainment industry and are giving tough competition to the cable operators especially, these have become the favourites among youth. But over the recent months, the OTT platforms have become the center of debate due to various scenes which have raised a question mark on the content that are being presented.   The controversy of ALTBalaji and Ekta Kapoor ALTBalaji is an Indian subscription based OTT platform which is owned by the subsidiary of Balaji Telefilms ltd whose founder is Ekta Kapoor. Now ALTBalaji among its other contents, is mostly popular for its XXX web series which is primarily an adult series and is filled with sex scenes in every episode with little or zero focus on storyline. In the recently released season of the series, the Indian Army uniform was involved in a sex scene in which it was disrespectfully torn, and this sparked controversy and nationwide protests.   The Patal Lok controversy ...

Is India immune to racism?

Over the past few days, the whole of world has been discussing over the incident that took place in US which resulted in massive outbreak of protests and even few cases of violent incidents occurred. This incident did not get unnoticed in India as well and people have been supporting this movements happening in US . But in India , is racism an unknown thing?   The incident that shook the world On May 25, 2020 a 46-year old African American man named George Floyd who reportedly died after a police officer knelt on his neck for a long time while he was lying on the street handcuffed. This incident caused a massive unrest in the US and people from all the communities came in front to support the movement; there were incidents of riots as well in few cities. After this incident, several such type of videos of racism surfaced on different social media platforms that showed that this was not just a very unique incident that occurred but one of the several incidents that are taki...