<?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 Nidhi Bansal on Medium]]></title>
        <description><![CDATA[Stories by Nidhi Bansal on Medium]]></description>
        <link>https://medium.com/@nidhibansal26?source=rss-fc5014642736------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*XgW1EgKAQNXE_AqL</url>
            <title>Stories by Nidhi Bansal on Medium</title>
            <link>https://medium.com/@nidhibansal26?source=rss-fc5014642736------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 12:32:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nidhibansal26/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[IaC and OpenShift Virtualization handshake (using Terraforms for VMs on OCP)]]></title>
            <link>https://medium.com/@nidhibansal26/iac-and-openshift-virtualization-handshake-c0a4ada79af5?source=rss-fc5014642736------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0a4ada79af5</guid>
            <category><![CDATA[infrastructure-as-code]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[virtualization]]></category>
            <dc:creator><![CDATA[Nidhi Bansal]]></dc:creator>
            <pubDate>Fri, 03 Sep 2021 12:23:37 GMT</pubDate>
            <atom:updated>2021-09-03T12:25:20.402Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>Author: Nidhi Bansal, Vishal Anand, Ranjan Roy</em></strong></p><p>In our <a href="https://medium.com/@nidhibansal26/leverage-openshift-pipelines-to-perform-devops-for-the-legacy-vms-running-on-openshift-cluster-18ada5b26577">last blog</a>, we talked about how to leverage Tekton (OpenShift Pipelines) to perform DevOps for virtualized applications running on VMs with OpenShift Virtualization (a feature of OpenShift container platform).</p><p>Provisioning infrastructure has historically been a time consuming and costly manual process. Now infrastructure management has moved away from physical hardware in data centers to virtualization, containers, and cloud computing for various cloud-native use cases.</p><p>Infrastructure as Code (IaC) can help an organization manage IT infrastructure needs while also improving consistency and reducing errors and manual configuration. IaC is an important part of implementing DevOps practices and continuous integration/continuous delivery (CI/CD).</p><p>Terraform is one of the open-source Infrastructure as Code software tool that provides a consistent CLI workflow to manage hundreds of cloud services. It codifies cloud APIs into declarative configuration files.</p><p>While Terraform can manage infrastructure for both public and private cloud services, it can also manage external services like GitHub, Nomad, and Kubernetes pods. Terraform also provides full lifecycle management of OpenShift resources including creation and deletion of pods, replication controllers, and services.</p><p>With the advent of OpenShift Virtualization (based on upstream KubeVirt project) as a feature (Operator) of OpenShift container platform, we have to provision to manage and control VMs alongside container resources in our OpenShift container platform (OCP).</p><p>But then one goes thinking as how we can leverage the same IaC tools, natively built and working with container resources on OpenShift, manage the legacy VM workload as well, running on same OpenShift cluster. This is what we are going to demonstrate here.</p><p><strong>Terraform configuration using KubeVirt provider</strong></p><p>Terraform needs the KubeVirt provider along with Kubernetes provider to provision and interact with VM resources running on OpenShift. The provider is created as a custom Terraform plugin.</p><p>Terraform should have access to OpenShift cluster along with KubeVirt plugin built and installed in Terraform configuration on host system. The Terraform template .tf files call out these providers first.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*AX0f4L3_pRRpKXxgKee96g.png" /></figure><p>After specifying the providers, initialize Terraform. This downloads and installs the latest version of the Terraform Kubernetes provider, locates and picks the KubeVirt provider from the locally installed plugins.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*e9_sjJbCSdNHd4Q1cJJQwg.png" /></figure><p>KubeVirt resources like DataVolumes(DV), Virtual Machines(VM) and other OpenShift resources required like Persistent Volume(PV), Persistent Volume Claim(PVC), services, routes etc. can now be created by providing the configuration in Terraform templates.</p><p>A DataVolume can be created using multiple definitions like source as PVC, http, local image, image registry.</p><p>Below is a snapshot of a DataVolume creation using source as Persistent Volume Claim (PVC) on OCP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZPE30q3IYUeQ9LErSHsJlA.png" /></figure><p>The created DataVolume can be used as a boot disk hosting source OS image required to build Virtual Machine on OCP. Virtual Machine can also be created with DataVolume creation specified as part of the VM resource configuration. There are multiple ways to specify DV within a VM configuration, below shown is a VM resource configuration in .tf file with DV cloned from an existing PVC hosting Windows 2012 OS image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*ZZH9liN-eaOGMmI6iUzLMw.png" /></figure><p>Apply this Terraform configuration to the OCP cluster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*mdKGNK0sto9l9WGtHuWVpQ.png" /></figure><p>The plan shows resource addition, updates or deletion as specified by the .tf configuration file. We can verify and choose to perform the required actions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*3BzDi3ZMpCMmYnbEhsJqGw.png" /></figure><p>And there you go, our Virtual Machine creation on OCP is started. A dataVolume is created first, with VM starting showing up in OCP console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aRzvnUtO6ebUGCPASpWODw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8IxfiAxzNBegRhD3H2yWSw.png" /></figure><p>Here is the VM listed in OCP, waiting to initialize with the source image imported from the dataVolume.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OY_FxRLinlUrq6eKJXiM8w.png" /></figure><p>Terraform console shows the live update status and finishes when the VM creation is done.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YSHo1zHmQDb5-zshwfTSNw.png" /></figure><p>The log of events shown here as visible on the OCP console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n0InrV07tziCglbCRSyHLg.png" /></figure><p>And here is the windows 2012 VM ready and running in OCP within a few minutes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r6W0WTwnDdOhzSbS7EZDpQ.png" /></figure><p>Login to the newly created windows VM console running on OCP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SQbvxqCmwZ9WX0dpK76j_Q.png" /></figure><p>This is just one VM demoed here. Spinning-up and managing multiple VMs by a simple click, all with varied OS, configurations, networking, resources, disks, replicated across different environments, pipelines triggers… is at your fingertips now.</p><p>Needless to mention, use-cases are endless and so are the advantages.</p><p>Happy VM’ing on OpenShift container platform, side by side with containers.</p><p>Disclaimer: Views and thoughts expressed are our very own and really personal ones.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0a4ada79af5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Leverage OpenShift Pipelines to perform DevOps for the legacy VMs running on OpenShift Cluster…]]></title>
            <link>https://medium.com/@nidhibansal26/leverage-openshift-pipelines-to-perform-devops-for-the-legacy-vms-running-on-openshift-cluster-18ada5b26577?source=rss-fc5014642736------2</link>
            <guid isPermaLink="false">https://medium.com/p/18ada5b26577</guid>
            <category><![CDATA[virtualization]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[tekton]]></category>
            <category><![CDATA[gitops]]></category>
            <dc:creator><![CDATA[Nidhi Bansal]]></dc:creator>
            <pubDate>Mon, 26 Jul 2021 14:58:06 GMT</pubDate>
            <atom:updated>2021-07-26T14:58:06.899Z</atom:updated>
            <content:encoded><![CDATA[<h3>Leverage OpenShift Pipelines to perform DevOps for the legacy VMs running on OpenShift Cluster (OCP)</h3><p><strong><em>Author: Nidhi Bansal, Vishal Anand, Ranjan Roy</em></strong></p><p>A feature of OpenShift Container Platform, OpenShift Virtualization, (formerly container-native virtualization) lets developers bring virtual machines (VMs) into containerized workflows by running a virtual machine within a container where they can develop, manage, and deploy virtual machines side-by-side with containers and serverless all in one platform. OpenShift Virtualization is ideal for teams that are shifting to cloud-native application development and have a large investment in conventional virtual machine technology.</p><p>But then one goes thinking that after migrating my VMs, what if DevOps too is implemented for the newly hosted VMs running side by side the containers. Can we use the similar CI/CD automation for VMs too? And the answer is yes, of course we can. How? Let’s read on…</p><p><strong>What is OpenShift Pipelines?</strong></p><p>Let us start first talking about what is Red Hat OpenShift Pipelines. OpenShift Pipelines is a cloud-native, continuous integration and continuous delivery (CI/CD) solution based on Kubernetes resources. It uses Tekton building blocks to automate deployments across multiple platforms by abstracting away the underlying implementation details. Some of its key features are:</p><ul><li>Pipelines run in isolated containers qualifying for a perfect serverless CI/CD system</li><li>Easy integration with existing Kubernetes environment with on-demand scaling</li><li>Declarative operator (shown below) that can be used to create tekton resources from OCP Developer console as well view tasks, triggers and pipeline run logs.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*90b9Y7Jt9rihrZDexx3l3g.png" /><figcaption>Pipelines Operator installed on OCP</figcaption></figure><p><strong>Install Tekton KubeVirt tasks</strong></p><p>A Tekton Pipeline orchestrates a set of Tasks to provide a desired goal, such as building an application and deploying it to a cluster.</p><p>OpenShift Pipelines provides out-of-the-box dozens of Tekton Tasks to be used in pipelines, ranging from things like cloning code from a git repository, to building application for several languages such as java, python, go, nodejs, or using build tools like maven, or deploying application etc.</p><p>Install KubeVirt specific tekton tasks used to manage tasks relating to:</p><ul><li>Creating and managing resources (VMs, DataVolumes)</li><li>Executing commands in VMs</li><li>Manipulating disk images with libguestfs tools</li></ul><p>The list of tasks can be seen in the OpenShift Console, under the ClusterTasks section in the Pipelines -&gt; Tasks menu</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*0glsT5VBMsLwQbyxY3coHA.png" /><figcaption>Cluster tasks List in OCP</figcaption></figure><p><strong>Create Pipelines using Tekton tasks</strong></p><p>OpenShift Pipelines not only provide a very rich UI to both run and visualize pipelines as they are being executed (or past runs), but also graphically design pipelines while OpenShift creates the corresponding YAML files in the background. This is the graphical view of the pipeline builder by assembling tekton tasks for creating a VM, and then deploying an app by executing script/commands inside the VM using ssh connection. The parameters and attributes for each task are configurable from the UI itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vq5fHuy2CAkWLFA9WX9bcQ.png" /><figcaption>Pipeline edit view in OCP</figcaption></figure><p>And here, we can see the pipeline created above, in action under Pipeline Runs, all tasks being run to completion. Certain tasks are run in parallel, while others have dependency on previous task completion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/903/1*Y-coaY0fkJPm8YBLiQlUmA.png" /><figcaption>Pipeline Run View after completion in OCP explained</figcaption></figure><p>To see complete step details of each task, switch to the Logs view:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mqLOJiw28x3qDtFxt5JSEA.png" /><figcaption>Pipeline Run Logs View in OCP</figcaption></figure><p>Here is our newly created VM running in OCP, ready and available.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QxtGUdhX4F94Qdg3herm8Q.png" /><figcaption>New VM running in OCP</figcaption></figure><p>Below is the UI of our e-commerce legacy Monolith application named eStore, hosted inside our VM, and is accessible after creating routes in OpenShift.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JfWJnfuXhIwkRX-zAjp6Fw.png" /><figcaption>eStore Monolith App UI running on VM in OCP</figcaption></figure><p>And to achieve complete automation for this application maintenance, we probably want to link pipeline execution to some external events, or what we call a <strong>Trigger</strong> in Tekton terms, such as a Git Push or Pull Request, and OpenShift Pipelines offers that out-of-the-box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RH7juW7hmIHJVRN9YTVubA.png" /><figcaption>Pipeline Triggers view in OCP</figcaption></figure><p>We can create Trigger Binding, Trigger Template and then Event Listener for that trigger.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*N-zXwJvZmd_mcwHDpqNv7Q.png" /><figcaption>Event Listener Config in OCP</figcaption></figure><p>As soon as a change in application code is delivered in Git, the payload is received by the trigger and the associated pipeline is brought to run by OpenShift Pipelines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*O6rf0sSTU4xApFjcI2Zh3w.png" /><figcaption>Auto Pipeline Run in OCP after Git push</figcaption></figure><p>And here, we can see the changes pushed in our eStore monolith application UI, live in OpenShift VM. Meet some of our colleagues from OpenShift Virtualization team — Vishal, Ranjan and Nidhi…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QNxW0_qyG_SuQEJfXvNL1Q.png" /><figcaption>eStore UI changes on the VM in OCP</figcaption></figure><p>Disclaimer: Views and thoughts expressed are our very own and really personal ones.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18ada5b26577" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>