<?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: Isah Idris</title>
    <description>The latest articles on DEV Community by Isah Idris (@eedygreen).</description>
    <link>https://dev.to/eedygreen</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%2F565463%2Fb0b1dfa6-1a86-4745-94b9-b4318c0180af.jpeg</url>
      <title>DEV Community: Isah Idris</title>
      <link>https://dev.to/eedygreen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eedygreen"/>
    <language>en</language>
    <item>
      <title>Tool Version Manager</title>
      <dc:creator>Isah Idris</dc:creator>
      <pubDate>Tue, 20 Sep 2022 21:08:17 +0000</pubDate>
      <link>https://dev.to/eedygreen/tool-version-manager-1afe</link>
      <guid>https://dev.to/eedygreen/tool-version-manager-1afe</guid>
      <description>&lt;h2&gt;
  
  
  Tool Version Manager
&lt;/h2&gt;

&lt;p&gt;Asdf is a tool version manager where all the tools and the versions are defined in a single file (.tool-versions). This single file can be shared across multiple teams to ensure everyone uses same versions of the same tool(s).&lt;/p&gt;

&lt;p&gt;Source: &lt;a href="https://asdf-vm.com/guide/introduction.html"&gt;asdf introduction page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reader’s Guide&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This technical documentation focus on Software Developers, DevOps, Cloud, SRE, System Engineers and Native Engineers that uses many tools.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.notion.so/Tool-Version-Manager-e8280abe22094d219853ee02bf075e40"&gt;Before Tool Version Manager&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.notion.so/Tool-Version-Manager-e8280abe22094d219853ee02bf075e40"&gt;Cons of Legacy Tools-Configurations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.notion.so/Tool-Version-Manager-e8280abe22094d219853ee02bf075e40"&gt;How Asdf works&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.notion.so/Tool-Version-Manager-e8280abe22094d219853ee02bf075e40"&gt;Asdf Setups&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Before Tool Version Manager
&lt;/h3&gt;

&lt;p&gt;The traditional method for multiple versions for a tool require various configurations which are also specific to tool and dependent on libraries. For an example, Let’s look at python on Mac.&lt;/p&gt;

&lt;p&gt;install python with Homebrew &lt;/p&gt;

&lt;p&gt;&lt;code&gt;brew install python&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This command will display the active python version&lt;/em&gt;&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; /usr/local/bin/python&lt;span class="k"&gt;*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This command will display all the installed python versions&lt;/em&gt;&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ln&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; /usr/local/bin/python3.8.1 /usr/local/bin/python
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This symlink command will change the active python version to python3.8.1&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This setup is a global wide configuration-That is-this configuration is not project specific. To be project specific will require performing the last two steps again and again as this case may require. And, indeed, this is a punishment 😢&lt;/p&gt;

&lt;p&gt;I’m a DevOps Engineer and I constantly work with many tools. From my experience over the years working for different companies and Crypto Fintech, I can tell you how painful this can be. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Imagine multiple clusters of different versions in different environments(Dev, Stage, Prod, QA…). Accessing these clusters where the client tool &lt;code&gt;kubectl&lt;/code&gt; requires different version. Another tool to consider is that of &lt;code&gt;terraform&lt;/code&gt; version constraints.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Cons of Legacy Tools Configuration
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The burden of constantly switching between one version and another&lt;/li&gt;
&lt;li&gt;It’s time-consuming just to access a tool&lt;/li&gt;
&lt;li&gt;Risk of breaking the system and re-installing from scratch&lt;/li&gt;
&lt;li&gt;Different virtual environments for each tool, such as Pyenv, nvm, rbenv&lt;/li&gt;
&lt;li&gt;Exports of multiple Paths as environmental variables&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How Asdf works
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Asdf&lt;/strong&gt; operates similar to nvm and other tool version managers but is not limited to a specific tool. Asdf uses plugins and this approach removes the constraints that a tool manager manages per tool with its own version file and commands. Thus, &lt;code&gt;asdf&lt;/code&gt; is a single command for accessing all tools through plugins and manages the versions through &lt;code&gt;.tool-verions&lt;/code&gt; file&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Once &lt;code&gt;asdf&lt;/code&gt; core is set up with your Shell configuration, plugins are installed to manage particular tools. When a tool is installed by a plugin, the executables that are installed have &lt;/em&gt;&lt;em&gt;&lt;a href="https://en.wikipedia.org/wiki/Shim_(computing)"&gt;shimsopen in new window&lt;/a&gt;&lt;/em&gt;&lt;em&gt; created for each of them. When you try and run one of these executables, the shim is run instead, allowing &lt;code&gt;asdf&lt;/code&gt; to identify which version of the tool is set in &lt;code&gt;.tool-versions&lt;/code&gt; and execute that version.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://asdf-vm.com/guide/introduction.html#related-projects:~:text=Once%20asdf%20core,%23"&gt;asdf page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is how asdf manages multiple tools I work with &lt;code&gt;asdf list&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZVM5cH4x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8efg0o9wvgnur4thyodd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZVM5cH4x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8efg0o9wvgnur4thyodd.png" alt="list of Asdf Plugins" width="432" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Asdf Setup
&lt;/h3&gt;

