<?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 Samirsaha on Medium]]></title>
        <description><![CDATA[Stories by Samirsaha on Medium]]></description>
        <link>https://medium.com/@samirsaha214?source=rss-86502b49e915------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*pT_8Y0BGX1i9usHooTeqKQ.jpeg</url>
            <title>Stories by Samirsaha on Medium</title>
            <link>https://medium.com/@samirsaha214?source=rss-86502b49e915------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 04:14:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@samirsaha214/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[Architectural Considerations of Re-hosting Mainframe Applications in Cloud Platform]]></title>
            <link>https://medium.com/@samirsaha214/architectural-considerations-of-re-hosting-mainframe-applications-in-cloud-platform-476ce1fc32e6?source=rss-86502b49e915------2</link>
            <guid isPermaLink="false">https://medium.com/p/476ce1fc32e6</guid>
            <category><![CDATA[architectural]]></category>
            <category><![CDATA[micro-focus]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[rehost]]></category>
            <category><![CDATA[mainframe-modernization]]></category>
            <dc:creator><![CDATA[Samirsaha]]></dc:creator>
            <pubDate>Mon, 04 Nov 2024 06:01:59 GMT</pubDate>
            <atom:updated>2024-11-04T06:01:59.054Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Abstract</strong></p><p>Rewriting legacy Mainframe/COBOL[1] applications into JAVA, Python like modern languages could be difficult and it depends on how complex the Mainframe applications are. Organizations are opting for rehosting the same Mainframe applications (without changing any COBOL code) in cloud platforms with Mainframe emulation software like Microfocus instead of rewriting applications in modern languages. Architects are required to understand the workings of Mainframe applications and how it can work with the types of cloud resources available. It is important to blend legacy applications with latest technologies without deteriorating its original performance and other non-functional requirements.</p><p><strong>Introduction</strong></p><p>Computing, Storage, Network &amp; Observability are the <strong>four pillars</strong> for an architect to design a home for any application. Other areas like security, DevOps, support etc. are the other parts of the design. In this paper we target these four pillars and discuss the trade off between Ideal vs Feasible architecture for the legacy modernization journey. In Mainframe Modernization a correct choice of these elements &amp; fine tuning it to extract the best performance can be crucial to a successful transformation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/0*W69QSs4Tm6H8Ne_d" /></figure><p><strong>Compute Selection</strong></p><p>Mainframe applications were built in an era of monolithic applications with waterfall project execution. Depending on the complexity of COBOL applications it could be difficult to split big fat legacy applications into micro services and containerize them. This narrows down the choices we have in cloud computing. A cloud based bare metal service could be overkill and expensive. The only solution we are now left with is IaaS services like Google Compute Instances or EC2 [3] Virtual Machines (VM) of AWS[4].</p><p><strong>High Availability &amp; Scalability of Compute</strong></p><p>Businesses are interested in cost saving by adopting scalability &amp; availability of their services. Essentially scale services only on demand and make services available across the globe. When architects are asked to address these very crucial business needs, they tend to say ‘yes’ first based on their theoretical cloud knowledge. Upon further investigation they realize there are multiple cloud computing factors that need to be considered in order to satisfy businesses requirements. Scalable solutions are not always the practical ones due its relationship with available storage solutions.</p><p><strong>Storage Scrutiny</strong></p><p>Many legacy Mainframe applications use databases like DB2[5]. Those applications can be rehosted in scalable computing strengths easily because we have a centralized storage system as Databases. In the cloud we have many choices of structured SQL Database &amp; we can design a scalable architecture with those. The problem comes when we have file-based applications (COBOL with VSAM[6] files) to rehost. The limitation lies within file access protocols. For example conventional Network Attached Storage with NFS[7] file access protocol — which can easily provide shared storage to distributed compute systems. NFS has file lock issues. Meaning when one process is writing to a file another process cannot read or write. NFS issues an exclusive lock to a process; the second process has to wait until the first one finishes its job. This ultimately degrades the performance of the service as the response time of a customer request could be high. Any file storage services like GCP Filestore or NetApp CVO with NFS etc. are not suitable with file-based COBOL applications. The chart below shows a linear relationship between concurrency of a request to a service and its response time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/0*bxu_-35fGSEzftBN" /></figure><p><strong>Alternatives Storage for File-based Applications</strong></p><p>Storage Area Network (SAN) with block storage protocol fits file-based applications. GCP’s Persistent Disk or NetApp CVO with iSCSI protocol is the alternative solution to design a file-based mainframe application in the cloud to get desired performance. A block storage device does not suffer from entire file locking when the application requires reading &amp; multi-writing at the same time. However, not all cloud providers can support such SAN block storage in shared mode. If you are using the Redhat linux operating system on GCP, Redhat on GCP does not support a protocol called GFS2[8] which is required to maintain data consistency among shared computing clusters (e.g. PCS[9] cluster). Even if we chose other cloud service providers such as AWS or AZURE or a different operating system, we still have the maintenance issue of computing clusters which makes the job of scaling up/down computing power more complicated. GCP regional persistent disk kind of managed services from cloud providers are seen as best fit to get required high performance with at least a couple of zonal coverage. Downside of using either regional PD SSD or NetApp with iSCSI [10] protocol without any clustering is designing active-passive architecture — rather scalable architecture. It forces you to design one-2-one computer-storage relationship, instead of many-2-one computer-storage relation. The tradeoff between performance &amp; scalability is a decision making factor for the Architect based on Organization’s need. The chart below shows block storage response time for different concurrent requests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/0*H2saQ26Bf4MT58R3" /></figure><p><strong>Network Considerations</strong></p><p>There are no special network lessons needed to rehost mainframe applications in the cloud. The standard practices of creating separate projects, with least privilege IAM (Identity &amp; Access Manager) accesses, and a strong firewall to safeguard applications are some points to mention. To get the best performance we must keep computers and storage in the same regions. Other areas are to set up optimized routes with only required hops when any data ingestion is there in architecture.</p><p><strong>Observability Setup</strong></p><p>We talked about the Ideal vs Feasible aspect of architecting the cloud platform for Mainframe rehosting because of compute and storage limitations as mentioned above. We cannot compromise on Observability setup as it is crucial to observe and maintain different systems. We can get all the best cloud native features and SRE (Site Reliability Engineer) practices to monitor our platform the best way we can. We can choose conventional cloud-based alerting/monitoring which cloud provider facilitates — or we can go for customized tools set as per organization’s SRE rule book by using Prometheus, Grafana, Data Dog, PagerDuty etc.</p><p><strong>Best Practices to be followed</strong></p><ul><li>Before outlining the architecture, we should know what existing storage throughput and IOPS application requires. This fact helps to determine which machine type will be suitable in the cloud.</li><li>Based on machine size, businesses will be able to calculate what would be the emulator software (e.g. Microfocus) License cost.</li><li>Storage should be procured in phases. Some storage like GCP persistent disk cannot be shrunk, so it is advisable you allocate what is needed and then keep on increasing.</li><li>You can use NFS file storage, where no application related data needs to be kept like file drop zone, inbound, outbound files from applications etc.</li><li>Try using block storage for all file systems whichever Microfocus s/w is dealing with — NFS deteriorates the performance and creates many application-level problems.</li></ul><p><strong>Conclusion</strong></p><p>This paper highlights the four main pillars (compute, storage, network &amp; observability) of mainframe modernisation and how it can be used to design a solution that fits the technology and business needs. Architects could use facts and findings from this paper to get a profound understanding of what is idle and what is feasible in their Cloud based Mainframe application modernisation journey.</p><p><strong>Abbreviation</strong></p><p>[1] COBOL : Common Business Oriented Language</p><p>[2] CRA : Credit Rating Agencies</p><p>[3] EC2 : Elastic Compute</p><p>[4] AWS : Amazon Web Services</p><p>[5] DB2 : IBM Database 2</p><p>[6] VSAM : Virtual Storage Access Method</p><p>[7] NFS : Network File System</p><p>[8] GFS2 : Global File System 2</p><p>[9] PCS : Pacemaker/Corosync Configuration System</p><p>[10] iSCSI : Internet Small Computer System Interface</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=476ce1fc32e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Storage selection for VSAM files in Mainframe Modernization to Google Cloud]]></title>
            <link>https://medium.com/@samirsaha214/storage-selection-for-vsam-files-in-mainframe-modernization-to-google-cloud-fc39f8e5bdb8?source=rss-86502b49e915------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc39f8e5bdb8</guid>
            <category><![CDATA[storage-option]]></category>
            <category><![CDATA[mainframe-modernization]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Samirsaha]]></dc:creator>
            <pubDate>Mon, 01 Apr 2024 12:34:57 GMT</pubDate>
            <atom:updated>2024-04-01T12:34:57.503Z</atom:updated>
            <content:encoded><![CDATA[<p>let’s invest some of our time to revise our old school storage formats, storage types &amp; what are google cloud offerings of those now a days. In cloud computing, most of the time we choose ephemeral distributed compute — whereas we need a permanent &amp; robust storage solution.</p><p>This article discusses on storage considerations of a Mainframe Modernization project where a file based COBOL ecosystem with Key sequenced <strong>read/write VSAM file</strong> is needed to migrate. We are considering Google cloud is the platform with Microfocus as Emulation for the discussion — but use case is valid for other cloud provider as well. In IBM Mainframe, the Key sequenced VSAM files can be used as Database replacement by designing Insert / Update / Delete operations. It is very crucial to treat VSAM files as database equivalent in that situation and choose your backend storage wisely to store them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*0nEc2ukeoQ772WJHdXOTog.png" /></figure><p>Before we jump into exact use case and best practices to be followed, we need to revise some of our theories to understand the circumstances.</p><h3>File vs Block vs Object Storage Formats</h3><p>The very basic definition of “Data storage” talks about the retention of information. The most prevalent forms of storage formats are <strong>block</strong>, <strong>file</strong> and <strong>object.</strong></p><p>The data that we store in <strong>block storage</strong> is divided into chunks, each stored as a separate <em>block</em> with a unique address. Applications access data by referencing the appropriate block addresses. Block storage is optimized for high-IOPS workloads, such as transaction processing. The the read time shared lock &amp; write time exclusive <strong>lock is applied on block level</strong>, which makes it faster and a suitable choices for a Database requirements.</p><p><strong>File storage</strong> stores data as a single piece of information in a folder to help organize it among other data. This is also called hierarchical storage, imitating the way that paper files are stored. When we need access to data, computer system needs to know the path to find it. Data being read/write from this type through NAS (NFS, SMB etc.) protocol. NFS is one of the popular one which acquire write time <strong>exclusive lock on entire file</strong> to maintain the data integrity.</p><p><strong>Object storage</strong> takes each piece of data and designates it as an object. Data is kept in separate storehouses versus files in folders and is bundled with associated metadata and a unique identifier to form a storage pool. Cloud providers provide their services and ensure to maintain object’s immutable nature — means <strong>for write operation it overwrites the object</strong> &amp; generate a new version of file altogether.</p><h3>Data Storage Types &amp; Sharing Solutions</h3><p>After understanding the storage formats, lets recall how these storages can be connected with compute — three types of sharing solutions is present compute system.</p><p><strong>Type-1 : DAS (Direct Attached Storage):-</strong></p><p>DAS is a simple, low maintenance, low cost data storage solution where the data storage system is connected directly to the computers or servers through iSCSI or other connection protocols. It is similar to external hard drive of a personal computer. DAS is not designed for sharing data across the network. It is not designed for scalability. Most of the cases an one to one relationship between compute and storage is designed by this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*fv-O8mEgMZfyV3gW.png" /></figure><p><strong>Type-2 : NAS (Network Attached Storage):-</strong></p><p>NAS offers dedicated file-level storage through a network. It allows both remote and local access to data through a network connection. NAS is just one node on a network. Compared to DAS, it has many benefits — such as it is available 24x7 &amp; shared among different user groups over the Ethernet. It is reliable, flexible, scalable storage solution which is being accessed by NFS protocol.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bN1o4bVoEKijlO6K.png" /></figure><p><strong>Type-3 : SAN(Storage Area Network):-</strong></p><p>SAN is a dedicated high performance storage system that provides block-level storage of data. The technology is based on Fiber Channel, a fast data transfer protocol. As a separate network, SAN can be accessed by TCP/IP networks. Servers are connected with storage RAIDS through the Fiber Channel switch. Other alternative SAN technologies of Fiber Channel are iSCSI (internet Small Computer System Interface) and FCoE (Fiber Channel over Ethernet).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/398/0*O-k-Ha9SFgWFxnR6.jpg" /></figure><h3>Google Cloud’s offerings in storage</h3><p>Every cloud providers follows these three types and creates their services accordingly. If your cloud provider is Google Cloud please refer <a href="https://cloud.google.com/architecture/storage-advisor#block-storage">https://cloud.google.com/architecture/storage-advisor</a> to see their services.</p><h3>Storage option to store VSAM files in GCP</h3><p>VSAM files (Virtual Storage Access Method — <a href="https://www.ibm.com/docs/en/zos-basic-skills?topic=set-what-is-vsam">https://www.ibm.com/docs/en/zos-basic-skills?topic=set-what-is-vsam</a>) is a IBM Mainframe file system — from an architect perspective, we do not need deep understanding of VSAM files. We just need to know that COBOL applications can use these files for read only, write only modes in batch applications — whereas in read/write mode in online system where multiple processes can simultaneously write to and read from same file. This online legacy COBOL application’s use case asks solution architects to consider these files as database kind &amp; choose storage accordingly.</p><p><strong>Batch</strong> applications need to read only or write only situations i.e. same time both read/write in same file is not needed from multiple hosts — these can be treated as standard file storage requirement. NAS solution (with NFS4) protocol is best suited if you want distributed compute infrastructure to deal with a centralized storage device for your batch workload.</p><p><strong>Online</strong> applications may need to read/write simultaneously. In that situation keeping these VSAM files in file storage will create performance bottleneck because of full file write exclusive locks. The write lock will prohibit the readings from the file at same time. This can lead to performance problems in your online applications. The same time read/write requirements makes the VSAM files database replacement— and a <strong>block storage</strong> is way to go from solution Architect’s perspective.</p><h3>Google Cloud offerings of shared block storage</h3><p>As of writing this blog, there is <strong>no available solution in GCP for multizone shared bock storage.</strong> A Persistent Disk cannot span across multiple zones where that can be shared among multiple Virtual Machines <a href="https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms">https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms</a>. This restricts users to migrate a legacy VSAM based online Mainframe applications to a distributed, scalable Managed Instance Group (MiG) like compute infrastructure in GCP. The third party storage option with NetApp ONTAP supports both iSCSI (a block device) &amp; NFS (a file storage) — but there is also limitation to mount NetApp CVO in distributed client VMs with RHEL. To consume NetApp CVO in distributed compute, it must have a cluster design (e.g. pacemaker cluster) with GFS2 filesystem at client side machines. Currently RedHat does not support GFS2 in Google Compute Engine Instances as well.</p><p>Then what to do? we still can build active-passive architecture where we can host VSAM files in block storage — may be in regional persistent disk which can give HA from storage perspective. But sharing a block storage among multiple VMs of multiple zones is still a problem in GCP.</p><h3>Conclusion</h3><p>If you aspire to perform Mainframe Modernization in GCP with Microfocus as a emulator, it is prudent to assess the applications very well. If application demands multiple simultaneous read/write in a set of VSAM files, then current GCP offerings might be a problem to design a distributed, high available, scalable compute architecture — performance might be a bottleneck if you use File storage solution with distributed compute.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc39f8e5bdb8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Observability — using Telegraf, InfluxDB & Grafana in Kubernetes]]></title>
            <link>https://medium.com/@samirsaha214/observability-using-telegraf-influxdb-grafana-in-kubernetes-9aa39ee5674f?source=rss-86502b49e915------2</link>
            <guid isPermaLink="false">https://medium.com/p/9aa39ee5674f</guid>
            <category><![CDATA[telegraf]]></category>
            <category><![CDATA[influxdb]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[grafana]]></category>
            <category><![CDATA[sre]]></category>
            <dc:creator><![CDATA[Samirsaha]]></dc:creator>
            <pubDate>Mon, 21 Aug 2023 11:35:40 GMT</pubDate>
            <atom:updated>2023-08-21T11:35:40.877Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Observability — using Telegraf, InfluxDB &amp; Grafana in Kubernetes</strong></h3><p>‘Keeping an eye on’ the application, product or platform works as a catalyst in service availability — which organizations promise to their customer. In SRE world, observability is an integral part of the Operational stage. Building a high-quality automatic observability setup and acting upon it can increase business growth. Through this article we are going to help the reader to set up an end to end observability solution in Kubernetes application. For our use case consideration, we have picked some of the trending opensource technologies — Telegraf, InfluxDB &amp; Grafana. Here we are going to demonstrate a pilot setup using these tools to achieve required monitoring of a sample application hosted in a Kubernetes cluster.</p><p>There are plenty of online blogs, articles, references of Telegraf, InfluxDB &amp; Grafana integration to achieve the observability. But in this article, our discussion point is running these observability tools as Kubernetes resources with sample manifest files — which might be helpful for readers who looking for setting up observability in Kubernetes cluster very quickly and then slowly want to mature it to enterprise level.</p><h3>What we want to build?</h3><p>Telegraf collects the data points, push it to influxDB database — then in Grafana using influxDB as source, we can build queries and dashboards using influxQL. We will break down every area, to set up everything in your Kubernetes cluster — with a sample use case. To demonstrate end to end flow, in this blog we will consider Jenkins as a source application which we want to monitor through the setup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6KNoSj6xyc0iQwLT27E8VA.png" /></figure><p>To achieve this architecture and setup we will use below sequence: -</p><p>Install InfluxDB → Install and config Telegraf → Install and setup Grafana → Create Grafana Dashboards</p><h3>Setup InfluxDB</h3><p>Setting up InfluxDB is quite standard — we can use the official helm chart ( <a href="https://github.com/influxdata/helm-charts/tree/master/charts/influxdb2">https://github.com/influxdata/helm-charts/tree/master/charts/influxdb2</a> ). We do not need to change much to override anything unless you need more customization for enterprise level using it. The stored data is persisted by default in helm configuration.</p><p>A default user-id password would have been deployed in your k8s cluster as a secret resource once you follow the installation process mentioned in official site. You can do base64 decode to get the default password for initial login from your installed secret resource in cluster. You can also setup your desired user-id &amp; password if you want to. The helm chart will expose the InfluxDB2 as a service, we can extend that and expose that as an Ingress k8s resource to have browser view of your InfluxDB2. Exposing InfluxDB by an external IP can also be done by other methods like using NEG — choice is yours. Below is sample Ingress manifest: -</p><pre>apiVersion: networking.k8s.io/v1<br>kind: Ingress<br>metadata:<br>  name: influx-ingress<br>  namespace: influx<br>  annotations:<br>    kubernetes.io/ingress.global-static-ip-name: &lt;name of a allocated static ip&gt;<br>    nginx.ingress.kubernetes.io/rewrite-target: /<br>spec:<br>  rules:<br>  - http:<br>      paths:<br>      - path: /<br>        pathType: ImplementationSpecific<br>        backend:<br>          service:<br>            name: my-release-influxdb2<br>            port:<br>              number: 80</pre><p>Post installation of official helm chart and an additional Ingress resource as given above sample manifest, below set of resources should appear in your namespace in k8s cluster.</p><pre>kubectl get all,cm,secret,ing -n &lt;namepsace&gt;<br><br>NAME              READY   STATUS    RESTARTS        AGE<br>pod/influxdb2-0   1/1     Running   0               47m<br>NAME                TYPE       CLUSTER-IP    EXTERNAL-IP   PORT(S)        AGE<br>service/influxdb2   NodePort   &lt;ip&gt;          &lt;none&gt;        80:32275/TCP   23d<br><br>NAME                         READY   AGE<br>statefulset.apps/influxdb2   1/1     23d<br><br>NAME                                     TYPE                 DATA   AGE<br>secret/influxdb2-auth                    Opaque               2      23d<br>secret/sh.helm.release.v1.influxdb2.v1   helm.sh/release.v1   1      23d<br><br>NAME                                       CLASS    HOSTS   ADDRESS          PORTS   AGE<br>ingress.networking.k8s.io/influx-ingress   &lt;none&gt;   *       &lt;your static IP&gt;   80      24d</pre><p>Now you can login to UI with ‘admin’ as user-id and base64 decoded default password from your secret resource running in k8s.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/473/1*m-_QLamAFuO6AkxEj06Slg.png" /></figure><p>Create an organization, a bucket, and an API token with desired permissions as minimum setup post login. You can do it by just playing around with buttons/links of UI or just google it a little to find how to create these.</p><p>This much InfluxDB setup is sufficient for storing Telegraf supplied data and use it as a source in Grafana to create Dashboard using Flux queries. But some of us prefer SQL like query statement to create my Grafana Dashboard. Some additional setup is needed in that case as described below which we would require if we like to use <strong>InfluxQL</strong> as query language.</p><pre>Step-1)Get inside your influxDB pod<br>Kubectl exec -it influxdb2-0 -n &lt;namespace&gt;<br><br>Step-2) Create a configuration with created API token so that authN/authZ happens<br>  influx config create --config-name influx-config \<br>  --host-url &lt;the URL where influxDB is exposed&gt; \<br>  --org &lt;your created organization name&gt; \<br>  --token &lt;your API token which you created post first login in UI&gt; \<br>  --active<br><br>Step-3) Create a database inside your created bucket<br> influx v1 dbrp create \<br>  --db &lt;a database name&gt; \<br>  --rp &lt;a retention period name&gt; \<br>  --bucket-id &lt;existing bucket id, fetch from UI&gt; \<br>  --default<br><br>Step-4)Verify created database with retention period<br>influx v1 dbrp list<br><br>Step-5) Create user and password for your database<br> influx v1 auth create \<br>  --read-bucket &lt;existing bucket id, fetch from UI&gt; \<br>  --write-bucket &lt;existing bucket id, fetch from UI&gt; \<br>  --username &lt;a new username&gt;<br>? Please type your password ************<br>? Please type your password again ************</pre><p>That’s it — we will be using this <strong>database name</strong>, <strong>user id</strong> and <strong>password</strong> when we will configure Grafana to use InfluxDB as data source and select InfluxQL as our query language.</p><h3>Setup Telegraf</h3><p>After InfluxDB setup, we will move towards Telegraf setup. There is one helm chart available ( <a href="https://github.com/influxdata/helm-charts/tree/master/charts/telegraf">https://github.com/influxdata/helm-charts/tree/master/charts/telegraf</a> ) — but, we would go with our custom way of installing Telegraf in our k8s cluster <strong>to gain desired flexibility of using input plugins</strong>. Please bear with me, I will discuss and show all required yaml manifest files which reader of this blog can refer and use similar for the setup. I would advise watching some quick YouTube videos on Telegraf to clear the concept as well. In quick summary, there is telegraf configuration file which has mainly two parts — <strong>Input Plugins</strong> &amp; <strong>Output Plugins</strong>. Input plugins are to define the data sources &amp; output plugin configuration decides where to push the collected data. There are many input plugins available ( <a href="https://github.com/influxdata/telegraf/tree/master/plugins/inputs">https://github.com/influxdata/telegraf/tree/master/plugins/inputs</a> ). We have picked <strong>http</strong> input plugin to fetch Jenkins metrics &amp; the output is InfluxDB as target.</p><p>In k8s, <strong>three</strong> maximum resources are sufficient for the pilot Telegraf setup :-</p><p>1) A statefulset — where Telegraf runs as k8s pod. Sample manifest can be like below:-</p><pre>apiVersion: apps/v1 <br>kind: StatefulSet <br>metadata: <br>  name: telegraf <br>spec: <br>  serviceName: telegraf <br>  replicas: 1 <br>  selector: <br>    matchLabels: <br>      app: telegraf <br>  minReadySeconds: 5 <br>  template: <br>    metadata: <br>      labels: <br>        app: telegraf <br>      spec: <br>      containers: <br>        - image: telegraf:1.27.2 <br>          name: telegraf <br>          args: [&quot;--config-directory&quot;,&quot;/etc/telegraf/telegraf.d/&quot;] <br>          envFrom: <br>            - secretRef: <br>                name: telegraf-secrets <br>          volumeMounts: <br>          - name: telegraf-config <br>            mountPath: /etc/telegraf/telegraf.d/telegraf-jenkins-metrics.conf <br>            subPath: telegraf-jenkins-metrics.conf <br>            readOnly: true <br>      volumes: <br>        - name: telegraf-jenkins-metrics-config <br>          configMap: <br>            name: telegraf-jenkins-metrics-config</pre><p>2) A secret — where we can keep user-id, password, API token etc. Sample manifest file can be like below:-</p><pre>apiVersion: v1<br>kind: Secret<br>metadata:<br>  name: telegraf-secrets<br>type: Opaque<br>stringData:<br>  INFLUXDB_URL: &lt;inluxDB URL exposed as k8s Ingress&gt;<br>  INFLUXDB_TOKEN: &lt;influx-api-token&gt;<br>  INFLUXDB_ORG: &lt;influx-organizartion-name&gt;<br>  INFLUXDB_BUCKET: &lt;influx-bucket-name&gt;<br>  JENKINS_USER: &lt;username&gt;<br>  JENKINS_API_TOKEN: &lt;your-jenkins-api-token&gt;</pre><p>3) A configmap — which holds Telegraf configuration and we are flexible to change it.</p><pre>apiVersion: v1 <br>kind: ConfigMap <br>metadata: <br>  name: telegraf-jenkins-metric-config <br>data: <br>  telegraf-jenkins-metrics.conf: |+ <br>  [global_tags] <br>  [agent] <br>  interval=&quot;24h&quot; <br>  round_interval = false <br>  debug = false <br>  quiet = false <br>  logfile = &quot;&quot; <br>############################################################################### <br># INPUT PLUGINS # <br>############################################################################### <br>[[inputs.http]] <br>  urls = [&quot;http://&lt;exposed ip&gt;/jenkins/metrics/currentUser/metrics&quot;] <br>  username = &quot;$JENKINS_USER&quot; <br>  password = &quot;$JENKINS_API_TOKEN&quot; <br>  data_format = &quot;json_v2&quot;<br>  [[inputs.http.json_v2]]<br>    measurement_name = &quot;jenkins-health-details&quot;<br>    [[inputs.http.json_v2.object]]<br>      path = &quot;gauges&quot;<br>    [[inputs.http.json_v2.object]]<br>      path = &quot;counters&quot;<br><br>############################################################################### <br># OUTPUT PLUGINS # <br>############################################################################### <br>data_format=&quot;influx&quot; <br>[[outputs.influxdb_v2]] <br>  urls = [&quot;$INFLUXDB_URL&quot;] <br>  token = &quot;$INFLUXDB_TOKEN&quot; <br>  organization = &quot;$INFLUXDB_ORG&quot; <br>  bucket = &quot;$INFLUXDB_BUCKET&quot;  <br>  precision = &quot;s&quot;</pre><p>Once you apply the above manifest files your desired Telegraf resources will be installed k8s cluster and it will start pushing Jenkins metrics to influxDB. Below k8s resources should be available in your cluster post applying mentioned manifest.</p><pre>kubectl get all,cm,secret,ing -n &lt;namespace&gt;<br><br>NAME              READY   STATUS    RESTARTS   AGE<br>pod/telegraf-0    1/1     Running   0          21h<br><br>NAME                         READY   AGE<br>statefulset.apps/telegraf    1/1     22d<br><br>NAME                                        DATA   AGE<br>configmap/telegraf-jenkins-metrics-config   1      3d9h<br><br>NAME                                     TYPE                 DATA   AGE<br>secret/telegraf-secrets                  Opaque               4      23d</pre><p>On successful installation, you should be able to see all required fields are getting generated automatically in your InfluxDB measurement something like below: -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*fxZq8Zalf-aShhPfNUYkJQ.png" /></figure><h3>Setup Grafana</h3><p>The last part of article is Grafana installation and setting up InlfuxDB as its datasource. Grafana itself is another learning curve, I would advise you watch some YouTube videos &amp; other material for in depth concept. We will not discuss Grafana in extended form — but will tell you what setup is needed to use InfluxDB as data source to create desired dashboard by using InfluxQL as query language. Grafana’s official helm chart ( <a href="https://github.com/grafana/helm-charts">https://github.com/grafana/helm-charts</a> ) works fine and you can install in k8s cluster easily by referring official chart instructions. Considering Grafana also up and running &amp; exposed in browser, we can setup below configuration to use InfluxDB as data source. Here we will use last time’s created database name, user-id and password to enable InfluxQL as a choice of query language over default flux queries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*auTvuif4zDqd4xZcxc7O0g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*l8Ov_iNNWJMTZRb_df7mtg.png" /></figure><p>It is now ready to execute sample InfluxQL queries ( <a href="https://docs.influxdata.com/influxdb/v1.3/query_language/">https://docs.influxdata.com/influxdb/v1.3/query_language/</a> )and create dashboard in Grafana using InfluxDB as a data source.</p><p><strong>Reference notes:</strong></p><p>Jenkins metrics as a source (via input http plugin) is chosen for above demonstration. You can extend this pilot to collect multiple data sources, fields and pass to different measurements in influxDB. Some useful other Jenkins API end points toy can setup like: -</p><p><a href="http://%3cip%3e/jenkins/job/%3cjob_name%3e/job/master/api/json?tree=builds%5b*">http://&lt;ip&gt;/jenkins/job/&lt;job_name&gt;/job/master/api/json?tree=builds[*</a>]</p><p><a href="http://%3cip%3e/jenkins/job/%3cjob_name%3e/job/master/api/json?tree=builds%5b*">http://&lt;ip&gt;/jenkins/job/&lt;job_name&gt;/job/</a><a href="http://34.117.71.124/jenkins/job/Employee/job/hospital-backend-patient-docker/job/master/lastBuild/api/json">master/lastBuild/api/json</a></p><p><a href="http://%3cip%3e/jenkins/job/%3cjob_name%3e/job/master/api/json?tree=builds%5b*">http://&lt;ip&gt;/jenkins/job/&lt;job_name&gt;/job/master/lastSuccessfulBuild/wfapi/describe</a></p><p>http://&lt;ip&gt;/jenkins/job/&lt;job_name&gt;/job/<a href="http://34.117.71.124/jenkins/job/Employee/job/hospital-backend-doctor-docker/job/master/lastFailedBuild/wfapi/describe">master/lastFailedBuild/wfapi/describe</a></p><p><a href="http://%3cip%3e/jenkins/metrics/currentUser/healthcheck">http://&lt;ip&gt;/jenkins/metrics/currentUser/healthcheck</a></p><p>To play with and understand more JSON data which telegraf parses and push you can refer below links</p><p><a href="https://docs.influxdata.com/telegraf/v1.21/data_formats/input/json_v2/"><strong>https://docs.influxdata.com/telegraf/v1.21/data_formats/input/json_v2/</strong></a></p><p><a href="https://gjson.dev/"><strong>https://gjson.dev/</strong></a></p><h3>Summary</h3><p>Telegraf, InfluxDB &amp; Grafana is one of the way of setting up Observability which many organization is following now a days. There are other well established ways using Prometheus &amp; Grafana. A Prometheus server pulls its data by scraping HTTP endpoints. The endpoints provide a continuous stream, allowing the Prometheus server to collect real-time data. Whereas Telegraf is a plug-in-driven agent that enables the collection of metrics from different sources and data is stored InfluxDB. Choosing between Prometheus vs Telegraf/InfluxDB depends on organization’s technical stack and choice. In case you looking for Telegraf, InfluxDB and Grafana to setup your observability — you are at right place. Happy Learning !!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9aa39ee5674f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A tale of ‘Chef to Ansible’ in Cloud Transformation!]]></title>
            <link>https://medium.com/@samirsaha214/a-tale-of-chef-to-ansible-in-cloud-transformation-48fd60e5b1d4?source=rss-86502b49e915------2</link>
            <guid isPermaLink="false">https://medium.com/p/48fd60e5b1d4</guid>
            <category><![CDATA[ansible]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[chef-knife]]></category>
            <category><![CDATA[legacy-modernization]]></category>
            <dc:creator><![CDATA[Samirsaha]]></dc:creator>
            <pubDate>Wed, 26 Jul 2023 14:46:17 GMT</pubDate>
            <atom:updated>2023-07-26T14:46:17.764Z</atom:updated>
            <content:encoded><![CDATA[<p>Transformation and modernization are in the air now a days. It is not restricted in platform migration or application migration in cloud transformation journey. Enterprises started thinking and adopting the best DevOps tool sets in their transformation journey — even existing tools can work somehow. The selection of any DevOps tool in migration journey depends on platform, compatibility, market trends, ease of operation &amp; organization’s choice. In this article, let me tell you a tale of Chef to Ansible transformation. In many industries, Chef might be choice of infra configuration tool in on-premises Infrastructure. When we modernize platforms from on-premises to cloud, we are not only interested in migrating applications but also keen to adopt cloud native configuration tools like Ansible. In this article, we will discuss the process and benefits of moving to ansible from chef — as a configuration tool in cloud. As a reader if such use case you referring to — where Chef to Ansible transformation is needed, then you are at right place.</p><p>To talk about Chef to Ansible, we first need to understand how Chef works in a production like setup.</p><h3>Chef architecture and its dependent ecosystem</h3><p>In conventional Chef architecture, there are three components — workstation, server with databag setup, and nodes. The workstation is a machine where developers build new recipes and test — then push to server. The server is a centralized location where multiple team/developers push their work and keep secrets in databag. The nodes are the target machines which pull the recipe configurations &amp; secrets and apply to themselves — either at time bootstrapping phase (e.g., at image creation step by packer) or in periodic chef-client run in target nodes. In this ecosystem, <strong>multiple</strong> teams get involved. Some centralized team who manages chef server. Individual application teams are responsible for creating their application specific recipes and managing them. Some operation teams who look after nodes take ownership of running recipes at node machines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*YC5Yoks9--gLnn7nAaaXrg.png" /></figure><h3>Ansible architecture and its independence</h3><p>In cloud native ansible world an application team itself can manage the entire ansible ecosystem. There is no need for a centralized server or dependency on third team — either in ansible push or ansible pull concept. A sample use case solution of above kind of chef architecture replacement by ansible can be implemented like below: -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*9uwYnpdZulZTnrQTzaDaIw.png" /></figure><p>Here, the source control management tool (e.g., GitHub) plays replacement of chef-server logically and can play single source of truth. The developers commit their ansible playbook (replacement of chef recipes &amp; cookbooks) to GitHub and on every node ansible pull can be setup using crontab schedules to pull playbooks periodically. The same ansible pull can also be done at time pre-bake image creation at packer build step. Chef’s databag can be replaced by opensource HashiCorp Vault for secret maintenance.</p><p>Now how to certify such a transformation? We can migrate things from one tool to another, but a strong testing strategy is needed to have smooth transition. A solid QA approach can make the journey like a piece of cake.</p><h3>Potential Testing Strategy in Chef to Ansible</h3><p>One of the ways of certifying the recipe to playbook conversion is incremental ansible playbook &amp; decremental chef recipe approach. In this approach you can convert a chef recipe into an ansible playbook — then run the chef by removing that recipe from run list and execute equivalent ansible playbook in a node. This was overall configuration remains same and we slowly increase ansible playbook and decrease chef recipes in a system. At end there is no recipe and entire configuration is being done by ansible playbooks — and still the application behaves in same way how it used to be. Taking a big bang approach of converting all recipes into playbook — and then certify system may be a time-consuming matter in troubleshooting any issues which is caused by any wrong playbook configuration.</p><h3>Why to choose Ansible?</h3><p>In cloud modernization, enterprises are looking towards cloud native and cloud agnostics DevOps configuration management tools — ansible is one of the right fit and heavily adopted one. With so many simplifications, Ansible can surely present many advantages and give you reasons of choosing for your need !</p><p><strong>→ Cloud native and cloud agnostic:</strong> Ansible is a go to configuration tool in cloud world due to its cloud agnostic nature and easy to use.</p><p><strong>→ Simple to Learn:</strong> Ansible is simpler — both for experienced professionals &amp; beginners. It is easy to learn, and so, users can learn it quickly and be productive in no time.</p><p><strong>→ Agents Independent:</strong> The next important addition among the benefits of Ansible refers to its agentless nature. Ansible manages all the master-agent communications through Standard SSH in ansible push architecture. The ansible pull also made it attractive to simulate similar behavior of Chef — where the node itself can pull the playbooks and apply to itself. This makes an apple to apple conversion in Chef to Ansible transformation.</p><p><strong>→ Declarative YAML :</strong> The Playbooks are written in YAML which is another reason for the major advantages of Ansible. The interesting fact is that YAML is a better alternative for configuration management and automation in DevOps world because many other tool sets also prefer YAML.</p><p><strong>→ Ansible Galaxy:</strong> Any tool or language becomes popular when it has large community and reusable modules — where we don’t need to invent the wheel again, just need to know how to use it. Ansible Galaxy is a portal that acts as the central repository for locating, reusing, and sharing Ansible-related content.</p><p><strong>→ Reduced Maintenance Dependency:</strong> Unlike Chef where we need separate team to manage the server, development workstation or operation in nodes, in Ansible a single team can maintain the entire ecosystem.</p><h4>Conclusion</h4><p>This article describes the story of the Chef to Ansible migration use case — how it can be achieved, what testing strategy we can take and why someone would adopt Ansible as a choice. The DevOps world is very wide and growing very fast — plenty of tools and a variety of them are available. We can use Chef, Ansible, or Puppet based on our need — as a DevOps Engineer we should be able to unlearn any tool/technology and learn new tool in light speed. Happy Learning!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48fd60e5b1d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3S paradigm — Signs, Strategies and Solutions in Legacy Modernization Journey]]></title>
            <link>https://medium.com/@samirsaha214/3s-paradigm-signs-strategies-and-solutions-in-legacy-modernization-journey-34dfa7094a32?source=rss-86502b49e915------2</link>
            <guid isPermaLink="false">https://medium.com/p/34dfa7094a32</guid>
            <category><![CDATA[cloud-migration-strategy]]></category>
            <category><![CDATA[design-thinking]]></category>
            <category><![CDATA[legacy-modernization]]></category>
            <category><![CDATA[mainframe-modernization]]></category>
            <dc:creator><![CDATA[Samirsaha]]></dc:creator>
            <pubDate>Wed, 19 Jul 2023 15:38:25 GMT</pubDate>
            <atom:updated>2023-07-19T15:38:25.062Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>3S paradigm — Signs, Strategies and Solutions in Legacy Modernization Journey</strong></h3><h3>­­­</h3><p>In the era of legacy modernization journey, it is absolute necessity to realize when to make the right move by understanding the signs, brainstorming the strategies and refer corresponding piloted solutions. Out of plenty of modernization methodologies, concepts, use cases the selection of the right one drives the actual success rate. Understanding the problem before running for the solution &amp; well calculated forward moves exactly like chess game is the mantra of successful legacy transformation. This paper introduces a simple 3S (Signs → Strategies → Solutions) paradigm to ease the decision making for enterprises in legacy modernization journey. An encapsulated view of end-to-end journey is presented here to help the readers to achieve the successful transformation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/224/1*JYtB0jRzaSZd1NsjgCI9aQ.png" /></figure><h3><strong>An Introduction to Realization of Maturity Point</strong></h3><p>Over time, Legacy applications of enterprises become hard to up­date, tune further and costly to maintain. Replacing the old applications with new is complex and expensive in the early stages. It requires a solid mind set and visible business benefit to make the decision. Wearing a design thinking hat, it is known that after a certain amount of time an application or platform or product needs a jump to the new S curve — to innovate new things and get the next opportunity for growth. The introduced 3S paradigm can be applied in every innovation window cycle — whenever a jump is needed from one S curve to another throughout the lifecycle of an organization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/294/1*8XMTzBG6qFZQE46tGW25Qg.png" /></figure><h3>Understand the <strong>Signs</strong></h3><p>The signs of maturity point of any product, application or platform is the first paradigm of the discussed 3S approach. Any jump to the new S curve demands initial <strong>CapEx</strong> (Capital Expenditure) investment. So, the right level of understanding the symptoms of the modernization requirement is quite vital. The existing product/platform should continue to operate till the time it is under growth and within the <strong>OpEx</strong> (Operational Expenditure) budget. When saturation happens in growth over time — is high time to make a jump to innovate and be competitive in business. Below are the various important signs of saturation point –</p><p>● <strong>Higher operational costs:</strong> As per the Government Accountability Office, approximately ten of the federal government’s legacy systems cost around <a href="https://www.gao.gov/products/gao-21-524t"><strong>$337 million</strong></a> yearly.</p><p>● <strong>Incompatible in integration with modern systems:</strong> It is important that software, regardless of its age, integrates well with the other apps needed to operate the end-to-end business effectively. Organizations cannot afford to ignore the compatibility problems in the overall transformation journey.</p><p>● <strong>Weak Security</strong>: The older the software gets, the more vulnerable it becomes, because attackers have had enough time to uncover the vulnerabilities.</p><p>● <strong>No more performance tuning feasible: </strong>When product or platform reaches its maturity, no process improvement or service improvements helps anymore to reduce the latency. System reaches its saturation — thus stagnant growth in business.</p><p>● <strong>High Time to Market:</strong> Legacy platforms prevent a company from competing effectively against those with modern systems that provide sufficient agility and flexibility. Therefore, its use can seriously impact the Time to Market of a company. When it is found that to build any new feature in a legacy application takes more time than even doing transformation — it is another sign of taking the decision of transformation. On a lighter note, a famous Dilbert depicts the situation of intention.</p><p>● <strong>Shrinking</strong> number of experts: The lack of community support in obsolete technologies discourages IT staff from continuing working in the legacy world.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*DrZZh7RCyKNGjnxMu2loMw.png" /></figure><h3>Brainstorm the<strong> Strategies</strong></h3><p>Once the various signs are realized, look at modernization strategies, the <strong>2nd S</strong> of paradigm. There are many R strategies available in various forums and blogs. Many forums describe similar or some specific cloud provider related strategies. Here we talked about provider agnostic strategies. One or multiple options can be adopted by organizations out of these. Which one to choose depends on use cases, but a good rule of thumb is to always migrate simpler applications first. The well assessed strategy in the transformation journey decides success rate. We emphasize understanding &amp; adopting the correct one based on specific business needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*sL9k2q8VhDd1uDWw4JuVDA.png" /></figure><ol><li><strong>Rehost:</strong> Rehosting an application means moving an application to a different host platform without any changes to the app itself.</li><li><strong>Replatform:</strong> Replatforming is like rehosting — but with some additional adjustments in the system.</li><li><strong>Repurchase:</strong> Rather than refactoring, rebuilding, or rehosting, enterprises repurchase new software from the marketplace. It is one of the easy modernization techniques.</li><li><strong>Refactor / Rearchitect:</strong> Refactoring &amp; Rearchitecting is the way of tearing down monolithic applications into small microservice architecture and host the refactored product in cloud.</li><li><strong>Retire:</strong> Many old legacy applications no longer serve the business need. The functionality itself is no longer appealing. It is prudent to retire such applications and launch new ones.</li><li><strong>Retain:</strong> Usually this means “revisit” or do nothing (for now). There is always no need to modernize — unless it gives business value. It is possible the legacy is still serving well, and no additional value would be added post migration.</li><li><strong>Hybrid:</strong> Another strategy to transform in phase wise fashion. Organization adopts a hybrid architecture model where the product remains in on-prem, and data is migrated to the cloud or run production in on-prem, and Disaster Recovery (DR) migration happens to the cloud. This gives organizations confidence about cloud transformation roadmap.</li></ol><h3>Design the <strong>Solutions</strong></h3><p>When a strategy is selected, the <strong>3rd S</strong> i.e., <strong>solution</strong> of our discussed paradigm comes into play. There are various example solutions discussed — corresponding to most adopted strategies. The reader will get benefits from having reference knowledge of potential solutions.</p><h4>Rehosting Migration Solution</h4><p>The solution basically means lifting existing applications and shifting them to a different infrastructure. The target platform should not necessarily be in cloud only e.g., when IBM mainframe modernization takes place, it is possible to have an Emulated Mainframe platform as target supported by some like Microfocus, Hercules-390, Oracle Tuxedo etc. For an easy and simple way to migrate applications, rehosting is the best bet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*OAzFNIhfbwYLs_FRcDLehg.png" /></figure><h4>Replatforming Migration Solution</h4><p>Like rehosting, application replatforming is also referred to as lift, <strong>tinker</strong>, and shift. This means that the application is first lifted, then tinkered, and finally shifted to the appropriate target platform. This suggests that before moving the application to another infrastructure, a significant number of changes are embedded within the system. It is believed that modifying, optimizing, or tweaking the existing application helps increase the performance of the target infrastructure. A common example of Replatforming is to just copy the data to a suitable cloud native target — not same kind of database which it used to be in on-premises.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*JegjKqcnThrEz5ycgKeXQg.png" /></figure><p><strong>Repurchase </strong>Migration Solution</p><p>An organization can eliminate a lot of migration effort and cloud setup by purchasing directly as software as a service (SaaS), or via the different cloud provider’s Marketplace. Such as, it is unusual for organizations to build and operate their own email, payroll and CRM systems by their own — where capable third-party solutions are available at low cost. Many vendors now offer their services as managed services hosted on cloud infrastructure. It is thus possible to avoid migration effort to quite an extent by buying the end-user functionality. It avoids the maintenance and management overhead — but introduces vendor lock.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*bdLAfaWgCPggR68f3mUQhA.png" /></figure><p><strong>Refactoring</strong> / <strong>Rearchitecting </strong>Migration Solution</p><p>Refactoring &amp; Rearchitecting applications enables us to hold onto the best parts of those applications while also adopting agile, scalable, and secure cloud-native features. Rearchitecting is the one that creates a complete transformation among all other discussed solutions. It is like totally reimagining how legacy applications can be rebuilt and operated on the cloud freshly. A good solution example is to decompose the legacy monolith application into microservices, containerize those microservices before deploying to a Kubernetes cluster or any other cloud native serverless options of any cloud provider.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*3rKkhzK_9QeJMSjqraX01A.png" /></figure><p><strong>Hybrid </strong>Migration Solution</p><p>An enterprise often chooses hybrid architecture between private and public cloud. By this solution a phase wise migration happens where initial time an integration between on-prem and cloud takes place. Some example solutions are, placing data in the cloud but keeping the product in on-prem, or migrating disaster recovery application to cloud and keep production in a private data center. This gives the enterprises tremendous confidence towards full-fledged migration. This hybrid nature is not just restricted to on-prem and cloud, it can be done in mainframe modernization too where data can be kept in Mainframe where products are migrated to open-source world where data being fed from mainframe.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*UksfBy801NFGJL6Qpcck-w.png" /></figure><p><strong>Market trends</strong> of modernization adoption</p><p>As per Gartner reports more than half of enterprise IT spending in key market segments will shift to the Cloud by 2025. Below market analysis of the worldwide cloud shift from 2019 to projected 2025 shows how much enterprises are moving towards legacy modernization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*-IRuiB2PeIsLscOn9HGJXw.png" /></figure><p>In another forum, it shows the trends of various cloud offerings of the last three years. These statistics and references of market trend analysis will help the reader of this paper to understand what offerings enterprises are adopting most.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*eDIwu-ZIek0jInd8ieMCIA.png" /></figure><p><strong>Conclusion</strong></p><p>In this paper, it is being tried to encapsulate the legacy modernization journey starting from the symptoms to its potential solutions. It has been explained from the design thinking point of view — when is the right time, what are the signs to make the call by the organizations with the right strategy selection by knowing its potential solutions including the pros and cons. It is very important to realize that everything has its longevity. Today it is the era of cloud computing, tomorrow the same S curve rule will be applicable — when even products and cloud platforms will encounter its maturity point. At that time some other strategies and solutions organizations would have to adopt to be innovative and competitive.</p><p><strong>Abbreviations</strong></p><p>CapEx :- Capital Expenditure</p><p>OpEx :- Operational Expenditure</p><p>DR :- Disaster Recovery</p><p>DaaS :- Desktop as a Service</p><p>IaaS :- Infrastructure as a Service</p><p>PaaS :- Platform as a Service</p><p>SaaS :- Software as a Service</p><p>BPaaS :- Business Process as a Service</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34dfa7094a32" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The tricks of trimming down Cloud Total Cost of Ownership!]]></title>
            <link>https://medium.com/@samirsaha214/the-tricks-of-trimming-down-cloud-total-cost-of-ownership-bab736f2912a?source=rss-86502b49e915------2</link>
            <guid isPermaLink="false">https://medium.com/p/bab736f2912a</guid>
            <category><![CDATA[cloud-cost-optimization]]></category>
            <category><![CDATA[total-cost-of-ownership]]></category>
            <dc:creator><![CDATA[Samirsaha]]></dc:creator>
            <pubDate>Wed, 19 Jul 2023 15:24:11 GMT</pubDate>
            <atom:updated>2023-07-19T15:24:11.006Z</atom:updated>
            <content:encoded><![CDATA[<p>Investment in the right systems, assets, and infrastructure determines business success. Enterprises employ many methods to determine the value of a product or service before cloud adoption. One of these methods is the <em>total cost of ownership (TCO). A right level of assessment, understanding the pain points of existing system and a holistic view of end-to-end expenditure are the facts of transformation journey. </em><strong>Total cost of ownership (TCO) </strong><em>is “an estimate of all the direct and indirect costs involved in </em><a href="https://www.google.com/search?rlz=1C1GCEA_enIN1045IN1045&amp;q=acquiring&amp;si=AMnBZoFEI0LGJdD1jElhAGFwRnmoczm6wSkVcIV4XCBnYWdHD5crXh4MX5OhqJZev3vePy0EYBVQ0bhdjxInt2A8CpWadgw49Q%3D%3D&amp;expnd=1"><em>acquiring</em></a><em> and operating a product or system over its lifetime”.</em> It helps enterprises understand the cost of a product beyond the initial implementation price and is extremely helpful for understanding Return on Investment (ROI) in the long run.</p><h3>TCO blends with Knowledge &amp; Assessment</h3><p>From a business mindset point of view, the first question comes in any digital transformation — what is Return on Investment? The next question is what is wrong with the existing product, and has it reached its maturity point to step up for transformation? When these two questions are answered, the time comes to calculate the total cost of ownership for budget allocation. The TCO in cloud migration refers to the total cost of provisioning cloud infrastructure, expenditure of migration project &amp; operating post migration. At time of cloud migration, enterprises feel the necessity of performing a cloud TCO analysis. It helps to weigh the cost of cloud adoption against the cost of running applications on existing on-premises systems. With a perfect blend of assessment, knowledge and investment — enterprises can achieve successful transformation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*MLYhYjKs5NoEuV9gBThfxw.png" /></figure><h3>Cloud TCO Calculation</h3><p>There are mainly three direct elements which we can consider as parts of Cloud Total Cost of Ownership. To calculate the predictive budget of the project below mentioned three steps can be followed.</p><p><strong>Fact 1: Cloud Migration costs — Capital Expenditure (CapEx)</strong></p><p>Both the applications and data migration to the cloud are the key steps in modernization journey. On-prem applications may require some modification to function finely in the cloud. We need to discuss the ways to move applications into the cloud.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*QsCfqv6M0JIDxw_oW7sbOw.png" /></figure><ul><li><strong>Rehost:</strong> Rehosting an application means moving an application to a different host platform without any changes to the app itself.</li><li><strong>Replatform:</strong> Replatforming is like rehosting — but with some additional adjustments in the system.</li><li><strong>Repurchase:</strong> Rather than refactoring, rebuilding, or rehosting, enterprises repurchase new software from the marketplace. It is one of the easy modernization techniques.</li><li><strong>Refactor / Rearchitect:</strong> Refactoring &amp; Rearchitecting is the way of tearing down monolithic applications into small microservice architecture and host the refactored product in cloud.</li><li><strong>Hybrid:</strong> Another strategy to transform in phase wise fashion. Organization adopts a hybrid architecture model where the product remains in on-prem, and data is migrated to the cloud or run production in on-prem, and Disaster Recovery (DR) migration happens to the cloud. This gives organizations confidence about cloud transformation roadmap.</li></ul><p>Each application migration method has its cost implications, and we need to determine the costs associated with the method we choose. In addition to application migration costs, estimate data transfer charges that will remain for the initial time until decommissioned.</p><p><strong>Fact 2: Cloud running costs — Operational Expenditure (OpEx)</strong></p><p>Next, the cloud operational cost of the applications needs to be calculated. Many of the cost areas considered for on-premises infrastructure will not apply in the cloud because they will be offloaded to the cloud service provider. However, an important note is that a cloud solution is not always cheaper than on-premises infrastructure. Enterprises often may assume that their cloud bill will be automatically cheaper. But the on-demand nature of cloud services and unchecked infrastructure consideration may incur high cloud bills. Understanding the major cost areas in the cloud is key to optimizing the cost and ensuring a lower TCO. The operational cloud expense depends on the application workload, the consumed cloud services and the method of purchase. The goal here is to estimate the potential monthly cloud bill based on the current workloads. Since this calculation differs considerably for each organization, major cloud platforms provide pricing calculators that make it easier to estimate the potential monthly cloud bill based on to be resources and its specifications. Two of the major factors that will affect the amount of operational bill are:</p><p><strong>Services consumed: Choice of correct service type from IaaS (Infrastructure as a Service), PaaS (Platform as a Service), SaaS (Software as a Service) or complete serverless </strong>are the factors of varying cost. What is the right fit for application should be assessed. We should not overprovision resources or wrongly select the services. The elastic nature of cloud platform helps in cost optimization and is one of key reasons to switching to cloud.</p><p><strong>Consumption model:</strong> In on-demand model resources are deployed based on application requirement. It is the most popular cloud usage model — but it is also the most expensive cloud consumption model. Some other way to consume cloud services is to use compute savings plan or reserved instances when the workload is predictable and well known in advance. We can go with the spot instances wherever we have stateless restorable applications in many cases.</p><p><strong>Fact 3: Consultation &amp; training costs</strong></p><p>We might need to factor of human resources too. It is possible that we will need to hire new resources as well as train the existing team. The associated investment of hiring and training also is part of TCO calculation.</p><h3>Is Cloud only for cost savings?</h3><p>When enterprises calculate cloud TCO, they often make a side-by-side comparison of the costs of running an on-premises system versus the cost of running the same system in the cloud. In many use cases and budgets are not approved because of the apple-to-apple comparison — where the assessments show same or similar or even more expenses in cloud platform. Enterprises go with “Retain” strategy and drop/delay idea of migration. Head-to-head comparison is a good place to start, but we may not get the full picture. This is because it neither captures hidden costs nor shows intangible benefits of a cloud solution, such as faster time to market, increased productivity, and elasticity of demand. In this blog, we have discussed the approaches when evaluating Cloud TCO. Running applications in Cloud is not always cheaper than an on-premises model. The purpose of cloud migration is not to lower down just TCO — the end goal is a larger ROI and better business outcomes with many intangible cloud benefits — which overpower the TCO. With the right level of service selection and cost optimization from time to time, the cloud platform may also incur less TCO than on-premises — we’ll also discuss the ways to achieve it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*fb6rFSDikO78k4Uy5sscwQ.png" /></figure><h3>Trimming down Cloud TCO</h3><p>There are various methods of cost optimization. Cloud providers also provide services which continuously monitor provisioned infrastructure and advise automatically — which enterprises can keep on following to save operational cost. The beauty of clouds is everything is rented and elastic, unlike on-premises. So, even if we overprovision something mistakenly at start, we can optimize it very easily. We normally calculate TCO at early stages of a project, so a good understanding of architecture and which service is best fit in what situation helps to calculate optimum TCO at start itself — the operational optimization is a continuous process for entire lifecycle of product. Consider the below best practices to reducing TCO and optimizing cloud bills:</p><p>1. <strong>Select Flexible Compute Resources</strong>: At the start of the project, it is very difficult to predict exact compute need. We start the work based on our experience and then mature it through testing. It is a good idea to select cloud resources that are flexible, should optimization be required later.</p><p>2. <strong>Optimize Cloud Storage:</strong> The second point is Storage optimization. Understand the data, its retrieval frequency, archival need. Every cloud provider has plenty of storage classes of their services which drastically varies cost wise. It is our duty to understand our data and select the best fit for it. The correct storage selection, either block storage, file storage or even databases can make a huge impact on overall TCO.</p><p>3. <strong>Control Network cost:</strong> The next aspect is network cost optimization. Nothing is free in clouds — and many things are if you smart to find it out. With solid understanding of project’s required data flow, you can design lowest ingress (incoming traffic to cloud) &amp; egress (outgoing traffic from cloud). For example, mostly in same zone data transfer for most of the cloud provider is free — so designing some part of the architecture in same zone which does not need high availability can also reduce cost.</p><p>4. Adopt <strong>Automation: </strong>In present days, not only application but also infrastructure provisioning is automated using IaC (Infrastructure as Code). Automatic way of infrastructure in multiple layers — Dev, Test, Stage, Prod using same IaC is a latest way of saving money. Build once and use multiple times is the purpose of automation. Any task which can be automated using any framework, in house scripts, tools — go for that. Even the cases where partial automation is possible — do it.</p><p>5. <strong>Decommission</strong> On-premises platform: At the initial phase of transformation, both on-prem and cloud platforms remain active in most cases. After a certain amount of time, when product gets matured in cloud environment, it is prudent to assess and decommission all legacy on-premises applications, platform, software licenses etc. The amount of money saved by decommissioning is quite high — which is one of the main goals of transformation.</p><p>6. <strong>Utilize</strong> Cloud Governance Tools: Most of the cloud providers help with Governance tools as a service. The tool can be selected not only to keep costs lower but also to prevent unwanted wastage of resources. These tools helps to predict the estimated operational cost and based on result you can revisit the architecture couple of time even before start of project. Take advantage of budget alerting while operating in cloud — find root cause of billing spike and eliminate the reasons as continuous practice.</p><p>7. Choose <strong>backup and Disaster Recovery</strong> wisely: Designing of required backup &amp; archive strategy differs among enterprises. Keep the necessary backup only and archive non-business required data. Understand the RTO (Recovery Time Objective) &amp; RPO (Recovery Point Objective). It also varies organization wise. Designing the DR site based on permissible RTO/RPO — instead of overprovisioning e.g., only in sync data might be sufficient and there might be enough RTO window not to have running compute infrastructure in Disaster Recovery site. This wise choice based on requirement will also help trimming down the TCO.</p><p>8. Up <strong>skilling &amp; training</strong> existing team: Existing team already having functional knowledge, they are subject matter expert domain wise. A good blend of lesser new hire and training in existing resources might help in TCO. It is always found that preparing existing resources and cheaper than hiring many new specialized resources.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bab736f2912a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>