<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ravi Jagannathan on Medium]]></title>
        <description><![CDATA[Stories by Ravi Jagannathan on Medium]]></description>
        <link>https://medium.com/@ravijagannathan?source=rss-366cc11e3265------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*umDxGGgOUJrSXP81.</url>
            <title>Stories by Ravi Jagannathan on Medium</title>
            <link>https://medium.com/@ravijagannathan?source=rss-366cc11e3265------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 11:25:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ravijagannathan/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Wordpress and Mysql on TKG+]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@ravijagannathan/wordpress-and-mysql-on-tkg-d168bff69e89?source=rss-366cc11e3265------2"><img src="https://cdn-images-1.medium.com/max/2392/1*VM9zC8w2cRHGbTxtyOIjZg.png" width="2392"></a></p><p class="medium-feed-snippet">on VSphere 7.0 using CNI Storage / Metal LB / Kustomize</p><p class="medium-feed-link"><a href="https://medium.com/@ravijagannathan/wordpress-and-mysql-on-tkg-d168bff69e89?source=rss-366cc11e3265------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@ravijagannathan/wordpress-and-mysql-on-tkg-d168bff69e89?source=rss-366cc11e3265------2</link>
            <guid isPermaLink="false">https://medium.com/p/d168bff69e89</guid>
            <category><![CDATA[tkg]]></category>
            <category><![CDATA[tanzu]]></category>
            <category><![CDATA[wordpress]]></category>
            <category><![CDATA[vsphere-7]]></category>
            <category><![CDATA[tanzu-kubernetes-grid]]></category>
            <dc:creator><![CDATA[Ravi Jagannathan]]></dc:creator>
            <pubDate>Wed, 19 Aug 2020 11:50:03 GMT</pubDate>
            <atom:updated>2020-08-19T12:00:05.869Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Backup and DR in K8]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@ravijagannathan/backup-and-dr-in-k8-f7e3f0fd2946?source=rss-366cc11e3265------2"><img src="https://cdn-images-1.medium.com/max/2414/1*OLivNffDVLtNmno1wYkamA.png" width="2414"></a></p><p class="medium-feed-snippet">Velero</p><p class="medium-feed-link"><a href="https://medium.com/@ravijagannathan/backup-and-dr-in-k8-f7e3f0fd2946?source=rss-366cc11e3265------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@ravijagannathan/backup-and-dr-in-k8-f7e3f0fd2946?source=rss-366cc11e3265------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7e3f0fd2946</guid>
            <category><![CDATA[velero]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[backup]]></category>
            <category><![CDATA[disaster-recovery]]></category>
            <category><![CDATA[redis]]></category>
            <dc:creator><![CDATA[Ravi Jagannathan]]></dc:creator>
            <pubDate>Tue, 05 May 2020 17:42:32 GMT</pubDate>
            <atom:updated>2020-05-19T12:51:16.105Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Minio on PKS access from DotnetCore]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@ravijagannathan/minio-on-pks-access-from-dotnetcore-d1d957860345?source=rss-366cc11e3265------2"><img src="https://cdn-images-1.medium.com/max/698/1*j1gS8D8J9oZB4udkCAcv7Q.png" width="698"></a></p><p class="medium-feed-snippet">How to refactor for File writer / reader / uploader to a Microservice on your platform.</p><p class="medium-feed-link"><a href="https://medium.com/@ravijagannathan/minio-on-pks-access-from-dotnetcore-d1d957860345?source=rss-366cc11e3265------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@ravijagannathan/minio-on-pks-access-from-dotnetcore-d1d957860345?source=rss-366cc11e3265------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1d957860345</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[minio]]></category>
            <category><![CDATA[pk]]></category>
            <category><![CDATA[pivotal-container-service]]></category>
            <category><![CDATA[dotnet-core]]></category>
            <dc:creator><![CDATA[Ravi Jagannathan]]></dc:creator>
            <pubDate>Sun, 21 Jul 2019 22:54:28 GMT</pubDate>
            <atom:updated>2019-07-22T00:38:27.388Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Ambassador Api Gateway on PKS]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@ravijagannathan/ambassador-api-gateway-on-pks-299c9abb2c28?source=rss-366cc11e3265------2"><img src="https://cdn-images-1.medium.com/max/2000/1*asrKGmrvaGN2GujM89jm6w.png" width="2000"></a></p><p class="medium-feed-snippet">Simple steps to microservice</p><p class="medium-feed-link"><a href="https://medium.com/@ravijagannathan/ambassador-api-gateway-on-pks-299c9abb2c28?source=rss-366cc11e3265------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@ravijagannathan/ambassador-api-gateway-on-pks-299c9abb2c28?source=rss-366cc11e3265------2</link>
            <guid isPermaLink="false">https://medium.com/p/299c9abb2c28</guid>
            <category><![CDATA[pk]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[istio]]></category>
            <category><![CDATA[ambassador]]></category>
            <category><![CDATA[gateway]]></category>
            <dc:creator><![CDATA[Ravi Jagannathan]]></dc:creator>
            <pubDate>Tue, 23 Apr 2019 14:11:51 GMT</pubDate>
            <atom:updated>2019-04-24T14:01:12.826Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Hello DotNetCore onPKS]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@ravijagannathan/hello-dotnetcore-onpks-67d8bd3e8d11?source=rss-366cc11e3265------2"><img src="https://cdn-images-1.medium.com/max/2000/1*asrKGmrvaGN2GujM89jm6w.png" width="2000"></a></p><p class="medium-feed-snippet">Simple steps on the Pivotal Kubernetes platform</p><p class="medium-feed-link"><a href="https://medium.com/@ravijagannathan/hello-dotnetcore-onpks-67d8bd3e8d11?source=rss-366cc11e3265------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@ravijagannathan/hello-dotnetcore-onpks-67d8bd3e8d11?source=rss-366cc11e3265------2</link>
            <guid isPermaLink="false">https://medium.com/p/67d8bd3e8d11</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[pivotal]]></category>
            <category><![CDATA[pk]]></category>
            <category><![CDATA[dotnet-core]]></category>
            <dc:creator><![CDATA[Ravi Jagannathan]]></dc:creator>
            <pubDate>Mon, 01 Apr 2019 11:55:28 GMT</pubDate>
            <atom:updated>2019-04-01T15:43:18.294Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[NVDS in NSX-T]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@ravijagannathan/nvds-in-nsx-t-20e4080ff564?source=rss-366cc11e3265------2"><img src="https://cdn-images-1.medium.com/max/836/1*f9Xx9lOkALQIHebwms59xg.png" width="836"></a></p><p class="medium-feed-snippet">Why its important.</p><p class="medium-feed-link"><a href="https://medium.com/@ravijagannathan/nvds-in-nsx-t-20e4080ff564?source=rss-366cc11e3265------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@ravijagannathan/nvds-in-nsx-t-20e4080ff564?source=rss-366cc11e3265------2</link>
            <guid isPermaLink="false">https://medium.com/p/20e4080ff564</guid>
            <category><![CDATA[nvd]]></category>
            <category><![CDATA[geneve]]></category>
            <category><![CDATA[nsx-t]]></category>
            <category><![CDATA[vds]]></category>
            <category><![CDATA[pk]]></category>
            <dc:creator><![CDATA[Ravi Jagannathan]]></dc:creator>
            <pubDate>Fri, 29 Mar 2019 13:15:19 GMT</pubDate>
            <atom:updated>2019-03-30T07:25:41.263Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Console DotnetCore app on Cloud Foundry]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@ravijagannathan/console-dotnetcore-app-on-cloud-foundry-ba828513bddf?source=rss-366cc11e3265------2"><img src="https://cdn-images-1.medium.com/max/600/1*gcyjat7c_PU-392Jzz1y9A.gif" width="600"></a></p><p class="medium-feed-snippet">What is a Console app ?</p><p class="medium-feed-link"><a href="https://medium.com/@ravijagannathan/console-dotnetcore-app-on-cloud-foundry-ba828513bddf?source=rss-366cc11e3265------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@ravijagannathan/console-dotnetcore-app-on-cloud-foundry-ba828513bddf?source=rss-366cc11e3265------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba828513bddf</guid>
            <category><![CDATA[console-app]]></category>
            <category><![CDATA[cloud-foundry]]></category>
            <category><![CDATA[pcf]]></category>
            <category><![CDATA[windows-services]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Ravi Jagannathan]]></dc:creator>
            <pubDate>Mon, 06 Aug 2018 08:34:03 GMT</pubDate>
            <atom:updated>2019-07-12T15:44:55.805Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[DotNet and Config Server on Cloud Foundry]]></title>
            <link>https://medium.com/@ravijagannathan/dotnet-and-config-server-pattern-on-cloud-foundry-ae5cc918ca6d?source=rss-366cc11e3265------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae5cc918ca6d</guid>
            <category><![CDATA[steeltoe]]></category>
            <category><![CDATA[spring-cloud-services]]></category>
            <category><![CDATA[cloud-foundry]]></category>
            <category><![CDATA[pivotal-cloud-foundry]]></category>
            <category><![CDATA[dotnet]]></category>
            <dc:creator><![CDATA[Ravi Jagannathan]]></dc:creator>
            <pubDate>Tue, 14 Mar 2017 02:53:55 GMT</pubDate>
            <atom:updated>2017-03-14T16:42:11.996Z</atom:updated>
            <content:encoded><![CDATA[<p>When discussing Microservices, we come across numerous references which talk about <a href="http://microservices.io/patterns/externalized-configuration.html">externalizing configuration</a>.</p><p>From the MSDN articles, we can see that externalizing configuration in cloud-based applications is an important pattern.</p><blockquote>Managing changes to local configurations across multiple running instances of an application, especially in a cloud-hosted scenario, is a challenging proposition.</blockquote><blockquote>Store the configuration information externally and provide an interface that can be used to quickly and efficiently read and update configuration settings… .</blockquote><p><em>Read more </em><a href="https://msdn.microsoft.com/en-us/library/dn589803.aspx"><em>here</em></a></p><pre><strong><em>Externalizing configuration is important for Distributed systems and is an important pattern to implement when moving towards microservices architecture from monolithic ones.</em></strong></pre><p>So how can I implement this pattern in DotNet?</p><p>Enter <strong>.. SteelToe.io</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ForhpRx-1zpS1aNpGUlN-g.png" /><figcaption>from Steeltoe.io</figcaption></figure><blockquote><strong><em>By leveraging SteelToe.io libraries, we can use Spring Cloud Config Service from DotNet inside Cloud Foundry.</em></strong></blockquote><p><strong>SteelToe</strong></p><ul><li>Includes .NET client library<strong> </strong>for connecting into Spring Cloud Config Server on Cloud Foundry (CF)</li><li>Allows to share configuration across all your apps/microservices inside and outside DotNet</li></ul><p>So SteelToe reuses the goodness of SpringCloud and brings it to the DotNet world. It’s a great set of tools for building Microservices like apps leveraging the productivity of Cloud Foundry.</p><p>Let’s take a look at an example of a <strong>SteelToe Config solution </strong>written<strong> </strong>in DotNet and hosted on Cloud Foundry.</p><p><strong>What we need</strong>:</p><ul><li>Cloud foundry installation with Diego Windows enabled</li><li>Ability to create SpringCloud Configurati0n service within our Org/Space.</li><li>Ability to build/publish <a href="https://github.com/SteeltoeOSS/Samples">Steeltoe</a> Dotnet solution</li><li>Visual Studio 2015</li><li>Command line CF cli installed from <a href="https://github.com/cloudfoundry/cli#downloads">here</a></li></ul><p><em>Another option, if you cannot build/publish this code, is to clone this </em><a href="https://github.com/reagul/DotNet-SpringConfigServer-Sample"><em>repo</em></a><em> and simply </em><em>cf push from command line to view the app on your Space inside CF.</em></p><p><strong>First</strong> Login to CF with this:</p><pre>$ cf login -a api.[my-cloudfoundry].com<br>API endpoint: https://api.[my-cloudfoundry].com<br><br>Email&gt; [my-email]<br><br>Password&gt; [my-password]<br>Authenticating...<br>OK</pre><p>Our end solution will run like this …</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OUNEccaUb9Wz7JyRwotxJw.png" /><figcaption>Final solution</figcaption></figure><p>The green box is the Cloud Foundry platform environment within which we have our FOO app running along with Config server, provisioned from the marketplace. Our FOO app is bound to the config server and binding happens once we push the app from the command line using “cf push”. Before binding, the backing service has to be provisioned, in our case this is “Spring Config Server “.</p><p><em>How did we bind our FOO app to the Config service? See the manifest section below…</em></p><p>The GIT repo is accessible to this CF instance. It contains the configuration key-value which the config server will expose to our FOO app. App B and App C are other apps which can similarly access the config once they are bound to the config server within the platform.</p><p><strong>Summary of steps from 3000 ft</strong> :</p><ul><li><em>Fork </em><a href="https://github.com/reagul/config-repo"><em>Git Repo</em></a><em> to host key-value configuration. {Fork not clone}</em></li><li><em>Provision Spring Cloud Config Service on CF from marketplace</em></li><li><em>Push our app {</em><strong><em>FOO</em></strong><em>} and bind with Config service</em></li><li><em>Check working prototype</em></li></ul><p><strong>Next Fork</strong> the <a href="https://github.com/reagul/config-repo">Git repo</a> to your github.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3ryijro6etSLOyO38QdjwA.png" /></figure><p><strong>Clone</strong> Steeltoe project in local dir on your laptop.</p><pre>git clone <a href="https://github.com/SteeltoeOSS/Samples.git">https://github.com/SteeltoeOSS/Samples.git</a></pre><p>Let’s <strong>create</strong> Spring Config server from the marketplace.</p><p>I have Spring Cloud Services available in my CF environment as this image shows. Your <strong>CF admin</strong> will have to enable the Spring Cloud Services bits in CF for you {the developer} so you can access it via marketplace.</p><p>In my space, there are other products installed and available in the marketplace like <em>{</em><a href="https://docs.pivotal.io/p-mysql/1-8/index.html"><em>p-mysql </em></a><em>/ </em><a href="https://docs.pivotal.io/redis/1-7/index.html"><em>p-redis</em></a><em> / </em><a href="https://docs.pivotal.io/rabbitmq-cf/1-7/index.html"><em>p-rabbitmq</em></a><em> / </em><a href="http://docs.pivotal.io/spring-cloud-services/1-3/common/index.html"><em>p-service-registry</em></a><em>}.</em></p><p>Check if it is available by typing cf marketplace</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PK1sG2lLhQYizrvfUeHHSg.png" /></figure><p>We will create a “p-config-server” instance from the marketplace. We will call this instance “<em>myConfigServer</em>”. We will bind to this config server from our FOO app.</p><p>Open the Steeltoe “Configuration” code in VisualStudio.</p><p><em>Cd </em>into <strong>Steeltoe/samples/Configuration</strong> and open the Configuration solution. It opens up the subprojects in VStudio like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f4j_tcMzs-vJem7Thhbmlg.png" /></figure><p>Select SimpleCloudFoundry project and <strong>right click</strong> — select “Set as startup project”.</p><p><strong>Select</strong> the file “config-server.json” and <strong>change it to point to your forked config repo</strong> <em>{from step 1 of 3000 ft view}</em> in the uri section. I have it pointing to my fork.</p><p><em>We are pointing the p-config-server instance to our forked config git repo by editing the config-server.json, so we can experiment easily and edit yml files.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bIHC0w3C4NNJ2VoiMkNJwg.png" /><figcaption>click to view larger</figcaption></figure><p>Edit and Save it.</p><p>From the command line, type</p><p><em>“cf create-service p-config-server standard myConfigServer -c ./config-server.json”</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AsrD6sUpTcQPEqV8jwJ5mw.png" /></figure><p>It reads “ create a service” of type “p-config-server”. Name it “myConfigServer” and this new service should fetch config keys from the uri mentioned in “config-server.json”.</p><p>Once its on its way, we get a “create in progress” message. The services are provisioned Asyncronously. Give it like a minute to finish.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Le50ZBF4_BzYRcA0Bznr9w.png" /><figcaption>click to view larger</figcaption></figure><p>Once it’s finished, we can check the provisioned service in our Org/Space. Our Org is called “DCS-Dev” and Space is “code”. It shows 2 services that are provisioned in my space { mysql and myConfigServer }. <a href="https://medium.com/@ravijagannathan/dotnet-and-mysql-on-cloud-foundry-platform-4ed210324013#.k8txcyns8">I mention using the mysql service in another post.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UlYzPhu_0RiCfGXzHOoJFA.png" /><figcaption>Services provisioned in my org/space</figcaption></figure><p><strong>Up until</strong> now we have “myConfigServer” provisioned.</p><p><strong>Next</strong> let us build/publish the “SimpleCloudFoundry” solution to a local file system, from where we will be able to push the app named FOO to CF.</p><p>In <strong>VStudio 2015</strong>, I select the Project, right click, select “publish” and choose custom and give it a name. I named this “local”. <br>{You can name it anything.}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CeX8jhMZ5nPUSJTOZODVVg.png" /></figure><p>On next, choose the Filesystem and select a clean <strong>empty directory</strong>, where your binary will get published. The idea is to “CF push” this binary from command line and not let VStudio deploy .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bWWM1Zms6kSIY9N86llHQg.png" /></figure><p>On clicking Publish, you can see the console output in VStudio.</p><p>Cd into this newly published directory. You can see the manifest.yml file.</p><p><strong>CF Manifest</strong> : lists the input parameters to cf cli.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OmiJZHmXEy2JWTAFmj-0bQ.png" /></figure><p>This shows the name of the app: Foo, and the <strong>services section </strong>that it will bind to “myConfigServer”.</p><p>When we specify the services to bind to via the manifest, the CF cli will create the app and bind those services for us.</p><pre>---<br>applications:<br>- name: foo<br>  memory: 1G  <br>  stack: windows2012R2  <br>  env:<br>  services:<br>   - myConfigServer</pre><p>So now we are ready to cf push this FOO app to CF.</p><p>From inside the publish folder, type $ cf push</p><p>We will get scrolling output and the app “FOO” will start with OK status.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*otsQCFC50HeH5vIwC1Laog.png" /></figure><p>You can see the app running like this... notice the “urls” output in command line, which gives us the url to app. Open it in browser..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wy3LCky5WGUY2VGljD0yPA.png" /></figure><p>Success… but let us validate more… .</p><p>Let us inspect our code in VStudio to understand what is happening.</p><p>I am highlighting the HomeController.cs. Right up top, you see the <strong>glue</strong>..<strong>Steeltoe.Extensions.Configuration.CloudFoundry;</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RDb1-WAZ2rgp9te698YgPQ.png" /><figcaption>Open “Simple Cloud Foundry” project in VStudio</figcaption></figure><p>Once we click in the menu item on our FOO app — called “Config Server Settings”-we get this page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yr-yJc8H7SVgseXN-zs1dA.png" /></figure><p>These are the values our app controller is reading from config keys with help from Spring cloud configuration services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ulh1FrszBZ1YiM8uU0M6tQ.png" /></figure><p>Before building code, I went ahead and added a new key in Git config repo under {foo-development.properties} called “gitname”.</p><p>To read it in the “Config Server Data” tab in the FOO app, I modified the controller section to fetch a value from config called “gitname”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VQAt2ye4nwezWOcUmVCgCw.png" /><figcaption>click to view larger</figcaption></figure><p>We see it being displayed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qfG3XrkFfebRLwCpgWtmHw.png" /></figure><p><em>So what happens if the “FOO” instance crashes ? Will the configs get lost??</em></p><p><em>Answer : Another FOO instance will be spun up automagically by CF platform and once this instance comes online, it will start reading config from the Spring Cloud Server. Externalizing the config this way, makes the solution resilient to failure.</em></p><p>Looking at the dll’s shipped as part of the publish dir, we see Steeltoe.Extensions.*.dll, Pivotal.Extensions.*.dll , and SimpleCloudFoundry4.dll which do the heavy lifting behind the scenes. They allow the DotNet FOO app to connect to Spring Config service inside CF and fetch the value for given key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NeybU8gVLZ_PcNi2Zj5KnA.png" /></figure><p>To conclude, <a href="http://steeltoe.io/">Steeltoe</a> brings the power of resilient, scalable microservices to .NET developers. Combine this with power of Cloud Foundry Platform which brings app resiliency and developer productivity a great choice for DotNet ecosystem.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae5cc918ca6d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DotNet and Mysql on Cloud Foundry Platform]]></title>
            <link>https://medium.com/@ravijagannathan/dotnet-and-mysql-on-cloud-foundry-platform-4ed210324013?source=rss-366cc11e3265------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ed210324013</guid>
            <category><![CDATA[cloud-foundry]]></category>
            <category><![CDATA[dotnet-core]]></category>
            <category><![CDATA[bind]]></category>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[dotnet]]></category>
            <dc:creator><![CDATA[Ravi Jagannathan]]></dc:creator>
            <pubDate>Sun, 26 Feb 2017 16:57:57 GMT</pubDate>
            <atom:updated>2017-03-01T15:26:15.806Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article we will push a basic DotNet app onto Cloud Foundry (CF) and bind it to a Mysql service. We will take a look at how the platform makes it easy to create and deploy apps faster with backing services {mysql here}.</p><p>So this is a <strong>DotNet classic</strong> codebase.. different than DotNet core.</p><p>For how they are different..<a href="http://Comparison with .NET Framework"> read this</a> and look at the section <em>Comparison with .NET Framework.</em></p><p><strong>First</strong>, you will need a Cloud Foundry developer account which will allow’s you to <strong>provision a Mysql service</strong>.</p><p>Your instance of CF should have a Windows Diego cell where this app will get deployed.</p><p><strong>Next</strong>, clone this repo <a href="https://github.com/reagul/DotNetMysqlPCFStarter">https://github.com/reagul/DotNetMysqlPCFStarter</a></p><p>You will also need <strong><em>cloud foundry cli</em></strong> on you machine. Get it <a href="https://github.com/cloudfoundry/cli#downloads">here</a>.</p><p>Let’s login to our account with CF cli like this. Replace [ ] with your URL.</p><pre>$ cf login -a api.[my-cloudfoundry].com<br>API endpoint: https://api.[my-cloudfoundry].com<br><br>Email&gt; [my-email]<br><br>Password&gt; [my-password]<br>Authenticating...<br>OK<br></pre><p>Once logged into your CF account via CF cli, cd into the cloned repo</p><pre>cd DotNetMysqlPCFStarter</pre><p>The app has everything you need to use Mysql db service in the cloud, and all we are doing now is to inspect and understand how it uses it once it gets deployed to CF.</p><p>Let us look at the manifest file for this app. Manifest is a way to organize parameters needed by CF cli when pushing your code to CF.</p><pre>---<br>applications:<br>- name: env<br>  host: env-${random-word}<br>  memory: 512m<br>  stack: windows2012R2<br>  buildpack: binary_buildpack</pre><p>The name of the app is env and the host is env-{some random word}. The memory is set to 512 m and the stack is windows2012. We are using binary buildpack. The host param will define the url where it can be accessed.</p><p>Cd into ViewEnvironment and type</p><pre>cf push</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jGBTlcVmJFJkzN5ilTYkhQ.png" /></figure><p>CF cli takes your app bits and pushes it to CF. Once it is completely pushed, PCF attempts to start the app. Along the way it creates a URL for the app which you can access on your browser.</p><p>Once the app starts in CF, you can access it’s URL and will see something similar to screen grab below. This sample app is reading the environment information accessible to it, and displaying it on home page. The important pieces are current .Net version, bound services { blank for now }, Instance Id { GUID }and instance index { 0 }. If we had scaled it to 2 instance, it would be display index { 0, 1}. So instances index start at 0. Once we bind Mysql service to it, it will start reading it and display more info in the bound services line.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WMN1aRjr1lItAHsvhYNPYQ.png" /></figure><p><em>Wait, what does kill btn do</em>… if you press the red btn here, it will kill this instance and PCF will bring it up again automatically. This is resiliency the PCF platform provides out of the box to your app.</p><p>So far so good.. lets bind mysql service to it.</p><p>From the marketplace, select Mysql and select the 100mb plan and enter some name and select the app we pushed to PCF named “env” in Bind to app drop down.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mKycu7UPIA1Vpf_OX7Zzow.png" /><figcaption>Bind Mysql to app</figcaption></figure><p>Once we bind mysql, lets <strong><em>re-stage</em></strong> our app from cli. This will make the app recognize new environment vars coming from the mysql service its bound to.</p><pre>cf restage env</pre><p>Lets refresh the browser and you will see new details. I went ahead and pressed the Add Attendee and it inserted a record into our new Mysql db that we bound to this app. It displays the dummy record here for us to look at with the Environment vars detail. So at this point it is connected to our mysql backend service and able to insert into and read it back.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cgzLXqeLGPZnzVoYTYRX3Q.png" /></figure><p>So what does the C# code that detects our bound mysql Db look like.. look at CurrentEnvironment.cs . It detects if it finds “p-mysql” in its env vars and then sets the connection strings accordingly { server, port , uid }.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fRzSd0J_m95qBEWxYvhHUA.png" /></figure><p>Our app depends on driver dll’s which are defined in the packages.config with this line .</p><p><em>id=”MySql.Data” version=”6.9.8&quot; targetFramework=”net45&quot;</em></p><p>So if you clicked “Add Attendees” button again, it will add the same record into DB and fetch it back. Not really functional but gives you enough idea on how records are inserted into our backing service and read back.</p><p>As a developer, you are used to waiting for provisioning web server, databases and other backing services, almost like watching paint dry, while your code is ready but not tested yet. While you are waiting for deployment, you cannot test your app and know it work’s as intended especially with a large codebase which means lots of risk to take on by the Dev teams.</p><p>Cloud foundry platform frees developer’s to focus on writing code and allows them to iterate on it, while providing necessary services within the platform. So a developer can push code in small increments and test it almost immediately. This also has the intended effect of pushing iterations faster into test phase, so the QA and Dev teams are almost working in tandem.</p><p>For the developer, Cloud Foundry is a Door to productivity. The platform abstracts a lot of details, like logging, security, metrics, resiliency, elastic capacity, and all developer’s have to do is to write and push code, bind into backing services and keep refining their code base.</p><p>The same way we used mysql, we could have used Redis, Gemfire and many other services all available through the marketplace.</p><p>As a developer you are not waiting for resources anymore and are fee to iterate on code faster. <strong>The platform opens up developer agility.</strong></p><p>You can also integrate into custom services that you have created and offer it inside the marketplace for others to consume. Thus you can build on reusable services and modular code almost from get-go.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ed210324013" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Install Cloud Foundry on Bosh Lite]]></title>
            <link>https://medium.com/@ravijagannathan/install-cloud-foundry-on-bosh-lite-6d3b9a1e416a?source=rss-366cc11e3265------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d3b9a1e416a</guid>
            <category><![CDATA[cloud-found]]></category>
            <category><![CDATA[open-source-cloud-foundry]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[bosh-lite]]></category>
            <dc:creator><![CDATA[Ravi Jagannathan]]></dc:creator>
            <pubDate>Fri, 30 Dec 2016 12:52:31 GMT</pubDate>
            <atom:updated>2020-09-25T13:12:05.698Z</atom:updated>
            <content:encoded><![CDATA[<p>Here are the steps I followed to do a fresh install of Cloud Foundry OSS on Bosh Lite using Vagrant. It takes ~ 45 mins to install, depending on your internet speed.</p><p>Once CF is installed locally, we will push a Spring Boot app called “spring-music” which will be our test of the install. Make sure you have ~4gb RAM / 10gb free on your laptop.</p><p><strong>What is Cloud Foundry </strong>(CF)? <br><strong>Cloud Foundry</strong> is an open source <strong>cloud</strong> platform as a service (PaaS) on which developers can build, deploy, run and scale applications on public and private <strong>cloud </strong>models like Vmware / Google Cloud / AWS / Azure and Openstack . Pivotal has a <a href="https://pivotal.io/platform/pcf-tutorials/getting-started-with-pivotal-cloud-foundry">excellent tutorial </a>here for starters. Also check out the resources below for free courses by the community. Pivotal is one of the major contributors to the Cloud Foundry open source codebase.</p><p><strong>What is Bosh-Lite? <br></strong>Bosh Lite<strong> </strong>allows you to s<em>imulate a cloud in a single VM. </em>It is a vagrant box with BOSH director installed to enable the creation of VMs needed to run CF using containers. <strong>BOSH</strong> is an open source tool for release engineering, deployment, lifecycle management and monitoring of distributed systems (chef on steroids). Take a look for more info about <a href="https://bosh.io/docs/">Bosh at Bosh.io.</a> <strong>BOSH Lite</strong> is a pre-built Vagrant box which includes the Director. It uses containers to emulate VMs which makes it an excellent choice for general BOSH exploration without investing time and resources to configure an IaaS.</p><p><strong><em>So … Cloud Foundry runs on BOSH… yup!</em></strong></p><p><strong>Prepare the Environment: </strong>(command-line)<strong> </strong>You will need some familiarity on the command-line to accomplish these tasks.</p><p>Install latest Bosh Client gem install bosh_cli --no-ri --no-rdoc</p><p>Check the version of Bosh bosh -v — it should show something like<br> BOSH 1.3262.24.0.</p><p>Install <a href="http://$ vagrant --version Vagrant 1.7.4">Vagrant</a> depending on your OS. Check the Version. $ vagrant --version</p><p>Clone this repo git clone <a href="https://github.com/cloudfoundry/bosh-lite">https://github.com/cloudfoundry/bosh-lite</a>.</p><p>Change into this cloned Bosh-lite directory cd bosh-lite</p><p>Bring up the Vagrant Bosh-lite machine vagrant up --provider=virtualbox</p><p>It will take a minute for the Vagrant box to come up. Once it does, target the Bosh Director using the Bosh client installed recently. Use “admin” for user id and password when prompted. In my case it did not prompt me, so I had to type “bosh login” to get to that.</p><pre>$ bosh target 192.168.50.4 lite<br>Target set to `Bosh Lite Director&#39;<br>Your username: admin<br>Enter password: *****<br>Logged in as `admin&#39;</pre><p>Once Bosh target is successful, set the route by running bin/addroute (without which you will not be able to push apps). I overlooked this step initially and spent many hours debugging . You are still inside the Bosh-lite directory when running this step.</p><pre>$ bin/add-route</pre><p>Install bundler gem install bundler</p><p>Install Spiff by downloading the binary from here <a href="https://github.com/cloudfoundry-incubator/spiff/releases">https://github.com/cloudfoundry-incubator/spiff/releases</a></p><p><strong>Finally</strong> install cloud foundry client from <a href="https://github.com/cloudfoundry/cli">this git repo</a></p><p><strong>Cloud Foundry Install </strong>: Up until now, we have gotten the Vagrant box up and running with Bosh-Lite. Bosh is needed for us to install Cloud Foundry. This is the same consistent model, be it single a VM install or a large scale setup over Cloud providers like Azure/Google cloud.</p><p>Clone the cf-release git repo</p><pre>$ git clone https://github.com/cloudfoundry/cf-release.git</pre><p>Change into this cloned directory</p><pre>cd cf-release</pre><p>Run the update script and give it ~ 10 mins to run. It will download dependent repos. <em>Take a tea break</em>.</p><pre> ./scripts/update</pre><p>Use the command to create a <strong>deployment</strong> <strong>manifest. </strong>We are creating a manifest suitable for bosh-lite installation.</p><pre>./scripts/generate-bosh-lite-dev-manifest</pre><p><strong>Set</strong> this as the deployment. The yml file has all the necessary instructions to tell Bosh what is needed to be built. In the end this will result in multiple components which will run CF. YML is a markup just like xml, and is getting popular.</p><pre>bosh deployment bosh-lite/deployments/cf.yml</pre><p>In this file “cf.yml” you will find the entry that shows the Bosh-Lite target set to “<em>director_uuid: 28539132–6d43–4e1b-bf40-f2ce032ee9f8”.</em></p><p>You can further check the UUID of the director by running “bosh status” like this. Note the Deployment manifest line.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6N42EnxwYmgYr8mDtQfgTQ.png" /></figure><p>So at this point the manifest is generated and ready. Let’s create the release.</p><p><strong>Create CF Release</strong> : Type this in the same cf-release root directory</p><pre>$ bosh create release</pre><p>This will now take a while. Give it ~10 mins to run. It will start downloading into the release and packages folder (under cf-release) many git sources. After all dependencies are met you will see the following message.</p><p><em>Started release has been created &gt;cf/237. Done (00:00:00)</em></p><p>Here you will be prompted to save it under a name. Choose the default “cf”. I chose a different name and that did not work so I had to re-do this step.</p><p>Naming your release something other than the default cf will render it incompatible with the release names in the manifests generated for BOSH-Lite. So I had to deleteconfig/dev.yml file that was generated in the cf-release directory, and ran bosh create releaseagain, and go with the default cf name for the release.</p><p>Now we are ready to upload this release to the Bosh director.</p><p><strong>What’s a Release ?</strong> It basically contains the binaries/packages to install various components for CF to run.</p><p>But let’s review what we have up to this point. We have a Manifest (cf.yml) and a CF Release. Both are in our local directory on laptop/desktop. We will need to upload the Releases and Stemcell to the Bosh director. The upload step makes these files/binaries usable artifacts by the director.</p><p><strong>What’s a Stemcell ?</strong> Stemcell contains a bare minimum OS skeleton with a few common utilities pre-installed, like a BOSH Agent and a few configuration files to securely configure the OS. This is the image for the VM which will contain the CF installation components. In our case we have chosen the “bosh warden bosh-lite stemcell “ from the git repo.</p><p><strong>In essence, these are the 3 things needed to install anything on linux. Manifest specifies the order, inputs etc, Release is the package specification and Stemcell is the base o/s which the release will be installed on.</strong> This becomes a deployment in terms of Bosh.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GcTG-7W8Bcm_1SuI8JxbhA.png" /></figure><p>Let’s upload the stemcell to Bosh director first. We can provide Bosh with a url of the stemcell or provide a local copy. Here we use a url — it’s easy since we don’t need to clog more space on our laptop.</p><pre>$ bosh upload stemcell <a href="https://bosh.io/d/stemcells/bosh-warden-boshlite-ubuntu-trusty-go_agent%5C?v%5C=3312.12">https://bosh.io/d/stemcells/bosh-warden-boshlite-ubuntu-trusty-go_agent\?v\=3312.12</a></pre><p>Lets upload the release to the Bosh director ( will run for ~10 mins ) from inside the cf-release directory.</p><pre>$ bosh upload release</pre><pre>Started creating new packages capi_utils/4e26b58dd32963c9db7ff975b607bce98a06c5b4. Done (00:00:02)<br>  Started creating new packages cc_uploader/7ce56335391332ea2096bbcb8b3ed8c0e53cbac1. Done (00:00:05)<br>  Started creating new packages cli/0f19a1df7ef777208cc3bfcdc875b2b56613ab40. Done (00:00:05)<br>  Started creating new packages cloud_controller_ng/f87cb49aa2cd87792cb9c2211a79e1542502be4d. Done (00:00:03)<br>  Started creating new packages collector/9f8dfbcbcfffb124820327ad2ad4fee35e51d236. Done (00:00:00)<br>  Started creating new packages common/953ccbc1b39fc972d2b4903beb16af7daf78cc85. Done (00:00:01)<br>  Started creating new packages confab/2256cb5bc15bea04aa36c1bd9cf6d4698038262d. Done (00:00:00)<br>  Started creating new packages consul/14b83378b30a2b55a25e641e835af3e5c87a0d41. Done (00:00:00)<br>  Started creating new packages &gt;consul-common/ffab9ae7bea8a053aacca8816681e241b0fab30b. Done (00:00:01)<br>  Started creating new packages dea_logging_agent/d6e574fb9c49b29158713c6ce986e91e615daf31. Done (00:00:06)</pre><p>We can verify that Bosh director has all the info needed ( Stemcell + Release ) before we kick off the CF install with the “deploy” command.</p><p><strong>Before we ask Bosh to Deploy, it will need the Manifest, Stemcell and Release all ready.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uz-XHyg95ax6hRDpYlP7hQ.png" /><figcaption>Bosh Stemcell info</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*dzJCF1Fu6E-wUxIrYYqq5Q.png" /><figcaption>Bosh Release info</figcaption></figure><pre>$ bosh deploy</pre><pre>....</pre><pre>Please review all changes carefully<br><br>Deploying<br>---------<br>Are you sure you want to deploy? (type &#39;yes&#39; to continue): yes<br><br>Director task3<br>  Started preparing deployment &gt;Preparing deployment. Done (00:00:01)</pre><p>Bosh deploy will prompt you to accept the deployment and start the compilation and creating of Vm’s. Give it ~ 10 mins.</p><pre>...Task 3done</pre><pre>Started 2016–10–23 19:19:28 UTC<br>Finished 2016–10–23 19:28:56 UTC<br>Duration00:09:28</pre><pre>Deployed ‘cf-warden’ to ‘Bosh Lite Director’</pre><p>Success message.. !! we have a CF deployed on our Vagrant box. We can check what VM’s were created by typing “bosh vms” .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BWDIb1t3pm4CUS0hzRhVpw.png" /></figure><p>Lets check the installed CF endpoint’s with dig.. it should show up as <strong>10.244.0.34</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s5MdJWheFmB9ztEMiTd3-Q.png" /><figcaption>dig command output</figcaption></figure><p>If you try to telnet test this machine, it should connect like this</p><p>telnet 10.244.0.34 443 ↵<br>Trying 10.244.0.34…<br>Connected to 10.244.0.34.<br>Escape character is ‘^]’.</p><p>Telnet is often used to see if a machine is responding to a agreed on port. Lets curl the HTTP endpoint for testing if it comes up Ok ..This is the target for our Cf Cli.</p><pre>$ curl -vvv -k -L <a href="https://api.bosh-lite.com/v2/info">https://api.bosh-lite.com/v2/info</a>                                                                 1 ↵<br>*   Trying 10.244.0.34...<br>* Connected to api.bosh-lite.com (10.244.0.34) port 443 (#0)<br>* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256<br>* Server certificate: *.bosh-lite.com<br>&gt; GET /v2/info HTTP/1.1<br>&gt; Host: api.bosh-lite.com<br>&gt; User-Agent: curl/7.49.1<br>&gt; Accept: */*<br>&gt;<br>&lt; HTTP/1.1 200 OK<br>&lt; Content-Length: 555<br>&lt; Content-Type: application/json;charset=utf-8<br>&lt; Date: Thu, 29 Dec 2016 23:05:54 GMT<br>&lt; Server: nginx<br>&lt; X-Content-Type-Options: nosniff<br>&lt; X-Vcap-Request-Id: aa8919f8-8927-4e2e-527c-4c6bb2d27e0c<br>&lt; X-Vcap-Request-Id: aa8919f8-8927-4e2e-527c-4c6bb2d27e0c::205cc628-6aa0-4e8a-a737-e9f6aeff3683<br>&lt;<br>* Connection #0 to host api.bosh-lite.com left intact<br>{&quot;name&quot;:&quot;&quot;,&quot;build&quot;:&quot;&quot;,&quot;support&quot;:&quot;<a href="http://support.cloudfoundry.com/">http://support.cloudfoundry.com</a>&quot;,&quot;version&quot;:0,&quot;description&quot;:&quot;&quot;,&quot;authorization_endpoint&quot;:&quot;<a href="https://login.bosh-lite.com/">https://login.bosh-lite.com</a>&quot;,&quot;token_endpoint&quot;:&quot;<a href="https://uaa.bosh-lite.com/">https://uaa.bosh-lite.com</a>&quot;,&quot;min_cli_version&quot;:null,&quot;min_recommended_cli_version&quot;:null,&quot;api_version&quot;:&quot;2.68.0&quot;,&quot;app_ssh_endpoint&quot;:&quot;ssh.bosh-lite.com:2222&quot;,&quot;app_ssh_host_key_fingerprint&quot;:&quot;a6:d1:08:0b:b0:cb:9b:5f:c4:ba:44:2a:97:26:19:8a&quot;,&quot;app_ssh_oauth_client&quot;:&quot;ssh-proxy&quot;,&quot;logging_endpoint&quot;:&quot;wss://loggregator.bosh-lite.com:443&quot;,&quot;doppler_logging_endpoint&quot;:&quot;wss://doppler.bosh-lite.com:4443&quot;}%</pre><p>Lets target the CF cli to this endpoint ..</p><p><strong>What is cf cli ?</strong> This is the official command line client for <a href="https://github.com/cloudfoundry/cli">Cloud Foundry</a>. Cf cli is how we will talk to our local Cloud Foundry install and push apps on it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*eOenRRLMbA3UulhFc2YJew.png" /></figure><p>Lets login with “cf login “ use “admin” for user / pwd</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*3XNox-p_CoeDtCJ-8SVknQ.png" /></figure><p>It says “ no org or space targeted”. Lets create one.. “ravi-org”. You can create any name…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*O5AUjn8QjMnMjQe1x4-LCQ.png" /><figcaption>Create Org</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*r-JzCcvhpL4SLvDQxLoQ4g.png" /><figcaption>check Org.</figcaption></figure><p>Check the Org exists..by typing “cf orgs”.. we should see “ravi-org”.</p><p><strong>What are orgs and spaces ?</strong> An org is a development account that an individual or multiple collaborators can own and use. Every application and service is scoped to a space. Each org contains at least one space. A space provides users with access to a shared location for application development, deployment, and maintenance. Each space role applies only to a particular space.</p><p>Next lets create space… but first lets target the new Org.. under which we will create the space “ravi-dev”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*h7QWfOMz05DItcgqd1tf1g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z8X_qDSQ8_owXDAdl0oL_A.png" /></figure><p>Lets check our work till now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qQYcxgs6vTip6PpeSx5n2Q.png" /></figure><p>So we have the org and space targeted on the cf cli.</p><p>Let us clone a “Spring Music “ repository <a href="https://github.com/scottfrederick/spring-music">from Git here</a> into a separate directory . $ cd Spring-Music</p><pre>$ git clone <a href="https://github.com/scottfrederick/spring-music.git">https://github.com/scottfrederick/spring-music.git</a></pre><p>Once cloned.. you will find the manifest.yml in the root of the folder. You would want to tweak the 1G to 512k and save it.</p><pre>---<br>applications:<br>- name: spring-music<br>  memory: 1G  <br>  random-route: true  <br>  path: build/libs/spring-music.jar</pre><p>Lets build the app.. $ ./gradlew assemble Now we have to push the build jar to our CF like this $ cf push . We can do this from the same directory where we have the manifest.yml. You will see an output like this . It has a ot of detail to note.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IJFqiBJI3I6MbL4AMCWtrw.png" /></figure><p>It starts with crate the “route” and then uploading the jar ( from the manifest.yml ) to our CF . Then it detects and applies the “ Javabuildpack “. Then it stages the bits and creates the “droplet” and starts the app.</p><p>A lot is going on behind the scenes here . All we have done is to upload create the application jar and ask Cf cli to push it to CF. Once CF detects these incoming requests it goes to work, creates the route .. till it starts the app.</p><p>Once App is started we can see the output with “cf apps” like this .. notice i specified the 1g in my manifest.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PMXQC5qu7F6c1sXeq6vBow.png" /></figure><p>At this point if everything has worked well, we should be able to open a browser and go to our app..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0wPxTQRy2o9TvMW1mStRxg.png" /></figure><p>So in this post, we briefly installed a local install of Cloud Foundry on Boshlite and saw how to push an app onto it. Cloud Foundry has a lot of pieces which we shall look into our subsequent blogs.</p><p><strong>Resources to learn more</strong> :</p><p>Detailed documentation <a href="http://docs.cloudfoundry.org/deploying/boshlite/index.html">deploy CF on Boshlite</a> .</p><p>Cloud Foundry community provides three courses with hands on labs.</p><ul><li><a href="http://basics-workshop.cloudfoundry.org/">Cloud Foundry for Beginners: From Zero to Hero</a></li><li><a href="http://cloud-native-workshop.cloudfoundry.org/">Microservices on Cloud Foundry: Going Cloud Native</a></li><li><a href="http://operator-workshop.cloudfoundry.org/">Operating a Platform: BOSH and Everything Else</a></li></ul><p>You can get more in-depth documentation at <a href="http://docs.cloudfoundry.org/">Cloud Foundry Docs</a>. Check Youtube for many videos.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d3b9a1e416a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>