&lt;p&gt;Two method for installing asdf &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Git&lt;/li&gt;
&lt;li&gt;Package manager&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Git
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/asdf-vm/asdf.git ~/.asdf &lt;span class="nt"&gt;--branch&lt;/span&gt; v0.10.2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Export the path&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nv"&gt;$HOME&lt;/span&gt;/.asdf/asdf.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the &lt;a href="https://asdf-vm.com/guide/getting-started.html#_2-download-asdf"&gt;asdf page&lt;/a&gt; for specific installation according to your setup&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;USAGE&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Install the dependencies first before you proceeds. &lt;code&gt;brew install gpg gawk&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Let’s install &lt;code&gt;istio&lt;/code&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First, find the plugin
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# find the plugin&lt;/span&gt;
asdf plugin list all | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; istio
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Add the plugin
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# add the plugin&lt;/span&gt;
asdf plugin add istioctl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BJjirM_w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kqq5ezio8rirdj7gvdj6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BJjirM_w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kqq5ezio8rirdj7gvdj6.png" alt="List available versions" width="880" height="249"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;List available versions
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# list available versions&lt;/span&gt;
asdf list all istioctl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ojlQKayM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ueztndd533pr8oy8032s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ojlQKayM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ueztndd533pr8oy8032s.png" alt="list of istio versions" width="872" height="666"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install the version
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# install version 1.14.3&lt;/span&gt;
asdf &lt;span class="nb"&gt;install &lt;/span&gt;istioctl 1.14.3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;List installed istio versions
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# list the installed versions&lt;/span&gt;
asdf list istioctl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2dsZFHhQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3nhj3vui1j6fpuf5llr8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2dsZFHhQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3nhj3vui1j6fpuf5llr8.png" alt="installing istio" width="880" height="242"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Version File
&lt;/h3&gt;

&lt;p&gt;Asdf uses &lt;code&gt;.tool-versions&lt;/code&gt; file to track which version to use when the command is invoked. Let’s see what happens when istio cli tool  &lt;code&gt;istioctl&lt;/code&gt; is invoked.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;istioctl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CrZ4Z_ta--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wq3zf6cnp05yab8qfj0q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CrZ4Z_ta--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wq3zf6cnp05yab8qfj0q.png" alt="istioctl" width="826" height="258"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If the version is not set, asdf complains with this error ☝️&lt;/p&gt;

&lt;p&gt;Let set the version 1.15.0&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the &lt;code&gt;.tool-versions&lt;/code&gt; file &lt;/li&gt;
&lt;li&gt;Add the version as the 👇
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;istioctl 1.15.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QOD4haGg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jxyyv9slfkvwcxdo9aa6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QOD4haGg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jxyyv9slfkvwcxdo9aa6.png" alt="istio config in .tool-versions" width="784" height="114"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Save the file&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Try it again, istioctl will display the usage just like this 👇&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;istioctl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eSYB9pQC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n226oh094dq6eocw479d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eSYB9pQC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n226oh094dq6eocw479d.png" alt="istio is working" width="880" height="785"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How To Set Version
&lt;/h3&gt;

