<?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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Sukumaar’s notes]]></title><description><![CDATA[I add technical guide and notes of the applications/ framework / code blocks / techniques I encountered in this blog]]></description><link>https://rovingdev.com</link><image><url>https://substackcdn.com/image/fetch/$s_!jD6n!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc64e6bf1-ea5f-4145-9e3b-24d73d0c26db_1024x1024.png</url><title>Sukumaar’s notes</title><link>https://rovingdev.com</link></image><generator>Substack</generator><lastBuildDate>Mon, 18 May 2026 04:29:55 GMT</lastBuildDate><atom:link href="https://rovingdev.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Sukumaar Mane]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[rovingdev@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[rovingdev@substack.com]]></itunes:email><itunes:name><![CDATA[Sukumaar Mane]]></itunes:name></itunes:owner><itunes:author><![CDATA[Sukumaar Mane]]></itunes:author><googleplay:owner><![CDATA[rovingdev@substack.com]]></googleplay:owner><googleplay:email><![CDATA[rovingdev@substack.com]]></googleplay:email><googleplay:author><![CDATA[Sukumaar Mane]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Dataform: The ELT Game Changer for GCP]]></title><description><![CDATA[The Perfect ELT Companion for BigQuery & How It Stacks Up Against DBT]]></description><link>https://rovingdev.com/p/dataform-the-elt-game-changer-for</link><guid isPermaLink="false">https://rovingdev.com/p/dataform-the-elt-game-changer-for</guid><dc:creator><![CDATA[Sukumaar Mane]]></dc:creator><pubDate>Wed, 26 Mar 2025 12:02:01 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!jD6n!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc64e6bf1-ea5f-4145-9e3b-24d73d0c26db_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If you&#8217;re just starting out with data transformation and using Google Cloud Platform (GCP), Dataform might be the perfect tool for you, especially if you&#8217;re working with BigQuery. Dataform is a service designed to help you manage SQL-based data operations within BigQuery, making it easy to turn raw data into clean, usable tables or views for analysis. It&#8217;s part of GCP, so it works seamlessly within this ecosystem, offering features like version control and collaboration through Git. For beginners, think of it as a simple way to organize and clean up your data in BigQuery without needing deep programming knowledge.</p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tIj0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6248174c-1f89-4680-9b52-d8fe50507de5_3840x724.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tIj0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6248174c-1f89-4680-9b52-d8fe50507de5_3840x724.png 424w, https://substackcdn.com/image/fetch/$s_!tIj0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6248174c-1f89-4680-9b52-d8fe50507de5_3840x724.png 848w, https://substackcdn.com/image/fetch/$s_!tIj0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6248174c-1f89-4680-9b52-d8fe50507de5_3840x724.png 1272w, https://substackcdn.com/image/fetch/$s_!tIj0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6248174c-1f89-4680-9b52-d8fe50507de5_3840x724.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tIj0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6248174c-1f89-4680-9b52-d8fe50507de5_3840x724.png" width="1456" height="275" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6248174c-1f89-4680-9b52-d8fe50507de5_3840x724.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:275,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!tIj0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6248174c-1f89-4680-9b52-d8fe50507de5_3840x724.png 424w, https://substackcdn.com/image/fetch/$s_!tIj0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6248174c-1f89-4680-9b52-d8fe50507de5_3840x724.png 848w, https://substackcdn.com/image/fetch/$s_!tIj0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6248174c-1f89-4680-9b52-d8fe50507de5_3840x724.png 1272w, https://substackcdn.com/image/fetch/$s_!tIj0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6248174c-1f89-4680-9b52-d8fe50507de5_3840x724.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><div><hr></div><h2>What is Dataform?</h2><p>Dataform is a service designed to manage SQL-based data operations within BigQuery, a part of Google Cloud Platform. It serves as a framework for data teams to develop, test, version control, and schedule complex workflows for data transformation. For beginners, think of Dataform as a tool that helps organize and clean up data in BigQuery, making it ready for analysis or reporting. It is particularly useful for creating scalable data pipelines, leveraging software engineering best practices like version control with Git and automated testing.</p><p></p><h4>Key Features:</h4><ul><li><p>SQL-First Approach: Write your transformations using SQL, making it simple for analysts and data engineers.</p></li><li><p>Integrated with BigQuery: Designed to work seamlessly with BigQuery&#8217;s powerful processing capabilities.</p></li><li><p>Collaboration: Supports version control and testing, so you can ensure data quality as your team evolves your data pipelines.</p></li></ul><p></p><h4>Components of Dataform:</h4><ol><li><p>Repositories</p><ol><li><p>A workspace to store transformation logic with Git integration for version control.</p></li></ol></li><li><p>SQLX Files (Scripts)</p><ol><li><p>Extended SQL format for defining transformations:</p></li><li><p>Tables (.sqlx) &#8211; Creates transformed tables.</p></li><li><p>Views (.sqlx) &#8211; Defines virtual tables.</p></li><li><p>Incremental Tables &#8211; Processes only new data.</p></li></ol></li><li><p>Dependencies &amp; DAG</p><ol><li><p>Auto-detects dependencies and builds a Directed Acyclic Graph (DAG) to run queries in order.</p></li></ol></li><li><p>Assertions (Data Quality Checks)</p><ol><li><p>Ensures data correctness (e.g., checks for negative revenue).</p></li></ol></li><li><p>Scheduling &amp; Orchestration</p><ol><li><p>Automates transformation runs using Cloud Workflows/Scheduler.</p></li></ol></li><li><p>Testing &amp; Documentation</p><ol><li><p>Supports unit tests and auto-generates documentation with data lineage.</p></li></ol></li></ol><p></p><h4>SQLX file format:</h4><pre><code>// &#9989; Declaration: Define table/view/incremental settings
config {
  type: "table",
    description: "This table joins t1 and t2",
  columns: {
    column_1: "column1 description",
    column_2: "column1 description",
  },
    assertions: {
    uniqueKey: ["id"]
  }
}

---

// &#9989; Transformation: The core SQL logic for data processing
SELECT 
  &lt;column_1&gt;, 
  &lt;column_2&gt;, 
  &lt;aggregations/calculations&gt;
FROM &lt;source_table&gt;
JOIN &lt;another_table&gt; 
ON &lt;join_condition&gt;
WHERE &lt;filter_conditions&gt;
GROUP BY &lt;grouping_columns&gt;;

---

