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.
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.
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.
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.
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.
Once uploaded successfully, go to your space and you will
see the app running.
Click on the link provided on the right side of the name and
you will get to see your program running.
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>”.
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
Post a Comment