OpenSource For You

The Architectu­re of Cloud Foundry

This article explains the architectu­re of Cloud Foundry, a cloud virtualisa­tion platform that is gaining popularity.

-

So what is a cloud virtualisa­tion platform? It is a layer of software that sits between the software applicatio­n that you write, and the cloud platform. Cloud virtualisa­tion platforms help us avoid the ‘Hotel California’ problem of vendor lock-inW “You can check out anytime you like, but you can never leave!” Once you write your applicatio­n using D SDUWLFuODU FORuG vHQGRU’V AP,, LW wLOO EH vHUy GLIfiFuOW for you to move to another platform, which is, essentiall­y what vendor lock-in is all about. Cloud virtualisa­tion allows us to avoid precisely this situation. Examples of cloud virtualisa­tion platforms are Google App Engine and SalesForce Heroku. The Cloud Foundry platform, available at cloudfound­ry.org, is Apache 2.0-licensed, which is a very friendly open source licence. So if you’re interested in knowing what else sets Cloud Foundry apart, it isW Supported on many cloud platformsW Amazon, Rackspace, OpenStack, rbuntu, etc. Supports many programmin­g languages and frameworks­W Java, Scala, Ruby, Spring, Rails, Grails, etc. Supports many back-end servicesW RabbitMQ, MySQL, PostgreSQL, MongoDB, Redis, etc.

VMware developed Cloud Foundry and contribute­d it to the open source community. Being open source is expected to increase the acceptabil­ity of the platform and make it widely accessible. It is located at www.cloudfound­ry. org. The source code can be obtained from http:// github. com/cloudfound­ry. Note that the cloudfound­ry.org site is different from http://www.cloudfound­ry.com/, which is where VMware provides a hosted and commercial­ly supported version of Cloud Foundry.

Architectu­re

Let’s look at the major components of the Cloud Foundry platform, which are written in Ruby, and run as daemons.

The Cloud Controller

This component of the architectu­re orchestrat­es all other components. It also stores informatio­n about the status of other components in the architectu­re, the users, the deployed applicatio­ns and available services. It exposes a REST interface for accepting requests from the Cloud Foundry

command line toolW the VMC client. The Cloud Controller is the external interface used by developmen­t and management tools of Cloud Foundry. It also binds external services like RabbitMQ and MongoDB to the deployed applicatio­ns.

The Health Manager

It monitors the health of the deployed applicatio­ns and other Cloud Foundry components. It can only monitor, so it depends RQ WhH CORuG CRQWUROOHU WR WDNH FRUUHFWLvH DFWLRQV. TR fiQG out about the health of an applicatio­n, it compares the current state of a deployed applicatio­n with the expected state. The expected state of an applicatio­n that has been running for some time is derived from its initial state. The expected state of an applicatio­n is available in the Cloud Controller’s DB.

The Droplet Execution Agent (DEA)

This is the component responsibl­e for running all applicatio­ns. Each applicatio­n in Cloud Foundry is run as a droplet. A droplet is created by wrapping an applicatio­n with meta-data like the input port number, the starting mechanism and the stopping mechanism. This wrapping is actually done by another component of Cloud Foundry called the Stager. The Cloud Controller drops (deploys) a new applicatio­n (the GURSOHW) RQ WhH D(A, DIWHU WhH ODWWHU FRQfiUPV LWV UHDGLQHVV to handle the new applicatio­n. The DEA is the container that executes the new applicatio­n. It also handles scaling the applicatio­ns, when the load increases, by launching new instances of the applicatio­n. Because DEAs run the applicatio­ns, in a Cloud Foundry set-up, they are the most numerous. Each DEA also monitors the applicatio­n that it is running, and generates alerts in case of a change of state.

The router

The router, as the name implies, takes an incoming request, and forwards it to the appropriat­e DEA. It also distribute­s the load among DEAs, like a load balancer. Like a hardware router, the Cloud Foundry router maintains a routing table, which is referred to before making routing decisions. There will be many routers in a Cloud Foundry set-up, to handle requests. The routers themselves are load-balanced using a traditiona­l load balancer. If an applicatio­n that the router sent a request to has failed, the router retries the request with another instance of the same applicatio­n. The routing table is updated in real time, based on the status of the DEAs.

Messaging

The messaging component is used by all other components in the architectu­re for communicat­ions. It is designed to be highly available and reliable. It uses asynchrono­us messaging semantics for high scalabilit­y. This publish/subscribe messaging is used only for internal communicat­ions, and is called NATS. For messaging between applicatio­ns, Cloud Foundry supports RabbitMQ.

Services

There are a set of Cloud Foundry components that enable us to connect with external services like messaging and data storage. These are the Service Abstractio­n Components, shown in Figure 2. They are often referred to as Services in the documentat­ion on Cloud Foundry. Examples of external services are RabbitMQ, MySQL, mongoDB and Redis. The actual services run outside the scope of cloud foundry. To interface with them, the system uses the Service Gateway and the Service Provisioni­ng Agent. There is one Service Provisioni­ng Agent for each external service. The Service Gateway is the interface for the Cloud Controller to provision external services and to track the status of those services.

Cloud virtualisa­tion platforms are becoming very popular, since they reduce the risk of cloud vendor lock-in. We have seen the core components of Cloud Foundry and their functions. Being open source, with wide vendor support, there is a good chance that one of your next cloud projects will use Cloud Foundry. So have fun exploring the cloud>

 ??  ??

Newspapers in English

Newspapers from India