// &#9989; Assertion: Data quality check conditions
config {
  type: "table",
  assertions: {
    nonNull: ["column_1"]
  }
}</code></pre><div><hr></div><h3>Why Dataform Excels in ELT Workflows?</h3><p><em>Before diving into why Dataform is better for ELT, let&#8217;s clarify the workflow types.</em></p><ul><li><p>ETL (Extract, Transform, Load): This traditional approach involves extracting data from sources, transforming it outside the data warehouse (e.g., using separate tools or servers), and then loading the transformed data into the warehouse.</p></li><li><p>ELT (Extract, Load, Transform): A modern approach where data is first extracted and loaded into the data warehouse in its raw form, then transformed within the warehouse.</p></li><li><p>Dataform is explicitly designed for the transformation part of ELT workflows, as evidenced by its documentation, which states it helps &#8220;transform data already loaded in your warehouse&#8221;. This alignment makes it a natural fit for ELT, where transformations occur after loading, utilizing BigQuery&#8217;s powerful query engine.</p></li></ul><p></p><h4>Here&#8217;s why ELT with Dataform is better:</h4><ul><li><p><strong>Optimized for BigQuery</strong>: Direct integration with GCP for easier management and scalability.</p></li><li><p><strong>Modular &amp; Scalable</strong>: Breaks down transformations into reusable parts, leveraging BigQuery&#8217;s processing power.</p></li><li><p><strong>Automated Dependencies &amp; Scheduling</strong>: Automatically detects dependencies, manages execution order, and supports reliable automation with Cloud Scheduler.</p></li><li><p><strong>Data Quality &amp; Version Control</strong>: Built-in assertions for data integrity and Git integration for versioning and collaboration.</p></li><li><p><strong>Cost-Efficient ELT</strong>: Optimizes compute costs by using BigQuery&#8217;s on-demand processing, eliminating the need for intermediate ETL steps.</p></li></ul><p></p><h4><strong>Dataform vs. dbt: A Beginner&#8217;s Take</strong></h4><p>You might have heard of dbt (Data Build Tool), another big name in data transformation. Both Dataform and dbt help you write SQL to transform data, but they&#8217;re a little different. Here&#8217;s a quick comparison:</p><ul><li><p><strong>Where They Work</strong>: Dataform is made for BigQuery and GCP&#8212;it&#8217;s like a native citizen of that world. dbt, on the other hand, works with lots of data warehouses (BigQuery, Snowflake, Redshift, etc.), making it more of a global citizen.</p></li><li><p><strong>Setup</strong>: With Dataform, you&#8217;re ready to go in GCP&#8217;s web interface&#8212;no extra installs. dbt has a free version (dbt Core) that needs some setup on your computer, or a paid dbt Cloud option with a web UI.</p></li><li><p><strong>Coding Style</strong>: Dataform uses SQL with a sprinkle of JavaScript for extra flexibility. dbt uses SQL with Jinja (a Python-like tool), which might feel trickier if you&#8217;re new to coding.</p></li><li><p><strong>Community</strong>: dbt has a bigger community with tons of tutorials and plugins. Dataform&#8217;s community is smaller but growing, especially among GCP fans.</p></li></ul><div><hr></div><p><em>PS: Dataform is part of BigQuery. </em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://rovingdev.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://rovingdev.com/subscribe?"><span>Subscribe now</span></a></p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[Poetry : A Better Alternative to requirements.txt. The Maven for Python ?]]></title><description><![CDATA[#python #maven #java #poetry #automation]]></description><link>https://rovingdev.com/p/poetry-a-better-alternative-to-requirementstxt</link><guid isPermaLink="false">https://rovingdev.com/p/poetry-a-better-alternative-to-requirementstxt</guid><dc:creator><![CDATA[Sukumaar Mane]]></dc:creator><pubDate>Sat, 28 Dec 2024 20:29:21 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!gChp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fada00800-c107-45cd-b4a5-5cd5a1f1074f_1540x1920.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p>On a Friday evening, a Python team deployed updates using <code>requirements.txt</code>, only to face a production crash caused by untracked transitive dependency changes. Debugging revealed mismatched local environments, unpinned versions, and undocumented Python constraints.</p><p>Rollback attempts failed due to a breaking change in another dependency, and onboarding new developers was already chaotic. Dependency drift across staging and production led to unpredictable failures, forcing the team into a weekend firefight. They realized the lack of a lockfile and proper dependency management with <code>requirements.txt</code> had caused critical downtime&#8212;and vowed to switch to Poetry.</p></blockquote><h4><strong>What this tutorial will have ? &#129300;:</strong></h4><ul><li><p>What is Poetry</p></li><li><p>Similarities with Maven</p></li><li><p>Why it is superior to requirements.txt</p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://github.com/sukumaar/parquet_to_json_example&quot;,&quot;text&quot;:&quot;Github Code Link&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://github.com/sukumaar/parquet_to_json_example"><span>Github Code Link</span></a></p><h3>Poetry:</h3><ul><li><p>Poetry is a tool used to manage and organize the various components required to build and run a python application. It's essentially a way to ensure that all the necessary pieces are in place and working together seamlessly.</p></li><li><p>Imagine building a house. You need various materials like bricks, cement, and wood, and you need to ensure that they are all the right quality and quantity. You also need to make sure that they are all delivered to the construction site at the right time. This is similar to what Poetry does, but instead of building a house, it's helping to build a software application.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://python-poetry.org/" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gChp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fada00800-c107-45cd-b4a5-5cd5a1f1074f_1540x1920.png 424w, https://substackcdn.com/image/fetch/$s_!gChp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fada00800-c107-45cd-b4a5-5cd5a1f1074f_1540x1920.png 848w, https://substackcdn.com/image/fetch/$s_!gChp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fada00800-c107-45cd-b4a5-5cd5a1f1074f_1540x1920.png 1272w, https://substackcdn.com/image/fetch/$s_!gChp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fada00800-c107-45cd-b4a5-5cd5a1f1074f_1540x1920.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gChp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fada00800-c107-45cd-b4a5-5cd5a1f1074f_1540x1920.png" width="270" height="336.5728021978022" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ada00800-c107-45cd-b4a5-5cd5a1f1074f_1540x1920.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1815,&quot;width&quot;:1456,&quot;resizeWidth&quot;:270,&quot;bytes&quot;:1180728,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://python-poetry.org/&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gChp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fada00800-c107-45cd-b4a5-5cd5a1f1074f_1540x1920.png 424w, https://substackcdn.com/image/fetch/$s_!gChp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fada00800-c107-45cd-b4a5-5cd5a1f1074f_1540x1920.png 848w, https://substackcdn.com/image/fetch/$s_!gChp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fada00800-c107-45cd-b4a5-5cd5a1f1074f_1540x1920.png 1272w, https://substackcdn.com/image/fetch/$s_!gChp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fada00800-c107-45cd-b4a5-5cd5a1f1074f_1540x1920.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Poetry official logo</figcaption></figure></div><h4>Poetry takes care of the following tasks:</h4><ul><li><p>It ensures that all the necessary components, or "dependencies," are installed and up-to-date.</p></li><li><p>It manages the different versions of these components, so that the application can work correctly.</p></li><li><p>It provides a way to easily reproduce the exact same environment on different machines, which is important for testing and deployment.</p></li></ul><p>Poetry is a modern, all-in-one tool for managing Python projects, designed to address common challenges in dependency management, virtual environments, and project packaging. Unlike traditional workflows that rely on <code>pip</code>, <code>setup.py</code>, and <code>requirements.txt</code>, Poetry simplifies and unifies these processes. It also simplifies publishing to repositories.</p><h3>Sample Code:</h3><p>This example creates a python project which will have a library function for conversion of parquet file to JSON file. This can also be run independently at CLI by accepting input path of parquet file and output path to store JSON file.</p><h4>Prerequisites: </h4><ul><li><p>I tested code on an environment with below versions.</p></li></ul><pre><code>Python 3.9.x
git 2.x
pip 22.x</code></pre><h4>Installation:</h4><pre><code>pip install pipx
pipx install poetry
poetry config virtualenvs.in-project true</code></pre><p><code>virtualenvs.in-project true</code> will create <code>.venv </code>inside project, this will make life of IDEs easier and can easily identify project dependencies via project virtual env.</p><h4>Project Creation:</h4><ul><li><p><code>poetry new &lt;project_name&gt;</code></p><ul><li><p>I am creating a project with name <a href="https://github.com/sukumaar/parquet_to_json_example">parquet_to_json_example</a>, so I will use command: <code>poetry new parquet_to_json_example</code></p></li><li><p>This command creates a directory with default values in <code>pyproject.toml</code></p></li></ul></li><li><p><code>cd project_name</code></p><ul><li><p>change directory, move into the newly created directory</p></li><li><p>I will use <code>cd parquet_to_json_example</code></p></li></ul></li><li><p>Update <code>pyproject.toml, </code>below is the example :</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fUQK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd30ce9ab-2fac-4768-a696-70fa3e8266eb_2528x2704.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fUQK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd30ce9ab-2fac-4768-a696-70fa3e8266eb_2528x2704.png 424w, https://substackcdn.com/image/fetch/$s_!fUQK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd30ce9ab-2fac-4768-a696-70fa3e8266eb_2528x2704.png 848w, https://substackcdn.com/image/fetch/$s_!fUQK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd30ce9ab-2fac-4768-a696-70fa3e8266eb_2528x2704.png 1272w, https://substackcdn.com/image/fetch/$s_!fUQK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd30ce9ab-2fac-4768-a696-70fa3e8266eb_2528x2704.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fUQK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd30ce9ab-2fac-4768-a696-70fa3e8266eb_2528x2704.png" width="1456" height="1557" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d30ce9ab-2fac-4768-a696-70fa3e8266eb_2528x2704.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1557,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1065439,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fUQK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd30ce9ab-2fac-4768-a696-70fa3e8266eb_2528x2704.png 424w, https://substackcdn.com/image/fetch/$s_!fUQK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd30ce9ab-2fac-4768-a696-70fa3e8266eb_2528x2704.png 848w, https://substackcdn.com/image/fetch/$s_!fUQK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd30ce9ab-2fac-4768-a696-70fa3e8266eb_2528x2704.png 1272w, https://substackcdn.com/image/fetch/$s_!fUQK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd30ce9ab-2fac-4768-a696-70fa3e8266eb_2528x2704.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ul><li><p>dependencies needs to mention under <code>[tool.poetry.dependencies]</code></p></li><li><p>Check line no.19, </p><ul><li><p>entry point need to mention to run this code directly via CLI, it is possible by mentioning script name and function to run.</p></li><li><p>as per format, it needs to mention under <code>[tool.poetry.scripts]</code></p></li><li><p>Explanation:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!E6AS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d5d09b3-093d-4bec-8861-cc3fdf9dc67a_2080x716.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!E6AS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d5d09b3-093d-4bec-8861-cc3fdf9dc67a_2080x716.png 424w, https://substackcdn.com/image/fetch/$s_!E6AS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d5d09b3-093d-4bec-8861-cc3fdf9dc67a_2080x716.png 848w, https://substackcdn.com/image/fetch/$s_!E6AS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d5d09b3-093d-4bec-8861-cc3fdf9dc67a_2080x716.png 1272w, https://substackcdn.com/image/fetch/$s_!E6AS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d5d09b3-093d-4bec-8861-cc3fdf9dc67a_2080x716.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!E6AS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d5d09b3-093d-4bec-8861-cc3fdf9dc67a_2080x716.png" width="1456" height="501" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1d5d09b3-093d-4bec-8861-cc3fdf9dc67a_2080x716.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:501,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:69661,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!E6AS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d5d09b3-093d-4bec-8861-cc3fdf9dc67a_2080x716.png 424w, https://substackcdn.com/image/fetch/$s_!E6AS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d5d09b3-093d-4bec-8861-cc3fdf9dc67a_2080x716.png 848w, https://substackcdn.com/image/fetch/$s_!E6AS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d5d09b3-093d-4bec-8861-cc3fdf9dc67a_2080x716.png 1272w, https://substackcdn.com/image/fetch/$s_!E6AS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d5d09b3-093d-4bec-8861-cc3fdf9dc67a_2080x716.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div></li></ul></li></ul></li></ul><h4>Project directory structure:</h4><pre><code>parquet_to_json_example
&#9500;&#9472;&#9472; LICENSE
&#9500;&#9472;&#9472; README.md
&#9500;&#9472;&#9472; parquet2json
&#9474;   &#9500;&#9472;&#9472; __init__.py
&#9474;   &#9500;&#9472;&#9472; __main__.py
&#9474;   &#9492;&#9472;&#9472; converter
&#9474;       &#9500;&#9472;&#9472; __init__.py
&#9474;       &#9492;&#9472;&#9472; parquet_to_json.py
&#9500;&#9472;&#9472; pyproject.toml
&#9492;&#9472;&#9472; tests
    &#9492;&#9472;&#9472; __init__.py</code></pre><h4>Poetry Commands:</h4><ul><li><p><code>poetry add &lt;packageName&gt; </code> , to add new dependencies from CLI, more details <a href="https://python-poetry.org/docs/cli/#add">here</a></p></li><li><p><code>poetry remove &lt;packageName&gt;</code> ,  to remove dependencies from CLI, more details <a href="https://python-poetry.org/docs/cli/#remove">here</a></p></li><li><p><code>poetry install</code>  , this fetches all dependency and create <code>poetry.lock, </code>run this only on first time.</p></li><li><p><code>poetry update </code> , updates the dependencies  after adding/removing dependency.</p></li><li><p><code>poetry build </code> , builds distributable packages (wheel / tar.gz )</p></li><li><p><code>poetry shell </code>,<code>t</code>his will start a shell within the project&#8217;s virtual environment.</p></li></ul><h4>Command for this project:</h4><ul><li><p>After installing poetry, below commands will install <a href="https://github.com/sukumaar/parquet_to_json_example">parquet_to_json_example</a> project</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!N9q-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5ce35ca-4b2b-4e77-9c2a-d3bf89d608bb_4064x2436.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!N9q-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5ce35ca-4b2b-4e77-9c2a-d3bf89d608bb_4064x2436.png 424w, https://substackcdn.com/image/fetch/$s_!N9q-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5ce35ca-4b2b-4e77-9c2a-d3bf89d608bb_4064x2436.png 848w, https://substackcdn.com/image/fetch/$s_!N9q-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5ce35ca-4b2b-4e77-9c2a-d3bf89d608bb_4064x2436.png 1272w, https://substackcdn.com/image/fetch/$s_!N9q-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5ce35ca-4b2b-4e77-9c2a-d3bf89d608bb_4064x2436.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!N9q-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5ce35ca-4b2b-4e77-9c2a-d3bf89d608bb_4064x2436.png" width="1456" height="873" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a5ce35ca-4b2b-4e77-9c2a-d3bf89d608bb_4064x2436.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:873,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:954480,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!N9q-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5ce35ca-4b2b-4e77-9c2a-d3bf89d608bb_4064x2436.png 424w, https://substackcdn.com/image/fetch/$s_!N9q-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5ce35ca-4b2b-4e77-9c2a-d3bf89d608bb_4064x2436.png 848w, https://substackcdn.com/image/fetch/$s_!N9q-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5ce35ca-4b2b-4e77-9c2a-d3bf89d608bb_4064x2436.png 1272w, https://substackcdn.com/image/fetch/$s_!N9q-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5ce35ca-4b2b-4e77-9c2a-d3bf89d608bb_4064x2436.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="pullquote"><p>Sounds similar to Maven from Java world ?</p></div><h4>Similarities between Poetry (Python) and Maven (Java) :</h4><p>By looking at above tutorial you could think that there are many similarities between poetry and maven, some of them are listed below:</p><ul><li><p><strong>Package managers</strong>: They manage dependencies and libraries for their respective languages.</p></li><li><p><strong>Build automation tools</strong>: They automate the build process, making it easier to manage and deploy projects.</p></li><li><p><strong>Dependency resolvers</strong>: They resolve dependencies and ensure that all required libraries are installed and up-to-date.</p></li><li><p><strong>Used for project management</strong>: They provide a standardized way to manage projects, making it easier to collaborate and share code.</p></li></ul><div class="pullquote"><p>But my team uses <code>requirements.txt</code> why should I look into other solutions ? </p></div><h4> Features of Poetry and why it is better&nbsp;than requirements.txt:</h4><ul><li><p><strong>Dependency Management</strong>: Poetry handles both direct and transitive dependencies, ensuring a <code>lockfile (poetry.lock)</code> for reproducible environments.</p></li><li><p><strong>Simplified Workflow</strong>: Combines dependency installation, packaging, and publishing in one tool, streamlining development.</p></li><li><p><strong>Semantic Versioning</strong>: Supports intuitive dependency version constraints (e.g., ^1.0), making upgrades safer.</p></li><li><p><strong>Virtual Environments</strong>: Automatically manages virtual environments without additional tools.</p></li><li><p><strong>Project Metadata</strong>: Uses <code>pyproject.toml</code> for unified configuration, adhering to <a href="https://peps.python.org/pep-0518/">PEP 518</a>.</p></li><li><p><strong>Build and Publishing</strong>: With built-in tools for packaging and publishing to PyPI, Poetry eliminates the need for separate tools like <code>setuptools .</code></p></li><li><p>In contrast, <strong>requirements.txt</strong> lacks dependency locking, automated environment management, and higher-level project tooling, built-in <code>venv</code> support.</p></li></ul><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YQy4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aececc9-b57b-42ee-99e8-381d99a8dde8_1418x620.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YQy4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aececc9-b57b-42ee-99e8-381d99a8dde8_1418x620.png 424w, https://substackcdn.com/image/fetch/$s_!YQy4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aececc9-b57b-42ee-99e8-381d99a8dde8_1418x620.png 848w, https://substackcdn.com/image/fetch/$s_!YQy4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aececc9-b57b-42ee-99e8-381d99a8dde8_1418x620.png 1272w, https://substackcdn.com/image/fetch/$s_!YQy4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aececc9-b57b-42ee-99e8-381d99a8dde8_1418x620.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YQy4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aececc9-b57b-42ee-99e8-381d99a8dde8_1418x620.png" width="1418" height="620" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2aececc9-b57b-42ee-99e8-381d99a8dde8_1418x620.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:620,&quot;width&quot;:1418,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:222520,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YQy4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aececc9-b57b-42ee-99e8-381d99a8dde8_1418x620.png 424w, https://substackcdn.com/image/fetch/$s_!YQy4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aececc9-b57b-42ee-99e8-381d99a8dde8_1418x620.png 848w, https://substackcdn.com/image/fetch/$s_!YQy4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aececc9-b57b-42ee-99e8-381d99a8dde8_1418x620.png 1272w, https://substackcdn.com/image/fetch/$s_!YQy4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aececc9-b57b-42ee-99e8-381d99a8dde8_1418x620.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>Why Poetry Matters for Large Organizations</h3><p>Poetry should be preferred in large teams. Implementing Poetry can significantly benefit large organizations, especially those with numerous developers working on critical projects. Here are some key reasons:</p><ol><li><p>Enhanced Collaboration &#129309;</p><ol><li><p>Consistency Across Teams</p></li><li><p>Easier Onboarding</p></li></ol></li><li><p>Simplified Dependency Management &#128230;</p><ol><li><p>Automatic Resolution</p></li><li><p>Version Control</p></li><li><p>Easy Dependency Management</p></li></ol></li><li><p>Streamlined Project Setup &#128736;&#65039;</p><ol><li><p>Quick Start, poetry simplifies the setup process for new projects</p></li><li><p>Unified Configuration</p></li><li><p>Reproducibility</p></li></ol></li><li><p>Deployment Made Easy &#9881;&#65039;</p><ol><li><p>One Command Installation</p></li><li><p>Rollback Capabilities</p></li></ol></li></ol><div><hr></div><p>Hey reader, since you've devoured every last word of this post like a champ, how about you reward yourself with a little email subscription ?</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://rovingdev.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://rovingdev.com/subscribe?"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[Guide to : Java Spring Boot Docker Container Image]]></title><description><![CDATA[#docker #java #spring #springboot #container #cloud]]></description><link>https://rovingdev.com/p/guide-to-java-spring-boot-docker</link><guid isPermaLink="false">https://rovingdev.com/p/guide-to-java-spring-boot-docker</guid><dc:creator><![CDATA[Sukumaar Mane]]></dc:creator><pubDate>Mon, 09 Dec 2024 01:04:25 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!1ClT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c6ed3ac-5207-4c48-b6f6-84f4bb35dd87_1214x1036.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p>In this tutorial, let&#8217;s create a simple Docker container of a spring boot REST java application using a Dockerfile. The process mentioned in the article will also help to create reusable and redistributable code image.</p></blockquote><div><hr></div><h4><strong>What this tutorial will have ? &#129300;:</strong></h4><ul><li><p>Docker Java container with dynamic arguments</p></li><li><p>Image creation of spring boot rest Java application</p></li><li><p>Reusable container creation from locally hosted image</p></li><li><p>A GitHub link of all the code I used in this post.</p></li><li><p>One of the reason to use such container images in production environment.</p></li></ul><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1ClT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c6ed3ac-5207-4c48-b6f6-84f4bb35dd87_1214x1036.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1ClT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c6ed3ac-5207-4c48-b6f6-84f4bb35dd87_1214x1036.png 424w, https://substackcdn.com/image/fetch/$s_!1ClT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c6ed3ac-5207-4c48-b6f6-84f4bb35dd87_1214x1036.png 848w, https://substackcdn.com/image/fetch/$s_!1ClT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c6ed3ac-5207-4c48-b6f6-84f4bb35dd87_1214x1036.png 1272w, https://substackcdn.com/image/fetch/$s_!1ClT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c6ed3ac-5207-4c48-b6f6-84f4bb35dd87_1214x1036.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1ClT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c6ed3ac-5207-4c48-b6f6-84f4bb35dd87_1214x1036.png" width="1214" height="1036" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7c6ed3ac-5207-4c48-b6f6-84f4bb35dd87_1214x1036.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/392d61f2-df79-4bd0-95d1-31e5aac75a4a_1214x1036.png&quot;,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1036,&quot;width&quot;:1214,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:99236,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1ClT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c6ed3ac-5207-4c48-b6f6-84f4bb35dd87_1214x1036.png 424w, https://substackcdn.com/image/fetch/$s_!1ClT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c6ed3ac-5207-4c48-b6f6-84f4bb35dd87_1214x1036.png 848w, https://substackcdn.com/image/fetch/$s_!1ClT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c6ed3ac-5207-4c48-b6f6-84f4bb35dd87_1214x1036.png 1272w, https://substackcdn.com/image/fetch/$s_!1ClT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c6ed3ac-5207-4c48-b6f6-84f4bb35dd87_1214x1036.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Docker and Java official logos</figcaption></figure></div><div><hr></div><h4><strong>Prerequisites &#9989; :</strong></h4><ul><li><p>JDK 17 (I am using AWS <a href="https://docs.aws.amazon.com/corretto/latest/corretto-17-ug/downloads-list.html">corretto 17</a>)</p></li><li><p><a href="https://maven.apache.org/download.cgi">Maven 3.x</a></p></li><li><p><a href="https://docs.docker.com/engine/install/">Docker</a> or <a href="https://podman.io/docs/installation">Podman</a> (just CLI is enough)</p></li><li><p>Linux/macOS is preferred, but Windows is fine too. </p></li></ul><p><em><strong>Why spring is used in this example? </strong></em></p><p><em>Because historically, when there were not many web frameworks, people used to prefer spring MVC/ spring boot. Even when there are plenty of better frameworks available in this era, spring is still used in legacy application as well as it has large community support than most JVM based web framework.</em></p><div><hr></div><p>Before we proceed, I would like to gently encourage you to have a basic understanding of Docker and containers. If you feel you&#8217;d like to learn more, I have a post that offers some helpful insights. Please feel free to take a look at it when you have the time, here is the link &#11015;&#65039;</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;c9efc244-dec8-4498-b230-b42ebf1ecefe&quot;,&quot;caption&quot;:&quot;In this tutorial, let&#8217;s create a simple Docker container of Ubuntu and Node.js using a Dockerfile. This base Dockerfile will serve as a starting point for building custom Docker images. By leveraging this Dockerfile, we can automate the process of creating a standardized Ubuntu environment for our applications.&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Unlocking Docker: A Beginner's Guide to Ubuntu and Node.js installation&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:221562000,&quot;name&quot;:&quot;Sukumaar Mane&quot;,&quot;bio&quot;:&quot;Software Engineer&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cba12e5d-f9b3-42e5-9ace-25d05b5b9348_1024x1024.webp&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2024-12-04T02:16:21.735Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F875f1de6-1617-44af-99e9-b55c6d0d37dc_1240x1064.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://rovingdev.com/p/unlocking-docker-a-beginners-guide&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:152546031,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:0,&quot;comment_count&quot;:2,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;Sukumaar&#8217;s notes&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc64e6bf1-ea5f-4145-9e3b-24d73d0c26db_1024x1024.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div><hr></div><h4>Let&#8217;s have a look at code. &#129488;</h4><p>I created a really simple REST service in Java with the help of <a href="https://spring.io/projects/spring-boot">spring boot</a>. </p><p>This is the directory structure of the code:</p><pre><code>.
