{"id":45998,"date":"2014-09-01T18:55:46","date_gmt":"2014-09-01T15:55:46","guid":{"rendered":"https:\/\/www.altoros.com\/blog\/?p=45998"},"modified":"2021-12-14T00:56:32","modified_gmt":"2021-12-13T21:56:32","slug":"building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example","status":"publish","type":"post","link":"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/","title":{"rendered":"Building a Custom BOSH CPI for the Cloud Foundry PaaS: A GCE Example"},"content":{"rendered":"<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2014\/09\/building-a-custom-cpi-for-cloud-foundry-using-bosh.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2014\/09\/building-a-custom-cpi-for-cloud-foundry-using-bosh.png\" alt=\"\" width=\"180\" class=\"alignright size-full wp-image-46009\" \/><\/a><\/p>\n<p>Portability and cross-platform compatibility are the fundamental principles and key advantages of the Cloud Foundry PaaS.\u00a0Despite that, its architecture supported a limited number of cloud platforms until now: OpenStack, AWS, vSphere, vCloud, and Warden. However, thanks to the efforts of the community some new names have been added to the list of available IaaS vendors. At the end of May 2014, Pivotal <a href=\"https:\/\/tanzu.vmware.com\/blog\" target=\"_blank\" rel=\"noopener noreferrer\">released<\/a> its <a href=\"https:\/\/github.com\/cf-platform-eng\/bosh-google-cpi\/tree\/google-cpi\" target=\"_blank\" rel=\"noopener noreferrer\">Google Compute Engine CF-BOSH CPI<\/a>. Developers\u00a0are currently discussing ways to create a <a href=\"https:\/\/groups.google.com\/a\/cloudfoundry.org\/forum\/#!topic\/bosh-dev\/Kh1XMshWCYY\" target=\"_blank\" rel=\"noopener noreferrer\">CPI for Microsoft Azure<\/a> in the BOSH Developers Google <a href=\"https:\/\/groups.google.com\/a\/cloudfoundry.org\/forum\/#!msg\/bosh-dev\/Kh1XMshWCYY\/JZORpjoedVIJ\" target=\"_blank\" rel=\"noopener noreferrer\">group<\/a>. Finally, the BOSH team have released an experimental version of the <a href=\"https:\/\/groups.google.com\/a\/cloudfoundry.org\/forum\/#!searchin\/bosh-dev\/bosh-dev$20Working$20external$20CPI$20experiment\/bosh-dev\/8CkDk20aDU4\/u4vsALaELHIJ\" target=\"_blank\" rel=\"noopener noreferrer\">external CPI<\/a> that can serve as a new way for creating CPIs.<\/p>\n<p>In this post, we will share our experience of developing a custom CPI for Cloud Foundry using the standard CPI mechanism. You will also learn about the issues we have encountered and get some tips on how to address them.<\/p>\n<p>&nbsp;<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_79_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/#Teaching_Cloud_Foundry_to_work_with_a_new_IaaS\" >Teaching Cloud Foundry to work with a new IaaS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/#Creating_a_custom_CPI_for_Google_Compute_Engine\" >Creating a custom CPI for Google Compute Engine<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/#Updating_BOSH\" >Updating BOSH<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/#Binding_BOSH_and_a_CPI\" >Binding BOSH and a CPI<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/#Conclusions\" >Conclusions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/#Further_reading\" >Further reading<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Teaching_Cloud_Foundry_to_work_with_a_new_IaaS\"><\/span>Teaching Cloud Foundry to work with a new IaaS<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Although Cloud Foundry itself can be deployed on almost any cloud infrastructure (with custom tools), BOSH\u2014the official tool for installing this PaaS\u2014has a limited range of supported solutions. It interacts with different IaaS platforms through BOSH Cloud Provider Interface (<a href=\"https:\/\/docs.cloudfoundry.org\/bosh\/bosh-components.html#cpi\" target=\"_blank\" rel=\"noopener noreferrer\">CPI<\/a>), which is a set of common methods that allow for working with a specific cloud. These methods help to create and remove images, start and stop VMs, set up networks, and perform other cloud management tasks. So, since BOSH did not support GCE out of the box, we were to improve BOSH and create a CPI for this infrastructure.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Creating_a_custom_CPI_for_Google_Compute_Engine\"><\/span>Creating a custom CPI for Google Compute Engine<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Since BOSH did not have a CPI for GCE, it had to be created from scratch. To do that, we used <a href=\"http:\/\/fog.io\/\" target=\"_blank\" rel=\"noopener noreferrer\">fog<\/a>, a Ruby-based tool that makes it possible to work with a cloud API. This Ruby Gem provides a simple DSL that allows for working with a variety of cloud providers. The fog library is used to map the XML\/JSON responses from an IaaS provider into objects. That is one of the reasons why it is used inside BOSH, for instance, in OpenStack CPI, the BOSH Registry, and Director components. So, we decided that fog would be a good choice for creating a GCE CPI.<\/p>\n<p>&nbsp;<br \/>\n<b>Version compatibility issues<\/b><\/p>\n<p>While we were researching into this issue, Google released a new version of Google Compute Engine API. At that point, fog was still using v1.beta16. To make fog compatible with MicroBOSH, we introduced a number of changes and shared the updates with the community. These covered support for GCE v1, working with Google storage, and fixing tests. Here is the list of all the commits:<\/p>\n<ul>\n<li style=\"margin-bottom: 6px;\">Fixed tests for the Google Cloud module of fog\u2014<a href=\"https:\/\/github.com\/fog\/fog\/pull\/2508\" target=\"_blank\" rel=\"noopener noreferrer\">#2508<\/a><\/li>\n<li style=\"margin-bottom: 6px;\">Fixes that improve the operation of Google Cloud Storage\u2014<a href=\"https:\/\/github.com\/fog\/fog\/pull\/2994\" target=\"_blank\" rel=\"noopener noreferrer\">#2994<\/a><\/li>\n<li style=\"margin-bottom: 6px;\">Fixes that add a possibility to create public buckets in Google Cloud Storage\u2014<a href=\"https:\/\/github.com\/fog\/fog\/pull\/2555\" target=\"_blank\" rel=\"noopener noreferrer\">#2555<\/a>, <a href=\"https:\/\/github.com\/fog\/fog\/pull\/2554\" target=\"_blank\" rel=\"noopener noreferrer\">#2554<\/a>, and <a href=\"https:\/\/github.com\/fog\/fog\/pull\/2556\" target=\"_blank\" rel=\"noopener noreferrer\">#2556<\/a><\/li>\n<li style=\"margin-bottom: 6px;\">Refactoring\u2014<a href=\"https:\/\/github.com\/fog\/fog\/pull\/2496\" target=\"_blank\" rel=\"noopener noreferrer\">#2496<\/a>, <a href=\"https:\/\/github.com\/fog\/fog\/pull\/3000\" target=\"_blank\" rel=\"noopener noreferrer\">#3000<\/a>, and <a href=\"https:\/\/github.com\/fog\/fog\/pull\/2995\" target=\"_blank\" rel=\"noopener noreferrer\">#2995<\/a><\/li>\n<\/ul>\n<p>In addition to these improvements, we patched fog inside <a href=\"https:\/\/github.com\/Altoros\/bosh\/tree\/google-cpi-microbosh\/bosh_google_cpi\/lib\/fog\" target=\"_blank\" rel=\"noopener noreferrer\">our GitHub repo<\/a>. This enabled us to provide support for GCE API v1 and the required version of fog inside BOSH.<\/p>\n<p>&nbsp;<br \/>\n<b>Architectural issues<\/b><\/p>\n<p>Incompatibility of product versions was not the only issue we were to deal with. Almost all requests to the GCE API are asynchronous and return operation objects (there are three types of objects: <a href=\"https:\/\/cloud.google.com\/compute\/docs\/reference\/rest\/v1\/regionOperations\" target=\"_blank\" rel=\"noopener noreferrer\">GlobalOperation<\/a>, RegionalOperation, and ZoneOperation). This allows for building asynchronous functions. However, at that moment, fog did not support asynchronous operations, which was discussed in fog PR <a href=\"https:\/\/github.com\/fog\/fog\/pull\/2501\" target=\"_blank\" rel=\"noopener noreferrer\">#2501<\/a>. This issue has been partially fixed now, but it still remains relevant for functions that create sources.<\/p>\n<p>Another issue was caused by the way the fog library maps responses from IaaS providers. It converts responses into fields of an object. The process is actually simple and straightforward. However, the format of fields fetched from GCE does not always coincide with the required format for managing resources. For instance, when you fetch disk information, zone details are represented as a zone <a href=\"https:\/\/cloud.google.com\/compute\/docs\/reference\/latest\/disks#resource\" target=\"_blank\" rel=\"noopener noreferrer\">name<\/a>, while you need it to be displayed as an URL to perform any actions on this disk.<\/p>\n<p>To eliminate the drawbacks described above, we pulled a change request (<a href=\"https:\/\/github.com\/fog\/fog\/pull\/2501\" target=\"_blank\" rel=\"noopener noreferrer\">#2501<\/a>), but these updates have not been accepted yet.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Updating_BOSH\"><\/span>Updating BOSH<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The built-in components of BOSH use fog v1.14.0 (the current stable version is 1.22.1), which is still <a href=\"https:\/\/github.com\/cloudfoundry\/bosh\/issues\/530\" target=\"_blank\" rel=\"noopener noreferrer\">an issue<\/a> for many developers. To update the version of fog and add the required functionality, we decided to create an extension to fog v1.14 using a monkey patch.<\/p>\n<p>Since BOSH was initially designed to work with AWS and Openstack, it reflects architectures of these two cloud platforms. In particular, it uses three types of disks: system, ephemeral, and persistent. This approach to data storage had been used since the first BOSH releases to reduce the cost of deployment. However, this variety of disks causes some issues. For example, when an instance is terminated and then started again, an ephemeral disk will be recreated from scratch, and BOSH will not find the necessary disks. This <a href=\"https:\/\/github.com\/cloudfoundry\/bosh\/commit\/097e0d33cae5701a960d021e1f545305e8139e76\" target=\"_blank\" rel=\"noopener noreferrer\">bug has been fixed<\/a> in the latest version of BOSH. If an instance flavour does not have an ephemeral disk, all data is dumped to the persistent storage. However, the <a href=\"https:\/\/grokbase.com\/t\/cloudfoundry.org\/bosh-users\/13b310chjq\/bosh-backup-and-disaster-recovery-community-guide\" target=\"_blank\" rel=\"noopener noreferrer\">error<\/a> is still relevant for AWS deployments.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Binding_BOSH_and_a_CPI\"><\/span>Binding BOSH and a CPI<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p dir=\"ltr\">So, we have created a CPI and updated fog, but it was not the end of the story. Now, we had to add the new CPI to BOSH. To do this, you need to make adjustments inside the BOSH components, for instance, the <a href=\"https:\/\/github.com\/cloudfoundry\/bosh\/tree\/master\/bosh_agent\/lib\/bosh_agent\/infrastructure\" target=\"_blank\" rel=\"noopener noreferrer\">BOSH Agent<\/a>, the release creator, components used for building stemcells, and in other parts of the solution. You will also have to <a href=\"https:\/\/github.com\/cloudfoundry\/bosh\/tree\/master\/bosh_cli_plugin_micro\/lib\/bosh\/deployer\/infrastructure_defaults\" target=\"_blank\" rel=\"noopener noreferrer\">change MicroBOSH defaults<\/a> and <a href=\"https:\/\/github.com\/cloudfoundry\/bosh\/tree\/master\/bosh_cli_plugin_micro\/lib\/bosh\/deployer\/instance_manager\" target=\"_blank\" rel=\"noopener noreferrer\">managers<\/a>. Many of these components use a simple \u201cwhen..case\u201d syntax for choosing a CPI. Since even an easy factory method pattern would fit this case better, this makes it challenging to provide support for new cloud platforms in BOSH. Work on fixing these drawbacks is underway, read more about adding external CPIs in <a href=\"https:\/\/www.pivotaltracker.com\/n\/projects\/956238\/epics\/927164\/expand\" target=\"_blank\" rel=\"noopener noreferrer\">this project<\/a> and <a href=\"https:\/\/www.pivotaltracker.com\/story\/show\/60722750\" target=\"_blank\" rel=\"noopener noreferrer\">this issue<\/a> in Pivotal Tracker. Fortunately, an experimental CPI that uses an external CPI was <a href=\"https:\/\/groups.google.com\/a\/cloudfoundry.org\/forum\/#!searchin\/bosh-dev\/bosh-dev$20Working$20external$20CPI$20experiment\/bosh-dev\/8CkDk20aDU4\/u4vsALaELHIJ\" target=\"_blank\" rel=\"noopener noreferrer\">released<\/a> recently.<\/p>\n<p>Although, a lot has been done to simplify adding new CPIs, BOSH supports only several architectures, such as OpenStack, AWS, vSphere, vCloud, and Warden. You may still find it difficult to add <a href=\"https:\/\/groups.google.com\/a\/cloudfoundry.org\/forum\/#!searchin\/bosh-dev\/bug$20workarounds$20in$20a$20CPI\/bosh-dev\/Hd4CCvGjoIk\/9dOLfi__CUoJ\" target=\"_blank\" rel=\"noopener noreferrer\">other platforms<\/a> that are based on different architectural principles. However, given the active community supporting the project, it should become possible and easy in the future.<\/p>\n<p>&nbsp;<br \/>\n<b>Creating custom stemcells<\/b><\/p>\n<p>To work with a certain cloud platform, BOSH requires a stemcell (image) created specifically for it. One of the\u00a0<a href=\"https:\/\/cloud.google.com\/compute\/docs\/images#stronglyrecommended\" target=\"_blank\" rel=\"noopener noreferrer\">requirements<\/a> for this stemcell and the GCE archive containing it is that they should be created with the sparse option. It means that files with \u201choles\u201d (areas that have never been written to) should be interpreted as zeros and stored in an\u00a0<a href=\"http:\/\/www.gnu.org\/software\/tar\/manual\/html_node\/sparse.html\" target=\"_blank\" rel=\"noopener noreferrer\">archive<\/a>. For instance, an AWS image of 1.2 GB will occupy 10 GB if it is not archived. Compared to the standard procedure for creating\u00a0<a href=\"https:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/php-hadrupal-tutorial.html\" target=\"_blank\" rel=\"noopener noreferrer\">an Amazon Machine Image<\/a>, this method takes more time.<\/p>\n<p>Tools for building stemcells require special skills and knowledge about images in the IaaS you have selected. You may need to log into your AWS account to use it with Vagrant (true for default settings). At the same time, there are some nice and modern solutions, such as <a href=\"https:\/\/www.packer.io\/\" target=\"_blank\" rel=\"noopener noreferrer\">Packer<\/a>, that automate creation of machine images (currently used inside BOSH Lite). Normally, it takes several hours to build a stemcell.<\/p>\n<p>MicroBOSH has its own stemcell with a compiled blob store that has everything you need to run BOSH inside a particular virtual machine. Because of that, you need to rebuild the MicroBOSH stemcell every time you make changes to BOSH release components. It can take quite some time, if you want to modify a BOSH release and test these changes by deploying it with MicroBOSH. This complicates and adds time to the process of stemcell debugging and CPI development.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Conclusions\"><\/span>Conclusions<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>When we had reached this point, Pivotal <a href=\"https:\/\/tanzu.vmware.com\/blog\" target=\"_blank\" rel=\"noopener noreferrer\">released<\/a> its <a href=\"https:\/\/github.com\/cf-platform-eng\/bosh-google-cpi\/tree\/google-cpi\" target=\"_blank\" rel=\"noopener noreferrer\">Google Compute Engine CF-BOSH CPI<\/a>. It uses the updated fog v1.22.0 that eliminates most of the issues we had to overcome at the beginning of this project. So, we were moving in the same direction, and our commits to fog helped Pivotal to deliver their update faster. In addition, we detected some issues that can be fixed and improved in the upcoming Cloud Foundry releases. We will keep on contributing to fog and other open-source solutions around Cloud Foundry.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Further_reading\"><\/span>Further reading<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/how-to-add-bosh-support-to-a-custom-cloud-part-1-bosh-components\/\">How to Add BOSH Support to a Custom Cloud (Part 1): BOSH Components<\/a><\/li>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/how-to-add-bosh-support-to-a-custom-cloud-part-2-external-bosh-cpis\/\">How to Add BOSH Support to a Custom Cloud (Part 2): External BOSH CPIs<\/a><\/li>\n<li><a href=\"https:\/\/www.altoros.com\/visuals\/bosh-cli-cheat-sheet\/\">BOSH CLI Cheat Sheet<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<\/p>\n<p>Portability and cross-platform compatibility are the fundamental principles and key advantages of the Cloud Foundry PaaS.\u00a0Despite that, its architecture supported a limited number of cloud platforms until now: OpenStack, AWS, vSphere, vCloud, and Warden. However, thanks to the efforts of the community some new names have been added to the [&#8230;]<\/p>\n","protected":false},"author":35,"featured_media":46010,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":"","_links_to":"","_links_to_target":""},"categories":[214],"tags":[873,206],"class_list":["post-45998","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-cloud-native","tag-oss-cloud-foundry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Building a Custom BOSH CPI for the Cloud Foundry PaaS: A GCE Example | Altoros<\/title>\n<meta name=\"description\" content=\"Learn about version compatibility and architectural issues, how to address them, how to bind BOSH and a CPI, create custom stemcells, etc.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Building a Custom BOSH CPI for the Cloud Foundry PaaS: A GCE Example | Altoros\" \/>\n<meta property=\"og:description\" content=\"Portability and cross-platform compatibility are the fundamental principles and key advantages of the Cloud Foundry PaaS.\u00a0Despite that, its architecture supported a limited number of cloud platforms until now: OpenStack, AWS, vSphere, vCloud, and Warden. However, thanks to the efforts of the community some new names have been added to the [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Altoros\" \/>\n<meta property=\"article:published_time\" content=\"2014-09-01T15:55:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-13T21:56:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2014\/09\/building-a-custom-BOSH-CPI-for-the-cloud-foundry-paas-google-cloud-engine-example.png\" \/>\n\t<meta property=\"og:image:width\" content=\"640\" \/>\n\t<meta property=\"og:image:height\" content=\"360\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Alexander Lomov\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alexander Lomov\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/\",\"url\":\"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/\",\"name\":\"Building a Custom BOSH CPI for the Cloud Foundry PaaS: A GCE Example | Altoros\",\"isPartOf\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2014\/09\/building-a-custom-BOSH-CPI-for-the-cloud-foundry-paas-google-cloud-engine-example.png\",\"datePublished\":\"2014-09-01T15:55:46+00:00\",\"dateModified\":\"2021-12-13T21:56:32+00:00\",\"author\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/32bad30d8a66fbba345c09f5ce9503a6\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/#primaryimage\",\"url\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2014\/09\/building-a-custom-BOSH-CPI-for-the-cloud-foundry-paas-google-cloud-engine-example.png\",\"contentUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2014\/09\/building-a-custom-BOSH-CPI-for-the-cloud-foundry-paas-google-cloud-engine-example.png\",\"width\":640,\"height\":360},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.altoros.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Building a Custom BOSH CPI for the Cloud Foundry PaaS: A GCE Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#website\",\"url\":\"https:\/\/www.altoros.com\/blog\/\",\"name\":\"Altoros\",\"description\":\"Insight\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.altoros.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/32bad30d8a66fbba345c09f5ce9503a6\",\"name\":\"Alexander Lomov\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/12\/Alexander-Lomov-150x150.jpg\",\"contentUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/12\/Alexander-Lomov-150x150.jpg\",\"caption\":\"Alexander Lomov\"},\"description\":\"Alexander Lomov is a Cloud Foundry Engineer at Altoros. With extensive experience in Ruby, Go, and Python, he was involved in development of BOSH CPIs and other Cloud Foundry-related projects for Canonical, IBM, and other companies. Alexander is a frequent speaker at various events\/meetups, mostly sharing his experience with Cloud Foundry. You may also know him as the author of several blog posts about Cloud Foundry internals.\",\"sameAs\":[\"http:\/\/altoros.com\"],\"url\":\"https:\/\/www.altoros.com\/blog\/author\/alexander-lomov\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Building a Custom BOSH CPI for the Cloud Foundry PaaS: A GCE Example | Altoros","description":"Learn about version compatibility and architectural issues, how to address them, how to bind BOSH and a CPI, create custom stemcells, etc.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/","og_locale":"en_US","og_type":"article","og_title":"Building a Custom BOSH CPI for the Cloud Foundry PaaS: A GCE Example | Altoros","og_description":"Portability and cross-platform compatibility are the fundamental principles and key advantages of the Cloud Foundry PaaS.\u00a0Despite that, its architecture supported a limited number of cloud platforms until now: OpenStack, AWS, vSphere, vCloud, and Warden. However, thanks to the efforts of the community some new names have been added to the [...]","og_url":"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/","og_site_name":"Altoros","article_published_time":"2014-09-01T15:55:46+00:00","article_modified_time":"2021-12-13T21:56:32+00:00","og_image":[{"width":640,"height":360,"url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2014\/09\/building-a-custom-BOSH-CPI-for-the-cloud-foundry-paas-google-cloud-engine-example.png","type":"image\/png"}],"author":"Alexander Lomov","twitter_misc":{"Written by":"Alexander Lomov","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/","url":"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/","name":"Building a Custom BOSH CPI for the Cloud Foundry PaaS: A GCE Example | Altoros","isPartOf":{"@id":"https:\/\/www.altoros.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/#primaryimage"},"image":{"@id":"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2014\/09\/building-a-custom-BOSH-CPI-for-the-cloud-foundry-paas-google-cloud-engine-example.png","datePublished":"2014-09-01T15:55:46+00:00","dateModified":"2021-12-13T21:56:32+00:00","author":{"@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/32bad30d8a66fbba345c09f5ce9503a6"},"breadcrumb":{"@id":"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/#primaryimage","url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2014\/09\/building-a-custom-BOSH-CPI-for-the-cloud-foundry-paas-google-cloud-engine-example.png","contentUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2014\/09\/building-a-custom-BOSH-CPI-for-the-cloud-foundry-paas-google-cloud-engine-example.png","width":640,"height":360},{"@type":"BreadcrumbList","@id":"https:\/\/www.altoros.com\/blog\/building-a-custom-bosh-cpi-for-the-cloud-foundry-paas-a-gce-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.altoros.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Building a Custom BOSH CPI for the Cloud Foundry PaaS: A GCE Example"}]},{"@type":"WebSite","@id":"https:\/\/www.altoros.com\/blog\/#website","url":"https:\/\/www.altoros.com\/blog\/","name":"Altoros","description":"Insight","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.altoros.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/32bad30d8a66fbba345c09f5ce9503a6","name":"Alexander Lomov","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/12\/Alexander-Lomov-150x150.jpg","contentUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/12\/Alexander-Lomov-150x150.jpg","caption":"Alexander Lomov"},"description":"Alexander Lomov is a Cloud Foundry Engineer at Altoros. With extensive experience in Ruby, Go, and Python, he was involved in development of BOSH CPIs and other Cloud Foundry-related projects for Canonical, IBM, and other companies. Alexander is a frequent speaker at various events\/meetups, mostly sharing his experience with Cloud Foundry. You may also know him as the author of several blog posts about Cloud Foundry internals.","sameAs":["http:\/\/altoros.com"],"url":"https:\/\/www.altoros.com\/blog\/author\/alexander-lomov\/"}]}},"_links":{"self":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/45998","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/users\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/comments?post=45998"}],"version-history":[{"count":12,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/45998\/revisions"}],"predecessor-version":[{"id":65430,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/45998\/revisions\/65430"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/media\/46010"}],"wp:attachment":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/media?parent=45998"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/categories?post=45998"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/tags?post=45998"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}