<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rohan Babbar</title>
    <description>The latest articles on DEV Community by Rohan Babbar (@rohanbabbar04).</description>
    <link>https://dev.to/rohanbabbar04</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3794121%2F4f62047c-fdac-4fe9-8635-4c26be3b2fc0.jpg</url>
      <title>DEV Community: Rohan Babbar</title>
      <link>https://dev.to/rohanbabbar04</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rohanbabbar04"/>
    <language>en</language>
    <item>
      <title>Openstack Heat Template: OS:Nova:KeyPair Issue</title>
      <dc:creator>Rohan Babbar</dc:creator>
      <pubDate>Sun, 01 Mar 2026 17:31:48 +0000</pubDate>
      <link>https://dev.to/rohanbabbar04/openstack-heat-template-osnovakeypair-issue-51g2</link>
      <guid>https://dev.to/rohanbabbar04/openstack-heat-template-osnovakeypair-issue-51g2</guid>
      <description>&lt;p&gt;OpenStack is an open source infrastructure platform that uses pooled  resources to build and manage private and public clouds. &lt;a href="https://docs.openstack.org/heat/rocky/template_guide/hot_guide.html" rel="noopener noreferrer"&gt;OpenStack Heat templates&lt;/a&gt; are files (usually YAML) that configure and automate the deployment of cloud infrastructure.&lt;/p&gt;

&lt;p&gt;Recently, I faced some issues while I was creating different heat templates and after further investigation I found that the issue was with &lt;code&gt;OS:Nova:KeyPair&lt;/code&gt;. If you are also facing a similar issue, I will be sharing the fix to this problem in this post.&lt;/p&gt;

&lt;h2&gt;
  
  
  What should work
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;new_keypair:
    type: OS::Nova::KeyPair
    properties:
      name: "test_key"
      save_private_key: true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ideally, the above code creates a new keypair with name "test_key" along with a public and private key which you can use to create server instances, etc.&lt;/p&gt;

&lt;p&gt;Now if this is not working for you and you are getting an error like below, the fix should work for you as well:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fidvu057gllbismumcr4f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fidvu057gllbismumcr4f.png" alt="Nova Version Error" width="302" height="103"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Case - 1 - Provide only the &lt;code&gt;public_key&lt;/code&gt; contents
&lt;/h2&gt;

&lt;p&gt;The error clearly states that you would need to pass in the &lt;code&gt;public_key&lt;/code&gt; as a new parameter.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public_key_content:
    type: string
    description: Keypair public key

new_keypair:
    type: OS::Nova::KeyPair
    properties:
      name: "test_key"
      public_key: { get_param: public_key_content }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above will work and a new keypair will be created with the public key provided.&lt;/p&gt;

&lt;h2&gt;
  
  
  Case - 2 - Provide both the &lt;code&gt;public_key&lt;/code&gt; and &lt;code&gt;private_key&lt;/code&gt; contents
&lt;/h2&gt;

&lt;p&gt;Now, when public_key is provided, it does not generate a private_key automatically so you cannot do something like &lt;code&gt;{ get_attr: [test_keypair, private_key] }&lt;/code&gt;. If you require the &lt;code&gt;private_key&lt;/code&gt; content, you would need to pass it as a new parameter.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;private_key_content:
    type: string
    hidden: true  # Pass as a hidden parameter 
    description: SSH private key

public_key_content:
    type: string
    description: Keypair public key

new_keypair:
    type: OS::Nova::KeyPair
    properties:
      name: "test_key"
      public_key: { get_param: public_key_content }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Run using the openstack stack create command
&lt;/h2&gt;

&lt;p&gt;To create a stack named &lt;code&gt;new-stack&lt;/code&gt; using a &lt;code&gt;template.yml&lt;/code&gt; can be done my passing the public and private key contents using the &lt;code&gt;--parameter-file&lt;/code&gt; argument.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export SSH_KEY=.ssh/id_rsa
openstack stack create new-stack -t ./template.yml --wait \
    --parameter-file private_key_content=${SSH_KEY} \
    --parameter-file public_key_content=${SSH_KEY}.pub
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>openstack</category>
      <category>infrastructure</category>
    </item>
    <item>
      <title>Spack: Package manager for MPI Cluster</title>
      <dc:creator>Rohan Babbar</dc:creator>
      <pubDate>Thu, 26 Feb 2026 10:41:34 +0000</pubDate>
      <link>https://dev.to/rohanbabbar04/spack-package-manager-for-mpi-cluster-13p</link>
      <guid>https://dev.to/rohanbabbar04/spack-package-manager-for-mpi-cluster-13p</guid>
      <description>&lt;p&gt;While working and managing my MPI Cluster, I wanted something which can easily manage my software packages and support multiple versions of the same package while also supporting multiple MPI implementations. I used to spend hours fixing the old builds and making sure the experiments I run work without anything bugging me.&lt;/p&gt;

&lt;p&gt;Few months back I found Spack, &lt;a href="https://github.com/spack/spack" rel="noopener noreferrer"&gt;Spack&lt;/a&gt; is an open source flexible package manager to easily install software packages for your HPC environment. Some advantages which it offers which are great if someone is trying to create an HPC cluster:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Spack is open source and can be installed quite easily. Many packages, containers like podman, apptainer can be found and installed using a single command.&lt;/li&gt;
&lt;li&gt;Spack supports multiple versions of the same package, for example you can install two separate versions of mpich and load whichever you want. Spack creates separate builds for each.&lt;/li&gt;
&lt;li&gt;Spack supports multiple implementations of software packages and handles loading and unloading of packages with ease which is great.&lt;/li&gt;
&lt;li&gt;Spack also provides environments, its used is pretty similar to what we have in &lt;code&gt;conda&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Quick commands
&lt;/h2&gt;

&lt;p&gt;Spack supports a lot of commands but here are some I personally recommend/use:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;spack install/uninstall &amp;lt;package&amp;gt;@version&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Installing/Uninstalling different packages in your cluster&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;spack load/unload &amp;lt;package&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Load and unload which package would you want to use, with all other dependencies handled automatically.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;spack list&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;See all available packages which are provided&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;spack env create &amp;lt;env&amp;gt;&lt;/code&gt; &lt;br&gt; &lt;code&gt;spack env activate &amp;lt;env&amp;gt;&lt;/code&gt; &lt;br&gt; &lt;code&gt;spack add &amp;lt;package&amp;gt;&lt;/code&gt; &lt;br&gt; &lt;code&gt;spack install&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Activate a spack env and install packages to create reproducible environment&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Another important package I personally use is LMod(Lua Modules), this  makes loading and unloading of packages easier. Spack integrates with LMod to generate module files and commands to manipulate them.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do I use it in my MPI Cluster
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Ensure that each of my nodes has Spack as their package manager, with each node having mpich and openmpi preinstalled using Spack. If required, I install other packages as well.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SSH into the login node and write and run scripts which will perform computations on the compute nodes and use spack or lmod commands to load/unload software packages.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run experiments and get your results; Spack handles all the dependencies automatically when loading new packages.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Spack even though is slightly slower when installing packages, because it builds from source, its flexibility across different supercomputing and HPC environments is great. The number of packages which are currently available is huge and is ever increasing making it an immediate choice for HPC experiments.&lt;/p&gt;

</description>
      <category>hpc</category>
      <category>spack</category>
      <category>mpi</category>
    </item>
  </channel>
</rss>