&#9500;&#9472;&#9472; Dockerfile
&#9500;&#9472;&#9472; README.md
&#9500;&#9472;&#9472; pom.xml
&#9492;&#9472;&#9472; src
    &#9492;&#9472;&#9472; main
        &#9500;&#9472;&#9472; java
        &#9474;   &#9492;&#9472;&#9472; com
        &#9474;       &#9492;&#9472;&#9472; example
        &#9474;           &#9492;&#9472;&#9472; spring_demo
        &#9474;               &#9492;&#9472;&#9472; SpringDemoApplication.java
        &#9492;&#9472;&#9472; resources
            &#9492;&#9472;&#9472; application.properties</code></pre><p>The main class <code>SpringDemoApplication.java :</code></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tkaq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56d90bc-dfde-49eb-93a1-d76f11d3da59_3680x3336.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tkaq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56d90bc-dfde-49eb-93a1-d76f11d3da59_3680x3336.png 424w, https://substackcdn.com/image/fetch/$s_!tkaq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56d90bc-dfde-49eb-93a1-d76f11d3da59_3680x3336.png 848w, https://substackcdn.com/image/fetch/$s_!tkaq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56d90bc-dfde-49eb-93a1-d76f11d3da59_3680x3336.png 1272w, https://substackcdn.com/image/fetch/$s_!tkaq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56d90bc-dfde-49eb-93a1-d76f11d3da59_3680x3336.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tkaq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56d90bc-dfde-49eb-93a1-d76f11d3da59_3680x3336.png" width="1456" height="1320" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c56d90bc-dfde-49eb-93a1-d76f11d3da59_3680x3336.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7b908040-3994-4215-af78-25687204b397_3680x3336.png&quot;,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1320,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1206647,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!tkaq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56d90bc-dfde-49eb-93a1-d76f11d3da59_3680x3336.png 424w, https://substackcdn.com/image/fetch/$s_!tkaq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56d90bc-dfde-49eb-93a1-d76f11d3da59_3680x3336.png 848w, https://substackcdn.com/image/fetch/$s_!tkaq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56d90bc-dfde-49eb-93a1-d76f11d3da59_3680x3336.png 1272w, https://substackcdn.com/image/fetch/$s_!tkaq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc56d90bc-dfde-49eb-93a1-d76f11d3da59_3680x3336.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>URL mappings:</strong></p><ul><li><p>/ : default is mapped to <strong>defaultLanding(),</strong> this will simply return &#8216;Hello from Docker&#8216;</p></li><li><p>/hello : </p><ul><li><p>is mapped to <strong>hello(), </strong>this will return extract value from URL parameter <strong>name </strong> and append to Hello string </p></li><li><p>Example: <code>/hello?name=ABCD</code> will return &#8216;Hello ABCD!&#8216;</p></li></ul></li></ul><p><strong>Dockerfile contents:</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RBoe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ba6650e-20a0-43e4-b696-7d726bc86352_3716x2256.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RBoe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ba6650e-20a0-43e4-b696-7d726bc86352_3716x2256.png 424w, https://substackcdn.com/image/fetch/$s_!RBoe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ba6650e-20a0-43e4-b696-7d726bc86352_3716x2256.png 848w, https://substackcdn.com/image/fetch/$s_!RBoe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ba6650e-20a0-43e4-b696-7d726bc86352_3716x2256.png 1272w, https://substackcdn.com/image/fetch/$s_!RBoe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ba6650e-20a0-43e4-b696-7d726bc86352_3716x2256.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RBoe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ba6650e-20a0-43e4-b696-7d726bc86352_3716x2256.png" width="1456" height="884" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3ba6650e-20a0-43e4-b696-7d726bc86352_3716x2256.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:884,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:865032,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!RBoe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ba6650e-20a0-43e4-b696-7d726bc86352_3716x2256.png 424w, https://substackcdn.com/image/fetch/$s_!RBoe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ba6650e-20a0-43e4-b696-7d726bc86352_3716x2256.png 848w, https://substackcdn.com/image/fetch/$s_!RBoe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ba6650e-20a0-43e4-b696-7d726bc86352_3716x2256.png 1272w, https://substackcdn.com/image/fetch/$s_!RBoe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ba6650e-20a0-43e4-b696-7d726bc86352_3716x2256.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ul><li><p>Look carefully at line 1, we are using <strong>maven:3.9-eclipse-temurin-17 </strong> as base image. We are using <a href="https://adoptium.net/temurin/releases/?version=17">Eclipse Temurin</a> 17 as JDK, this is the open source Java SE build based upon OpenJDK. This has GPLv2 with Classpath Exception license, which makes commercial use easy.</p></li><li><p>At line 5, we have created <code>jar_file_name</code> with default value, we are going to override this while building docker image. We will provide actual path of the jar file.</p></li><li><p>At line 9, we have created <code>env_port</code> as an environmental variable, this will be useful to provide a dynamic parameter at the time of running docker container.</p></li></ul><p><strong>Commands &#128187; :</strong></p><ul><li><p>These are sample commands to build Dockerfile and run container:</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wsPZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19b3795d-01fa-4449-a81b-b877c0398692_4716x1536.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wsPZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19b3795d-01fa-4449-a81b-b877c0398692_4716x1536.png 424w, https://substackcdn.com/image/fetch/$s_!wsPZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19b3795d-01fa-4449-a81b-b877c0398692_4716x1536.png 848w, https://substackcdn.com/image/fetch/$s_!wsPZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19b3795d-01fa-4449-a81b-b877c0398692_4716x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!wsPZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19b3795d-01fa-4449-a81b-b877c0398692_4716x1536.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wsPZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19b3795d-01fa-4449-a81b-b877c0398692_4716x1536.png" width="1456" height="474" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/19b3795d-01fa-4449-a81b-b877c0398692_4716x1536.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:474,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:779928,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wsPZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19b3795d-01fa-4449-a81b-b877c0398692_4716x1536.png 424w, https://substackcdn.com/image/fetch/$s_!wsPZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19b3795d-01fa-4449-a81b-b877c0398692_4716x1536.png 848w, https://substackcdn.com/image/fetch/$s_!wsPZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19b3795d-01fa-4449-a81b-b877c0398692_4716x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!wsPZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19b3795d-01fa-4449-a81b-b877c0398692_4716x1536.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ul><li><p>1st line in above code is used to compile and generated final jar</p></li><li><p>3rd line is used to test if the code is working fine or not, once you enter this command the REST service will be available at http://localhost:8010. It is running at the port 8010 as we specified <code>&#8212;-server.port:8010</code></p></li><li><p>Once you are done with the testing, you can kill it by CTRL + c or CMD + c.</p></li><li><p>5th line </p><ul><li><p>builds docker image with the JAR file from target directory, and tag it with <code>spring-docker-demo</code>. </p></li><li><p>We also override the <code>jar_file_name</code> argument with actual jar file path that we built in previous stage.</p></li></ul></li><li><p>You can check if image got created or not by entering <code>docker image list </code>command, this will list all local images.</p></li><li><p>7th line </p><ul><li><p>will start the docker container with the JAR file.</p></li><li><p>while starting the container, we have provided value to <code>env_port,</code>this will detect the port for the REST service running inside the container.</p></li><li><p>-p 8008:8087 will do port forwarding between docker host port (8008) and docker container port (8087).</p></li></ul></li><li><p>That&#8217;s all.</p></li></ul><p><em>FYI, I used a Linux machine (Ubuntu 24.04) to run the above commands.</em></p><div><hr></div><p><strong>Why you should prefer using Docker images for production ? &#9881;&#65039;</strong></p><ul><li><p>Docker images encapsulate applications and their dependencies in a consistent environment, ensuring reliable and predictable production deployments. </p></li><li><p>This promotes reusability across different environments, as images can be easily shared and version-controlled, reducing conflicts and streamlining updates. Overall, they enhance scalability and simplify the deployment process, leading to faster and more efficient software delivery. </p></li><li><p>This is applicable with <a href="https://opencontainers.org/">OCI images</a>.</p></li></ul><div><hr></div><p>Hey reader, since you've devoured every last word of this post like a champ, how about you reward yourself with a little email subscription ?</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://rovingdev.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://rovingdev.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p>All code related to this tutorial is available here:</p><p><a href="https://github.com/sukumaar/spring-docker-demo">https://github.com/sukumaar/spring-docker-demo</a></p>]]></content:encoded></item><item><title><![CDATA[Apache Spark Unit Testing Strategies]]></title><description><![CDATA[#scala #programming #apachespark #bigdata]]></description><link>https://rovingdev.com/p/apache-spark-unit-testing-strategies</link><guid isPermaLink="false">https://rovingdev.com/p/apache-spark-unit-testing-strategies</guid><dc:creator><![CDATA[Sukumaar Mane]]></dc:creator><pubDate>Thu, 05 Dec 2024 21:20:28 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!xiRL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13cb4dc3-5322-4ad7-a5bd-f1cccbbd247d_3680x3604.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p>Recipe/Guide about writing unit tests for Apache Spark with Scala (mainly for beginners).</p></blockquote><div><hr></div><p>Recipe complexity level: &#9724;&#65039;&#9723;&#65039;&#9723;&#65039;&#9723;&#65039;<br>Recipe prerequisite:</p><ul><li><p>Some knowledge of Big Data, Apache Spark, Scala, Java.</p></li></ul><p>Recipe ingredients:</p><ul><li><p>Your favorite IDE : Intellij or VSCode (with Metals)</p></li><li><p><a href="https://www.scala-sbt.org/">sbt</a> / <a href="https://maven.apache.org/">maven</a> installed (sbt is used in this tutorial)</p></li><li><p><a href="https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/downloads-list.html">jdk 8</a></p></li><li><p><a href="https://www.scala-lang.org/download/2.12.13.html">scala 2.12 &#128526;</a></p></li></ul><div><hr></div><p><strong>Unit testing ?</strong><br>In computer programming, unit testing is a software testing method by which individual units of source code&#8212;sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures&#8212;are tested to determine whether they are fit for use <a href="https://en.wikipedia.org/wiki/Unit_testing">Wikipedia</a></p><p>Writing unit tests of the code before writing the actual code is a brilliant strategy used in TDD.</p><p><strong>TDD ?</strong><br>Test-driven development (TDD) is a software development process relying on software requirements being converted to test cases before software is fully developed, and tracking all software development by repeatedly testing the software against all test cases. <a href="https://en.wikipedia.org/wiki/Test-driven_development">Wikipedia</a></p><p>I will skip writing about the advantages of writing unit tests or the advantages of TDD (because there are so many that I need to write a separate article for it.)</p><p>This code sample uses (super awesome) Scalatest &#128526;&#129321; testing framework.</p><p><strong>ScalaTest:</strong></p><ul><li><p>It is the most flexible and most popular testing tool in the Scala ecosystem.<a href="https://www.scalatest.org/">link</a></p></li><li><p>With so many other features, it allows designing tests with multiple styles.</p><ul><li><p><code>ScalaTest</code> supports different styles of testing, each designed to address a particular set of needs. <a href="https://www.scalatest.org/user_guide/selecting_a_style">link</a></p></li><li><p>There are separate traits for these styles.</p></li><li><p><code>JUnit</code> lovers can use the <code>AnyFunSuite</code> trait.</p></li></ul></li></ul><div><hr></div><p><strong>Project Creation:</strong><br>Directory structure of my project:</p><pre><code>.
