<?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 Harini Reddy on Medium]]></title>
        <description><![CDATA[Stories by Harini Reddy on Medium]]></description>
        <link>https://medium.com/@hkantare?source=rss-dbe1c28c1f20------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Harini Reddy on Medium</title>
            <link>https://medium.com/@hkantare?source=rss-dbe1c28c1f20------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 11 Nov 2026 20:49:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hkantare/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[IAM Resource Group, Access Group & Access Policies for IBM Cloud Kubernetes Service using Terraform]]></title>
            <link>https://medium.com/@hkantare/iam-resource-group-access-group-access-policies-for-ibm-cloud-kubernetes-service-using-terraform-6cf58bd30b13?source=rss-dbe1c28c1f20------2</link>
            <guid isPermaLink="false">https://medium.com/p/6cf58bd30b13</guid>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Harini Reddy]]></dc:creator>
            <pubDate>Tue, 18 Dec 2018 06:32:15 GMT</pubDate>
            <atom:updated>2019-05-03T03:51:52.272Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Overview of Resource Groups</strong></p><p>Resource groups, lets you organize your resources for access control and billing purposes. If you are familiar with using Cloud Foundry spaces, you can think of organizing resources into resource groups similarly to the way you organized resources into spaces. A resource is anything that can be created, managed, and contained within a resource group. Users aren’t added to resource groups — only resources can be added. Refer to this blog [<a href="https://www.ibm.com/blogs/bluemix/2018/10/resource-group-support-in-ibm-cloud-kubernetes-service/">https://www.ibm.com/blogs/bluemix/2018/10/resource-group-support-in-ibm-cloud-kubernetes-service/</a>] for more details.</p><h3>The benefits of Identity and Access Management (IAM)</h3><p>IAM enables you to securely authenticate users for both platform services and control access to resources consistently across IBM Cloud. It provides the capability to perform the following:</p><ul><li>User management</li><li>Fine-grained access control</li><li>API-key creation for authorization</li></ul><h3>Resource groups in IBM Kubernetes Service</h3><p>When you provision a cluster on IBM Kubernetes Service, out-of-box, you will see a default resource group. In order to organize the resources used by your application in dev, stage &amp; production environment; you could create additional resource groups each stages in the application lifecycle dev, stage, and prod. These resource groups, will give you the ability to set fine-grained access control for a set of Kubernetes clusters, so that you can share your account with your whole organization.</p><pre>resource &quot;ibm_resource_group&quot; &quot;resourceGroup&quot; {</pre><pre>name     = &quot;prod&quot;</pre><pre>}</pre><p>After creating the prod Resource Group, you can assign Access Policy for a user <a href="/service/mailto:test@in.ibm.com">test@in.ibm.com</a>, by inviting the user to “myorganization” and “myspace”.</p><pre>resource &quot;ibm_org&quot; &quot;org&quot; {<br>  name             = &quot;myorganization&quot;<br>  users            = [&quot;test@in.ibm.com&quot;]<br>}<br><br>resource &quot;ibm_space&quot; &quot;space&quot; {<br>  org        = &quot;${ibm_org.org.name}&quot;<br>  name       = &quot;myspace&quot;<br>  developers = [&quot;test@in.ibm.com&quot;]<br>}</pre><p>The next <strong>Assign access to a resource group </strong>because it allows you to control what the user can do to the resource group itself. You have three options:</p><ul><li><strong>Viewer:</strong> The user can see the resource group but cannot edit.</li><li><strong>Editor:</strong> The user can perform all platform actions except for managing the account and assigning access policies.</li><li><strong>Administrator:</strong> The user can perform all platform actions based on the resource this role is being assigned, including assigning access policies to other users.</li></ul><p>Lets add <strong>Viewer</strong> role to user <a href="/service/mailto:test@in.ibm.com"><strong>test@in.ibm.com</strong></a><strong> </strong>for resource group.</p><pre>resource &quot;ibm_iam_user_policy&quot; &quot;policy1&quot; {<br>  depends_on = [&quot;ibm_org.org&quot;, &quot;ibm_space.space&quot;]</pre><pre>  ibm_id = &quot;test@in.ibm.com&quot;<br>  roles  = [&quot;Viewer&quot;]<br><br>  resources = [{<br>    resource_group_id = &quot;${ibm_resource_group.resourceGroup.id}&quot;<br>  }]<br>}</pre><p>Lets assign <strong>Editor</strong> role to user <a href="/service/mailto:test@in.ibm.com"><strong>test@in.ibm.com</strong></a> for accessing the IBM Kubernetes Service.</p><pre>resource &quot;ibm_iam_user_policy&quot; &quot;policy2&quot; {<br> depends_on = [&quot;ibm_org.org&quot;, &quot;ibm_space.space&quot;]</pre><pre>ibm_id = &quot;test@in.ibm.com&quot;<br> roles  = [&quot;<strong>Editor</strong>&quot;]<br> resources = [{<br>  service = &quot;containers-kubernetes&quot;<br> }]<br>}</pre><p>You can also set policy for all clusters in a specified region, within a resource group,</p><pre>resource &quot;ibm_iam_user_policy&quot; &quot;policy&quot; {<br> depends_on = [&quot;ibm_org.org&quot;, &quot;ibm_space.space&quot;]</pre><pre>ibm_id = &quot;test@in.ibm.com&quot;<br> roles  = [&quot;Editor&quot;]<br> region = &quot;us-south&quot;</pre><pre> resources = [{<br>  service = &quot;containers-kubernetes&quot;<br> }]<br>}</pre><h3>Access groups and access policies</h3><p>Access Groups, lets you to organize the group of users (or teams) and assign access policies. Access policies can be used to assign access to services and applications.</p><p>To take things to the next level, you can batch assign policy to a group of users. Go ahead and create an access group.</p><pre>resource &quot;ibm_iam_access_group&quot; &quot;accgrp&quot; {<br>  name        = &quot;prod users&quot;<br>  description = &quot;New access group&quot;<br>}</pre><p>After you create the group, Add users who are part of account.</p><pre>resource &quot;ibm_iam_access_group_members&quot; &quot;accgroupmem&quot; {<br>  access_group_id = &quot;${ibm_iam_access_group.accgroup.id}&quot;<br>  ibm_ids         = [&quot;test@in.ibm.com&quot;, &quot;test1@in.ibm.com&quot;, &quot;test2@in.ibm.com&quot;]<br>}</pre><p>Next, <strong>Assign access </strong>to access-group</p><pre>resource &quot;ibm_iam_access_group_policy&quot; &quot;policy1&quot; {<br>  access_group_id = &quot;${ibm_iam_access_group.accgrp.id}&quot;<br>  roles        = [&quot;Viewer&quot;]<br><br>  resources = [{<br>    resource_group_id = &quot;${ibm_resource_group.resourceGroup.id}&quot;<br>  }]<br>}</pre><pre>resource &quot;ibm_iam_access_group_policy&quot; &quot;policy2&quot; {<br>  access_group_id = &quot;${ibm_iam_access_group.accgrp.id}&quot;<br>  roles        = [&quot;Editor&quot;]<br><br>  resources = [{<br>    service           = &quot;containers-kubernetes&quot;<br>  }]<br>}</pre><p>Now, you can batch assign policy to hundreds of users, to a common set of Kubernetes clusters within a resource group.</p><p>You can find more information about <a href="https://github.com/IBM-Cloud/terraform-provider-ibm"><strong>IBM Cloud Terraform provider</strong> </a>resources <a href="https://ibm-cloud.github.io/tf-ibm-docs/"><strong>here</strong></a>. Please give it a try and let us know your comments!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6cf58bd30b13" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Provisioning IBM Cloud Services Using Terraform]]></title>
            <link>https://medium.com/@hkantare/provisioning-ibm-cloud-services-using-terraform-9bf793ca3c7d?source=rss-dbe1c28c1f20------2</link>
            <guid isPermaLink="false">https://medium.com/p/9bf793ca3c7d</guid>
            <category><![CDATA[cloud-services]]></category>
            <category><![CDATA[cloud-foundry]]></category>
            <category><![CDATA[terraform]]></category>
            <dc:creator><![CDATA[Harini Reddy]]></dc:creator>
            <pubDate>Thu, 16 Aug 2018 09:38:44 GMT</pubDate>
            <atom:updated>2018-08-16T09:38:44.557Z</atom:updated>
            <content:encoded><![CDATA[<p>The last time I looked up, the<strong> </strong><a href="https://console.bluemix.net/catalog/"><strong>IBM Cloud catalog</strong></a><strong> </strong>had more than 170+ services, available under different categories — AI, Analytics, Databases, Developer Tools, Integration, IoT, Web &amp; Mobile, Security &amp; Identity, and so on.</p><p>I was able to use the <a href="https://github.com/IBM-Cloud/terraform-provider-ibm"><strong>IBM Cloud Terraform provider</strong></a> and provision the IBM Cloud Services / Resources, using the service-instance resources as illustrated here:</p><pre>resource &quot;ibm_service_instance&quot; &quot;service-instance&quot; { <br>  name       = &quot;test&quot;<br>  space_guid = &quot;${data.ibm_space.spacedata.id}&quot;<br>  service    = &quot;compose-for-etcd&quot;<br>  plan       = &quot;Standard&quot;<br>  parameters = {<br>    &quot;db_version&quot; = &quot;3.2.18&quot;<br>  }<br>}</pre><p>However, when I tried to do the same for <strong>internet-svcs</strong>, it failed.</p><p>After some investigation, I discovered that the difference lies in how <a href="https://console.bluemix.net/docs/iam/quickstart.html#getstarted"><strong>Cloud Identity &amp; Access Management</strong></a><strong> </strong>treats your Cloud Services or Resources.</p><ul><li>A set of IBM Cloud services are enabled to use <a href="https://console.bluemix.net/docs/iam/index.html#iamoverview"><strong>Cloud IAM</strong></a> for access control and are organized into resource groups within your account to enable giving users quick and easy access to more than one resource at a time. Cloud IAM access policies are used to assign users and service IDs access to the resources within your account. You can group a set of users and service IDs into an access group to easily give all entities within the group the same level access.</li><li>The access to the remaining set of IBM Cloud services &amp; resources are governed using the <a href="https://console.bluemix.net/docs/iam/cfaccess.html#cfaccess"><strong>Cloud Foundry roles</strong></a>; wherein Users are added to the org and space to which the instance belongs with a Cloud Foundry role assigned.</li></ul><p>Now,<strong> “how do I find whether my Cloud Services / Resource can be accessed using Cloud IAM roles or Cloud Foundry roles ?”</strong></p><p>This cute <a href="http://servicedata.mybluemix.net/"><strong>Service Info</strong></a> application can be used to find the answers. It lists all the IBM Cloud services and its corresponding details like Description, Plans, Region, Terraform Type — resource-instance (Cloud IAM roles) or service-instance (Cloud Foundry roles).</p><pre>resource &quot;ibm_resource_instance&quot; &quot;resource_instance&quot; {<br>  name     = &quot;test&quot;<br>  service  = &quot;internet-svcs&quot;<br>  plan     = &quot;free&quot;<br>  location = &quot;global&quot;<br>}</pre><p>Another, challenge that you will face, while using the resource-instance or service-instance resource in the IBM Cloud Terraform provider is — “how do I know the list of parameters required to provision the resource?” For example, I wanted to provision a <strong>compose-for-mongodb </strong>database using the service_instance, but I could not find the relevant documentation that tells me, <strong>“what parameters does it accept ? And, how to specify the required mongodb ‘version’ as the parameter?”</strong></p><p>Here again, the same <a href="http://servicedata.mybluemix.net/"><strong>Service Info</strong></a> application enlists the params (and potential values) that can be passed to the Terraform configuration tf file, as shown below.</p><pre>resource &quot;ibm_service_instance&quot; &quot;service-instance&quot; { <br>  name       = &quot;test&quot;<br>  space_guid = &quot;${data.ibm_space.spacedata.id}&quot;<br>  service    = &quot;compose-for-mongodb&quot;<br>  plan       = &quot;Standard&quot;<br>  parameters = {<br>    &quot;db_version&quot; = &quot;3.4.10&quot;<br>  }<br>}</pre><p>You can find more information about <a href="https://github.com/IBM-Cloud/terraform-provider-ibm"><strong>IBM Cloud Terraform provider</strong> </a>resources <a href="https://ibm-cloud.github.io/tf-ibm-docs/"><strong>here</strong></a>. Please give it a try and let us know your comments!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9bf793ca3c7d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Terraform-driven Blue-Green Deployment of Cloud Foundry Application on IBM Cloud]]></title>
            <link>https://medium.com/@hkantare/terraform-driven-blue-green-deployment-of-cloud-foundry-application-on-ibm-cloud-7b6499111a9e?source=rss-dbe1c28c1f20------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b6499111a9e</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[ibm-cloud]]></category>
            <category><![CDATA[cloud-foundry]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[blue-green-deployment]]></category>
            <dc:creator><![CDATA[Harini Reddy]]></dc:creator>
            <pubDate>Thu, 30 Nov 2017 10:17:14 GMT</pubDate>
            <atom:updated>2017-11-30T10:17:14.640Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://github.com/IBM-Bluemix/terraform-provider-ibm">IBM Cloud Terraform Provider </a>has a rich set of resources around Cloud Foundry Application. Blue-green deployment is a pretty common<br>deployment technique to reduce the downtime and risk. The provider doesn’t support this technique out of box. It does provide necessary<br>resources to help you perform the deployment. We will follow the steps outlined <a href="https://docs.cloudfoundry.org/devguide/deploy-apps/blue-green.html">here</a>.</p><p>To demonstrate the technique we will use a <a href="https://github.com/ashishth09/cf-python-app">simple python application</a>.<br>The repo has two tags v0.1.0 and v0.2.0. The former will be used for the Blue deployment and the latter for the Green deployment.</p><p><strong>Preparation for the deployment</strong></p><ol><li><a href="https://releases.hashicorp.com/terraform/">Download</a> the Terraform binary zip. Unzip it and keep the binary in path ex- /usr/local/bin.</li><li><a href="https://github.com/IBM-Bluemix/terraform-provider-ibm/releases/tag/v0.5.0">Download</a> the IBM Cloud provider binary zip. Unzip it and keep the binary in path in the same directory where you placed Terraform binary in previous step. You can also build the binary yourself. Please look into <a href="https://github.com/IBM-Bluemix/terraform-provider-ibm/blob/master/README.md">documentation</a>.</li><li>Issue below commands to download and configure terraform configuration files.</li></ol><pre>$ git clone <a href="https://github.com/ashishth09/blue-green-deployment">https://github.com/ashishth09/blue-green-deployment</a><br>$ cd blue-green-deployment<br>$ export BM_API_KEY=bx_api_key</pre><h3>Incremental deployment</h3><p><strong>Blue deployment</strong></p><p>This is for the deployment of the first version of the app. App will be accessible at https://my-welcome-app.mybluemix.net</p><pre>$ git checkout blue<br>$ terraform apply -var org=org -var space=space</pre><p>After this step</p><ul><li>Blue is now running on IBM Cloud .</li><li>The CF Router sends all traffic for my-welcome-app.mybluemix.net to Blue.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QOFD3Vkg7WY2GuwHevEn8A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PzX1ATRUPgCS9XoDOvQevA.png" /></figure><p><strong>Green deployment</strong></p><p>This is for the deployment of the second version of the app. App will be accessible at https://my-welcome-app-temp.mybluemix.net</p><pre>$ git checkout blue-green<br>$ git diff blue blue-green  #To see how the configuration has changed.<br>$ terraform apply -var org=org -var space=space</pre><p>After this steps:</p><ul><li>Two instances of our application are now running on IBM Cloud: the original Blue and the updated Green.</li><li>The CF Router continues sending all traffic for my-welcome-app.mybluemix.net to Blue. The router now also sends any traffic for my-welcome-app-temp.mybluemix.net to Green.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QjUputFpBMRn6qbFbL0FoQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DyKohhxt_ukFqEVeqO5uDw.png" /></figure><p><strong>Load balancing between Blue and Green</strong></p><p>This is when Blue and Green are load balanced. Green is accessible at my-welcome-app.mybluemix.net and my-welcome-app-temp.mybluemix.net</p><pre>$ git checkout blue-green-lb<br>$ git diff blue-green blue-green-lb  #To see how the configuration has changed.<br>$ terraform apply -var org=org -var space=space</pre><p>After this steps:</p><ul><li>The CF Router continues sending traffic for my-welcome-app.mybluemix.net to Green.</li><li>Within a few seconds, the CF Router begins load balancing traffic for my-welcome-app.mybluemix.net between Blue and Green.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b1FfcberoNN_WMXrtLDFmQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*quWfFgkpg9JxWVf3r-g4fg.png" /></figure><p><strong>Making blue in-accessible</strong></p><p>Blue is no more accessible. Green continues to be accessible at two routes</p><pre><br>$ git checkout green-only-with-2-routes<br>$git diff blue-green-lb green-only-with-2-routes #To see how the configuration has changed.<br>$ terraform apply -var org=org -var space=space</pre><p>After this steps:</p><ul><li>The CF Router stops sending traffic to Blue. Now all traffic for my-welcome-app.mybluemix.net is sent to Green.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PG6uKQYUXzRkkvwiXvhowQ.png" /></figure><p><strong>Remove Temporary Route to Green</strong></p><p>Green is accessible only at original route my-welcome-app.mybluemix.net</p><pre>$ git checkout green-original-route-only<br>$ git diff green-only-with-2-routes  green-original-route-only #To see how the configuration has changed.<br>$ terraform apply -var org=org -var space=space</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*grCc42C97kfvuJx62VTMnQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b6499111a9e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>