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

What is Cloud Computing? | IaaS vs PaaS vs SaaS | How is Cloud Foundry different from AWS?

With high speed internet facilities cheaply available, the digital world is now accessible to almost every person. Not only large and medium scaled industries, but even the small businesses have now turned up for their own websites or e-commerce sites for selling their products to the customers directly. So demand for an agile and scalable storage is high and here comes “clouds” to the rescue.   What is Cloud Computing? Cloud Computing is the delivery of services such as storage, databases, servers, software or analytics to the customers over the internet. Imagine you want to run a website for your small website , now once the site is ready you need to host it in some server which will store the data of your site and is available for public to use. But in order to do so, you will need a server room that in turn will need space and proper maintenance which will in turn increase your cost to run your site. Now if someone tells you that he has that facility that you want and

How to pass Azure Certification Exam?

With the different businesses shifting their data from self hosting to the Cloud providers' platforms, demand for the people with Cloud skills has been high in the Job market. According to a report, t he global Cloud Computing market size is expected to grow from USD 371.4 billion in 2020 to USD 832.1 billion by 2025, at a Compound Annual Growth Rate (CAGR) of 17.5% In one of our previous blog , we discussed about various Cloud technologies and their types. Although there a lot of providers in the market who provide Cloud hosting solutions for the companies, the main global competitors are - Amazon through their offering known as AWS ( Amazon Web Services ) Microsoft through their offering known as Azure . Google through their offering known as Google Cloud . As per Canalys report as of July 2020, AWS gets about 31% of market share, Azure gets a share of 20% while Google Cloud is 6%. An interesting fact that has come up for Microsoft's Azure is, due to the Cor