&#9500;&#9472;&#9472; build.sbt
&#9492;&#9472;&#9472; src
    &#9500;&#9472;&#9472; main
    &#9474;   &#9492;&#9472;&#9472; scala
    &#9474;       &#9492;&#9472;&#9472; sukumaar
    &#9474;           &#9492;&#9472;&#9472; App.scala #This doesn't have any imp code
    &#9492;&#9472;&#9472; test
        &#9492;&#9472;&#9472; scala
            &#9492;&#9472;&#9472; sukumaar
                &#9500;&#9472;&#9472; AppTest.scala
                &#9492;&#9472;&#9472; TraitSparkSessionTest.scala</code></pre><p><code>build.sbt</code> I used :</p><pre><code>name := "sample-spark-scala-project"
version := "1.0"
scalaVersion := "2.12.13"

val sparkVersion = "2.4.0"

libraryDependencies += 
    "org.apache.spark" %% "spark-core" % sparkVersion
libraryDependencies += 
    "org.apache.spark" %% "spark-sql" % sparkVersion
libraryDependencies += 
    "org.scalatest" %% "scalatest" % "3.2.9" % Test

/*
// you can always use this dependency if you are 
// going to use only funsuite
libraryDependencies += 
    "org.scalatest" %% "scalatest-funsuite" % "3.2.11" % "test"
*/</code></pre><p>Import this project to your favorite IDE.<br>If you prefer CLI (like a mature developer &#128539;) then use this command: </p><pre><code> <code>sbt clean compile</code></code></pre><div><hr></div><p>The steps I followed:</p><p><sub>of course, you can change package name, if you do then you have to change directory name accordingly in previous step</sub></p><p>Step 1: Add this to <code>TraitSparkSessionTest.scala</code></p><pre><code>package sukumaar
trait TraitSparkSessionTest {}</code></pre><p>Step 2: Add this to <code>TraitSparkSessionTest.scala</code></p><pre><code>package sukumaar

import org.apache.spark.sql.SparkSession

trait TraitSparkSessionTest {

  protected val sparkSession = SparkSession
    .builder()
    .appName("sample-spark-scala-project")
    .master("local[2]")
    .getOrCreate()       
}</code></pre><p>Step 3: Add this to <code>AppTest.scala</code></p><pre><code>package sukumaar
class AppTest {}</code></pre><p>The trick is <code>sparkSession</code> object must be used in all the test classes wherever spark test cases are present, unless there is a use case to use more than one spark session.<br>As this object is a part of <code>TraitSparkSessionTest</code> trait, this trait can be easily used as a mixin to mix with the test classes.</p><p>Step 4: Add this to <code>AppTest.scala</code></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xiRL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13cb4dc3-5322-4ad7-a5bd-f1cccbbd247d_3680x3604.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xiRL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13cb4dc3-5322-4ad7-a5bd-f1cccbbd247d_3680x3604.png 424w, https://substackcdn.com/image/fetch/$s_!xiRL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13cb4dc3-5322-4ad7-a5bd-f1cccbbd247d_3680x3604.png 848w, https://substackcdn.com/image/fetch/$s_!xiRL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13cb4dc3-5322-4ad7-a5bd-f1cccbbd247d_3680x3604.png 1272w, https://substackcdn.com/image/fetch/$s_!xiRL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13cb4dc3-5322-4ad7-a5bd-f1cccbbd247d_3680x3604.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xiRL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13cb4dc3-5322-4ad7-a5bd-f1cccbbd247d_3680x3604.png" width="1456" height="1426" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/13cb4dc3-5322-4ad7-a5bd-f1cccbbd247d_3680x3604.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1426,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1780626,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xiRL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13cb4dc3-5322-4ad7-a5bd-f1cccbbd247d_3680x3604.png 424w, https://substackcdn.com/image/fetch/$s_!xiRL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13cb4dc3-5322-4ad7-a5bd-f1cccbbd247d_3680x3604.png 848w, https://substackcdn.com/image/fetch/$s_!xiRL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13cb4dc3-5322-4ad7-a5bd-f1cccbbd247d_3680x3604.png 1272w, https://substackcdn.com/image/fetch/$s_!xiRL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13cb4dc3-5322-4ad7-a5bd-f1cccbbd247d_3680x3604.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Done. Now go and run your tests &#128519;</p><div><hr></div><p>Hey reader, since you've devoured every last word of this post like a champ, how about you reward yourself with a little email subscription ?</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://rovingdev.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://rovingdev.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p>Full source code link: <a href="https://github.com/sukumaar/spark-scala-unit-test-example">https://github.com/sukumaar/spark-scala-unit-test-example</a></p>]]></content:encoded></item><item><title><![CDATA[What is '_spark_metadata' Directory in Spark Structured Streaming ?]]></title><description><![CDATA[#apachespark #scala #java #bigdata]]></description><link>https://rovingdev.com/p/what-is-spark-metadata-directory</link><guid isPermaLink="false">https://rovingdev.com/p/what-is-spark-metadata-directory</guid><dc:creator><![CDATA[Sukumaar Mane]]></dc:creator><pubDate>Thu, 05 Dec 2024 04:57:39 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!4pc8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31b5e2ae-01bf-4d81-8e07-b3c07cfa8440_1000x420.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p><strong>Spark Structured Streaming</strong> is a real-time data processing framework in Apache Spark. It enables continuous, scalable, and fault-tolerant data ingestion, transformation, and analysis from various sources, like Kafka or files. <br>Unlike traditional batch processing, it treats data as an unending stream, allowing for low-latency analytics. Queries are expressed using familiar SQL or DataFrame API, making it user-friendly. It provides built-in support for event-time processing and ensures exactly-once processing semantics, making it suitable for various real-time applications like monitoring, ETL, and more.</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4pc8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31b5e2ae-01bf-4d81-8e07-b3c07cfa8440_1000x420.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4pc8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31b5e2ae-01bf-4d81-8e07-b3c07cfa8440_1000x420.jpeg 424w, https://substackcdn.com/image/fetch/$s_!4pc8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31b5e2ae-01bf-4d81-8e07-b3c07cfa8440_1000x420.jpeg 848w, https://substackcdn.com/image/fetch/$s_!4pc8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31b5e2ae-01bf-4d81-8e07-b3c07cfa8440_1000x420.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!4pc8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31b5e2ae-01bf-4d81-8e07-b3c07cfa8440_1000x420.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4pc8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31b5e2ae-01bf-4d81-8e07-b3c07cfa8440_1000x420.jpeg" width="1000" height="420" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/31b5e2ae-01bf-4d81-8e07-b3c07cfa8440_1000x420.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:420,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Cover image for What is '_spark_metadata' Directory in Spark Structured Streaming ?&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Cover image for What is '_spark_metadata' Directory in Spark Structured Streaming ?" title="Cover image for What is '_spark_metadata' Directory in Spark Structured Streaming ?" srcset="https://substackcdn.com/image/fetch/$s_!4pc8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31b5e2ae-01bf-4d81-8e07-b3c07cfa8440_1000x420.jpeg 424w, https://substackcdn.com/image/fetch/$s_!4pc8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31b5e2ae-01bf-4d81-8e07-b3c07cfa8440_1000x420.jpeg 848w, https://substackcdn.com/image/fetch/$s_!4pc8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31b5e2ae-01bf-4d81-8e07-b3c07cfa8440_1000x420.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!4pc8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F31b5e2ae-01bf-4d81-8e07-b3c07cfa8440_1000x420.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong><br>In this article, </strong>we'll explore a critical component of Spark Structured Streaming: the _spark_metadata directory<strong>.</strong></p><div><hr></div><p>In this article, we will assume the nature of streaming jobs as: </p><pre><code>Apache Kafka -&gt; Apache Spark -&gt; Apache Hadoop(HDFS)</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DNlW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4107f977-3597-423a-91f7-1308859f3ab1_800x363.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DNlW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4107f977-3597-423a-91f7-1308859f3ab1_800x363.png 424w, https://substackcdn.com/image/fetch/$s_!DNlW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4107f977-3597-423a-91f7-1308859f3ab1_800x363.png 848w, https://substackcdn.com/image/fetch/$s_!DNlW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4107f977-3597-423a-91f7-1308859f3ab1_800x363.png 1272w, https://substackcdn.com/image/fetch/$s_!DNlW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4107f977-3597-423a-91f7-1308859f3ab1_800x363.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DNlW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4107f977-3597-423a-91f7-1308859f3ab1_800x363.png" width="800" height="363" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4107f977-3597-423a-91f7-1308859f3ab1_800x363.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/35e96eb7-97ff-4abb-a94c-8512cd2b380e_800x363.png&quot;,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:363,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;sample architectural diagram &quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="sample architectural diagram " title="sample architectural diagram " srcset="https://substackcdn.com/image/fetch/$s_!DNlW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4107f977-3597-423a-91f7-1308859f3ab1_800x363.png 424w, https://substackcdn.com/image/fetch/$s_!DNlW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4107f977-3597-423a-91f7-1308859f3ab1_800x363.png 848w, https://substackcdn.com/image/fetch/$s_!DNlW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4107f977-3597-423a-91f7-1308859f3ab1_800x363.png 1272w, https://substackcdn.com/image/fetch/$s_!DNlW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4107f977-3597-423a-91f7-1308859f3ab1_800x363.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4>What is _spark_metadata Directory?</h4><ul><li><p>Every spark structured streaming job creates <code>_spark_metadata</code> directory in the destination file sink. This file sink could be any supported file system e.g. HDFS,GCS,S3,etc. .</p></li><li><p>This directory is specifically used for metadata management.</p></li><li><p>It manages the metadata of the spark structured streaming job that is writing to that path.</p></li><li><p><code>_spark_metadata</code> directory is not sharable among jobs, there is only one directory per job.</p></li><li><p><code>_spark_metadata</code> directory prevents writing from more than one spark structured streaming job at the same location, and this behaviour happens by design.</p></li><li><p>This directory will get created inside the output path.</p></li><li><p>This directory contains write-ahead logs for every batch run. This is how Spark can guarantee <code>exactly-once</code> when writing to a file sink.</p></li><li><p>For example: If the spark streaming job is writing to <code>hdfs://tmp/landing/streaming_store/</code> then <code>_spark_metadata</code> will by default be created at <code>hdfs://tmp/landing/streaming_store/_spark_metadata/</code></p></li></ul><h4>How to run multiple structured streaming jobs for the same output path?</h4><ul><li><p>You can not (last checked in Apache Spark 2.3). Due to the mere presence of <code>_spark_metadata</code> directory.</p></li><li><p>Even if you start multiple structured streaming jobs, only the first started job can write to the destination path. Other subsequent jobs will not write as well as not fail if <code>failOnDataLoss</code> option is set to <code>false</code>, this option is <code>true</code> by default. (Assumption is we are reading/consuming from Apache Kafka).</p></li><li><p>The path of this directory is unchangeable, it is hard coded.</p></li><li><p><code>FileStreamSink</code> is the class used while writing stream to supported file systems like <code>HDFS/S3/GCS</code> and so forth, see <a href="https://github.com/apache/spark/blob/v2.3.0/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/FileStreamSink.scala#L33">code</a> sample below:</p></li></ul><pre><code>scala
package org.apache.spark.sql.execution.streaming

import scala.util.control.NonFatal

import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.fs.Path

import org.apache.spark.internal.Logging
import org.apache.spark.internal.io.FileCommitProtocol
import org.apache.spark.sql.{DataFrame, SparkSession}
import org.apache.spark.sql.catalyst.expressions._
import org.apache.spark.sql.execution.datasources.{FileFormat, FileFormatWriter}

object FileStreamSink extends Logging {
// The name of the subdirectory that is used to store metadata about which files are valid.
val metadataDir = "_spark_metadata"
.
.
.</code></pre><h4>Structure of _spark_metadata directory: </h4><ul><li><p>It has files in incremental order for each batch, you can see file names as 0 / 1 / 2.</p></li><li><p>If we list the files under directory, it may look something like this:</p></li></ul><pre><code>/tmp/landing/streaming_store/_spark_metadata/0
/tmp/landing/streaming_store/_spark_metadata/1</code></pre><ul><li><p>If we <code>cat</code> the file, then it may look something like this:</p></li></ul><pre><code>$ hadoop fs -cat /tmp/landing/streaming_store/_spark_metadata/0
v1
{"path":"hdfs://tmp/landing/streaming_store/part-00000-34bdc752-70a2-310f-92dd-7ca9c000c34b-c000.snappy.parquet","size":2287,"isDir":false,"modificationTime":1616075186000,"blockReplication":1,"blockSize":33554432,"action":"add"}</code></pre><h4>What will happen if you delete _spark_metadata directory? </h4><ul><li><p>You will see exception `java.lang.IllegalStateException: /tmp/landing/streaming_store/_spark_metadata/0 doesn't exist when compacting batch &lt;batchNumber&gt;`</p></li><li><p>Data loss will be unrecoverable.</p></li></ul><p><strong>PS: &#128680; _spark_metadata should not be deleted at all. &#128680;</strong></p><p>Hey reader, since you've devoured every last word of this post like a champ, how about you reward yourself with a little email subscription ?</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://rovingdev.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://rovingdev.com/subscribe?"><span>Subscribe now</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Unlocking Docker: A Beginner's Guide to Ubuntu and Node.js installation]]></title><description><![CDATA[#ubuntu #docker #nodejs #containerization #node]]></description><link>https://rovingdev.com/p/unlocking-docker-a-beginners-guide</link><guid isPermaLink="false">https://rovingdev.com/p/unlocking-docker-a-beginners-guide</guid><dc:creator><![CDATA[Sukumaar Mane]]></dc:creator><pubDate>Wed, 04 Dec 2024 02:16:21 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!AoTB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F875f1de6-1617-44af-99e9-b55c6d0d37dc_1240x1064.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p>In this tutorial, let&#8217;s create a simple Docker container of Ubuntu and Node.js using a Dockerfile. This base Dockerfile will serve as a starting point for building custom Docker images. By leveraging this Dockerfile, we can automate the process of creating a standardized Ubuntu environment for our applications.</p></blockquote><p><strong>What this tutorial will have ? &#129300;:</strong></p><ul><li><p>Installation of packages via default package manager (apt)</p></li><li><p> Installation of application (Node.js) via precompiled binaries (<code>tar.xz</code>)</p></li><li><p>Editing <code>.bashrc</code> file</p><div><hr></div></li></ul><p> </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AoTB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F875f1de6-1617-44af-99e9-b55c6d0d37dc_1240x1064.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AoTB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F875f1de6-1617-44af-99e9-b55c6d0d37dc_1240x1064.png 424w, https://substackcdn.com/image/fetch/$s_!AoTB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F875f1de6-1617-44af-99e9-b55c6d0d37dc_1240x1064.png 848w, https://substackcdn.com/image/fetch/$s_!AoTB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F875f1de6-1617-44af-99e9-b55c6d0d37dc_1240x1064.png 1272w, https://substackcdn.com/image/fetch/$s_!AoTB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F875f1de6-1617-44af-99e9-b55c6d0d37dc_1240x1064.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AoTB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F875f1de6-1617-44af-99e9-b55c6d0d37dc_1240x1064.png" width="1240" height="1064" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/875f1de6-1617-44af-99e9-b55c6d0d37dc_1240x1064.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1064,&quot;width&quot;:1240,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:116439,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!AoTB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F875f1de6-1617-44af-99e9-b55c6d0d37dc_1240x1064.png 424w, https://substackcdn.com/image/fetch/$s_!AoTB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F875f1de6-1617-44af-99e9-b55c6d0d37dc_1240x1064.png 848w, https://substackcdn.com/image/fetch/$s_!AoTB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F875f1de6-1617-44af-99e9-b55c6d0d37dc_1240x1064.png 1272w, https://substackcdn.com/image/fetch/$s_!AoTB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F875f1de6-1617-44af-99e9-b55c6d0d37dc_1240x1064.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Docker, Ubuntu and Node.js official logos</figcaption></figure></div><p></p><div><hr></div><p><strong>Docker 101, what it is ? &#129299;:</strong></p><ul><li><p>Docker is a tool that helps developers package applications and all their necessary parts into a single container. Think of it like a lunchbox that holds a complete meal, so it can be easily transported and served anywhere. </p></li><li><p>This makes it simpler to run the application on different computers without worrying about missing ingredients. It helps ensure everything works smoothly in various environments. Overall, Docker makes software sharing and deployment more efficient and hassle-free.</p></li></ul><p><strong>Docker vs Virtual Machines :</strong></p><ul><li><p>Whatever Docker is doing sometimes looks like what a typical VM does, but there are many differences. The big difference is containerization. </p></li><li><p>Docker and virtual machines (VMs) are both ways to run software in separate environments on a computer. </p></li><li><p>Docker uses a lightweight method to package applications, allowing them to share the same operating system and resources, which makes it faster and uses less space. </p></li><li><p>In contrast, virtual machines create an entire separate computer environment, including its own operating system, which takes up more space and uses more resources.</p></li><li><p>This means Docker is typically quicker to start and more efficient for running applications. However, VMs provide greater isolation and can run different operating systems at the same time.</p></li></ul><p><strong>Let&#8217;s get into code &#128736;&#65039; :</strong></p><p><em>Prerequisites: <a href="https://docs.docker.com/engine/install/">Docker</a> has to be installed beforehand.</em></p><p>This is what my <code>Dockerfile</code> is looking like:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Y4DC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa43d8a9a-4cfd-4235-a734-ab5321ccb6bc_4716x4236.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Y4DC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa43d8a9a-4cfd-4235-a734-ab5321ccb6bc_4716x4236.png 424w, https://substackcdn.com/image/fetch/$s_!Y4DC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa43d8a9a-4cfd-4235-a734-ab5321ccb6bc_4716x4236.png 848w, https://substackcdn.com/image/fetch/$s_!Y4DC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa43d8a9a-4cfd-4235-a734-ab5321ccb6bc_4716x4236.png 1272w, https://substackcdn.com/image/fetch/$s_!Y4DC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa43d8a9a-4cfd-4235-a734-ab5321ccb6bc_4716x4236.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Y4DC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa43d8a9a-4cfd-4235-a734-ab5321ccb6bc_4716x4236.png" width="1456" height="1308" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a43d8a9a-4cfd-4235-a734-ab5321ccb6bc_4716x4236.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1308,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2191815,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Y4DC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa43d8a9a-4cfd-4235-a734-ab5321ccb6bc_4716x4236.png 424w, https://substackcdn.com/image/fetch/$s_!Y4DC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa43d8a9a-4cfd-4235-a734-ab5321ccb6bc_4716x4236.png 848w, https://substackcdn.com/image/fetch/$s_!Y4DC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa43d8a9a-4cfd-4235-a734-ab5321ccb6bc_4716x4236.png 1272w, https://substackcdn.com/image/fetch/$s_!Y4DC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa43d8a9a-4cfd-4235-a734-ab5321ccb6bc_4716x4236.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><ul><li><p>Look at line no. 3, if you do not set it then you can not perform <code>source ~/.bashrc </code>(line no. 29). If you can source your .bashrc then you can not use the libraries/tools/applications that you made available via &#8220;$PATH&#8221; variable.</p></li><li><p>This is an example commands to build Dockerfile and run container:</p></li></ul><pre><code>git clone https://github.com/sukumaar/docker-ubuntu-base.git
cd docker-ubuntu-base
docker build -t docker-ubuntu-base:1  .
docker run -it localhost/docker-ubuntu-base</code></pre><ul><li><p>After last the command, you will enter the container.</p></li><li><p>To exit the container, type <code>exit</code> and hit enter.</p></li><li><p>To check if your container is terminated or not, you can use this <a href="https://docs.docker.com/reference/cli/docker/container/ls/">command</a>: <code>docker ps</code></p></li><li><p>That&#8217;s all.</p></li></ul><p></p><p><em>Hey reader, since you've devoured every last word of this post like a champ, how about you reward yourself with a little email subscription ? </em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://rovingdev.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://rovingdev.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p>All code related to this tutorial is available here: <a href="https://github.com/sukumaar/docker-ubuntu-base">https://github.com/sukumaar/docker-ubuntu-base</a></p>]]></content:encoded></item><item><title><![CDATA[How to share constant values in Terraform?]]></title><description><![CDATA[#hashicorp #terraform #GCP #AWS #Azure]]></description><link>https://rovingdev.com/p/how-to-share-constant-values-in-terraform</link><guid isPermaLink="false">https://rovingdev.com/p/how-to-share-constant-values-in-terraform</guid><dc:creator><![CDATA[Sukumaar Mane]]></dc:creator><pubDate>Sat, 30 Nov 2024 02:20:52 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!wWzT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38240f74-5254-4178-903e-714851f8209e_2880x693.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><p>This tutorial will help you to solve the problem where you want to share common values among TF files or across modules.</p><p>Before approaching the problem, let's get some overview of Terraform and IaC.</p><div><hr></div><h4></h4><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wWzT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38240f74-5254-4178-903e-714851f8209e_2880x693.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wWzT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38240f74-5254-4178-903e-714851f8209e_2880x693.png 424w, https://substackcdn.com/image/fetch/$s_!wWzT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38240f74-5254-4178-903e-714851f8209e_2880x693.png 848w, https://substackcdn.com/image/fetch/$s_!wWzT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38240f74-5254-4178-903e-714851f8209e_2880x693.png 1272w, https://substackcdn.com/image/fetch/$s_!wWzT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38240f74-5254-4178-903e-714851f8209e_2880x693.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wWzT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38240f74-5254-4178-903e-714851f8209e_2880x693.png" width="1456" height="350" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/38240f74-5254-4178-903e-714851f8209e_2880x693.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:350,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;undefined&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="undefined" title="undefined" srcset="https://substackcdn.com/image/fetch/$s_!wWzT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38240f74-5254-4178-903e-714851f8209e_2880x693.png 424w, https://substackcdn.com/image/fetch/$s_!wWzT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38240f74-5254-4178-903e-714851f8209e_2880x693.png 848w, https://substackcdn.com/image/fetch/$s_!wWzT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38240f74-5254-4178-903e-714851f8209e_2880x693.png 1272w, https://substackcdn.com/image/fetch/$s_!wWzT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38240f74-5254-4178-903e-714851f8209e_2880x693.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a><figcaption class="image-caption">Terraform&#8217;s official logo</figcaption></figure></div><div><hr></div><h4>Terraform and IaC:</h4><ul><li><p>Terraform is an infrastructure-as-code (IaC) tool that allows users to define and manage cloud and on-premises infrastructure using a human-readable configuration file.</p></li><li><p>By writing infrastructure configurations in a high-level language, such as HashiCorp Configuration Language (HCL), Terraform enables users to version, reuse, and share their infrastructure configurations just like they would with application code.</p></li><li><p>At its core, Terraform uses a declarative approach, where users define what infrastructure they want to create, rather than how to create it. This means that Terraform takes care of the underlying complexity of provisioning and configuring infrastructure resources, allowing users to focus on defining the desired state of their infrastructure.</p></li><li><p>When a user runs Terraform, it reads the configuration file and creates a plan for the desired infrastructure state. Terraform then uses this plan to create, update, or delete infrastructure resources, such as virtual machines, networks, and storage, across a wide range of cloud and on-premises environments.</p></li><li><p>Terraform's IaC approach provides numerous benefits, including version control, reproducibility, and consistency, making it an essential tool for DevOps teams and infrastructure engineers. </p></li></ul><div><hr></div><h4>Problem:</h4><p>Let's come back to the problem statement, the agenda of this tutorial is to share common values among TF files.</p><h4>Why it is little complicated to do it in terraform?</h4><p>Terraform's modular design and lack of a built-in constant management system make it challenging to share constants across multiple modules and configurations.</p><h4>Solution:</h4><p>There are many ways to share common variables/constants/values, but I am going to focus on a method where we are going to create a separate module.</p><p><strong>Let's assume this is the structure of your current terraform infra code directory:</strong></p><pre><code>.
&#9500;&#9472;&#9472; instances.tf
&#9500;&#9472;&#9472; outputs.tf
&#9500;&#9472;&#9472; terraform.tfvars
&#9500;&#9472;&#9472; variables.tf
&#9492;&#9472;&#9472; version.tf</code></pre><p><strong>Shareable/common value can be added this way:</strong></p><ol><li><p>Add a module by creating a directory with the name of your choice, here I am <code>common_shared_vars</code> as directory name.</p></li><li><p>Under that, I will create <code>output.tf</code></p></li><li><p>I will mention the variable this way in the <code>output.tf </code>file</p><pre><code>output "vm_prefix" {
    value = "sample-tf-vm"
}</code></pre></li><li><p>Import the module by creating tf file, I am naming it as same as module directory for simplicity, <code>common_shared_vars.tf</code> . </p></li><li><p>In the <code>common_shared_vars.tf</code> file, source common_shared_vars directory. Like this:</p><pre><code>module "common_shared_vars"{
    source = "./common_shared_vars" 
}</code></pre></li><li><p>After this, all output values from <code>common_shared_vars/output.tf</code> file can be used like:</p><pre><code>${module.common_shared_vars.vm_prefix}</code></pre></li><li><p>Usage example, here I want to use <code>vm_prefix </code>in name of the vm resource.</p><pre><code>resource "aws_instance" "my_instance" {
  ami           = "ami-abcdxyz"  # Update with a valid AMI ID
  instance_type = "t2.micro"
  tags = {
    Name = "${module.common_shared_vars.vm_prefix}_${var.vm_name}"
  }
}</code></pre></li><li><p>Infrastructure code directory will look something like this:</p><pre><code>.
&#9500;&#9472;&#9472; common_shared_vars
&#9474;   &#9492;&#9472;&#9472; output.tf
&#9500;&#9472;&#9472; common_shared_vars.tf
&#9500;&#9472;&#9472; instances.tf
&#9500;&#9472;&#9472; outputs.tf
&#9500;&#9472;&#9472; terraform.tfvars
&#9500;&#9472;&#9472; variables.tf
&#9492;&#9472;&#9472; version.tf</code></pre></li><li><p>This is not the only way to solve the common shareable value/constant, there are other ways too. But, I prefer this one.</p></li></ol><p></p><p><em>Well, since you've devoured every last word of this post like a champ, how about you reward yourself with a little email subscription ?</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://rovingdev.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://rovingdev.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p>All codes related to this tutorial on my GitHub. <a href="https://github.com/sukumaar/tf-common-var">Click here for Github link of this tutorial</a>. <br><br><em>PS:Please note that the provided code is for illustrative purposes only and should not be used in a production environment without modification; it is recommended to adapt and customize the code to meet the specific requirements and needs of your production setup.</em></p><p></p>]]></content:encoded></item><item><title><![CDATA[What could be the future of Stack Overflow community after OpenAI partnership?]]></title><description><![CDATA[Some news about s/w developers' beloved stackoverflow community.]]></description><link>https://rovingdev.com/p/what-could-be-the-future-of-stack</link><guid isPermaLink="false">https://rovingdev.com/p/what-could-be-the-future-of-stack</guid><dc:creator><![CDATA[Sukumaar Mane]]></dc:creator><pubDate>Sat, 18 May 2024 21:19:54 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!g2t9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae64c926-0dab-422f-b195-bf17b97637a3_1846x1396.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This news came out on May 6, 2024 &#128467;&#65039;:</p><div class="pullquote"><p>Stack Overflow and OpenAI today announced a new API partnership that will empower developers with the collective strengths of the world's leading knowledge platform for highly technical content with the world's most popular LLM models for AI development. Here &#128279; : https://openai.com/index/api-partnership-with-stack-overflow/</p></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!g2t9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae64c926-0dab-422f-b195-bf17b97637a3_1846x1396.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!g2t9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae64c926-0dab-422f-b195-bf17b97637a3_1846x1396.png 424w, https://substackcdn.com/image/fetch/$s_!g2t9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae64c926-0dab-422f-b195-bf17b97637a3_1846x1396.png 848w, https://substackcdn.com/image/fetch/$s_!g2t9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae64c926-0dab-422f-b195-bf17b97637a3_1846x1396.png 1272w, https://substackcdn.com/image/fetch/$s_!g2t9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae64c926-0dab-422f-b195-bf17b97637a3_1846x1396.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!g2t9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae64c926-0dab-422f-b195-bf17b97637a3_1846x1396.png" width="1456" height="1101" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ae64c926-0dab-422f-b195-bf17b97637a3_1846x1396.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1101,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:245468,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!g2t9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae64c926-0dab-422f-b195-bf17b97637a3_1846x1396.png 424w, https://substackcdn.com/image/fetch/$s_!g2t9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae64c926-0dab-422f-b195-bf17b97637a3_1846x1396.png 848w, https://substackcdn.com/image/fetch/$s_!g2t9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae64c926-0dab-422f-b195-bf17b97637a3_1846x1396.png 1272w, https://substackcdn.com/image/fetch/$s_!g2t9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae64c926-0dab-422f-b195-bf17b97637a3_1846x1396.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h3>What it means &#129300;?</h3><ul><li><p>Stack Overflow and OpenAI have partnered to help developers by combining Stack Overflow's coding expertise with OpenAI's advanced AI models. Here read coding expertise as the questions and answers contributed to Stack Overflow by developers/ programmers from all over the world with their free will.</p></li><li><p>These contributions are from a variety of languages and frameworks. Developers have been contributing for more than a decade, were not aware that this data sharing partnership would ever happen.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zNnA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c4ea738-11ee-4d60-a54c-cb2857d0c14e_1300x916.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zNnA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c4ea738-11ee-4d60-a54c-cb2857d0c14e_1300x916.png 424w, https://substackcdn.com/image/fetch/$s_!zNnA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c4ea738-11ee-4d60-a54c-cb2857d0c14e_1300x916.png 848w, https://substackcdn.com/image/fetch/$s_!zNnA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c4ea738-11ee-4d60-a54c-cb2857d0c14e_1300x916.png 1272w, https://substackcdn.com/image/fetch/$s_!zNnA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c4ea738-11ee-4d60-a54c-cb2857d0c14e_1300x916.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zNnA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c4ea738-11ee-4d60-a54c-cb2857d0c14e_1300x916.png" width="494" height="348.08" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4c4ea738-11ee-4d60-a54c-cb2857d0c14e_1300x916.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:916,&quot;width&quot;:1300,&quot;resizeWidth&quot;:494,&quot;bytes&quot;:1296558,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!zNnA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c4ea738-11ee-4d60-a54c-cb2857d0c14e_1300x916.png 424w, https://substackcdn.com/image/fetch/$s_!zNnA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c4ea738-11ee-4d60-a54c-cb2857d0c14e_1300x916.png 848w, https://substackcdn.com/image/fetch/$s_!zNnA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c4ea738-11ee-4d60-a54c-cb2857d0c14e_1300x916.png 1272w, https://substackcdn.com/image/fetch/$s_!zNnA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c4ea738-11ee-4d60-a54c-cb2857d0c14e_1300x916.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">This is just a meme</figcaption></figure></div><div><hr></div><p></p><p>Community contributing developers might have surprised and startled due to sharing of their hard work to third party <a href="https://www.theverge.com/2024/5/8/24151906/stack-overflow-ai-protest-posts-deleted-restored">without consent of the original authors of the questions or answers</a>.</p><p></p><h3>In retaliation, what developers did &#128528;?</h3><ul><li><p>Developers started revolting against Stack Overflow. <a href="https://ca.news.yahoo.com/developers-really-not-happy-openai-101401197.html?guccounter=1">Some of them seems not happy with it</a>. </p></li><li><p>Deleted their highest rated answers from Stack Overflow &#128561;.</p></li><li><p>Deleted their profile from Stack Overflow.</p></li><li><p>There is an Q and A on Stack Overflow meta regarding OpenAI partnership that question has 877 downvotes as of 18th May 2024 &#129327;. This is the lowest rated answer I have ever seen on the Stack Overflow. Link here: <a href="https://meta.stackexchange.com/questions/399619/our-partnership-with-openai">https://meta.stackexchange.com/questions/399619/our-partnership-with-openai</a></p></li><li><p>Screenshot of above link:</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zZ1A!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83cbcfdd-e22e-4b60-9ac9-b928f42e19f5_852x554.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zZ1A!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83cbcfdd-e22e-4b60-9ac9-b928f42e19f5_852x554.png 424w, https://substackcdn.com/image/fetch/$s_!zZ1A!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83cbcfdd-e22e-4b60-9ac9-b928f42e19f5_852x554.png 848w, https://substackcdn.com/image/fetch/$s_!zZ1A!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83cbcfdd-e22e-4b60-9ac9-b928f42e19f5_852x554.png 1272w, https://substackcdn.com/image/fetch/$s_!zZ1A!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83cbcfdd-e22e-4b60-9ac9-b928f42e19f5_852x554.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zZ1A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83cbcfdd-e22e-4b60-9ac9-b928f42e19f5_852x554.png" width="596" height="387.5399061032864" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/83cbcfdd-e22e-4b60-9ac9-b928f42e19f5_852x554.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:554,&quot;width&quot;:852,&quot;resizeWidth&quot;:596,&quot;bytes&quot;:95345,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!zZ1A!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83cbcfdd-e22e-4b60-9ac9-b928f42e19f5_852x554.png 424w, https://substackcdn.com/image/fetch/$s_!zZ1A!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83cbcfdd-e22e-4b60-9ac9-b928f42e19f5_852x554.png 848w, https://substackcdn.com/image/fetch/$s_!zZ1A!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83cbcfdd-e22e-4b60-9ac9-b928f42e19f5_852x554.png 1272w, https://substackcdn.com/image/fetch/$s_!zZ1A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83cbcfdd-e22e-4b60-9ac9-b928f42e19f5_852x554.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ul><li><p>One of the concern developers have is attribution, as most LLM's do not provide attribution to any of the answer they provide to the user.</p></li><li><p>Stack Overflow started banning / suspending account of such community contributors &#129394;. <a href="https://www.bleepingcomputer.com/news/technology/stack-overflow-suspends-user-for-editing-posts-in-openai-protest/">link1</a>, <a href="https://www.theregister.com/2024/05/09/stack_overflow_banning_users_who/">link2</a>, <a href="https://www.zdnet.com/article/stack-overflow-could-suspend-your-account-if-you-change-a-post-to-protest-openais-deal/">link3</a>, <a href="https://futurism.com/the-byte/stack-overflow-bans-users-openai-training-data">link4</a>.</p></li></ul><p></p><h3>What could be the possible future of the Stack Overflow &#129299;?</h3><ul><li><p>There were so many user communities past which ended due to lack of any contribution.</p></li><li><p>In developer communities, the typical ways of contributing is via documentation, questions, answers, tutorials, notes.</p></li><li><p>Will something like below happen with Stack Overflow community in future? What are your thoughts on it ?</p></li><li><p>Whatever written in below flow diagram could be just speculation, it might even never happen.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QkaE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcd41a66-aa68-4277-8b84-3bade21dbdce_1218x1576.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QkaE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcd41a66-aa68-4277-8b84-3bade21dbdce_1218x1576.png 424w, https://substackcdn.com/image/fetch/$s_!QkaE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcd41a66-aa68-4277-8b84-3bade21dbdce_1218x1576.png 848w, https://substackcdn.com/image/fetch/$s_!QkaE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcd41a66-aa68-4277-8b84-3bade21dbdce_1218x1576.png 1272w, https://substackcdn.com/image/fetch/$s_!QkaE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcd41a66-aa68-4277-8b84-3bade21dbdce_1218x1576.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QkaE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcd41a66-aa68-4277-8b84-3bade21dbdce_1218x1576.png" width="1218" height="1576" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bcd41a66-aa68-4277-8b84-3bade21dbdce_1218x1576.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1576,&quot;width&quot;:1218,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:213362,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!QkaE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcd41a66-aa68-4277-8b84-3bade21dbdce_1218x1576.png 424w, https://substackcdn.com/image/fetch/$s_!QkaE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcd41a66-aa68-4277-8b84-3bade21dbdce_1218x1576.png 848w, https://substackcdn.com/image/fetch/$s_!QkaE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcd41a66-aa68-4277-8b84-3bade21dbdce_1218x1576.png 1272w, https://substackcdn.com/image/fetch/$s_!QkaE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcd41a66-aa68-4277-8b84-3bade21dbdce_1218x1576.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><div class="poll-embed" data-attrs="{&quot;id&quot;:176415}" data-component-name="PollToDOM"></div><p></p>]]></content:encoded></item><item><title><![CDATA[Local Kubernetes on Mac Apple Silicon without Docker]]></title><description><![CDATA[Install and use local Kubernetes on Mac Apple Silicon with Parallels Desktop for Mac]]></description><link>https://rovingdev.com/p/local-kubernetes-on-mac-apple-silicon</link><guid isPermaLink="false">https://rovingdev.com/p/local-kubernetes-on-mac-apple-silicon</guid><dc:creator><![CDATA[Sukumaar Mane]]></dc:creator><pubDate>Mon, 08 Apr 2024 04:32:05 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!-x6M!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d1b478-cc82-4c69-89de-a6ba5d14b336_1024x1024.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em><strong>Audience consideration for this tutorial</strong>: Someone who wants to test the code on local Kubernetes cluster and has Apple Mac devices with Apple Silicon.</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-x6M!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d1b478-cc82-4c69-89de-a6ba5d14b336_1024x1024.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-x6M!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d1b478-cc82-4c69-89de-a6ba5d14b336_1024x1024.webp 424w, https://substackcdn.com/image/fetch/$s_!-x6M!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d1b478-cc82-4c69-89de-a6ba5d14b336_1024x1024.webp 848w, https://substackcdn.com/image/fetch/$s_!-x6M!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d1b478-cc82-4c69-89de-a6ba5d14b336_1024x1024.webp 1272w, https://substackcdn.com/image/fetch/$s_!-x6M!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d1b478-cc82-4c69-89de-a6ba5d14b336_1024x1024.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-x6M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d1b478-cc82-4c69-89de-a6ba5d14b336_1024x1024.webp" width="422" height="422" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/69d1b478-cc82-4c69-89de-a6ba5d14b336_1024x1024.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:422,&quot;bytes&quot;:242114,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-x6M!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d1b478-cc82-4c69-89de-a6ba5d14b336_1024x1024.webp 424w, https://substackcdn.com/image/fetch/$s_!-x6M!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d1b478-cc82-4c69-89de-a6ba5d14b336_1024x1024.webp 848w, https://substackcdn.com/image/fetch/$s_!-x6M!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d1b478-cc82-4c69-89de-a6ba5d14b336_1024x1024.webp 1272w, https://substackcdn.com/image/fetch/$s_!-x6M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69d1b478-cc82-4c69-89de-a6ba5d14b336_1024x1024.webp 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Prerequisite:</strong></h3><ol><li><p>Apple Mac machine &#128187; / &#128421;&#65039;</p></li><li><p>Parallels Desktop (non-pro version will also work)</p></li><li><p>Some free storage on your SSD</p></li></ol><h3>Steps &#128736;&#65039;:</h3><ol><li><p>Create a Linux VM</p></li><li><p>Install prerequisites in the Linux VM</p></li><li><p>Install Kubernetes (Let&#8217;s call it k8s henceforth) and related applications for the k8s deployment.</p></li><li><p>Cluster creation</p></li></ol><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://rovingdev.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Sukumaar&#8217;s Substack! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h4>Step 1:</h4><ul><li><p>Download the <a href="https://rockylinux.org/">rocky linux</a> (a clone of RHEL).  Here is the download link of <a href="https://download.rockylinux.org/pub/rocky/9/isos/aarch64/Rocky-9.3-aarch64-minimal.iso">rocky 9</a> for arm64 architecture (i.e. for Apple Silicon).</p></li><li><p>Create a linux VM by following this guide: <a href="https://kb.parallels.com/128445">Install Linux virtual machine on a Mac with Apple M-Series chip</a> .</p></li><li><p>While installing, please select OS type as Red Hat Enterprise Linux / CentOS Linux.  Like this: </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1iRd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf4887e9-f44a-4533-b9da-c12e6a28d5f1_1740x1166.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1iRd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf4887e9-f44a-4533-b9da-c12e6a28d5f1_1740x1166.png 424w, https://substackcdn.com/image/fetch/$s_!1iRd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf4887e9-f44a-4533-b9da-c12e6a28d5f1_1740x1166.png 848w, https://substackcdn.com/image/fetch/$s_!1iRd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf4887e9-f44a-4533-b9da-c12e6a28d5f1_1740x1166.png 1272w, https://substackcdn.com/image/fetch/$s_!1iRd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf4887e9-f44a-4533-b9da-c12e6a28d5f1_1740x1166.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1iRd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf4887e9-f44a-4533-b9da-c12e6a28d5f1_1740x1166.png" width="1456" height="976" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cf4887e9-f44a-4533-b9da-c12e6a28d5f1_1740x1166.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:976,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!1iRd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf4887e9-f44a-4533-b9da-c12e6a28d5f1_1740x1166.png 424w, https://substackcdn.com/image/fetch/$s_!1iRd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf4887e9-f44a-4533-b9da-c12e6a28d5f1_1740x1166.png 848w, https://substackcdn.com/image/fetch/$s_!1iRd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf4887e9-f44a-4533-b9da-c12e6a28d5f1_1740x1166.png 1272w, https://substackcdn.com/image/fetch/$s_!1iRd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf4887e9-f44a-4533-b9da-c12e6a28d5f1_1740x1166.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div></li><li><p>Proceed with further process of the OS installation.</p></li></ul><h4>Step 2:</h4><ul><li><p>Start the vm and then install prerequisites with below commands </p></li></ul><pre><code>sudo dnf install openssh-server
ip address # note down the ip address</code></pre><p>PS: Please use the host IP address noted from above command to ssh the vm. It will be easy to just copy and paste commands from below section.</p><p></p><h4>Step 3:</h4><p>Install required libraries &#128071; , GitHub link &#128279; for commands : <strong><a href="https://gist.github.com/sukumaar/917f90dcfa88f5c297bb2754bbd05a41">k8s-kind-podman-installation-command.sh</a></strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UXtj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff22f32aa-7ef6-4afb-93ac-88e87b957ed0_2304x1804.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UXtj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff22f32aa-7ef6-4afb-93ac-88e87b957ed0_2304x1804.png 424w, https://substackcdn.com/image/fetch/$s_!UXtj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff22f32aa-7ef6-4afb-93ac-88e87b957ed0_2304x1804.png 848w, https://substackcdn.com/image/fetch/$s_!UXtj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff22f32aa-7ef6-4afb-93ac-88e87b957ed0_2304x1804.png 1272w, https://substackcdn.com/image/fetch/$s_!UXtj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff22f32aa-7ef6-4afb-93ac-88e87b957ed0_2304x1804.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UXtj!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff22f32aa-7ef6-4afb-93ac-88e87b957ed0_2304x1804.png" width="1200" height="939.5604395604396" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f22f32aa-7ef6-4afb-93ac-88e87b957ed0_2304x1804.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1140,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:547339,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!UXtj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff22f32aa-7ef6-4afb-93ac-88e87b957ed0_2304x1804.png 424w, https://substackcdn.com/image/fetch/$s_!UXtj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff22f32aa-7ef6-4afb-93ac-88e87b957ed0_2304x1804.png 848w, https://substackcdn.com/image/fetch/$s_!UXtj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff22f32aa-7ef6-4afb-93ac-88e87b957ed0_2304x1804.png 1272w, https://substackcdn.com/image/fetch/$s_!UXtj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff22f32aa-7ef6-4afb-93ac-88e87b957ed0_2304x1804.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h4>Step 4:</h4><ul><li><p>Create cluster through <code>kind</code></p></li></ul><pre><code>kind create cluster # default cluster is name is kind
kubectl cluster-info # check k8s cluster info
#or
kubectl cluster-info --context kind-kind
podman ps # check podman status</code></pre><p></p><p>Now you can use this cluster as any other normal testing k8s cluster. &#128512;&#128512;</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://rovingdev.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Sukumaar&#8217;s Substack! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item></channel></rss>