Cloud Foundry - Ultimate Guide to PCF Interview Questions (2024)
Cloud Foundry Interview Questions
In this article, we explore the Cloud Foundry Interview Questions & Answers for Experienced or Freshers. we are trying to share experience and learning to helps you advance your career as Cloud Foundry Developer.
Cloud platform like platform as a service (PaaS) gaining lots of importance in today's world, and many reputed companies has a growing its usage day over day. At TechGeekNext, Pivotal Cloud Foundry is one of our key
focus area of our site, we provide number of technology article around Cloud Foundry.
What is the Cloud Foundry?
What do you understand by "The Cloud"?
What are types of cloud computing?
Why Cloud Foundry?
What are the components in Cloud Foundry and Cloud Foundry Architecture?
How to deploy Spring Boot + MySQL Application to Cloud Foundry (PCF)?
How to deploy Spring Boot + RabbitMQ Application to Cloud Foundry (PCF)?
What is difference between restart and restage in Cloud Foundry (PCF)?
What is stagging in Cloud Foundry?
What is droplet in Cloud Foundry?
What is Cloud Foundry log aggregator and it's architecture?
What is UAA in Cloud Foundry (PCF)?
What are the features of UAA in Cloud Foundry (PCF)?
What are the steps to deploy application in Iaas and PaaS (Cloud Foundry - PCF)
What is cloud foundry VCAP?
What is Manifests?
What is Organization, Spaces, and Domains?
What is Services?
What is CLI utility and how to use?
What are some basic command in CF?
In how many ways we can use Pivotal Cloud Foundry?
How memory allocation happens?
Can we use third party log mangers in Cloud Foundry (PCF)?
What is a Buildpack?
How Cloud Foundry different from AWS?
What is Cloud Foundry container?
Is Cloud Foundry a container?
Q: What is the Cloud Foundry?
Ans:
Cloud Foundry is an open source cloud computing platform originally developed in-house at VMware. It is a platform (PaaS) for cloud native application, it helps developer to just focus on code rather worrying about platform
they use and their configurations.
Q: What do you understand by "The Cloud"?
Ans:
- Distributed applications accessible over network.
- Resource on Demand : On-demand cloud computing allow provide resources on an "as needed" basis to client, rather than all at once. Advantages are Efficient Resources Management, Reduced Costs etc.
- Can run in-house (private cloud) as well.
- Hardware and Software sold as commodity
- Inherently Virtualized : Because of this feature, there are many benefits like Cost reduction, Clean up the environment.,Uptime increase,Faster provisioning, Easier backup.
Q: What are types of cloud computing?
Ans:
Iaas (Infrastructure as a Service)- Replacement for physical hardware
- Provides virtual hardware , OS, Network
- Amazon Web Services (AWS), RackSpace, Microsoft Azure, VMware vCloudAir
- More than a raw machine with OS
- Provides ready-made Platform for running apps
- CloudFoundry, Heroku, Google App Engine, Amazon Elastic Beanstalk
- Complete Software Application
- SaleForce.com, Google Apps etc.
Q: Why Cloud Foundry?
Ans:
- Open Source : Reduce vendor lock
- Public OR Private
- Language Independence ‐ Via Buildpacks
- Wide growing range of services
Checkout our related posts :
Q: How to deploy Spring Boot Application to Cloud Foundry (PCF)?
Ans:
Develop
and deploy Spring Boot application to Cloud Foundry (PCF).
Q: What are the components in Cloud Foundry and Cloud Foundry Architecture?
Ans:
Cloud Foundry is an open source cloud PaaS(Plateform as a Service), It can be deployed on any IaaS (Infrastructure as a Service), like OpenStack, AWS, vSphere. Below is high level cloud foundry architecture and it's major
components.
- Router: A unique route exist for each application. Cloud Foundry uses this router to map incoming request to the right application.
http://techgeeknext.cfapps.io - Blobstore: Storage for droplets and binary large files. Eliminates the need to reupload/restage when scaling application. NFS mounted storage or Amazon S3 store
- Cloud Controller Database (CCDB): Storage for application metadata.
Sore information like Application Name, No of instances, Memory limits, application Routes, Bound services ( like MYSQL,RabbitMQ)
A postgres DB instance - OAuth2 Server (UAA) and Login Server: User Authorization And Authentication (UAA), provides identity, security and authorization services.
- nsync, Cell Reps,BBS : The nsync, BBS, and Cell Rep components work together along a chain to keep apps running. At one end is the user. At the other end are the instances of applications running on widely-distributed VMs, which may crash or become unavailable.
- Auctioner: Gather states from appropriate sources of truth at decision time , run the algorithm, tell the cell that wins the auction by placing the action on BBS
- Cloud Controller and Diego Brain: Cloud Controller provide restful interface to domain object, it response to client like CLI, WEB UI, Spring STS
- Diego Cell :Diego is a self healing container system that attempts to keep the correct number of instances running in Diego cells to avoid network failures and crashes.
- Service Brokers: Provide an interface for native and external third party services. For Example, Mail Server, Messaging etc.
- Consul: Consul server keeps control data that lives longer, like component IP addresses and distributed locks, to prevent components from duplicating actions.
- BBS: Bulletin Board System (BBS), central co ordination for activities (actions) within cloud foundry.
- Loggregator: Master logging process, which accepts logs from application instances and cloud foundry components.
You can use cf log command to see the logs. It is non persistent, temporary log storage. It accumulates logs from multiple sources and aggregates by application. - Metrics Collector: The metrics collector gathers metrics and statistics from the components. Operators can use this information to monitor a Cloud Foundry deployment.
Q: How to deploy Spring Boot + MySQL Application to Cloud Foundry (PCF)?
Ans:
Develop
and deploy Spring Boot + MYSQL to Cloud Foundry (PCF).
Q: How to deploy Spring Boot + RabbitMQ Application to Cloud Foundry (PCF)?
Ans:
Develop
and deploy Spring Boot + RabbitMQ to Cloud Foundry (PCF).
Q: What is difference between restart and restage in Cloud Foundry (PCF)?
Ans:
By Restarting application, it stop your application and restarts application with the existing available compiled droplet.
By Restaging application, it stop your application and restages application by compiling new droplet and start the application.
So if you have made any changes in code, in that case use restage to re-compile your code else use restart to restart the application.
Q: What is stagging in Cloud Foundry?
Ans:
An archive within Cloud Foundry which contains the application-ready to run on Diego. A droplet is the result of the application staging process.
Q: What is droplet in Cloud Foundry?
Ans: Droplet is the execution unit of the Cloud Foundry. The result is a droplet once an application has been pushed to Cloud Foundry using a buildpack. Therefore, a droplet on top of the request is nothing but an abstraction that contains information such as metadata.Q: What is Cloud Foundry log aggregator and it's architecture?
Ans:
Cloud Foundry log aggregator collects logging output from application instances, cloud foundry components. And aggregates into consolidated log.
Logging Server : Process is called Doppler.
Loggregator= Metrics agents + Logging Servers + Traffic Controllers
Components:
- Metron Agent: Receive both logs and metrics
- Doppler Server: Accumulates data from agents
- Traffic Controllers: Allow access to metrics and logs
Q: How to configure 3rd party log management (Papertrailapp) to Cloud Foundry (PCF)?
Ans:
Example to Integrate 3rd Party Log Management Service with Cloud Foundry (PCF).
Q: What is UAA in Cloud Foundry (PCF)?
Ans:
User Account and Authentication (UAA) is an open source identity server in Cloud Foundry. UAA provides identity-based security for both applications and APIs. Cloud Foundry provide open standards for authentication and authorization including following:
- OAuth
- OpenID Connect
- System for Cross-domain Identity Management (SCIM)
- Lightweight Directory Access Protocol (LDAP)
- Security Assertion Markup Language (SAML)
Q: What are the features of UAA in Cloud Foundry (PCF)?
Ans:
Below are the main features of UAA
- Token exchange for SAML , JWT bearers, support for JWT
- Token revocation
- Authentication, authorization, and configuration management fro Rest Api's
- Token exchange for SAML and JWT bearers
- Logging, Auditing, and monitoring
- Flexibility of the server, including support for MySQL and Postgres
Q: What are the steps to deploy application in Iaas and PaaS (Cloud Foundry - PCF)
Ans:
IAAS |
PAAS |
-Configure Firewall -Configure Service Connectivity -Configure SSL Termination -Configure Load Balancer -Deploy Application -Install Application Runtime -Provision a VM
|
cf push <app name> |
Q: What is cloud foundry VCAP?
Ans:
VCAP is a Cloud Foundry Environment Variable, it provides the way by which the Cloud Foundry runtime communicates with deployed application about its environment. We can view environment variables by using
cf env app-name
command. It displays VCAP_APPLICATION
and VCAP_SERVICES
environment
variable provided in Cloud Foundry container.
C:\techgeeknext>cf env techgeeknext-springBootRabbitMq
Getting env variables for app techgeeknext-springBootRabbitMq in org techgeeknext-org / space development as techgeeknext@gmail.com...
OK
System-Provided:
{
"VCAP_SERVICES": {
"cleardb": [
{
"binding_name": null,
"credentials": {
"hostname": "us-cdbr-iron-east-05.cleardb.net",
"jdbcUrl": "jdbc:mysql://us-cdbr-iron-east-05.cleardb.net/ad_b6922dd73cbe0c3?user=bbf5e1768b2060\u0026password=fea97f6d",
"name": "ad_b6922dd73cbe0c3",
"password": "fea97f6d",
"port": "3306",
"uri": "mysql://bbf5e1768b2060:fea97f6d@us-cdbr-iron-east-05.cleardb.net:3306/ad_b6922dd73cbe0c3?reconnect=true",
"username": "bbf5e1768b2060"
},
"instance_name": "techgeeknext-mysqldb",
"label": "cleardb",
"name": "techgeeknext-mysqldb",
"plan": "spark",
"provider": null,
"syslog_drain_url": null,
"tags": [
"Data Stores",
"Cloud Databases",
"Developer Tools",
"Web-based",
"Data Store",
"Online Backup \u0026 Storage",
"Development and Test Tools",
"Single Sign-On",
"Buyable",
"relational",
"mysql",
"Cloud Security and Monitoring"
],
"volume_mounts": []
}
],
Q: What is Manifests?
Ans:
-A deployment blueprint for an application-Repeatable :redeploy using same manifest
Example:
--- applications: - name : teckgeeknextPrj memory : 64M instances : 3 domain :cfapps.io
Q: What is Organization, Spaces, and Domains?
Ans:
Organization : Designed for use by any organization, typically a company, department, or a large project nameAll organization will have default domain as cfapps.io
Spaces : Organization will have multiple spaces.
Default space is development; users can create their own spaces like Testing, Production etc.
Can Create New Space as given below
Created Production Space.
Domains : Every application is associated with a URL, which redirects to an application
It have default domain as cfapps.io
Can create own custom domain
Subdomain : Each application has a unique sub-domain
Example- http://techgeeknext.cfapps.io
Q: What is Services?
Ans:
Any type of add-on can be provisioned alongside your app-database,mail,messaging etc
-services are usually bound to one or more applications
-connection information are put in environment variable called VCAP_SERVICES
Q: What is CLI utility and how to use?
Ans:
It is called cf. To use the cli, install cli from cloud foundry as given below.
Click on Tools
Install cli and cloud foundry instance using login command.
Q: What are some basic command in CF?
Ans:
Version :
cf -- version
Help :
cf help
cf login - a api.run.pivotal.io
Push an application:
cf push app_name
View Organization:
cf orgs OR cf org
Space:
cf spaces
Create Spaces :
cf create-space -o
Stop application:
cf stop
Start application:
cf start
Restart application:
cf restart
View Logs:
cf logs
Q: In how many ways we can use Pivotal Cloud Foundry?
Ans:
There are various ways to connect to Cloud Foundry.
- Command Line Interface (CLI)
- Web based application management
- Eclipse/STS plugin
Q: How memory allocation happens?
Ans:
-512 is default memory would get allocate.-Can configure/extend as per project application or production needs
Q: Can we use third party log mangers in Cloud Foundry (PCF)?
Ans:
Yes, Cloud Foundry provides provision to use third party managers like Splunk, Logstash, Logenteries, Papertrail etc.
Q: What is a Buildpack?
Ans:
Allow cloud foundry to support multiple language and deployment environments.-Buildpacks for Java, Ruby, Javascript etc
-Buildpacks for Tomcat, Rails, Node.JS
Q: How Cloud Foundry different from AWS?
Ans:
Cloud Foundry is PaaS. Cloud Foundry is open source platform build by Pivotal. Pivotal Cloud Foundry can be deployed on OpenStack, VMware,AWS etc.. Where as AWS is IaaS
Q: What is Cloud Foundry container?
Ans:
A container is a standard software unit that packages code and all its dependencies, so that the program runs from one software environment to another quickly and reliably. Pivotal Cloud Foundry (PCF) is a multi-cloud platform for container, management, deployment and continuous delivery platform.
Cloud Foundry supports both the developer-built container and the platform-built container. Cloud Foundry allows companies to reap container benefits, support cloud architectures, and continue building a DevOps culture.
Q: Is Cloud Foundry a container?
Ans:
Kubernetes is a Container Runtime, where as Cloud Foundry is an Application Runtime.