Posts

Showing posts with the label cloud foundry

Learning Cloud Foundry - NATS

All Cloud Foundry components communicates with each other using NATS publish-subscribe mechanism. Lets see in detail what is NATS like. Cloud Foundry Router as NATS client During startup of Cloud Foundry Router ( router.rb ), there is a call to start NATS client below : NATS . start ( :uri => config [ 'mbus' ] ) It means that NATS client will be started with the uri parameter obtained from configuration parameter 'mbus'.  config_path = ENV [ "CLOUD_FOUNDRY_CONFIG_PATH" ] || File . join ( File . dirname ( __FILE__ ), '../config' ) config_file = File . join ( config_path , 'router.yml' ) ... opts . on ( "-c" , "--config [ARG]" , "Configuration File" ) do | opt |      config_file = opt    end ... We find that the configuration parameter will be read from a YAML (yet Another Markup Language) that whose location could came from multiple sources, in these order : specified fro...

Learning Cloud Foundry Router

Background The Cloud Foundry PaaS platform serves web applications. The Cloud Foundry router components is different from a router in the plain IT-talk, the Cloud Foundry router is a Ruby-based software component that determines which backend droplet that should serve (each and every) http request that are requested to one of the applications deployed on the platform. Starting Point In order to understand the mechanism of the router, we start from nginx, the http server that serves as the primary gatekeeper. Nginx configuration is my primary concern. So lets see the vcap source code that describes nginx configuration on each and every Cloud Foundry server. In the vcap/dev_setup/cookbooks/nginx folder we found a templates directory that stores nginx configuration templates.  The templates I suppose being used by the dev_setup installation procedure. Configuration templates We have cc-nginx.conf.erb Ruby template along with router-nginx.conf.erb template and some o...

Learning Cloud Foundry PHP staging and deployment

Image
Background VMWare Cloud Foudry is an open source Platform for PaaS (platform as a service). I see cloud foundry as a tool to simplify multiple application deployment in multiple servers. This post will describe things I found by reading source code of vcap (Vmware Cloud Application Platform) at github here and here . My point of interest is php deployment capability that exists on vcap, which are contributed by phpfog developers. My previous exploration of Cloud Foundry resulted in this picture below, which describe  my current understanding of the Cloud Foundry platform. Starting point The starting point of php support is given an interesting commit I had seen before, where phpfog team implements php functionality. At first it took me about 10 minutes browsing the vcap network graph (https://github.com/cloudfoundry/vcap/network), then I just realized there is a distinct phpfog branch in the vcap git..  The interesting commit is titled 'Support for deployi...