&lt;p&gt;There are two types of versions and this sublimes the problems of tools versioning.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Global Versioning&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Local Versioning&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;There are two approaches to set versioning for asdf. The declarative and the imperative approach. If you are DevOps Engineer or Software Developer you probably prefer the declarative approach. Though the imperative way is faster.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Quick check&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;which version is the current global&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;asdf current istioclt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="//Tool%20Version%20Manager%20e8280abe22094d219853ee02bf075e40/Screen_Recording_2022-09-20_at_3.56.27_PM.mov"&gt;istio current version&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Global Versioning
&lt;/h3&gt;

&lt;p&gt;Recall the configuration of &lt;code&gt;.tool-versions&lt;/code&gt; file as in this &lt;a href="https://www.notion.so/Tool-Version-Manager-e8280abe22094d219853ee02bf075e40"&gt;block&lt;/a&gt;. That was global versioning. It turns out that by default &lt;code&gt;asdf&lt;/code&gt; is a global version. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Declarative Approach&lt;/strong&gt; is the first approach by creating a &lt;code&gt;.tool-versions&lt;/code&gt; file and adding the tool-name, then space, the version-number.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;istioctl 1.15.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Imperative Approach&lt;/strong&gt; is the use of cli with the &lt;code&gt;asdf&lt;/code&gt; command and the flag &lt;code&gt;global&lt;/code&gt;. Here is an example on how to do that 👇.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;asdf global istioctl 1.15.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's promote the second version of &lt;a href="https://www.notion.so/Tool-Version-Manager-e8280abe22094d219853ee02bf075e40"&gt;istio 1.14.3&lt;/a&gt; to global using the imperative approach 👇&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;asdf global istioctl 1.14.3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--u1ON6DEj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xwvudppqcu8tam2nqenh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--u1ON6DEj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xwvudppqcu8tam2nqenh.png" alt="istio global versions" width="880" height="735"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;asdf global&lt;/code&gt; command updated the tool from 1.15.0 to 1.14.3 in &lt;code&gt;.tool-versions&lt;/code&gt; file. You see the imperative approach is faster but the declarative approach is safer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Local Versioning
&lt;/h3&gt;

&lt;p&gt;Local versioning allows you to set the tool version at project level. &lt;/p&gt;

&lt;p&gt;What does that even mean? &lt;/p&gt;

&lt;p&gt;You are allowed to set a version according to your working directory. Let’s try the two approaches.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Declarative Approach&lt;/strong&gt; for local versioning is similar to the global versioning as &lt;a href="https://www.notion.so/Tool-Version-Manager-e8280abe22094d219853ee02bf075e40"&gt;previously discussed&lt;/a&gt;. The difference is the directory. The Global version uses the &lt;code&gt;.tool-versions&lt;/code&gt; file in the &lt;strong&gt;$HOME&lt;/strong&gt; directory while the Local version uses the &lt;code&gt;.tool-versions&lt;/code&gt; in the working &lt;strong&gt;$PWD&lt;/strong&gt; directory.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Create a .tool-versions file in your project directory and add the tool, then space, the version number &lt;code&gt;istioctl 1.15.0&lt;/code&gt;. See the illustration using the imperative approach.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Imperative Approach&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The istio_confidential is my project directory where I want to use istio 1.15.0&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;istio_confidential

asdf &lt;span class="nb"&gt;local &lt;/span&gt;istioctl 1.15.0

&lt;span class="c"&gt;# view the .tool-versions file&lt;/span&gt;
&lt;span class="nb"&gt;cat&lt;/span&gt; .tool-versions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3uKxIIWh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/idg6xiyjyfep7j5o53z7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3uKxIIWh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/idg6xiyjyfep7j5o53z7.png" alt="istio imperative" width="880" height="789"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A .tool-versions file is created and version 1.15.0 is set for this project.&lt;/p&gt;

&lt;p&gt;Next, check the current istioctl version in the project directory (local) and outside the directory (global) 👇&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;asdf current istioctl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3z2GPMay--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/smrobzv1hqpma90pawdz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3z2GPMay--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/smrobzv1hqpma90pawdz.png" alt="istio versions locally and globally" width="880" height="129"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💪 Congratulations !!! &lt;/p&gt;

&lt;p&gt;You have installed asdf, added plugins and configure the versions, globally and locally. You have also successfully set two different istio versions on your machine, one for your project and the other globally accessible. &lt;/p&gt;

&lt;p&gt;You can install many versions and set different versions for different projects.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
