<?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"><channel><title><![CDATA[Vital Tech Blog]]></title><description><![CDATA[Vital Tech Blog]]></description><link>https://blog.vitaltechmyanmar.com</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1725508071690/1db7c12c-2d2a-493d-85bc-2a755765028f.jpeg</url><title>Vital Tech Blog</title><link>https://blog.vitaltechmyanmar.com</link></image><generator>RSS for Node</generator><lastBuildDate>Fri, 24 Apr 2026 19:56:36 GMT</lastBuildDate><atom:link href="https://blog.vitaltechmyanmar.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Vagrant For Beginner]]></title><description><![CDATA[What is Vagrant?
Vagrant ဆိုတာကတော့ Virtual Machines တွေကိုတည်ဆောက်ဖို့နဲ့ manage လုပ်ဖို့အတွက် အသုံးပြုရတဲ့ command-line tool တစ်ခုပဲဖြစ်ပါတယ်။ Vagrant သည် ပုံမှန် virtualbox, vmware တို့မှာ Virtual ]]></description><link>https://blog.vitaltechmyanmar.com/vagrant-for-beginner</link><guid isPermaLink="true">https://blog.vitaltechmyanmar.com/vagrant-for-beginner</guid><dc:creator><![CDATA[Sc3p73R]]></dc:creator><pubDate>Mon, 23 Mar 2026 09:41:12 GMT</pubDate><content:encoded><![CDATA[<h3><strong>What is Vagrant?</strong></h3>
<p>Vagrant ဆိုတာကတော့ Virtual Machines တွေကိုတည်ဆောက်ဖို့နဲ့ manage လုပ်ဖို့အတွက် အသုံးပြုရတဲ့ command-line tool တစ်ခုပဲဖြစ်ပါတယ်။ Vagrant သည် ပုံမှန် virtualbox, vmware တို့မှာ Virtual Machine Environment တစ်ခု ဖန်တီးသလိုပဲဖြစ်ပြီး မတူညီတဲ့အချက် ကတော့ virtualbox, vmware တို့မှာ မိမိအသုံးပြုချင်သည့် Os ကို Installation လုပ်ပြီးမှ အသုံးပြုလို့တာပဲဖြစ်ပါသည်။ Vagrant မှာတော့ပုံမှန် Traditional နည်းအတိုင်း (e.g. virtualbox) ပေါ်မှာပဲဖြစ်ဖြစ် Os Installation လုပ်ပြီးသုံးတာမျိုးမဟုတ်တော့ပဲ Vagrant ဆိုသည့် command-line tool ကိုသုံးပြီး မိမိအသုံးပြုချင်သည့် os ကို hypervisor ပေါ်မှာ command နဲ့ တန်း run ပြီး တော့အသုံးပြုလို့ရတာပဲဖြစ်ပါတယ်။</p>
<p>ပုံမှန်အားဖြင့် Vagrant ကို developers တွေက သူတို့ development environment အဖြစ်အသုံး ပြုကြတာမျိုးပဲဖြစ်ပါတယ်။ Vagrant ကိုအသုံးပြုဖို့အတွက် Hypervisor တစ်ခုခုလိုအပ်မည်ဖြစ် ပြီး ဒီ Lab လေးမှာတော့ ကျွန်တော်က virtualbox ကို အသုံးပြုသွားမှာပဲဖြစ်ပါတယ်။</p>
<h3><strong>Vagrant Installation step by step</strong></h3>
<p>Vagrant ကို Installation မလုပ်ခင် prerequisite အနေနဲ့ ကျွန်တော်တို့ရဲ့ စက်ထဲမှာ virtualbox နဲ့ vagrant package ကိုအရင်သွင်းထားဖို့ လိုအပ်ပါသည်။ ကျွန်တော်ကတော့ ubuntu ပေါ်မှာ lab စမ်းပြမှာဖြစ်သည့်အတွက် Windows User တွေနဲ့တော့ package installation step ကတော့ ကွဲလွဲနေမည်ဖြစ်ပါသည်။</p>
<p>ubuntu ပေါ်မှာ virtualbox installation မလုပ်ရသေးဘူးဆိုရင်တော့ အောက်ပါ command ကို အသုံးပြုပြီးတော့ virtualbox ကို installation လုပ်နိုင်ပါတယ်။</p>
<pre><code class="language-shell">sudo apt update
sudo apt install virtualbox
</code></pre>
<p>Windows User အတွက်ကတော့ virtualbox official website <a href="https://www.virtualbox.org/"><strong>https://www.virtualbox.org/</strong></a> သွားပြီး download ဆွဲပြီး install လုပ်နိုင်ပါတယ်။</p>
<p>နောက်ထပ် Vagrant Installation လုပ်ဖို့အတွက် Vagrant website ကို သွားပါမယ်။</p>
<p><a href="https://www.vagrantup.com/"><strong>https://www.vagrantup.com/</strong></a></p>
<p>အဲ့ link အတိုင်းသွားပြီး vagrant community version ကို download ဆွဲနိုင်ပါတယ်။ Windows User တွေကတော့ windows ကို ရွေးပြီး download ဆွဲနိုင်ပါတယ်။ Linux User တွေကတော့ Linux ကို ရွေးပြီးတော့ မိမိအသုံးပြုသည့် distro အတိုင်း download ဆွဲရမှာဖြစ်ပါတယ်။</p>
<img src="https://cdn.hashnode.com/uploads/covers/646edfeb0ed089624d33fe3c/08714e23-2fb6-4442-8b84-c8d73698be3d.png" alt="" style="display:block;margin:0 auto" />

<p>ကျွန်တော်ကတော့ Ubuntu သုံးတာဖြစ်သည့်အတွက်ubuntu tab ထဲမှာရေးထားသည့် instruction အတိုင်း လုပ်သွားမှာဖြစ်ပါတယ်။</p>
<pre><code class="language-shell">wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update &amp;&amp; sudo apt install vagrant
</code></pre>
<p>Vagrant ကို installation လုပ်ပြီးသွားရင်တော့ Terminal မှာ vagrant version ကိုစစ်ကြည့်လို့ရ ပါတယ်။</p>
<pre><code class="language-shell">vagrant --version
</code></pre>
<p>အဲ့လိုစစ်လိုက်ရင်တော့ output အနေနဲ့ Vagrant Version ကို ပြန်ထုတ်ပေးမှာပဲဖြစ်ပါတယ်။ ဒါဆို ရင်တော့ vagrant installation step ကပြီးသွားပြီပဲဖြစ်ပါတယ်။</p>
<h3><strong>Getting Started with Vagrant</strong></h3>
<p>vagrant ကိုအသုံးပြုဖို့အတွက် အရင်ဆုံးအနေနဲ့ project directory လေးတစ်ခု ဆောက်ပေးရမှာ ဖြစ်ပါတယ်။</p>
<pre><code class="language-plaintext">mkdir vagrant-lab
cd vagrant-lab
</code></pre>
<p>Directory ဆောက်ပြီးသွားရင်တော့ အဲ့ directory ထဲ ဝင်ပြီး vagrant init ဆိုတဲ့ command အသုံးပြုပေးရမှာဖြစ်ပါတယ်။ နောက်ထပ် သိထားရမှာတော့ Vagrant Boxes ဖြစ်ပြီး သူကတော့ ကျွန်တော်တို့ pre-build os image တွေကိုစုထားတဲ့ Vagrant Cloud ပဲဖြစ်ပါတယ်။ မိမိအသုံးပြု ချင်သည့် os ကို ရှာဖို့အတွက်အရင်ဆုံး အနေနဲ့ Vagrant Boxes မှာအရင်ရှာရမှာဖြစ်ပါတယ်။</p>
<p><a href="https://app.vagrantup.com/boxes/search"><strong>https://app.vagrantup.com/boxes/search</strong></a></p>
<img src="https://cdn.hashnode.com/uploads/covers/646edfeb0ed089624d33fe3c/563a277f-44e9-4fe0-af11-fd716551e0f2.png" alt="" style="display:block;margin:0 auto" />

<p>ကျွန်တော်ကတော့အဲ့ထဲက <strong>bento/ubuntu-22.04</strong> ဆိုသည့် image name ကိုအသုံးပြုမှာဖြစ်ပါ တယ်။ မိမိအသုံးပြုချင်သည့် image သိသွားပြီဆိုတော့ ခုနကတည်ဆောက်ခဲ့သည့် directory လေးမှာ အောက်ပါ command လေးကို ရိုက်ပေးရမည်ဖြစ်ပါသည်။</p>
<pre><code class="language-shell">vagrant init bento/ubuntu-22.04
</code></pre>
<p>ထိုကဲ့သို့ရိုက်လိုက်တာနဲ့ bento/ubuntu-22.04 ဆိုသည့် image လေးကို download ဆွဲသွားမှာ ဖြစ်ပါတယ်။ download ဆွဲလို့ ပြီးသွားရင်တော့ အောက်ပါအတိုင်းပြမည်ဖြစ်ပါသည်။</p>
<pre><code class="language-shell">A Vagrantfile has been placed in this directory. You are now ready to vagrant up your first virtual environment! Please read the comments in the Vagrantfile as well as documentation on vagrantup.com for more information on using Vagrant.
</code></pre>
<p>ပြီးရင်တော့ နောက်ထပ် vagrant up ဆိုသည့် command ရိုက်လိုက်တာနဲ့ virtualbox ပေါ်မှာ virtual machine တစ်ခု တည်ဆောက်သွားမှာပဲဖြစ်ပါတယ်။ အရင်ဆုံးအနေနဲ့ vagrant up command မရိုက်ခင်မှာ Vagrant Configuration File ထဲမှာconfig လေးတွေပြင်ပေးရပါဦးမယ်။ ကျွန်တော်တို့ခုနက vagrant init bento/ubuntu-22.04 ရိုက်လိုက်လို့ image download ဆွဲလို့ ပြီးသွားသည့်အချိန်မှာ ကျွန်တော်တို့ vagrant init ရိုက်လိုက်သည့် directory ထဲကို Vagrantfile ဆိုသည့် Vagrant Config File လေးက ရောက်လာမှာဖြစ်ပါတယ်။</p>
<p>ကျွန်တော်ကတော့ Vagrantfile config တွေပြင်ဖို့အတွက် vscode ကိုသုံးထားတာဖြစ်ပါတယ်။</p>
<pre><code class="language-ruby"># -*- mode: ruby -*-
# vi: set ft=ruby :

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.

Vagrant.configure("2") do |config|
  config.vm.box = "bento/ubuntu-22.04"
  config.vm.hostname= 'vagrant-lab'
 
# Create a private network, which allows host-only access to the machine
# using a specific IP.
  config.vm.network "private_network", ip: "192.168.56.10" 
  config.vm.provider "virtualbox" do |vb|
     vb.name = "srv-01"
     vb.cpus = "1"
     #vb.gui = true

     # Customize the amount of memory on the VM:
     vb.memory = "2048"
   end
# View the documentation for the provider you are using for more
# information on available options.
# Enable provisioning with a shell script. Additional provisioners such as
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
# documentation for more information about their specific syntax and use.
# config.vm.provision "shell", inline: &lt;&lt;-SHELL
#   apt-get update
#   apt-get install -y apache2
# SHELL
end
</code></pre>
<pre><code class="language-ruby">Vagrant.configure("2") do |config|
</code></pre>
<p>vagrant.configure ဆိုသည့် နေရာမှာတော့ ဘာမှပြင်စရာမလိုပါဘူး။ <a href="http://config.vm.box">config.vm.box</a> နေရာမှာ မိမိအသုံးပြုချင်သည့် Vagrant Boxes က image name ကိုထည့်ပေးရမည်ဖြစ်ပြီး config.vm.hostname နေရမှာတော့ Virtual Machine Hostname ကိုပေးချင်သည့် နာမည် ထည့်ပေးရမှာပဲဖြစ်ပါတယ်။</p>
<pre><code class="language-ruby">config.vm.box = "bento/ubuntu-22.04"
config.vm.hostname= 'vagrant-lab'
</code></pre>
<p>နောက်ထပ် virutalbox ရဲ့Host-only adapter Network ကိုအသုံးပြုရမှာဖြစ်သည့်အတွက် သူရဲ့ ip ကိုထည့်ပေးရမှာပဲဖြစ်ပါတယ်။</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1705916905300/e5c231bd-b9fd-4a76-b1a9-ddcc931ec233.png" alt="" style="display:block;margin:0 auto" />

<p>virutalbox ရဲ့Host-only adapter Network မှာအသုံးပြုထားတာက 192.168.56.1 ဖြစ်သည့် အတွက်ကျွန်တော်တို့ရဲ့ <a href="http://config.vm.network">config.vm.network</a> မှာတော့ အဲ့ဒီရဲ့ ip range ထဲမှာရှိသည့် ip ကိုထည့် ပေးရမှာဖြစ်ပါတယ်။</p>
<pre><code class="language-plaintext">config.vm.network "private_network", ip: "192.168.56.10"
</code></pre>
<p>နောက်ဆုံးအဆင့်အနေနဲ့ ဘယ် vm provider ကိုအသုံးပြုမလဲဆိုတာရွေးခိုင်းမည်ဖြစ်ပါတယ်။ Vagrantfile ရဲ့ default config မှာတော့ virtualbox က default ဖြစ်နေမှာပဲဖြစ်ပါတယ်။</p>
<pre><code class="language-plaintext">   config.vm.provider "virtualbox" do |vb|
     vb.name = "srv-01"
     vb.cpus = "1"
     vb.memory = "2048"
</code></pre>
<p>config.vm.provider ကတော့ virtualbox သုံးမှာဖြစ်သည့်အတွက် ဘာမှမပြင်တော့ပါဘူး။ <a href="http://vb.name">vb.name</a> မှာဆိုရင်တော့ virutalbox တွင် create လုပ်ရင်ပေးရသည့် vm name ကိုပဲ ပေးခိုင်း ခြင်းဖြစ်ပါသည်။ vb.cpus မှာတော့ မိမိအသုံးပြုမည့် cpu အရေအတွက်ကို ထည့်ပေးရမည်ဖြစ် ပြီး vb.memory မှာတော့ မိမိ vm မှာ အသုံးပြုချင်သည့် memory size ကိုထည့်ခိုင်းတာပဲဖြစ်ပါ သည်။</p>
<p>တခြား vm provider တွေအတွက်အသုံးပြုချင်ရင်တော့ Vagrant ရဲ့ Official Documentation ထဲမှာ ရေးပေးထားတာတွေရှိပါတယ်။ ကျွန်တော်ရေးပြတာထပ် Official Documentation ကိုပဲ ပိုပြီးဖတ်စေချင်တဲ့အတွက်ကြောင့် Documentation Link ကိုပဲ ထည့်ပေးထားပါတယ်။</p>
<p><a href="https://developer.hashicorp.com/vagrant/docs"><strong>https://developer.hashicorp.com/vagrant/docs</strong></a></p>
<p>VagrantFile ထဲမှာ Config တွေအကုန်လုံးပြင်ပြီးသွားရင်ဆိုရင်တော့ vagrant up ရိုက်ရပါမည်။ vagrant up ဆိုသည့် command ကိုရိုက်လိုက်တာနဲ့ virtualbox ထဲမှာ vm တစ်လုံးတည်ဆောက် ပြီး virtual machine တစ်ခါတည်း run သွားမည်ဖြစ်ပါသည်။</p>
<img src="https://cdn.hashnode.com/uploads/covers/646edfeb0ed089624d33fe3c/d970f67d-493a-48c4-8657-aaf12c731571.png" alt="" style="display:block;margin:0 auto" />

<p>အထက်ပါအတိုင်း ဘာ error မှမတက်ပဲပြီးသွားရင်တော့ configuration မှန်လို့ပဲဖြစ်ပါတယ်။ ဒါဆိုရင်တော့ virtual machine ထဲကို login ဝင်ဖို့အတွက် အဲ့ဒီ directory ထဲကနေပဲ</p>
<pre><code class="language-shell">vagrant ssh
</code></pre>
<p>ဆိုသည့် command ကိုရိုက်ပြီး vm ထဲ login ဝင်လို့ရမည်ဖြစ်ပါသည်။</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1705917814136/ade87e37-df25-4c31-98ef-22a671d7a1e9.png" alt="" style="display:block;margin:0 auto" />

<p>ဒါဆိုရင်တော့ ပုံပါအတိုင်း ကျွန်တော်တို့တည်ဆောက်ခဲ့သည့် vagrant-lab ဆိုသည့် အမည်ရှိသည့် virtual machine ထဲကို ရောက်သွားပြီပဲ ဖြစ်ပါတယ်။ traditional vm installation state လိုမျိုး installation state ကို အချိန်သီးသန့်ပေးစရာမလိုတော့ပဲ မိမိအသုံးပြုချင်သည့် development envrionment ကိုမြန်မြန်ဆန်ဆန် စမ်းသပ်နိုင်မှာပဲဖြစ်ပါတယ်။</p>
<p>Virtual Machine ပြန်ဖျက်ချင်ရင်တော့ vm ထဲကနေ exit လုပ်ပြီး vagrant-lab directory ထဲက နေပဲ</p>
<pre><code class="language-shell">vagrant destroy
</code></pre>
<p>ဆိုသည့် command အသုံးပြုပြီးဖျက်နိုင်ပါသည်။ vagrant destroy ဆိုပြီးရိုက်လိုက်သည့် အခါ တွင် ဒီ vm ဖျက်မှာလားဆိုပြီး အတည်ပြုခိုင်းမှာဖြစ်ပြီးတော့ y ကိုရေးပြီး enter နှိပ်လိုက်ရင်တော့ virtualbox ထဲတွင် ရှိနေသည့် virtual machine ကို ဖြတ်သွားမှာပဲဖြစ်ပါတယ်။</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1705918135161/9d5c90d1-04f8-47e7-bfea-ce7eaa682aad.png" alt="" style="display:block;margin:0 auto" />

<p>ဒီလောက်ဆိုရင်တော့ vagrant အသုံးပြုနည်းကို တီးမိခေါက်မိ ရှိလောက်သွားမယ်ထင်ပါတယ်။နောက်ထပ်အားရင်အားသလို vagrant နဲ့ပတ်သက်သည့် အကြောင်းအရာများကိုလဲ ဆက်ရေးပေး သွားပါဦးမယ်။</p>
<p>Original Post : <a href="https://blog.waiyan.dev/vagrant-for-beginner">Vagrant For Beginner</a></p>
<p># It was written on January 22, 2024.</p>
]]></content:encoded></item><item><title><![CDATA[Why need to associate IAM OIDC Provider for Amazon EKS Cluster?]]></title><description><![CDATA[Amazon EKS cluster မှာ OpenID Connect (OIDC) provider ကို associate လုပ်ရခြင်းရဲ့ အဓိကအကြောင်းရင်းကတော့ Security နဲ့ Access Control ကို ပိုမိုကောင်းမွန်အောင်ပြုလုပ်နိုင်ဖို့ဖြစ်ပါတယ်။ အဓိကအားဖြင့် အချက် (၂) ချက်ရှိပါတယ်။

To use IAM Roles for Service...]]></description><link>https://blog.vitaltechmyanmar.com/why-need-to-associate-iam-oidc-provider-for-amazon-eks-cluster</link><guid isPermaLink="true">https://blog.vitaltechmyanmar.com/why-need-to-associate-iam-oidc-provider-for-amazon-eks-cluster</guid><category><![CDATA[Elastic Kubernetes Service]]></category><category><![CDATA[Kubernetes]]></category><dc:creator><![CDATA[Sc3p73R]]></dc:creator><pubDate>Fri, 10 Oct 2025 09:19:11 GMT</pubDate><content:encoded><![CDATA[<p>Amazon EKS cluster မှာ OpenID Connect (OIDC) provider ကို associate လုပ်ရခြင်းရဲ့ အဓိကအကြောင်းရင်းကတော့ Security နဲ့ Access Control ကို ပိုမိုကောင်းမွန်အောင်ပြုလုပ်နိုင်ဖို့ဖြစ်ပါတယ်။ အဓိကအားဖြင့် အချက် (၂) ချက်ရှိပါတယ်။</p>
<ul>
<li><p>To use IAM Roles for Service Accounts (IRSA)</p>
</li>
<li><p>To authenticate user authentication to the Kubernetes Cluster</p>
</li>
</ul>
<h2 id="heading-to-use-iam-roles-for-service-accounts-irsa">To use IAM Roles for Service Accounts (IRSA)</h2>
<p>ပုံမှန်အားဖြင့် EKS cluster ထဲမှာ run နေတဲ့ application (pods) တွေက S3, DynamoDB, SQS စတဲ့ အခြား AWS service တွေကို သုံးဖို့လိုအပ်လာတဲ့အခါမှာ AWS credentials တွေကို လုံလုံခြုံခြုံနဲ့ ပေးဖို့လိုပါတယ်။ OIDC provider ကို EKS cluster နဲ့ associate လုပ်ထားတဲ့အခါမှာ Kubernetes service account တွေကို AWS IAM role တွေနဲ့ ချိတ်ဆက်ပေးနိုင်ပါတယ်။ ဒါကို IAM Roles for Service Accounts (IRSA) လို့ခေါ်ပါတယ်။ ဒီလိုချိတ်လိုက်တဲ့အခါမှာ pod တွေက IAM role ကို assume လုပ်ပြီး လိုအပ်တဲ့ AWS service တွေကို လုံခြုံစွာ access လုပ်နိုင်မှာဖြစ်ပါတယ်။</p>
<h3 id="heading-the-advantages-of-using-the-irsa">The advantages of using the IRSA</h3>
<p>IRSA ကို အသုံးပြုခြင်းအားဖြင့် AWS access key တွေ၊ secret key တွေကို pod တွေထဲမှာ တိုက်ရိုက်သိမ်းထားစရာမလိုတော့ပါဘူး။ OIDC ကနေတစ်ဆင့် လုံခြုံတဲ့ temporary credentials တွေကို အသုံးပြုသွားမှာဖြစ်ပါတယ်။ Pod တစ်ခုချင်းစီအတွက်ကို credential တွေ လိုက်ပေးနေစရာမလိုဘဲ service account နဲ့ IAM role ကိုသာ ချိတ်ဆက်ပေးလိုက်ရုံနဲ့ အဆင်ပြေပါတယ်။ Pod အသစ်တွေတက်လာရင်လည်း အဲ့ဒီ service account ကို သုံးလိုက်တာနဲ့ လိုအပ်တဲ့ permission တွေကို အလိုအလျောက်ရရှိမှာပဲဖြစ်ပါတယ်။ Pod (or) service account တစ်ခု အတွက် လိုအပ်တဲ့ permission အတိအကျကိုသာ IAM role မှာ သတ်မှတ်ပေးထားနိုင်တဲ့အတွက် "least privilege" principle ကိုလည်း အလွယ်တကူ အကောင်အထည်ဖော်နိုင်ပါတယ်။</p>
<h2 id="heading-to-authenticate-user-authentication-to-the-kubernetes-cluster">To authenticate user authentication to the Kubernetes Cluster</h2>
<p>EKS cluster ကို <code>kubectl</code> ကနေတစ်ဆင့် အသုံးပြုမယ့် developer တွေ၊ administrator တွေကို AWS IAM user တွေနဲ့ပဲ access ပေးမယ့်အစား Google, Okta, Auth0 စတဲ့ OIDC-compliant identity provider တွေနဲ့လည်း authentication လုပ်နိုင်အောင် configure လုပ်နိုင်ပါတယ်။ ဆိုလိုတာက မိမိတို့ corporate မှာအသုံးပြုနေတဲ့ user management system (eg - Google Workspace) နဲ့ EKS cluster ကို ချိတ်ဆက်ထားလိုက်တဲ့အခါမှာ user တွေက သူတို့ရဲ့ ရှိရင်းစွဲ corporate account တွေနဲ့ပဲ <code>kubectl</code> command တွေကိုအသုံးပြုပြီး Cluster ကို access ရနေမှာဖြစ်ပါတယ်။ ဒါကြောင့် user management ကို တစ်နေရာတည်းကနေ စီမံခန့်ခွဲနိုင်ပြီး user တွေအတွက်လည်း ပိုပြီးအဆင်ပြေစေပါတယ်။ ဒါကြောင့် EKS cluster မှာ OIDC provider ကို associate လုပ်ခြင်းဟာ Kubernetes cluster အတွင်းက application တွေ (pods) ကို အခြား AWS service တွေနဲ့ လုံခြုံစွာ ချိတ်ဆက်အသုံးပြုနိုင်ဖို့ (IRSA) နဲ့ cluster ကို အသုံးပြုမယ့် user တွေကို external identity provider တွေနဲ့ authentication လုပ်နိုင်ဖို့အတွက် မရှိမဖြစ်လိုအပ်တဲ့ အဆင့်တစ်ခုဖြစ်ပါတယ်။</p>
<p>အားလုံးပဲအချိန်ပေးပြီးဖတ်ရှုပေးတဲ့အတွက် ကျေးဇူးတင်ပါတယ်။</p>
]]></content:encoded></item><item><title><![CDATA[kubectl-like CLI tool for Amazon EKS]]></title><description><![CDATA[အားလုံးပဲမင်္ဂလာပါခင်ဗျာ။ ဒီနေ့မှာတော့ Amazon Elastic Kubernetes Service (EKS) ကို demo စမ်းဖို့အတွက် AWS ကနေမှ developed လုပ်ထားတဲ့ tool အကြောင်းကိုပြောပြမှာပဲဖြစ်ပါတယ်။ အဲ့ဒီ tool ရဲ့ nameလေးကတော့ eksdemo ပဲဖြစ်ပါတယ်။ eksdemo ဆိုတာဟာ Amazon EKS ကို...]]></description><link>https://blog.vitaltechmyanmar.com/kubectl-like-cli-tool-for-amazon-eks</link><guid isPermaLink="true">https://blog.vitaltechmyanmar.com/kubectl-like-cli-tool-for-amazon-eks</guid><category><![CDATA[AWS]]></category><category><![CDATA[EKS]]></category><dc:creator><![CDATA[Sc3p73R]]></dc:creator><pubDate>Thu, 02 Oct 2025 09:26:58 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1756272621937/51ee2845-0414-47b9-a240-a0521c204e5f.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>အားလုံးပဲမင်္ဂလာပါခင်ဗျာ။ ဒီနေ့မှာတော့ Amazon Elastic Kubernetes Service (EKS) ကို demo စမ်းဖို့အတွက် AWS ကနေမှ developed လုပ်ထားတဲ့ tool အကြောင်းကိုပြောပြမှာပဲဖြစ်ပါတယ်။ အဲ့ဒီ tool ရဲ့ nameလေးကတော့ eksdemo ပဲဖြစ်ပါတယ်။ <code>eksdemo</code> ဆိုတာဟာ Amazon EKS ကို testing, and demoing အတွက် အလွန်လွယ်ကူအောင် ဖန်တီးပေးထားတဲ့ command-line (CLI) tool တစ်ခုဖြစ်ပါတယ်။ သူ့ကို <code>kubectl</code>-like tool လို့ ခေါ်ဆိုရတဲ့ အကြောင်းရင်းကတော့ <code>kubectl</code> ရဲ့ command structure ကို အခြေခံထားပြီး အသုံးပြုရ ရင်းနှီးအောင် လုပ်ဆောင်ထားလို့ ဖြစ်ပါတယ်။ ဒါပေမဲ့ သူ့ရဲ့ အဓိကရည်ရွယ်ချက်ကတော့ <code>kubectl</code> ထက် ပိုပြီး Amazon EKS နဲ့ AWS service တွေကြားက ဆက်စပ်မှုကို ရှင်းရှင်းလင်းလင်းနဲ့ အလွယ်တကူ မြင်နိုင်အောင် ကူညီပေးဖို့ ဖြစ်ပါတယ်။</p>
<h4 id="heading-kubectl-like-command-structure"><code>kubectl</code>-like Command Structure</h4>
<p><code>eksdemo</code> ဟာ <code>kubectl</code> လိုပဲ သုံးပါတယ်။ example:</p>
<ul>
<li><code>eksdemo get nodegroup</code></li>
</ul>
<pre><code class="lang-bash">❯ eksdemo get nodegroup --cluster vtmm-cluster-1
+---------+--------+-----------------------+-------+-----+-----+-----------------+-----------+----------------+
|   Age   | Status |         Name          | Nodes | Min | Max |     Version     |   Type    |  Instance(s)   |
+---------+--------+-----------------------+-------+-----+-----+-----------------+-----------+----------------+
| 5 hours | ACTIVE | eks-master-node       |     1 |   1 |   2 | 1.32.9-20250920 | ON_DEMAND | c7i-flex.large |
| 6 hours | ACTIVE | eks-worker-node-group |     1 |   1 |   2 | 1.32.9-20250920 | ON_DEMAND | c7i-flex.large |
+---------+--------+-----------------------+-------+-----+-----+-----------------+-----------+----------------+
</code></pre>
<p>ဒီလို တူညီတဲ့ပုံစံကြောင့် <code>kubectl</code> နဲ့ ရင်းနှီးပြီးသားသူတွေအတွက် <code>eksdemo</code> ကို သုံးရတာ အလွန်လွယ်ကူပါတယ်။ <code>get</code>, <code>create</code>, <code>delete</code> ဆိုတာတွေကို အဓိကသုံးပါတယ်။</p>
<h4 id="heading-kubectl"><code>kubectl</code> ထက် ဘာတွေပိုထူးခြားလဲ။</h4>
<p><code>eksdemo</code> ရဲ့ အဓိက အားသာချက်ကတော့ Kubernetes object တွေကို AWS resource တွေနဲ့ ချိတ်ဆက်ပြီး ပြသနိုင်စွမ်း ဖြစ်ပါတယ်။</p>
<ul>
<li><p><strong>Viewpoint ကွာခြားမှု:</strong></p>
<ul>
<li><p><code>kubectl</code> က Kubernetes API ကိုပဲ အဓိကထားပြီး အလုပ်လုပ်ပါတယ်။ Cluster ထဲက resource တွေကိုပဲ ပြသနိုင်ပါတယ်။</p>
</li>
<li><p><code>eksdemo</code> ကတော့ Kubernetes API ရော၊ AWS API ကိုပါ တစ်ပြိုင်တည်း အသုံးပြုပါတယ်။ ဒါကြောင့် Kubernetes resource တစ်ခုနဲ့ ဆက်စပ်နေတဲ့ AWS resource ကိုပါ တစ်ပါတည်း ဖော်ပြပေးနိုင်ပါတယ်။</p>
<pre><code class="lang-bash">  ❯ eksdemo get ec2-instance
  +---------+------------+---------------------+--------------------------------+----------------+------------+
  |   Age   |   State    |         Id          |              Name              |      Type      |    Zone    |
  +---------+------------+---------------------+--------------------------------+----------------+------------+
  | 6 hours | running    | i-06dbfbc142668cb88 |                                | c7i-flex.large | us-east-1a |
  | 6 hours | running    | i-0497519f86b5f5981 |                                | c7i-flex.large | us-east-1c |
  +---------+------------+---------------------+--------------------------------+----------------+------------+
</code></pre>
<pre><code class="lang-bash">  ❯ eksdemo get vpc
  +-----------------------+-----------------------------+----------------+--------------+
  |          Id           |            Name             |  IPv4 CIDR(s)  | IPv6 CIDR(s) |
  +-----------------------+-----------------------------+----------------+--------------+
  | vpc-00bce47ab8ea38db0 | *                           | 172.31.0.0/16  | -            |
  +-----------------------+-----------------------------+----------------+--------------+
  * Indicates default VPC
</code></pre>
</li>
<li><p><strong>Viewing Node:</strong></p>
<ul>
<li><p><code>kubectl get nodes</code> လို့ရိုက်ရင် Kubernetes node တွေရဲ့ နာမည်၊ status, role, version စတာတွေကိုပဲ မြင်ရပါမယ်။</p>
</li>
<li><p><code>eksdemo get node</code> လို့ရိုက်ရင်တော့ အဲ့ဒီ Kubernetes node ရဲ့ အောက်မှာ run နေတဲ့ <strong>EC2 Instance ID, Instance Type, Subnet ID, AMI (Amazon Machine Image)</strong> စတဲ့ AWS အချက်အလက်တွေကိုပါ တစ်ခါတည်း တွဲပြီးပြပေးပါတယ်။</p>
<pre><code class="lang-bash">  ❯ eksdemo get node --cluster vtmm-cluster-1
  +---------+--------------------+---------------------+----------------+------------+-----------------------+
  |   Age   |        Name        |     Instance Id     |      Type      |    Zone    |       Nodegroup       |
  +---------+--------------------+---------------------+----------------+------------+-----------------------+
  | 6 hours | ip-172-31-33-128.* | i-0497519f86b5f5981 | c7i-flex.large | us-east-1c | eks-master-node       |
  | 6 hours | ip-172-31-89-30.*  | i-06dbfbc142668cb88 | c7i-flex.large | us-east-1a | eks-worker-node-group |
  +---------+--------------------+---------------------+----------------+------------+-----------------------+
  * Names end with <span class="hljs-string">"ec2.internal"</span>
</code></pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>command usage အသေးစိတ်အတွက်ကိုလည်း eksdemo ရဲ့ repo လေးကို အောက်မှာထည့်ပေးထားပါတယ်။</p>
<p>အားလုံးပဲအချိန်ပေးပြီးဖတ်ရှုပေးတဲ့အတွက်ကျေးဇူးတင်ပါတယ်။</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://github.com/awslabs/eksdemo">https://github.com/awslabs/eksdemo</a></div>
]]></content:encoded></item><item><title><![CDATA[Creating a cluster with kubeadm - Part 3]]></title><description><![CDATA[Part 2 မှာတော့ Cluster Setup လုပ်ဖို့အတွက် လိုအပ်တာတွေ အကုန် Installation လုပ်ပြီးဆိုတော့ ဒီမှာတော့ Cluster Setup ကို စတင်လုပ်ဆောင်တော့မှာပဲဖြစ်ပါတယ်။
Initializing your control-plane node
ဒီမှာတော့ ကျွန်တော်တို့ Setup လုပ်မှာက Master Node က တစ်လုံးပဲ...]]></description><link>https://blog.vitaltechmyanmar.com/creating-a-cluster-with-kubeadm-part-3</link><guid isPermaLink="true">https://blog.vitaltechmyanmar.com/creating-a-cluster-with-kubeadm-part-3</guid><category><![CDATA[Kubernetes]]></category><dc:creator><![CDATA[Sc3p73R]]></dc:creator><pubDate>Wed, 20 Aug 2025 08:13:03 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1753247365195/38357382-6884-4348-a114-06d4a78eaf0d.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Part 2 မှာတော့ Cluster Setup လုပ်ဖို့အတွက် လိုအပ်တာတွေ အကုန် Installation လုပ်ပြီးဆိုတော့ ဒီမှာတော့ Cluster Setup ကို စတင်လုပ်ဆောင်တော့မှာပဲဖြစ်ပါတယ်။</p>
<h1 id="heading-initializing-your-control-plane-node">Initializing your control-plane node</h1>
<p>ဒီမှာတော့ ကျွန်တော်တို့ Setup လုပ်မှာက Master Node က တစ်လုံးပဲ အသုံးပြုထားတာဆိုတော့အောက်ပါအတိုင်းပဲ အသုံးပြုပြီး run လို့ရပါတယ်။ တကယ်လို့ ကျွန်တော်တို့က kubeadm init နောက်မှာ ဘာ command တွေထည့်ရမလဲဆိုတာကို မသိဘူးဆိုရင်တော့ <code>kubeadm init —help</code> ဆိုပြီးတော့ စစ်ကြည့်နိုင်ပါတယ်။</p>
<pre><code class="lang-bash">kubeadm init --<span class="hljs-built_in">help</span>
</code></pre>
<p>ဒါဆိုရင်တော့ control-plane အနေနဲ့ အသုံးပြုမယ့် node ပေါ်မှာ cluster ကို initialize စလုပ်တော့မှာပဲဖြစ်ပါတယ်။</p>
<pre><code class="lang-bash">kubeadm init --pod-network-cidr 192.168.0.0/16
</code></pre>
<p>Output</p>
<pre><code class="lang-bash">[init] Using Kubernetes version: v1.33.4
[preflight] Running pre-flight checks
[preflight] Pulling images required <span class="hljs-keyword">for</span> setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action beforehand using <span class="hljs-string">'kubeadm config images pull'</span>
W0820 07:57:40.979712   92014 checks.go:846] detected that the sandbox image <span class="hljs-string">"registry.k8s.io/pause:3.8"</span> of the container runtime is inconsistent with that used by kubeadm.It is recommended to use <span class="hljs-string">"registry.k8s.io/pause:3.10"</span> as the CRI sandbox image.
[certs] Using certificateDir folder <span class="hljs-string">"/etc/kubernetes/pki"</span>
[certs] Generating <span class="hljs-string">"ca"</span> certificate and key
[certs] Generating <span class="hljs-string">"apiserver"</span> certificate and key
[certs] apiserver serving cert is signed <span class="hljs-keyword">for</span> DNS names [kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local mdo25-master] and IPs [10.96.0.1 10.230.66.136]
[certs] Generating <span class="hljs-string">"apiserver-kubelet-client"</span> certificate and key
[certs] Generating <span class="hljs-string">"front-proxy-ca"</span> certificate and key
[certs] Generating <span class="hljs-string">"front-proxy-client"</span> certificate and key
[certs] Generating <span class="hljs-string">"etcd/ca"</span> certificate and key
[certs] Generating <span class="hljs-string">"etcd/server"</span> certificate and key
[certs] etcd/server serving cert is signed <span class="hljs-keyword">for</span> DNS names [localhost mdo25-master] and IPs [10.230.66.136 127.0.0.1 ::1]
[certs] Generating <span class="hljs-string">"etcd/peer"</span> certificate and key
[certs] etcd/peer serving cert is signed <span class="hljs-keyword">for</span> DNS names [localhost mdo25-master] and IPs [10.230.66.136 127.0.0.1 ::1]
[certs] Generating <span class="hljs-string">"etcd/healthcheck-client"</span> certificate and key
[certs] Generating <span class="hljs-string">"apiserver-etcd-client"</span> certificate and key
[certs] Generating <span class="hljs-string">"sa"</span> key and public key
[kubeconfig] Using kubeconfig folder <span class="hljs-string">"/etc/kubernetes"</span>
[kubeconfig] Writing <span class="hljs-string">"admin.conf"</span> kubeconfig file
[kubeconfig] Writing <span class="hljs-string">"super-admin.conf"</span> kubeconfig file
[kubeconfig] Writing <span class="hljs-string">"kubelet.conf"</span> kubeconfig file
[kubeconfig] Writing <span class="hljs-string">"controller-manager.conf"</span> kubeconfig file
[kubeconfig] Writing <span class="hljs-string">"scheduler.conf"</span> kubeconfig file
[etcd] Creating static Pod manifest <span class="hljs-keyword">for</span> <span class="hljs-built_in">local</span> etcd <span class="hljs-keyword">in</span> <span class="hljs-string">"/etc/kubernetes/manifests"</span>
[control-plane] Using manifest folder <span class="hljs-string">"/etc/kubernetes/manifests"</span>
[control-plane] Creating static Pod manifest <span class="hljs-keyword">for</span> <span class="hljs-string">"kube-apiserver"</span>
[control-plane] Creating static Pod manifest <span class="hljs-keyword">for</span> <span class="hljs-string">"kube-controller-manager"</span>
[control-plane] Creating static Pod manifest <span class="hljs-keyword">for</span> <span class="hljs-string">"kube-scheduler"</span>
[kubelet-start] Writing kubelet environment file with flags to file <span class="hljs-string">"/var/lib/kubelet/kubeadm-flags.env"</span>
[kubelet-start] Writing kubelet configuration to file <span class="hljs-string">"/var/lib/kubelet/config.yaml"</span>
[kubelet-start] Starting the kubelet
[wait-control-plane] Waiting <span class="hljs-keyword">for</span> the kubelet to boot up the control plane as static Pods from directory <span class="hljs-string">"/etc/kubernetes/manifests"</span>
[kubelet-check] Waiting <span class="hljs-keyword">for</span> a healthy kubelet at http://127.0.0.1:10248/healthz. This can take up to 4m0s
[kubelet-check] The kubelet is healthy after 1.508544566s
[control-plane-check] Waiting <span class="hljs-keyword">for</span> healthy control plane components. This can take up to 4m0s
[control-plane-check] Checking kube-apiserver at https://10.230.66.136:6443/livez
[control-plane-check] Checking kube-controller-manager at https://127.0.0.1:10257/healthz
[control-plane-check] Checking kube-scheduler at https://127.0.0.1:10259/livez
[control-plane-check] kube-controller-manager is healthy after 8.305962353s
[control-plane-check] kube-scheduler is healthy after 12.083902309s
[control-plane-check] kube-apiserver is healthy after 16.004208401s
[upload-config] Storing the configuration used <span class="hljs-keyword">in</span> ConfigMap <span class="hljs-string">"kubeadm-config"</span> <span class="hljs-keyword">in</span> the <span class="hljs-string">"kube-system"</span> Namespace
[kubelet] Creating a ConfigMap <span class="hljs-string">"kubelet-config"</span> <span class="hljs-keyword">in</span> namespace kube-system with the configuration <span class="hljs-keyword">for</span> the kubelets <span class="hljs-keyword">in</span> the cluster
[upload-certs] Skipping phase. Please see --upload-certs
[mark-control-plane] Marking the node mdo25-master as control-plane by adding the labels: [node-role.kubernetes.io/control-plane node.kubernetes.io/exclude-from-external-load-balancers]
[mark-control-plane] Marking the node mdo25-master as control-plane by adding the taints [node-role.kubernetes.io/control-plane:NoSchedule]
[bootstrap-token] Using token: any80c.eqbktrknvek1dklk
[bootstrap-token] Configuring bootstrap tokens, cluster-info ConfigMap, RBAC Roles
[bootstrap-token] Configured RBAC rules to allow Node Bootstrap tokens to get nodes
[bootstrap-token] Configured RBAC rules to allow Node Bootstrap tokens to post CSRs <span class="hljs-keyword">in</span> order <span class="hljs-keyword">for</span> nodes to get long term certificate credentials
[bootstrap-token] Configured RBAC rules to allow the csrapprover controller automatically approve CSRs from a Node Bootstrap Token
[bootstrap-token] Configured RBAC rules to allow certificate rotation <span class="hljs-keyword">for</span> all node client certificates <span class="hljs-keyword">in</span> the cluster
[bootstrap-token] Creating the <span class="hljs-string">"cluster-info"</span> ConfigMap <span class="hljs-keyword">in</span> the <span class="hljs-string">"kube-public"</span> namespace
[kubelet-finalize] Updating <span class="hljs-string">"/etc/kubernetes/kubelet.conf"</span> to point to a rotatable kubelet client certificate and key
[addons] Applied essential addon: CoreDNS
[addons] Applied essential addon: kube-proxy

Your Kubernetes control-plane has initialized successfully!

To start using your cluster, you need to run the following as a regular user:

  mkdir -p <span class="hljs-variable">$HOME</span>/.kube
  sudo cp -i /etc/kubernetes/admin.conf <span class="hljs-variable">$HOME</span>/.kube/config
  sudo chown $(id -u):$(id -g) <span class="hljs-variable">$HOME</span>/.kube/config

Alternatively, <span class="hljs-keyword">if</span> you are the root user, you can run:

  <span class="hljs-built_in">export</span> KUBECONFIG=/etc/kubernetes/admin.conf

You should now deploy a pod network to the cluster.
Run <span class="hljs-string">"kubectl apply -f [podnetwork].yaml"</span> with one of the options listed at:
  https://kubernetes.io/docs/concepts/cluster-administration/addons/

Then you can join any number of worker nodes by running the following on each as root:

kubeadm join 10.230.66.136:6443 --token any80c.eqbktrknvek1dklk \
        --discovery-token-ca-cert-hash sha256:575ef91069b8af3c00ca7f0fb91f9cf1313aaa070860ac63a3612c197448d4c5
</code></pre>
<p>ပြီးသွားရင်တော့ အထက်ပါအတိုင်းမြင်ရမည်ဖြစ်ပြီး Cluster Setup အောင်မြင်သည့်အခါ Your Kubernetes control-plane has initialized successfully! ဆိုပြီးပြနေမည်ဖြစ်သည်။ နောက်ထပ် Kubernetes Cluster ကို manage လုပ်ဖို့အတွက် Kubernetes Config ကို User Directory အောက်က <code>.kube</code> အောက်ထဲသို့ထည့်ပေးရပါမယ်။</p>
<pre><code class="lang-bash">mkdir -p <span class="hljs-variable">$HOME</span>/.kube
sudo cp -i /etc/kubernetes/admin.conf <span class="hljs-variable">$HOME</span>/.kube/config
sudo chown $(id -u):$(id -g) <span class="hljs-variable">$HOME</span>/.kube/config
<span class="hljs-built_in">export</span> KUBECONFIG=/etc/kubernetes/admin.conf
</code></pre>
<p>အဲ့ဒါဆိုရင်တော့ Cluster ရဲ့ Node Info ကိုကြည့်ဖို့အတွက် <code>kubectl get nodes</code> command လေးနဲ့ခေါ်ပြီးကြည့်ကြည့်ပါမယ်။</p>
<pre><code class="lang-bash">kubectl get nodes
NAME           STATUS     ROLES           AGE     VERSION
mdo25-master   NotReady   control-plane   6m39s   v1.33.3
</code></pre>
<p>ဒါဆိုရင်တော့ Cluster Setup လုပ်တယ့် အဆင့်က ပြီးသွားပြီဖြစ်ပါတယ်။ Status မှာ <code>NotReady</code> ဖြစ်နေတာကတော့ Container Network Interface (CNI) Plugin တွေ မသွင်းရသေးသည့်အတွက် NotReady ဖြစ်နေခြင်းဖြစ်ပါသည်။ ဒါကိုတော့ နောက်ထပ် lab တွေကျမှပဲ ပြောပြပေးသွားပါမယ်။ တခြား node တွေ ထပ် join ချင်ရင်တော့ Join ချင်တဲ့ Node မှာ Kubeadm init လုပ်ပြီးတော့ Output မှာပြထားတဲ့ အတိုင်း kubeadm join command ကိုအသုံးပြုပေးရမှာပါပဲဖြစ်ပါတယ်။</p>
<pre><code class="lang-bash">kubeadm join 10.230.66.136:6443 --token any80c.eqbktrknvek1dklk \
        --discovery-token-ca-cert-hash sha256:575ef91069b8af3c00ca7f0fb91f9cf1313aaa070860ac63a3612c197448d4c5
</code></pre>
]]></content:encoded></item><item><title><![CDATA[Creating a cluster with kubeadm - Part 2]]></title><description><![CDATA[ဒီနေ့ထပ်ပြီးတော့ Sharing လုပ်မှာကတော့ kubeadm tool နဲ့ Kubernetes Cluster Setup လုပ်မှာကို ပြောပြပေးသွားမှာပဲဖြစ်ပါတယ်။ Part 1 မှာတုန်းကတော့ Kubernetes ဆိုတာဘာလဲရယ် Kubernetes Distribution အကြောင်း တွေကို အနည်းငယ်ရှင်းပြပေးခဲ့ပါတယ်။ Part 1 ကိုမဖတ်ရသေ...]]></description><link>https://blog.vitaltechmyanmar.com/creating-a-cluster-with-kubeadm-part-2</link><guid isPermaLink="true">https://blog.vitaltechmyanmar.com/creating-a-cluster-with-kubeadm-part-2</guid><category><![CDATA[Kubernetes]]></category><dc:creator><![CDATA[Sc3p73R]]></dc:creator><pubDate>Wed, 23 Jul 2025 03:49:35 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1753192758044/8575886f-bb1d-4132-930a-e94d7ee3b624.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>ဒီနေ့ထပ်ပြီးတော့ Sharing လုပ်မှာကတော့ kubeadm tool နဲ့ Kubernetes Cluster Setup လုပ်မှာကို ပြောပြပေးသွားမှာပဲဖြစ်ပါတယ်။ Part 1 မှာတုန်းကတော့ Kubernetes ဆိုတာဘာလဲရယ် Kubernetes Distribution အကြောင်း တွေကို အနည်းငယ်ရှင်းပြပေးခဲ့ပါတယ်။ Part 1 ကိုမဖတ်ရသေးရင်တော့ အောက်က Link ကိုနှိပ်ပြီးတော့ သွားရောက်ဖတ်ရှုနိုင်ပါတယ်။</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://blogs.vitaltechmyanmar.com/creating-a-cluster-with-kubeadm-part-1">https://blogs.vitaltechmyanmar.com/creating-a-cluster-with-kubeadm-part-1</a></div>
<p> </p>
<h2 id="heading-installing-and-configuring-prerequisites">Installing and Configuring Prerequisites</h2>
<p>Kubernetes Cluster Setup မလုပ်ခင်မှာ လိုအပ်တဲ့ Network Configuration တွေ Cluster အတွက် လိုအပ်သည့် Container Runtime တွေကို အရင်ဆုံးဆုံးအနေနဲ့ Installing လုပ်သွားမှာပဲဖြစ်ပါတယ်။</p>
<h2 id="heading-enable-ipv4-packet-forwarding">Enable IPv4 packet forwarding</h2>
<p>Network Config အနေနဲ့ကတော့ IPv4 packet forwarding ဆိုသည့် Kernel Option တစ်ခုကို Enable လုပ်ပေးဖို့လိုအပ်ပါတယ်။ IPv4 packet forwarding မရှိခဲ့ရင် network interfaces အမျိုးစုံအကြား network traffic တွေပေးပို့တဲ့အခါမှာ အဆင်မပြေနိုင်တာတွေရှိနိုင်ပါတယ်။ ဥပမာ အနေနဲ့ ပြောရရင် pod-to-pod communication လိုဟာမျိုးတွေပေါ့။ ကျွန်တော်တို့ Cluster ရဲ့ <strong>Node A</strong> ပေါ်မှာ pod တစ်ခုရှိတယ်ပဲထားပါတော့ဗျာ။ အဲ့ဒီ <strong>Node A</strong> ရဲ့ pod ကနေ တခြား <strong>Node B</strong> မှာရှိတယ့် pod ကို packet လေးတွေပို့ချင်တယ်ဆိုပါတော့။ ဒီ packet တွေရောက်ဖို့အတွက်က IPv4 packet forwarding ကို enable လုပ်ထားမှသာ <strong>Node A</strong> ရဲ့ physical network adapter ကနေတစ်ဆင့် <strong>Node B</strong> ရဲ့ Network Adapter ကိုဖျက်ပြီးတော့ <strong>Node B</strong> ရဲ့ pod ကို packet တွေရောက်မှာဖြစ်ပါတယ်။ ဒီ IPv4 packet forwarding kernel option ကို enable လုပ်ထားမှသာ Kubernetes ထဲမှာ အသုံးပြုမယ့် Network CNI Plugin တွေအတွက်လည်းကောင်းမွန်စွာအလုပ်လုပ်မှာ ဖြစ်ပါတယ်။</p>
<pre><code class="lang-bash"><span class="hljs-comment"># sysctl params required by setup, params persist across reboots</span>
cat &lt;&lt;EOF | sudo tee /etc/sysctl.d/k8s.conf
net.ipv4.ip_forward = 1
EOF

<span class="hljs-comment"># Apply sysctl params without reboot</span>
sudo sysctl --system
</code></pre>
<p>net.ipv4.ip_forward ကို 1 ဆိုပြီး setup လုပ်လိုက်တဲ့ ပြန်ခေါ်ကြည့်လို့ output က 1 ပြန်ရတယ်ဆိုရင်တော့ ipv4 packet forwarding enable ဖြစ်နေပါပြီ။</p>
<pre><code class="lang-bash">sysctl net.ipv4.ip_forward
</code></pre>
<p><strong>Output</strong></p>
<pre><code class="lang-bash">ubuntu@mdo25-master:~$ sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1
</code></pre>
<p>နောက်ထပ်အနေနဲ့ cgroups drivers ကို သတ်မှတ်ရမယ်ပေါ့နော်။ ဒါပေမယ့် cgroups drivers ကိုသီးသန့်သွားပြီး လုပ်စရာမလိုတော့ပဲ Kubernetes ရဲ့ v1.22 version ကနေစပြီးတော့ cgroup drivers နေရာမှာ ဘာမှ မသတ်မှတ်ထားခဲ့ရင် kubeadm က default အနေနဲ့ systemd ကိုအသုံးပြုသွားမယ်ဆိုတာမျိုးက ရှိတယ့်အတွက် ထွေထွေထူးထူးတော့ ဘာမှလုပ်စရာမလိုတော့ပါဘူး။ ကျွန်တော်တို့ အသုံးပြုသွားမယ့် Ubuntu Linux Distribution ကလဲ cgroup drivers အနေနဲ့က systemd ကိုပဲသုံးထားတာပဲဖြစ်တယ်။ ဒါကြောင့် cgroup drivers နဲ့ပတ်သက်ပြီးတော့ ဘာမှမသတ်မှတ်တော့ပါဘူး။</p>
<h1 id="heading-container-runtimes">Container Runtimes</h1>
<p>Container Runtimes အနေနဲ့ကတော့ ဒီ lab မှာ containerd ကိုအသုံးပြုမှာဖြစ်သည့်အတွက် containerd ကို installation လုပ်သွားမှာ ဖြစ်ပါတယ်။</p>
<h2 id="heading-containerd">Containerd</h2>
<p>Containerd ဆိုတာကတော့ ကျွန်တော်သိတယ့်အတိုင်းပဲ container တွေကို manage လုပ်ဖို့အတွက်သုံးတဲ့ tool တစ်ခုပဲဖြစ်ပါတယ်။ part 1 မှာပြောပြခဲ့အတိုင်း containerd manage လုပ်ဖို့အတွက် ctr ဆိုတယ့် cli tool နဲ့အသုံးပြုပါတယ်။ သူကတော့ docker command တွေနဲ့ အနည်းငယ် different ဖြစ်နေမည်ဖြစ်ပြီး docker က သုံးခဲ့သလိုမျိုးအသုံးပြုချင်ရင်တော့ nerdctl ဆိုတဲ့ cli tool ကိုအသုံးပြုလို့ရပါတယ်။ Kubernetes cluster တစ်ခုထဲမှာ kubelet က container runtime နဲ့ ချိတ်ဆက်ဖို့ <strong>Container Runtime Interface (CRI)</strong> ကိုသုံးပါတယ်။ အရင်တုန်းကတော့ docker ကို CRI အဖြစ် အသုံးပြုခဲ့တာဖြစ်ပြီးတော့ အခုနောက်ပိုင်းမှာတော့ containerd ကိုသာ CRI အဖြစ် native support လုပ်ပါတယ်။</p>
<pre><code class="lang-bash">sudo apt install containerd
</code></pre>
<p>containerd ကို install လုပ်တယ့်နေရာမှာ သူရဲ့ dependency ဖြစ်တယ့် runc ကိုပါတစ်ပါတည်း သွင်းသွားမည်ဖြစ်သည်။ containerd ကတော့ high-level runtime ဖြစ်ပြီးတော့ runc ကတော့ low-level runtime အနေနဲ့ ရှိပါတယ်။ containerd က စေခိုင်းသမျှကိုမှ runc အနေနဲ့ container တွေဖန်တီးတဲ့ ကိစ္စရပ်မျိုးတွေကို လုပ်ဆောင်ပေးတာပဲဖြစ်ပါတယ်။</p>
<pre><code class="lang-bash">ubuntu@mdo25-master:~$ sudo apt install containerd
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  runc
The following NEW packages will be installed:
  containerd runc
0 upgraded, 2 newly installed, 0 to remove and 62 not upgraded.
Need to get 45.7 MB of archives.
After this operation, 172 MB of additional disk space will be used.
Do you want to <span class="hljs-built_in">continue</span>? [Y/n]
</code></pre>
<p>Installation လုပ်ပြီးသွားရင်တော့ containerd service လေးကောင်းမွန်စွာ အလုပ်လုပ်မလုပ်ကို စစ်ချင်သည့် အတွက်</p>
<pre><code class="lang-bash">systemctl status containerd
</code></pre>
<p>ဆိုပြီး စစ်ကြည့်ပါမယ်။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753238827219/fc6b6aec-e400-4f56-a5c7-3881a40af8ec.png" alt class="image--center mx-auto" /></p>
<p>active (running) ဖြစ်နေပြီ ဖြစ်သည့်အတွက် containerd service က ကောင်းမွန်စွာအလုပ်လုပ်နေပြီလို့ သတ်မှတ်လို့ရပါတယ်။ containerd ကို installation လုပ်ပြီးသွားပြီဆိုတော့ နောက်ထပ်အနေနဲ့ cgroup driver တွေကို configure လုပ်ပေးဖို့လိုအပ်ပါတယ်။</p>
<h2 id="heading-configuring-cgroup-driver">Configuring cgroup driver</h2>
<p>cgroup driver ကို configuring လုပ်တဲ့နေရာမှာ ကျွန်တော်တို့ အသုံးပြုထားတဲ့ Ubuntu Linux Distribution က systemd ကိုအသုံးပြုထားတယ့်အတွက် <strong>systemd</strong> cgroup driver ကို configure လုပ်မှာပဲဖြစ်ပါတယ်။ သူရဲ့ config file လေးကတော့ <strong>/etc/containerd/config.toml</strong> ဆိုပြီးတော့သွားဆောက်ပေးမှာပဲဖြစ်ပါတယ်။ အရင်ဆုံးအနေနဲ့ /etc အောက်ထဲမှာ containerd ဆိုတယ့် directory တစ်ခုဆောက်ပေးရမှာပဲဖြစ်ပါတယ်။</p>
<pre><code class="lang-bash">sudo mkdir /etc/containerd
</code></pre>
<p>ပြီးရင်တော့ containerd config ကို create လုပ်ပါမယ်။</p>
<pre><code class="lang-bash">containerd config default &gt; /etc/containerd/config.toml
</code></pre>
<p>အထက်ပါ command ကိုအသုံးပြုပြီးသွားတဲ့ အခါမှာ /etc/containerd/config.toml ထဲမှာ config တွေ ရောက်နေမည်ဖြစ်ပါသည်။ အဲ့ထဲမှာမှ အောက်ပါပြထားတဲ့အတိုင်း SystemdCgroup နေရာမှာ false ကို true ဆိုပြီး ပြောင်းပေးရမည်ဖြစ်ပါသည်။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753240227278/19ad7103-a360-483b-8729-902c2391c40c.png" alt class="image--center mx-auto" /></p>
<p>ပြီးသွားရင်တော့ config changes ကို containerd ကသိအောင်လို့ containerd service ကို restart ချပေးရပါမယ်။</p>
<pre><code class="lang-bash">systemctl restart containerd
</code></pre>
<p>ပြီးသွားရင်တော့ containerd service proper ပြန်အလုပ်လုပ်မလုပ်လုပ်ကို <strong>systemctl status containerd</strong> နဲ့တစ်ချက်စစ်ကြည့်ချင်ရင် စစ်ကြည့်လို့ရပါသည်။ ဘာလို့ပြန်စစ်ခိုင်းတာလဲဆိုတော့ best practice အနေနဲ့လဲ ဖြစ်အောင်တစ်ခုခု changes လုပ်ပြီးတိုင်း restart ချတဲ့အခါ service က ကောင်းမွန်စွာ အလုပ်လုပ် မလုပ်ကို သိစေနိုင်ရန်အတွက်ကြောင့် ဖြစ်ပါတယ်။</p>
<h2 id="heading-disable-swap">Disable Swap</h2>
<p>Swap Configuration အနေနဲ့ကတော့ swap ကို disable လုပ်ပေးရမှာပဲဖြစ်ပါတယ်။ node မှာ swap ကိုသာ disable မလုပ်ခဲ့ရင် kubelet service ကို run လိုက်ပြီဆိုတာနဲ့ swap memory ကို detected ဖြစ်နေတဲ့အခါ kubelet service ဟာ ကောင်းကောင်းအလုပ်မလုပ်နိုင်ပဲ fail သွားတာမျိုးတွေ ရှိတတ်ပါတယ်။ အရင်ဆုံးအနေနဲ့ swap က အလုပ်လုပ်နေလားတစ်ချက်အရင်စစ်ကြည့်ပါမယ်။</p>
<pre><code class="lang-bash">free -m
</code></pre>
<p>Output</p>
<pre><code class="lang-bash">root@mdo25-master:~<span class="hljs-comment"># free -m</span>
               total        used        free      shared  buff/cache   available
Mem:            7936         478        6866           4         843        7457
Swap:              0           0           0
</code></pre>
<p>လက်ရှိ ကျွန်တော့်ရဲ့ vm ထဲမှာတော့ swap က မသုံးထားတဲ့အတွက် ထွေထွေထူးထူး ပိတ်စရာတော့မလိုပါဘူး။ တကယ်လို့ Swap ကိုအသုံးပြုထားတယ်ဆိုရင်တော့</p>
<pre><code class="lang-bash">swap off -a
</code></pre>
<p>အထက်ပါ command ကိုအသုံးပြုပြီး swap ကို disable လုပ်နိုင်သလို <strong>/etc/fstab</strong> ထဲမှာလည်း swap memory ကို အလုပ်မလုပ်အောင် comment သွားပိတ်ပေးရပါမယ်။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753241036883/4fb49e97-6ce0-459d-abd1-3a8b84c3765b.png" alt class="image--center mx-auto" /></p>
<h1 id="heading-installing-kubeadm-kubelet-and-kubectl">Installing kubeadm, kubelet and kubectl</h1>
<p>ဒီအဆင့်မှာတော့ Kubernetes အတွက် လိုအပ်မည့် package ကို စတင် install လုပ်မှာပဲဖြစ်ပါတယ်။</p>
<ul>
<li><p>kubeadm - ကတော့ cluster ကို bootstrap လုပ်ဖို့အတွက်အသုံးပြုရမည့် command ဖြစ်ပါတယ်။</p>
</li>
<li><p>kubelet - ကတော့ Kubernetes Cluster တစ်ခုလုံးရဲ့ အရေးကြီးဆုံးအစိတ်အပိုင်းတွေထဲက တစ်ခုဖြစ်ပြီး Node တိုင်းမှာ အလုပ်လုပ်တဲ့ service တစ်ခုဖြစ်ပါတယ်။</p>
</li>
<li><p>kubectl - ကတော့ kubernetes cluster ကို manage လုပ်ဖို့ command line utility tool ပဲဖြစ်ပါတယ်။</p>
</li>
</ul>
<p>ကျွန်တော်တို့က Kubernetes Cluster ကို Ubuntu Linux Distribution ကိုအသုံးပြုမှာဆိုတော့ Debian-based distributions တွေအတွက် Kubernetes Repo တွေကို add ပေးရပါမယ်။ ဒီ Lab မှာတော့ Kubernetes ရဲ့ latest version ဖြစ်တဲ့ v1.33 ကို အသုံးပြုမည်ဖြစ်ပါတယ်။</p>
<p>Update the <code>apt</code> package index and install packages needed to use the Kubernetes <code>apt</code> repository</p>
<pre><code class="lang-bash">sudo apt-get update
<span class="hljs-comment"># apt-transport-https may be a dummy package; if so, you can skip that package</span>
sudo apt-get install -y apt-transport-https ca-certificates curl gpg
</code></pre>
<p>Download the public signing key for the Kubernetes package repositories.</p>
<pre><code class="lang-bash"><span class="hljs-comment"># If the directory `/etc/apt/keyrings` does not exist, it should be created before the curl command, read the note below.</span>
<span class="hljs-comment"># sudo mkdir -p -m 755 /etc/apt/keyrings</span>
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.33/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
</code></pre>
<p>Add Kubernetes apt repository</p>
<pre><code class="lang-bash"><span class="hljs-built_in">echo</span> <span class="hljs-string">'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.33/deb/ /'</span> | sudo tee /etc/apt/sources.list.d/kubernetes.list
</code></pre>
<p>Update the <code>apt</code> package index, install kubelet, kubeadm and kubectl, and pin their version:</p>
<pre><code class="lang-bash">sudo apt-get update
sudo apt-get install -y kubelet kubeadm kubectl
sudo apt-mark hold kubelet kubeadm kubectl
</code></pre>
<p>Enable the kubelet service before running kubeadm:</p>
<pre><code class="lang-bash">sudo systemctl <span class="hljs-built_in">enable</span> --now kubelet
</code></pre>
<p>အဲ့တာဆိုရင်တော့ Kubernetes Cluster Setup လုပ်ဖို့အတွက် လိုအပ်တာတွေအကုန် installation လုပ်ပြီးပြီဖြစ်သည့်အတွက် Part 3 မှာတော့ Cluster Setup လုပ်တဲ့ဟာကို ထပ်မံရေးသားပေးသွားပါမယ်။</p>
<p>အချိန်ပေးပြီးဖတ်ရှုပေးတဲ့အတွက်ကျေးဇူးတင်ပါတယ်။</p>
]]></content:encoded></item><item><title><![CDATA[Creating a cluster with kubeadm - Part 1]]></title><description><![CDATA[ဒီနေ့ Sharing လုပ်ပေးမယ့် အကြောင်းကတော့ Kubeadm နဲ့ Kubernetes Cluster Setup လုပ်တယ့် အကြောင်းကိုပြောပြပေးသွားမှာပဲဖြစ်ပါတယ်။ အရင်ဆုံးအနေနဲ့ Cluster Setup မလုပ်ခင်မှာ Kubernetes ဆိုတာဘာလဲရယ် Kubernetes Distribution အကြောင်းလေးတွေရယ်ကို အနည်းငယ်ရှင်းပ...]]></description><link>https://blog.vitaltechmyanmar.com/creating-a-cluster-with-kubeadm-part-1</link><guid isPermaLink="true">https://blog.vitaltechmyanmar.com/creating-a-cluster-with-kubeadm-part-1</guid><category><![CDATA[Kubernetes]]></category><dc:creator><![CDATA[Sc3p73R]]></dc:creator><pubDate>Tue, 22 Jul 2025 06:20:15 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1753164847254/c415a365-f3e6-4b42-99a5-8a4102e804d7.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>ဒီနေ့ Sharing လုပ်ပေးမယ့် အကြောင်းကတော့ Kubeadm နဲ့ Kubernetes Cluster Setup လုပ်တယ့် အကြောင်းကိုပြောပြပေးသွားမှာပဲဖြစ်ပါတယ်။ အရင်ဆုံးအနေနဲ့ Cluster Setup မလုပ်ခင်မှာ Kubernetes ဆိုတာဘာလဲရယ် Kubernetes Distribution အကြောင်းလေးတွေရယ်ကို အနည်းငယ်ရှင်းပြပေးသွားမှာပဲ ဖြစ်ပါတယ်။</p>
<h1 id="heading-what-is-kubernetes">What is Kubernetes?</h1>
<p>Kubernetes ကတော့ Open Source Container Orchestration Platform တစ်ခုဖြစ်ပြီး Google ကနေ Developed လုပ်ခဲ့တာပဲဖြစ်ပါတယ်။ အခုလက်ရှိမှာတော့ Kubernetes ကို <a target="_blank" href="https://www.cncf.io/"><strong>Cloud Native Computer Foundation</strong></a> <a target="_blank" href="https://www.cncf.io/">က နေ ကြီးကြပ်နေတာပဲဖြစ်ပါတယ်။</a> Kubernetes ကတော့ container orchestration tool တစ်ခုဖြစ်တယ့်အတွက် Orchestration Platform အနေနဲ့ပဲ အခြေခံပြီး ထွက်လာတာပေါ့နော်။ Container တွေကို manage လုပ်ဖို့အတွက်ကျတော့ သူ့ထဲမှာမပါဘူး။ ဒါကြောင့် Container Runtime နဲ့ပတ်သက်ပြီးတော့ Container Runtime ဖြစ်တယ့် Docker ပေါ်ကို Relies လုပ်ရတယ်ပေါ့နော်။ နောက်ပိုင်းမှာတော့ ဘာတွေဖြစ်လာလဲဆိုတော့ Kubernetes က Dockershim ကိုဖြုတ်ပြီးတော့ Containerd ကို သူရဲ့ Container Runtime အဖြစ်သုံးလာခဲ့ပါတယ်။ Kubernetes က Support လုပ်တဲ့ Container Engine မှာဆိုရင် Containerd အပြင် CRI-O ဆိုတာလဲရှိသေးတယ်။ Docker Engine ကိုပဲဆက်ပြီးအသုံးပြုချင်တယ်ဆိုရင်လဲ cri-dockerd ဆိုတယ့် tool ကို ကြားခံအသုံးပြုလို့ရပေမယ့် Containerd focus ဖြစ်တယ့်အတွက် တခြားဟာတွေတော့အများကြီးမပြောတော့ပါဘူး။</p>
<p>CRI-O ကိုတော့ Redhat က Develop လုပ်ထားတဲ့ container runtime ဖြစ်ပြီးတော့ သူကကျ containerd လိုမဟုတ်ပဲ low-level ဖြစ်တယ့် runc ကို တန်းပြီးတော့ manage လုပ်နိုင်တယ်။ ပိုပြီးတော့ lightweight ဖြစ်တယ့် runtime အနေနဲ့ ရှိနေတယ်ပေါ့နော်။ Containerd မှာဆိုရင် low-level ဖြစ်တယ့် runc ကို တိုက်ရိုက် manage မလုပ်နိုင်ပဲ containerd-shim ကနေမှတစ်ဆင့် runc ကို manage လုပ်တယ်။ runc ကနေမှ container တွေဖန်တီးတဲ့ ကိစ္စမျိုးတွေကို လုပ်ဆောင်ပေးတာပေါ့နော်။ CRI-O ကတော့ Redhat ရဲ့ Openshift မှာပဲ အဓိကသုံးတာဖြစ်တယ်။ ဒါမယ့် ကျွန်တော်တို့ Kubernetes Community Version မှာလဲ Containerd အစား CRI-O ကိုလဲ သုံးချင်ရင် သုံးလို့ရတယ်ပေါ့နော်။ ဒီမှာတော့ ကျွန်တော်တို့က Containerd ကိုပဲ သုံးသွားမှာဖြစ်တယ့်အတွက် Containerd နဲ့ပတ်သက်တာတွေပဲ ပြောပါမယ်။</p>
<p>ကျွန်တော်တို့ Environment မှာ Containerd ကိုအသုံးပြုထားတယ်ဆိုရင် containerd တွေကို manage လုပ်ဖို့အတွက် ctr ဆိုတယ့် tool ကိုအသုံးပြုပြီး manage လုပ်ရတယ်။ ctr ကတော့ containerd နဲ့ တွဲပြီးအလုပ်လုပ်တဲ့ cli tool ဖြစ်တယ်။ ဒါမယ့် သူက Docker မှာအသုံးပြုခဲ့တယ့် Command တွေနဲ့ နည်းနည်းကွဲတယ်။ Docker မှာလို manage လုပ်တဲ့ပုံစံအတိုင်းကို ctr မှာသွားပြီးတော့ သုံးလို့မရဘူး။ ဒါကြောင့် docker လိုပဲ manage လုပ်ချင်တယ်ဆိုရင်တော့ nerdctl ဆိုတယ့် tool ကိုအသုံးပြုလို့ရတယ်။ Nerdctl က Containerd ကို manage လုပ်တဲ့ docker compactible cli tool တစ်ခုဖြစ်တယ်။ အောက်မှာတော့ Nerdctl ရဲ့ github repo လေးထည့်ပေးထားပါတယ်။ အသေးစိတ်လေ့လာချင်ရင် လေ့လာလို့ရပါတယ်။</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://github.com/containerd/nerdctl">https://github.com/containerd/nerdctl</a></div>
<p> </p>
<h1 id="heading-kubernetes-distribution">Kubernetes Distribution</h1>
<p>Kubernetes Distribution တွေကတော့ အများကြီးရှိကြပါတယ်။ Enterprise မှာဆိုရင် Redhat OpenShift, Mirantis Kubernetes Engine, VMware မှာဆိုရင်လဲ Tanzu စသဖြင့်ပေါ့နော်။ Cloud မှာဆိုရင်လဲ သူ့ရဲ့ Cloud Provider ပေါ်မူတည်ပြီး Google မှာဆိုရင် GKE, AWS မှာဆိုရင် EKS, Azure မှာဆိုရင် AKS စသဖြင့်ရှိကြတယ်။ ဒါတွေကတော့ Managed Kubernetes Platform တွေပဲဖြစ်ပါတယ်။ Community Version မှာဆိုရင်တော့ ကျွန်တော်တို့ အခုအသုံးပြုမယ့် Open Source Kubernetes ပေါ့။ သူ့ကိုတော့ တစ်နည်းအားဖြင့် Vanilla Kubernetes လို့လဲခေါ်ကြတယ်။ ကျွန်တော်တို့ရဲ့ Organization မှာ Container နဲ့ပတ်သက်တဲ့ application တွေကို develop လုပ်ပြီးအသုံးပြုတော့မယ်ပေါ့နော်။ အရင်ဆုံးအနေနဲ့ စတင်ပြီးစဥ်းစားရမှာကတော့ ကျွန်တော်တို့ ဘယ် Kubernetes Distribution ကိုသုံးသင့်လဲဆိုတာမျိုးပေါ့။ ထားပါတော့ ကျွန်တော်တို့ Infrastructure မှာ Existing အနေနဲ့ VMware vSphere လိုမျိုးရှိတယ်ဆိုရင် နောက်ထပ် VMware Tanzu ကိုပဲ Add on Subscription ထပ်ဝယ်ပြီးသုံးမလားပေါ့။ ဒါမှမဟုတ် ကျွန်တော်တို့ အသုံးပြုနေတယ့် Product တွေက Redhat နဲ့ပတ်သက်ပြီး Redhat JBoss တို့ တခြား Red Hat 3scale API Management လိုဟာမျိုးတွေ သုံးထားတာမျိုးတွေရှိရင်တော့ ကျွန်တော်တို့အနေနဲ့ စဥ်းစားသင့်တာက Redhat OpenShift Container Platform လိုဟာမျိုးကို စဥ်းစားရမှာပေါ့နော်။ ဒီလိုပဲ ကျွန်တော်တို့ Product တွေက AWS မှာ သုံးထားတယ်ဆိုရင်တော့ EKS လိုမျိုး Elastic Kubernetes Service လိုဟာမျိုးကိုအသုံးပြုသင့်တယ်ပေါ့နော်။ ဒါတွေကတော့ ကိုယ့်ရဲ့ Organization nature ပေါ်မူတည်ပြီးတော့ ရွေးချယ်ရမယ့် ကိစ္စဖြစ်ပါတယ်။ ဒီလောက်ဆိုရင်တော့ Kubernetes Distribution ရွေးချယ်တာနဲ့ ပတ်သက်ပြီးသိမယ်လို့ထင်ပါတယ်။</p>
<p>ကျွန်တော်တို့က Open Source ဖြစ်တယ့် Kubernetes ကိုပဲ အသုံးပြုမှာဆိုတော့ Open Source နဲ့ပတ်သက်တာကိုပဲဆက်ပြီးတော့ သွားကြပါမယ်။ Local Kubernetes Cluster ကို Setup လုပ်ဖို့အတွက် Tool တွေကတော့ မျိုးစုံရှိတယ်ပေါ့နော်။ Minikube ဆိုတာကိုပဲသုံးမလား။ Kind ဆိုတယ့် tool ကိုပဲသုံးမလားပေါ့နော်။ Kind ကတော့ Kubernetes In Docker ပေါ့ Kubernetes Cluster Setup လုပ်တဲ့အခါမှာ Node တွေလိုတယ်။ အဲ့ဒါကိုမှ အဲ့ဒီ Node တွေကို Docker Container အနေနဲ့ ပြန်ပြီး run တဲ့ပုံစံမျိုးအနေနဲ့သုံးပါတယ်။ ကျွန်တော်တို့ အသုံးပြုမှာကတော့ Production အတွက် ready ဖြစ်တယ့် kubeadm ဆိုတယ့် tool ကိုပဲ အသုံးပြုသွားမှာပဲဖြစ်ပါတယ်။ လောလောဆယ်တော့ စာအရမ်းရှည်သွားမှာဆိုးတဲ့အတွက် ဒီလောက်နဲ့ပဲ ခဏရပ်ထားပါမယ်။ Part -2 မှာတော့ Kubeadm နဲ့ Cluster Setup လုပ်တယ့် အကြောင်းကို ထပ်ပြောပြသွားမှာပဲဖြစ်ပါတယ်။</p>
<p>အချိန်ပေးပြီးဖတ်ရှုသည့်အတွက်ကျေးဇူးတင်ပါတယ်။</p>
]]></content:encoded></item><item><title><![CDATA[Synchronization error from On-Prem (AD) to Microsoft Entra ID (Part-1)]]></title><description><![CDATA[ဒီ Topic လေးမှာတော့ On-Prem (AD) Server ကနေ Microsoft Entra ID ကို Identity တွေကို Microsoft Entra Connect ကနေ sync တဲ့အခါမှာ ဖြစ်နိုင်ခြေရှိတယ့် error တွေကို ပြောပြသွားမှာပဲဖြစ်ပါတယ်။ Microsoft Entra Connect က directories တွေကို sync တဲ့အခါမှာ three...]]></description><link>https://blog.vitaltechmyanmar.com/synchronization-error-from-on-prem-ad-to-microsoft-entra-id-part-1</link><guid isPermaLink="true">https://blog.vitaltechmyanmar.com/synchronization-error-from-on-prem-ad-to-microsoft-entra-id-part-1</guid><category><![CDATA[microsoft-entra-id]]></category><dc:creator><![CDATA[Sc3p73R]]></dc:creator><pubDate>Sun, 20 Apr 2025 06:51:16 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1745131616977/149dc66e-9592-434f-9744-6f8c031ca65b.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>ဒီ Topic လေးမှာတော့ On-Prem (AD) Server ကနေ Microsoft Entra ID ကို Identity တွေကို Microsoft Entra Connect ကနေ sync တဲ့အခါမှာ ဖြစ်နိုင်ခြေရှိတယ့် error တွေကို ပြောပြသွားမှာပဲဖြစ်ပါတယ်။ Microsoft Entra Connect က directories တွေကို sync တဲ့အခါမှာ three types of operations အနေနဲ့ လုပ်ဆောင်ပါတယ်။ အဲ့ဒါတွေကတော့ -</p>
<ul>
<li><p>Import</p>
</li>
<li><p>Synchronization</p>
</li>
<li><p>Export တို့ပဲဖြစ်ပါတယ်။ ဒီ section မှာအဓိကပြောပြသွားမှာကတော့ Export လုပ်နေစဥ်အတွင်းမှာဖြစ်နိုင်တယ့် error များကို ပြောပြသွားမှာပဲဖြစ်ပါတယ်။</p>
</li>
</ul>
<p>Microsoft Entra Connector ကနေ synchronization လုပ်နေစဥ် အတွင်း Identity တွေကို Microsoft Entra Id ကို export လုပ်နေချိန်မှာ error ဖြစ်နိုင်ပါတယ်။ Entra Connector မှာ name format အနေနဲ့ <a target="_blank" href="http://vitaltechmm.onmicrosoft.com">vitaltechmm.onmicrosoft.com</a> သတ်မှတ်ခဲ့ပြီးတော့ Microsoft Entra ID ကို (add, update, delete) စသည့် operation တွေကို export လုပ်နေစဥ်အတွင်းမှာ Microsoft Entra connect (Sync Engine) ရဲ့ Microsoft Entra directory failed ခြင်းကြောင့်ပဲဖြစ်ပါတယ်။ ဖြစ်နိုင်ခြေရှိတဲ့ error တွေကတော့ -</p>
<ul>
<li><p>Data mismatch errors</p>
</li>
<li><p>ObjectTypeMismatch</p>
</li>
<li><p>Duplicate attributes</p>
</li>
<li><p>Data validation failures</p>
</li>
<li><p>LargeObject တို့ပဲဖြစ်ပါတယ်။</p>
</li>
</ul>
<ol>
<li><h3 id="heading-data-mismatch-errors-invalidsoftmatch">Data Mismatch Errors (InvalidSoftMatch)</h3>
</li>
</ol>
<p>Microsoft Entra Connect (sync engine) ကနေမှ directory object တွေကို Local AD ကနေ Entra ID ကို add or update စတဲ့ အလုပ်တွေကို instruction စပေးတယ်ပေါ့ဗျာ။ Sync လုပ်လိုက်တဲ့အချိန်မှာ Local AD က sourceAnchor attribute နဲ့ Microsoft Entra ID မှာရှိတဲ့ object ရဲ့ ImmutableId attribute နှစ်ခုကို တိုက်စစ်ပြီး match ဖြစ်သွားတယ်ပေါ့ဗျာ။ အဲ့လိုဖြစ်သွားတာမျိုးကို Hard Match လို့ခေါ်ပါတယ်။ Hard Match ဖြစ်သွားရင်တော့ Entra Connect က existing Entra Id object ကို update လုပ်ပါမယ်။</p>
<p>နောက်ထပ် အနေနဲ့ Microsoft Entra ID ကိုရောက်လာတဲ့ sourceAnchor attribute နဲ့ immutalbleId attribute ကို Hard Match လုပ်တယ်ပေါ့ဗျာ။ ဒါပေမယ့် any object တိုင်းမှာ match ဖြစ်နေတာကို ရှာမတွေ့တဲ့အခါ နောက်ထပ်အနေနဲ့ ProxyAddresses နဲ့ UserPrincipalName attributes တွေ match ဖြစ်မဖြစ်ထပ်ရှာတယ်။ Soft Match ဖြစ်သွားတဲ့အခါမှာလဲ Entra Connect က existing Entra ID object နဲ့ on-premises AD object ကို link လုပ်ဖို့ ကြိုးစားတယ်။ အဲ့ဒါကိုကျတော့ Soft Match လို့ခေါ်ပါတယ်။</p>
<p>InvalidSoftMatch Error ဖြစ်ရသည့် အကြောင်းရင်း ကတော့ Example - <a target="_blank" href="mailto:johndoe@vitaltechmm.com">johndoe@vitaltechmm.com</a> ဆိုတဲ့ user ကို Entra ID မှာ manually create လုပ်ထားတယ်ပေါ့ဗျာ။ On-Prem AD မှာ <a target="_blank" href="mailto:johndoe@vitaltechmm.com">johndoe@vitaltechmm.com</a> ဆိုတဲ့ user ကရှိနေတယ်။ အဲ့ဒီ user ကို sync တဲ့အခါမှာ Entra ID မှာရှိတယ့် johndoe user နဲ့ email address တူနေပါလိမ့်မယ်။ အဲ့ဒါကြောင့် Hard Match ဖြစ်မှာမဟုတ်ဘူး။ ဘာလို့လဲဆိုတော့ sourceAnchor နဲ့ immutableId မတူတဲ့အတွက်ကြောင့်ပဲဖြစ်ပါတယ်။ ဒါကြောင့်မလို့ သူက Soft Match လုပ်ဖို့ ထပ်ကြိုးစားပါလိမ့်မယ်။ အဲ့မှာတော့ UserPrincipalName(UPN) or ProxyAddresses တွေက တူနေတယ့်အတွက် soft match ဖြစ်လိမ့်မယ်။ ဒါပေမယ့် sourceAnchor နဲ့ immutableId က မတူတဲ့အတွက် InvalidSoftMatch error ဖြစ်ရခြင်းပဲဖြစ်ပါတယ်။</p>
<p>Entra Connect က တူညီတဲ့ Entra ID object နဲ့ on-premises AD object ကို link မလုပ်နိုင်ဘူး။ ဒါကြောင့် duplicate user ဖြစ်နိုင်တယ် (Entra ID မှာ manually create ထားတဲ့ user နဲ့ sync လုပ်လာတဲ့ user နှစ်ခု ဖြစ်နေပါလိမ့်မယ်)။</p>
<h3 id="heading-how-to-fix-invalidsoftmatch-error">How To Fix InvalidSoftMatch Error</h3>
<p>Entra ID မှာ manually create ထားတဲ့ user ကို delete လုပ်ပြီး sync ပြန်လုပ်ပါ။ ဒါမှမဟုတ် User ကို delete မလုပ်ချင်ရင်တော့ On-premises AD user ရဲ့ sourceAnchor ကို Entra ID user ရဲ့ immutableId နဲ့တူအောင် လုပ်ပါ။ ဒါမှ Hard Match ဖြစ်ပြီးတော့ InvalidSoftMatch error မဖြစ်တော့ပါဘူး။</p>
<p>အချိန်ပေးပြီး ဖတ်ရှုပေးသည့်အတွက်လည်း ကျေးဇူးတင်ပါတယ်ခင်ဗျ။ ကျန်တဲ့ Error Type ကိုတော့ နောက်ထပ် blog တွေမှာ ထပ်ရေးသွားပေးပါ့မယ်ခင်ဗျ။</p>
<p>Author By: <a class="user-mention" href="https://hashnode.com/@sc3p73r">Sc3p73R</a></p>
<p>Reference: Microsoft Documentation</p>
]]></content:encoded></item><item><title><![CDATA[Deploy Falcon Sensor for Linux with a Helm chart]]></title><description><![CDATA[အားလုံးပဲ မင်္ဂလာပါခင်ဗျာ။ ဒီနေ့မှာတော့ ကျွန်တော်တို့ရဲ့ kubernetes cluster ထဲကို CrowdStrike Falcon Sensor ကို installation လုပ်တဲ့အကြောင်းကို ပြောပြပေးမှာပဲဖြစ်ပါတယ်။
Overview
CrowdStrike Falcon Sensor ကို ဒီ lab မှာတော့ Helm Chart ကိုအသုံးပြုပြီး ...]]></description><link>https://blog.vitaltechmyanmar.com/deploy-falcon-sensor-for-linux-with-a-helm-chart</link><guid isPermaLink="true">https://blog.vitaltechmyanmar.com/deploy-falcon-sensor-for-linux-with-a-helm-chart</guid><category><![CDATA[Kubernetes]]></category><category><![CDATA[Linux]]></category><category><![CDATA[CrowdStrike falcon sensor]]></category><dc:creator><![CDATA[Sc3p73R]]></dc:creator><pubDate>Mon, 02 Dec 2024 08:37:17 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1733128719134/7a90319f-4f75-45ce-8fa1-85cb865e17bc.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>အားလုံးပဲ မင်္ဂလာပါခင်ဗျာ။ ဒီနေ့မှာတော့ ကျွန်တော်တို့ရဲ့ kubernetes cluster ထဲကို CrowdStrike Falcon Sensor ကို installation လုပ်တဲ့အကြောင်းကို ပြောပြပေးမှာပဲဖြစ်ပါတယ်။</p>
<h2 id="heading-overview">Overview</h2>
<p>CrowdStrike Falcon Sensor ကို ဒီ lab မှာတော့ Helm Chart ကိုအသုံးပြုပြီး install လုပ်မှာဖြစ်ပါတယ်။ Helm Chart ကတော့ kubernetes ပေါ်တွင် falcon sensor install လုပ်ရန် အတွက် လိုအပ်တဲ့ kubernetes resource တွေကို pre-configured လုပ်ပေးထားမည်ဖြစ်ပြီးတော့ helm chart နဲ့ installation လုပ်သည့်အခါတွင် falcon-sensor pod လေးကတော့ Daemonset အနေနဲ့ run သွားမှာပဲဖြစ်ပါတယ်။ ဒီနေရာမှာတော့ Helm တို့ Daemonset အကြောင်းတွေကိုတော့ ပြောသွားတော့မှာမဟုတ်ပါဘူး။</p>
<h3 id="heading-prerequisites">Prerequisites</h3>
<p>Prerequisites အနေကတော့ အောက်ပါအတိုင်းပဲဖြစ်ပါသည်။</p>
<ul>
<li><p>you have Helm 3.x or later installed</p>
</li>
<li><p>your kubernetes cluster nodes are either x86_64 or ARM64, but not both</p>
</li>
<li><p>your kubernetes vendor supports Helm 3</p>
</li>
<li><p>you must be a cluster administrator to deploy a Helm chart to the cluster.</p>
</li>
<li><p>By default, the Helm chart is installed in the default namespace. Best practice is to create a new namespace. See Install the chart archive for info.</p>
</li>
<li><p>The Falcon sensor for Linux as a DaemonSet should be used as the container image to deploy to a Kubernetes node.</p>
</li>
<li><p>The Falcon sensor for Linux as a DaemonSet must run as a privileged container so that the sensor can access the kernel.</p>
</li>
<li><p>The Falcon sensor for Linux as a DaemonSet should be deployed to a Kubernetes environment that grants node access or installation via a Kubernetes DaemonSet.</p>
</li>
<li><p>The Falcon sensor for Linux as a DaemonSet creates <mark>/opt/CrowdStrike</mark> on the Kubernetes nodes. Do not delete this folder.</p>
</li>
</ul>
<p>နောက်ထပ်သိရမှာကတော့ CrowdStrike က Region ပေါ်အခြေခံပြီးတော့ သူ့ရဲ့ Cloud Domain URL တွေကလည်းမတူညီပါဘူး။ ဒါတွေကိုသိအောင်လို့ ကျွန်တော်အောက်မှာ List လုပ်ပေးထားပါတယ်။</p>
<p>Cloud domains for US-1</p>
<pre><code class="lang-plaintext">ts01-b.cloudsink.net
lfodown01-b.cloudsink.net
lfoup01-b.cloudsink.net
https://falcon.crowdstrike.com
https://assets.falcon.crowdstrike.com
https://assets-public.falcon.crowdstrike.com
https://api.crowdstrike.com
https://firehose.crowdstrike.com
</code></pre>
<p>CrowdStrike Cloud US-2 domains</p>
<pre><code class="lang-plaintext">ts01-gyr-maverick.cloudsink.net
lfodown01-gyr-maverick.cloudsink.net
lfoup01-gyr-maverick.cloudsink.net
https://falcon.us-2.crowdstrike.com
https://assets.falcon.us-2.crowdstrike.com
https://assets-public.falcon.us-2.crowdstrike.com
https://api.us-2.crowdstrike.com
https://firehose.us-2.crowdstrike.com
</code></pre>
<p>CrowdStrike Cloud EU-1 domains</p>
<pre><code class="lang-plaintext">ts01-lanner-lion.cloudsink.net
lfodown01-lanner-lion.cloudsink.net
lfoup01-lanner-lion.cloudsink.net
https://falcon.eu-1.crowdstrike.com
https://assets.falcon.eu-1.crowdstrike.com
https://assets-public.falcon.eu-1.crowdstrike.com
https://api.eu-1.crowdstrike.com
https://firehose.eu-1.crowdstrike.com
</code></pre>
<p>CrowdStrike Cloud US-GOV-1 domains</p>
<pre><code class="lang-plaintext">ts01-laggar-gcw.cloudsink.net
sensorproxy-laggar-g-524628337.us-gov-west-1.elb.amazonaws.com
lfodown01-laggar-gcw.cloudsink.net
ELB-Laggar-P-LFO-DOWNLOAD-1265997121.us-gov-west-1.elb.amazonaws.com
https://falcon.laggar.gcw.crowdstrike.com
laggar-falconui01-g-245478519.us-gov-west-1.elb.amazonaws.com
https://api.laggar.gcw.crowdstrike.com
https://firehose.laggar.gcw.crowdstrike.com
falconhose-laggar01-g-720386815.us-gov-west-1.elb.amazonaws.com
</code></pre>
<p>CrowdStrike Cloud US-GOV-2 domains</p>
<pre><code class="lang-plaintext">ts01-us-gov-2.cloudsink.crowdstrike.mil
lfodown01-us-gov-2.cloudsink.crowdstrike.mil
https://falcon.us-gov-2.crowdstrike.mil
https://api.us-gov-2.crowdstrike.mil
https://firehose.us-gov-2.crowdstrike.mil
</code></pre>
<p>တို့ပဲဖြစ်ပါတယ်။</p>
<h2 id="heading-multi-architecture-sensor-image">Multi-architecture sensor image</h2>
<p>CrowdStrike ရဲ့ Falcon Sensor ကတော့ Linux image version 7.15 နဲ့ နောက်ပိုင်းတွေမှာတော့ Multi-Architecture နဲ့လုပ်ထားတဲ့ image တွေဖြစ်လာပါတယ်။ ဆိုလိုရင်းကတော့ Falcon Sensor ရဲ့ ဒီ Image တစ်ခုတည်းကိုပဲ x86_64 and aarch64 nodes တွေပေါ်မှာ တစ်ပြိုင်နက်အသုံးပြုလို့ရလာတာပဲဖြစ်ပါတယ်။ နမူနာအနေနဲ့ အောက်မှာ Linux image version 7.15 နဲ့ 7.14 ကို ယှဥ်ပြပေးထားပါတယ်။</p>
<p><strong>The Falcon sensor for Linux Image 7.15 and later</strong></p>
<p>Syntax: <code>falcon-sensor:&lt;release_number&gt;-&lt;build_number&gt;-&lt;baseImage_number&gt;.falcon-linux.Release.&lt;cloud-env&gt;</code></p>
<p>Example: <code>falcon-sensor:</code><a target="_blank" href="http://7.15.0-15501-1.falcon-linux.Release.US"><code>7.15.0-15501-1.falcon-linux.Release.US</code></a><code>-1</code></p>
<p><strong>The Falcon sensor for Linux Image 7.14 and earlier</strong></p>
<p>Syntax: <code>falcon-sensor:&lt;release_number&gt;-&lt;build_number&gt;-&lt;baseImage_number&gt;.falcon-linux.&lt;architecture&gt;.Release.&lt;cloud-env&gt;</code></p>
<p>Example: <code>falcon-sensor:7.14.0-14401-1.falcon-linux.x86_</code><a target="_blank" href="http://64.Release.US"><code>64.Release.US</code></a><code>-1</code></p>
<p>Example အတိုင်း 7.14 နဲ့ အစောပိုင်း version တွေဆိုရင် falcon sensor image တွေကို x86_64 Architecture အတွက်ဆို release သပ်သပ် aarch64 အတွက်ဆို release သပ်သပ်ထုတ်ခဲ့ပါတယ်။ 7.15 version ကနေစပြီးတော့ falcon sensor image တွေကို သပ်သပ်မထုတ်တော့ပဲ multi-architecture အဆင်ပြေအောင် ထုတ်ခဲ့တာပဲဖြစ်ပါတယ်။</p>
<h2 id="heading-deploy-with-helm">Deploy with Helm</h2>
<p>Step 1: Create an API client ID and secret</p>
<p>အရင်ဆုံး အနေနဲ့ CrowdStrike falcon sensor ရဲ့ image ကို pull လို့ရဖို့အတွက် ကျွန်တော်တို့ရဲ့ CrowdStrike Portal ထဲကနေ API client id နဲ့ secret ကို create လုပ်ပေးရမှာပဲဖြစ်ပါတယ်။ ဘယ်မှာသွား create ရမလဲဆိုတော့ <a target="_blank" href="https://falcon.crowdstrike.com/login/">https://falcon.crowdstrike.com</a> ထဲကို ဝင်ပြီးတော့ <strong>Support and resources &gt; Resources and tools &gt; API clients and keys</strong> ထဲမှာ အသစ် create လုပ်ပေးရပါမယ်။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1733124148760/54733478-b2f5-476a-988e-6c1dc569a3fa.png" alt class="image--center mx-auto" /></p>
<p>ရလာတဲ့ api clients and keys ကို မှတ်ထားပြီးတော့ ကျွန်တော်တို့ရဲ့ စက်ထဲမှာပဲ environment variables ကြေညာပေးရမှာဖြစ်ပါတယ်။</p>
<p><code>export FALCON_CLIENT_ID=&lt;YOUR_FALCON_CLIENT_ID&gt;</code></p>
<p><code>export FALCON_CLIENT_SECRET=&lt;YOUR_FALCON_CLIENT_SECRET&gt;</code></p>
<p>Step 2: Get your CID with checksum</p>
<p>နောက်တစ်ဆင့်အနေနဲ့ Falcon console ထဲကနေပဲ Customer ID checksum ကိုသွားယူပြီး variable အဖြစ်ကြေညာပေးရမှာပဲဖြစ်ပါတယ်။</p>
<p><code>export FALCON_CID=&lt;YOUR_CID_WITH_CHECKSUM&gt;</code></p>
<h2 id="heading-pull-the-image-from-the-crowdstrike-registry">Pull the image from the CrowdStrike registry</h2>
<p>နောက်ထပ်အနေနဲ့ CrowdStrike registry က falcon-sensor image ကို pullလုပ်ရမှာပဲဖြစ်ပါတယ်။</p>
<pre><code class="lang-bash">curl -sSL -o falcon-container-sensor-pull.sh <span class="hljs-string">"https://raw.githubusercontent.com/CrowdStrike/falcon-scripts/main/bash/containers/falcon-container-sensor-pull/falcon-container-sensor-pull.sh"</span>
chmod +x falcon-container-sensor-pull.sh
</code></pre>
<p>ပြီးသွားရင်တော့ ကျွန်တော်တို့စက်ထဲရောက်လာသည့် <code>falcon-container-sensor-pull.sh</code> script လေးကို အောက်ပါအတိုင်း run ပေးရပါမယ်။</p>
<pre><code class="lang-bash">./falcon-container-sensor-pull.sh \
  -u <span class="hljs-variable">$FALCON_CLIENT_ID</span> \
  -s <span class="hljs-variable">$FALCON_CLIENT_SECRET</span> \
  --list-tags \
  -t falcon-sensor
</code></pre>
<p>အဲ့တာဆိုရင်တော့ OUTPUT အနေနဲ့</p>
<pre><code class="lang-bash">{
  <span class="hljs-string">"name"</span> : <span class="hljs-string">"falcon-sensor"</span>,
  <span class="hljs-string">"tags"</span> : [ <span class="hljs-string">"6.35.0-13206.falcon-linux.x86_64.Release.US-2"</span>, 
… 
<span class="hljs-string">"7.15.0-15501-1.falcon-linux.Release.US-2"</span> ]
}
</code></pre>
<p>အခုလိုမျိုးပြမှာပဲဖြစ်ပါတယ်။</p>
<p>နောက်ထပ်အနေနဲ့ CrowdStrike registry နဲ့ image tag တို့ကို variable အနေနဲ့ သတ်မှတ်ပေးရမှာဖြစ်ပါတယ်။</p>
<p>Set variables for the CrowdStrike registry and the image tag:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">export</span> FALCON_IMAGE_REPO=registry.crowdstrike.com/falcon-sensor/&lt;cloud_tag&gt;/release/falcon-sensor
<span class="hljs-built_in">export</span> FALCON_IMAGE_TAG=7.15.0-15501-1.falcon-linux.Release.&lt;cloud_region&gt;
</code></pre>
<p><strong>Note</strong>: &lt;cloud_tag&gt; မှာတော့ မိမိရဲ့ crowdstrike cloud domain ကိုထည့်ပေးရမည်ဖြစ်ပါသည်။ region အလိုက် &lt;cloud_tag&gt; တွေက ကွဲမှာဖြစ်ပြီးတော့ us-1, us-2, eu-1, govcloud စသဖြင့် မိမိ region အလိုက်ထည့်ပေးရမှာပဲ ဖြစ်ပါတယ်။ &lt;cloud_region&gt; လဲထိုနည်းတူစွာပါပဲ &lt;cloud_region&gt; မှာ သူရဲ့သက်ဆိုင်ရာ region - US-1, US-2, EU-1, GOV-1 တို့ကို ထည့်ပေးရပါမယ်။ ကျွန်တော်ကတော့ ပုံပါအတိုင်း US-2 region ဖြစ်တယ့်အတွက် &lt;cloud_tag&gt; နေရာမှာ <code>us-2</code> ကို ထည့်ပေးရမည်ဖြစ်ပြီး &lt;cloud_region&gt; နေရာမှာ <code>US-2</code> ဆိုပြီး change ပေးရမှာပဲဖြစ်ပါတယ်။</p>
<p>အပေါ်က variable သတ်မှတ်ခဲ့တယ့် အဆင့်တွေ အကုန်လုပ်ဆောင်ပြီးရင်တော့ CrowdStrike registry ကနေ image ကို directly pull လုပ်လို့ရဖို့အတွက် pull token တွေကို create လုပ်ပေးရမှာပဲဖြစ်ပါတယ်။</p>
<p>Set variables for the CrowdStrike registry:</p>
<pre><code class="lang-bash">./falcon-container-sensor-pull.sh \
-u <span class="hljs-variable">$FALCON_CLIENT_ID</span> \
-s <span class="hljs-variable">$FALCON_CLIENT_SECRET</span> \
--dump-credentials
</code></pre>
<p>အခုလိုမျိုး run လိုက်တာနဲ့ Output အနေနဲ့ CrowdStrike registry username နဲ့ password ရမှာပဲဖြစ်ပါတယ်။</p>
<p>OUTPUT</p>
<pre><code class="lang-plaintext">CSRegistryUsername:fc-&lt;userName&gt;
CSRegistryPassword:ABC...123
</code></pre>
<p>အဲ့ဒီရလာတဲ့ registry Username နဲ့ Password ကို Image Pull လို့ရဖို့အတွက် variables သတ်မှတ်ပေးရမှာပဲဖြစ်ပါတယ်။</p>
<p>Create the pull token to pull images directly from the CrowdStrike registry:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">export</span> PARTIALPULLTOKEN=$(<span class="hljs-built_in">echo</span> -n <span class="hljs-string">"<span class="hljs-variable">$FALCON_ART_USERNAME</span>:<span class="hljs-variable">$FALCON_ART_PASSWORD</span>"</span> | base64 -w 0)
<span class="hljs-built_in">export</span> FALCON_IMAGE_PULL_TOKEN=$(<span class="hljs-built_in">echo</span> <span class="hljs-string">"{\"auths\":{\"registry.crowdstrike.com\":{\"auth\":\"<span class="hljs-variable">$PARTIALPULLTOKEN</span>\"}}}"</span> | base64 -w 0)
</code></pre>
<p><strong>Note:</strong> The pull token for the CrowdStrike registry does not expire.</p>
<p><strong>Step 4: Add the CrowdStrike Helm chart client</strong></p>
<p>နောက်တစ်ဆင့်အနေနဲ့ CrowdStrike ရဲ့ Helm Chart repo ကိုထည့်သွင်းပေးရမှာဖြစ်ပါတယ်။</p>
<pre><code class="lang-bash">helm repo add crowdstrike https://crowdstrike.github.io/falcon-helm
helm repo update
helm repo list
</code></pre>
<p>helm repo list လုပ်ကြည့်လိုက်တာနဲ့ crowdstrike repo ကိုမြင်နေရမှာပဲဖြစ်ပါတယ်။</p>
<pre><code class="lang-plaintext">NAME         URL
crowdstrike  https://crowdstrike.github.io/falcon-helm
</code></pre>
<p>နောက်ထပ် Falcon sensor repo ကို variables သတ်မှတ်ပေးရပါမယ်။</p>
<p>Set a variable for the Falcon sensor Helm chart:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">export</span> FALCON_SENSOR_REPO=crowdstrike/falcon-sensor
</code></pre>
<p><strong>Step 5: Install the Falcon sensor on your cluster</strong></p>
<p>အပေါ်ကအဆင့်တွေအားလုံးပြီးသွားပြီဆိုရင်တော့ Falcon sensor ကို ကျွန်တော်တို့ရဲ့ kubernetes cluster ထဲမှာ Install လုပ်လို့ရပီပဲဖြစ်ပါတယ်။</p>
<p>Create a namespace for the sensor and set the security context:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">export</span> FALCON_NAMESPACE=falcon-system
kubectl create namespace <span class="hljs-variable">$FALCON_NAMESPACE</span>
kubectl label ns --overwrite <span class="hljs-variable">$FALCON_NAMESPACE</span> pod-security.kubernetes.io/enforce=privileged
</code></pre>
<p>နောက်ထပ်တစ်ဆင့်အနေနဲ့ pod တွေကို label ထိုးပေးမှာပဲဖြစ်ပါတယ်။ ဒါကတော့ Optional ဖြစ်ပြီးတော့ namespace ထဲမှာရှိနေတဲ့ pod တွေကို specific configuration နဲ့ resources တွေအတွက်ကို policies တွေသတ်မှတ်ရလွယ်ကူစေမှာပဲဖြစ်ပါတယ်။</p>
<p>Install the Falcon sensor in the namespace:</p>
<pre><code class="lang-bash">helm install falcon-sensor <span class="hljs-variable">$FALCON_SENSOR_REPO</span> \
  -n <span class="hljs-variable">$FALCON_NAMESPACE</span> \
  --<span class="hljs-built_in">set</span> falcon.cid=<span class="hljs-variable">$FALCON_CID</span> \
  --<span class="hljs-built_in">set</span> node.image.repository=<span class="hljs-variable">$FALCON_IMAGE_REPO</span> \
  --<span class="hljs-built_in">set</span> node.image.tag=<span class="hljs-variable">$FALCON_IMAGE_TAG</span> \
  --<span class="hljs-built_in">set</span> node.image.registryConfigJSON=<span class="hljs-variable">$FALCON_IMAGE_PULL_TOKEN</span>
</code></pre>
<p>Install လုပ်တာ successfully ဖြစ်ရင်တော့ အောက်ပါအတိုင်း output ရမှာပဲဖြစ်ပါတယ်။</p>
<pre><code class="lang-plaintext">NAME: falcon-sensor
LAST DEPLOYED: Wed Oct 11 14:20:01 2023
NAMESPACE: falcon-sensor
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Thank you for installing the CrowdStrike Falcon Helm Chart!
Access to the Falcon Linux and Container Sensor downloads at registry.crowdstrike.com are
required to complete the install of this Helm chart. If an internal registry is used instead of registry.crowdstrike.com.
the containerized sensor must be present in a container registry accessible from Kubernetes installation.
CrowdStrike Falcon sensors will deploy across all nodes in your Kubernetes cluster after
installing this Helm chart. The default image name to deploy a kernel sensor to a node is `falcon-node-sensor`.
When utilizing your own registry, an extremely common error on installation is accidentally forgetting to add your containerized
sensor to your local image registry prior to executing `helm install`. Please read the Helm Chart's readme
for more deployment considerations.
</code></pre>
<p>အဲ့တာဆိုရင်တော့ falcon-sensor pod တွေ running ဖြစ်မဖြစ်သိအောင်လို့ စစ်ကြည့်ပါမယ်။</p>
<pre><code class="lang-bash">kubectl get pod -n falcon-system
</code></pre>
<p>Output:</p>
<pre><code class="lang-plaintext">kubectl get pod -n falcon-system
NAME                  READY   STATUS    RESTARTS       AGE
falcon-sensor-2z8nf   1/1     Running   13 (66d ago)   120d
falcon-sensor-ckz89   1/1     Running   9 (66d ago)    120d
falcon-sensor-nfjk2   1/1     Running   7 (66d ago)    120d
falcon-sensor-wvz85   1/1     Running   9 (66d ago)    120d
falcon-sensor-zpjn2   1/1     Running   1 (66d ago)    112d
</code></pre>
<p>running ဖြစ်နေပီဆိုတော့ ကျွန်တော်တို့ ရဲ့ deployment state ကအောင်မြင်သွားပီပဲဖြစ်ပါတယ်။</p>
<p>ကျွန်တော်ရေးခဲ့တာ အမှားများပါခဲ့ရင်လဲ လာရောက်ပြောကြားနိုင်ပါတယ်ခင်ဗျ။ အားလုံးပဲ အချိန်ပေးပြီးဖတ်ရှုပေးတယ့်အတွက်ကျေးဇူးတင်ပါတယ်။</p>
<p>Author By: <a class="user-mention" href="https://hashnode.com/@sc3p73r">Sc3p73R</a></p>
<p>Reference: CrowdStrike Documentation</p>
]]></content:encoded></item><item><title><![CDATA[CCNA LAB SVI DHCP server VTP Root guard BPDU filter Inter VLAN routing 802.1Q and RSTP]]></title><description><![CDATA[LAB Diagram

Configure the topology as per the diagram
Configure VLAN_10 VLAN_20 VLAN_30 on Core_SW
Configure 802.1Q Trunk Link Between Access Switches and Core_SW
Configure VTP version 2 on Core_SW
Configure VTP domain name lab.com
Make sure rest of...]]></description><link>https://blog.vitaltechmyanmar.com/ccna-lab-svi-dhcp-server-vtp-root-guard-bpdu-filter-inter-vlan-routing-8021q-and-rstp</link><guid isPermaLink="true">https://blog.vitaltechmyanmar.com/ccna-lab-svi-dhcp-server-vtp-root-guard-bpdu-filter-inter-vlan-routing-8021q-and-rstp</guid><category><![CDATA[networking]]></category><category><![CDATA[ccna]]></category><category><![CDATA[VLAN Trunking Protocol]]></category><dc:creator><![CDATA[ko thu]]></dc:creator><pubDate>Mon, 21 Oct 2024 07:22:15 GMT</pubDate><content:encoded><![CDATA[<p><strong>LAB Diagram</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729483125386/485aa8b9-2d0e-4913-9268-b887399cf128.png" alt class="image--center mx-auto" /></p>
<p><strong>Configure the topology as per the diagram</strong></p>
<p><strong>Configure VLAN_10 VLAN_20 VLAN_30 on Core_SW</strong></p>
<p><strong>Configure 802.1Q Trunk Link Between Access Switches and Core_SW</strong></p>
<p><strong>Configure VTP version 2 on Core_SW</strong></p>
<p><strong>Configure VTP domain name lab.com</strong></p>
<p><strong>Make sure rest of the switches will get this information</strong></p>
<p><strong>Configure the ports into their VLAN as per the topology</strong></p>
<p><strong>Configure the IP address to VLANs for inter VLAN routing</strong></p>
<p><strong>IP 10.10.10.0/24 to VLAN 10</strong></p>
<p><strong>IP 20.20.20.0/24 to VLAN 20</strong></p>
<p><strong>IP 30.30.30.0/24 to VLAN 30</strong></p>
<p><strong>Configure DHCP server for VLAN 10,20,30 on Core_SW</strong></p>
<p><code>CORE_SW#show interfaces trunk</code></p>
<p><code>Core_SW(config)#interface range Gi 0/0-3</code></p>
<p><code>Core_SW(config-if-range)#switchport trunk encapsulation dot1q</code></p>
<p><code>Core_SW(config-if-range)#switchport mode trunk</code></p>
<p><code>Core_SW(config-if-range)#switchport nonegotiate</code></p>
<p><code>Core_SW(config-if-range)#switchport trunk allowed vlan 10,20,30</code></p>
<p><code>Core_SW(config-if-range)#switchport trunk native vlan 999</code></p>
<p><code>Core_SW(config-if-range)#exit</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729484158701/98baf5b3-4cc5-4266-bfbe-ec409b1d344b.png" alt /></p>
<p><code>FLOOR_1(config)#interface Gi 0/0</code></p>
<p><code>FLOOR_1(config-if)#switchport trunk encapsulation dot1q</code></p>
<p><code>FLOOR_1(config-if)#switchport mode trunk</code></p>
<p><code>FLOOR_1(config-if)#switchport nonegotiate</code></p>
<p><code>FLOOR_1(config-if)#switchport trunk allowed vlan 10,20,30</code></p>
<p><code>FLOOR_1(config-if)#switchport trunk native vlan 999</code></p>
<p><code>FLOOR_1(config-if)#exit</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729485888036/d0380af4-dc42-4b06-bf70-c6058682ad5c.png" alt /></p>
<p><code>FLOOR_2(config)#interface Gi 0/0</code></p>
<p><code>FLOOR_2(config-if)#switchport trunk encapsulation dot1q</code></p>
<p><code>FLOOR_2(config-if)#switchport mode trunk</code></p>
<p><code>FLOOR_2(config-if)#switchport nonegotiate</code></p>
<p><code>FLOOR_2(config-if)#switchport trunk allowed vlan 10,20,30</code></p>
<p><code>FLOOR_2(config-if)#switchport trunk native vlan 999</code></p>
<p><code>FLOOR_2(config-if)#exit</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729485934381/cead13a6-7870-4b86-8a8e-597360e7f9aa.png" alt /></p>
<p><code>FLOOR_3(config)#interface Gi 0/0</code></p>
<p><code>FLOOR_3(config-if)#switchport trunk encapsulation dot1q</code></p>
<p><code>FLOOR_3(config-if)#switchport mode trunk</code></p>
<p><code>FLOOR_3(config-if)#switchport nonegotiate</code></p>
<p><code>FLOOR_3(config-if)#switchport trunk allowed vlan 10,20,30</code></p>
<p><code>FLOOR_3(config-if)#switchport trunk native vlan 999</code></p>
<p><code>FLOOR_3(config-if)#exit</code></p>
<p><code>Core_SW(config)#VTP domain lab.com</code><br />Domain name already set to lab.com<br /><code>Core_SW(config)#VTP mode server</code></p>
<p><code>Core_SW(config)#VTP version 2</code></p>
<p><code>Core_SW(config)#end</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729486167974/9ea58a90-c21d-4b14-a847-cf0a61c8c0d1.png" alt class="image--center mx-auto" /></p>
<p><code>FLOOR_1(config)#VTP domain lab.com</code><br />Domain name already set to lab.com<br /><code>FLOOR_1(config)#VTP mode client</code></p>
<p><code>FLOOR_1(config)#VTP version 2</code></p>
<p><code>FLOOR_1(config)#end</code></p>
<p><code>FLOOR_2(config)#VTP domain lab.com</code><br />Domain name already set to lab.com</p>
<p><code>FLOOR_2(config)#VTP mode client</code></p>
<p><code>FLOOR_2(config)#VTP version 2</code></p>
<p><code>FLOOR_2(config)#end</code></p>
<p><code>FLOOR_3(config)#VTP domain lab.com</code><br />Domain name already set to lab.com</p>
<p><code>FLOOR_3(config)#VTP mode client</code></p>
<p><code>FLOOR_3(config)#VTP version 2</code></p>
<p><code>FLOOR_3(config)#end</code></p>
<p><code>Core_SW(config)#vlan 10</code></p>
<p><code>Core_SW(config-vlan)#vlan 20</code></p>
<p><code>Core_SW(config-vlan)#vlan 30</code></p>
<p><code>Core_SW(config-vlan)#exit</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729486672009/bd2a7e1d-f863-43d7-8b16-548ac6f58cdf.png" alt /></p>
<p><code>FLOOR_1(config)#interface range gi 0/1-2</code></p>
<p><code>FLOOR_1(config-if-range)#switchport mode access</code></p>
<p><code>FLOOR_1(config-if-range)#switchport access vlan 10</code></p>
<p><code>FLOOR_1(config-if-range)#exit</code></p>
<p><code>FLOOR_1(config)#end</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729486942747/9781932d-5219-44be-b3a1-c5448e965a6e.png" alt class="image--center mx-auto" /></p>
<p><code>FLOOR_2(config)#interface range gi 0/1-2</code></p>
<p><code>FLOOR_2(config-if-range)#switchport mode access</code></p>
<p><code>FLOOR_2(config-if-range)#switchport access vlan 20</code></p>
<p><code>FLOOR_2(config-if-range)#exit</code></p>
<p><code>FLOOR_2(config)#end</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729487064978/58caf1a0-5bbe-401f-bba5-77c0fcbafab4.png" alt class="image--center mx-auto" /></p>
<p><code>FLOOR_3(config)#interface range gi 0/1-2</code></p>
<p><code>FLOOR_3(config-if-range)#switchport mode access</code></p>
<p><code>FLOOR_3(config-if-range)#switchport access vlan 30</code></p>
<p><code>FLOOR_3(config-if-range)#exit</code></p>
<p><code>FLOOR_3(config)#end</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729487129782/a55dca10-0fcd-4948-8c46-38e0833b16f8.png" alt class="image--center mx-auto" /></p>
<p><code>Core_SW(config)#interface vlan 10</code></p>
<p><code>Core_SW(config-if)#ip address 10.10.10.254 255.255.255.0</code></p>
<p><code>Core_SW(config-if)#no shutdown</code></p>
<p><code>Core_SW(config-if)#exit</code></p>
<p><code>Core_SW(config)#interface vlan 20</code></p>
<p><code>Core_SW(config-if)#ip address 20.20.20.254 255.255.255.0</code></p>
<p><code>Core_SW(config-if)#no shutdown</code></p>
<p><code>Core_SW(config-if)#exit</code></p>
<p><code>Core_SW(config)#interface vlan 30</code></p>
<p><code>Core_SW(config-if)#ip address 30.30.30.254 255.255.255.0</code></p>
<p><code>Core_SW(config-if)#no shutdown</code></p>
<p><code>Core_SW(config-if)#exit</code></p>
<p><code>Core_SW#show ip interface brief</code><br />Interface              IP-Address      OK? Method Status          Protocol<br />Vlan10                 10.10.10.254     YES manual up                    up<br />Vlan20                20.20.20.254   YES manual up                    up<br />Vlan30                30.30.30.254    YES manual up                    up**</p>
<p><code>Core_SW(config)#service dhcp</code></p>
<p><code>Core_SW(config)#ip dhcp pool VLAN10</code></p>
<p><code>Core_SW(dhcp-config)#network 10.10.10.0 255.255.255.0</code></p>
<p><code>Core_SW(dhcp-config)#default-router 10.10.10.254</code></p>
<p><code>Core_SW(dhcp-config)#dns-server 8.8.8.8</code></p>
<p><code>Core_SW(dhcp-config)#exit</code></p>
<p><code>Core_SW(config)#service dhcp</code></p>
<p><code>Core_SW(config)#ip dhcp pool VLAN20</code></p>
<p><code>Core_SW(dhcp-config)#network 20.20.20.0 255.255.255.0</code></p>
<p><code>Core_SW(dhcp-config)#default-router 20.20.20.254</code></p>
<p><code>Core_SW(dhcp-config)#dns-server 8.8.8.8</code></p>
<p><code>Core_SW(dhcp-config)#exit</code></p>
<p><code>Core_SW(config)#service dhcp   Core_SW(config)#ip dhcp pool VLAN30   Core_SW(dhcp-config)#network 30.30.30.0 255.255.255.0   Core_SW(dhcp-config)#default-router 30.30.30.254   Core_SW(dhcp-config)#dns-server 8.8.8.8   Core_SW(dhcp-config)#exit</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729494401267/3f3c52cb-4bea-46e4-89bd-0a87b0aeddba.png" alt /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729494460288/2da7fd74-a65d-4794-b7e5-89dcfcfdb82d.png" alt /></p>
<p><code>Core_SW(config)#spanning-tree vlan 10,20,30 root primary</code></p>
<p><code>Core_SW(config)#end</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1729494830885/42a39867-1944-4289-9784-b7b29c4b8e7b.png" alt class="image--center mx-auto" /></p>
<p><code>Core_SW(config)#interface range gi 0/1-3</code></p>
<p><code>Core_SW(config-if-range)#spanning-tree guard root</code></p>
<p><code>Core_SW(config-if-range)#end</code></p>
<p>**<em>Oct  2 17:26:10.692: %SPANTREE-2-ROOTGUARD_CONFIG_CHANGE: Root guard enabled on port GigabitEthernet0/1<br />Oct  2 17:26:10.693: %SPANTREE-2-ROOTGUARD_CONFIG_CHANGE: Root guard enabled on port GigabitEthernet 0/2<br />\</em>Oct  2 17:26:10.693: %SPANTREE-2-ROOTGUARD_CONFIG_CHANGE: Root guard enabled on port GigabitEthernet 0/3.*</p>
]]></content:encoded></item><item><title><![CDATA[IPSec Tunnel Between CheckPoint Firewall and PaloAlto Firewall]]></title><description><![CDATA[Hello everyone, today I’d like to share step by step guide for configuration ipsec tunnel between CheckPoint Firewall and PaloAlto firewall using eve-ng.
LAB Diagram

CheckPoint Side Configuration
For WAN Interface
Network Management >> Network Inter...]]></description><link>https://blog.vitaltechmyanmar.com/ipsec-tunnel-between-checkpoint-firewall-and-paloalto-firewall</link><guid isPermaLink="true">https://blog.vitaltechmyanmar.com/ipsec-tunnel-between-checkpoint-firewall-and-paloalto-firewall</guid><category><![CDATA[networking]]></category><dc:creator><![CDATA[ko thu]]></dc:creator><pubDate>Tue, 08 Oct 2024 08:34:03 GMT</pubDate><content:encoded><![CDATA[<p>Hello everyone, today I’d like to share step by step guide for configuration ipsec tunnel between CheckPoint Firewall and PaloAlto firewall using eve-ng.</p>
<p><strong>LAB Diagram</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728358297261/3edc0a73-b435-4ec4-9be6-99c7fd628867.png" alt class="image--center mx-auto" /></p>
<p><strong>CheckPoint Side Configuration</strong></p>
<p><strong>For WAN Interface</strong></p>
<p><strong>Network Management &gt;&gt; Network Interfaces &gt;&gt; Click eth1 &gt;&gt; Edit  &gt;&gt; Comment (optional) &gt;&gt; Checked Enabled &gt;&gt; Assign ip address manually &gt;&gt; Click OK</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728358357748/4a53d216-0eb4-41a6-b116-fcf9b6c88273.png" alt class="image--center mx-auto" /></p>
<p><strong>For LAN interface</strong></p>
<p><strong>Network Management &gt;&gt; Network Interfaces &gt;&gt; Click eth2 &gt;&gt; Edit  &gt;&gt; Comment (optional) &gt;&gt; Checked Enabled &gt;&gt; Assign ip address manually &gt;&gt; Click OK</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728360070480/c7b6f433-689e-46e9-900d-1a953df7bc65.png" alt class="image--center mx-auto" /></p>
<p><strong>Static Route Configuration</strong></p>
<p><strong>Network Management &gt;&gt; IPv4 Static Routes &gt;&gt; Click Default &gt;&gt; Edit &gt;&gt; Click Gateway &gt;&gt; Edit &gt;&gt; add the gateway ip address &gt;&gt; Click OK</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728360092487/12019da4-6aea-45a6-a56c-930b3c0f34b0.png" alt class="image--center mx-auto" /></p>
<p><strong>Login to the Smart Console &gt;&gt; navigate to the right side and Click New &gt;&gt; Network</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728360112932/feacb130-edc9-407a-99d5-4ab124b33f06.png" alt class="image--center mx-auto" /></p>
<p><strong>Checkpoint Internal Network Creation</strong></p>
<p><strong>Give a suitable name &gt;&gt; Click General &gt;&gt; Add Network Address and Subnet Mask</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728360136972/807311f5-a9c9-4adf-a6a9-13555434d0c3.png" alt class="image--center mx-auto" /></p>
<p><strong>Click NAT &gt;&gt; Checked Add Automatic address translation rules (for SNAT translation behind checkpoint firewall) &gt;&gt; Click OK</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728360152114/6ac6ad8b-1171-4699-89c0-0176a4d8b5f0.png" alt class="image--center mx-auto" /></p>
<p><strong>For PA Network Creation</strong></p>
<p><strong>Repeat Same Step likes checkpoint network creation</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728364362499/a453ec1d-4ce6-4335-98ec-19ad154d5fdb.png" alt class="image--center mx-auto" /></p>
<p><strong>PA Network Creation</strong></p>
<p><strong>Give a suitable name &gt;&gt; Click General &gt;&gt; Add Network Address and Subnet Mask</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728364388395/18656c16-b319-4f1c-8c0a-cb5ce7d3fe6d.png" alt class="image--center mx-auto" /></p>
<p><strong>Adding PA firewall object in checkpoint for ipsec tunnel</strong></p>
<p><strong>Click On right Navigation bar &gt;&gt; New &gt;&gt; More &gt;&gt; Network Object &gt;&gt; More &gt;&gt; Interoperable Device</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728373905835/df6f99a9-9ba2-4b64-a6a7-b205b3177c72.png" alt class="image--center mx-auto" /></p>
<p><strong>Configure the public ip address of PA firewall</strong></p>
<p><strong>General Properties &gt;&gt; Name (Suitable Name) &gt;&gt;</strong></p>
<p><strong>IPv4 Address (Public IP address of PA firewall)</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728375512659/6df006aa-5cf9-4a2f-8a76-621ee4a5d0f2.png" alt class="image--center mx-auto" /></p>
<p><strong>Configuration External Network for PA firewall</strong></p>
<p><strong>Topology &gt;. New &gt;&gt; General &gt;&gt; Name (External) &gt;&gt; IP Address  &gt;&gt; Subnet Mask &gt;&gt; Topology &gt;&gt; Checked External &gt;&gt; Click OK</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728375542608/4d750b91-11c2-4aeb-b6da-7c5681858d94.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728375551154/0f3b9f04-9019-4cf5-be7b-cb000fd81811.png" alt class="image--center mx-auto" /></p>
<p><strong>Configuration VPN Domain for PA firewall’s Network</strong></p>
<p><strong>Topology &gt;&gt; VPN Domain &gt;&gt; Check User defined &gt;&gt;</strong></p>
<p><strong>Click PA_Network (the network you created before)</strong></p>
<p><strong>\&gt;&gt; Click OK</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728375580398/d6f5fdc9-f388-4472-a825-67ba5490bfef.png" alt class="image--center mx-auto" /></p>
<p><strong>IPSec VPN &gt;&gt; Link Selection &gt;&gt; Check Selected address from topology table</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728375601947/c0bfb538-ea44-45e5-83b4-c1d7ec1152bc.png" alt class="image--center mx-auto" /></p>
<p><strong>VPN Domain for CheckPoint</strong></p>
<p><strong>In Smart Console Maing Menu &gt;&gt; Click SMS &gt;&gt;</strong></p>
<p><strong>Network Management &gt;&gt; VPN Domain &gt;&gt;</strong></p>
<p><strong>User Defined &gt;&gt; Selected Pre defined Network</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728375643227/d892fd6c-7a59-4f27-a098-42f4cbc60dde.png" alt class="image--center mx-auto" /></p>
<p><strong>Configuration IPSec Peer</strong></p>
<p><strong>Select IPSec VPN &gt;&gt; Link Selection &gt;&gt;</strong></p>
<p><strong>Check Selected address from topology table</strong></p>
<p><strong>\&gt;&gt; Click OK</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728375672189/5d7f33f9-216f-47c7-b1b9-699defbfb33a.png" alt class="image--center mx-auto" /></p>
<p><strong>Configuration VPN community</strong></p>
<p><strong>On the Smart Console Main Menu &gt;&gt; Navigate to the left panel &gt;&gt; Select Security Policies &gt;&gt; Click VPN Communities &gt;&gt;</strong></p>
<p> <strong>Create Meshed Community</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728375699381/7175c986-1f32-4e55-a98c-3481cce2c2cd.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728375719276/e901c794-f699-4cab-a456-62e90baf412c.png" alt class="image--center mx-auto" /></p>
<p><strong>Firewall Policy for IPSec VPN</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728375740046/e9ba4765-711c-441a-9762-1aefa1238e50.png" alt class="image--center mx-auto" /></p>
<p><strong>Click Install Policy &gt;&gt; Click Publish and Install on pop up box</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728375756532/106b5d40-c1e7-43eb-ad89-9bf8133d51f2.png" alt class="image--center mx-auto" /></p>
<p><strong>Click Install IPSEC VPN preparation for CheckPoint Side is Done</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728375774122/9e64272e-15bc-407b-b68d-af873d5c07c4.png" alt class="image--center mx-auto" /></p>
<p><strong>PaloAlto Side Configuration</strong></p>
<p><strong>Zone Configuration Trust , Untrust and IPSec Zones</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728375813934/d02fcf96-7692-45cc-9cd7-1f16b48a6321.png" alt class="image--center mx-auto" /></p>
<p><strong>IP Assign Interface  (WAN and LAN )</strong></p>
<p><strong>Click &gt;&gt; Network &gt;&gt; Interfaces &gt;&gt; Ethernet &gt;&gt; ethernet 1/1 &gt;&gt; interface type &gt;&gt; Virtual Router &gt;&gt; Security Zone &gt;&gt;</strong></p>
<p> <strong>IPv4 &gt;&gt; Advanced &gt;&gt; Click OK</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728375836769/7b10014d-ccc0-4ce3-8a7e-3399d15fdee3.png" alt class="image--center mx-auto" /></p>
<p><strong>Tunnel Interface configuration for IPSec Tunnel</strong></p>
<p><strong>Network &gt;&gt; interfaces &gt;&gt; Tunnel &gt;&gt; Add &gt;&gt; Tunnel id &gt;&gt; Virtual Router &gt;&gt; Security Zone &gt;&gt; Click OK</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728375856822/ca3251f7-1051-42c6-a677-686e1cf212f0.png" alt class="image--center mx-auto" /></p>
<p><strong>Creation of Security Rule for local network to access internet</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728375875535/1dd8873c-6b84-4442-9144-b44966eeab31.png" alt class="image--center mx-auto" /></p>
<p><strong>Security Rule Parameter</strong></p>
<p><strong>For local network to access</strong></p>
<p><strong>internet</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728375899370/dd3158e8-572d-48c3-ac36-112ca995e3f6.png" alt class="image--center mx-auto" /></p>
<p><strong>IPSec Security Rule Creation</strong></p>
<p><strong>Click Policies &gt;&gt; General &gt;&gt; Name &gt;&gt; Source &gt;&gt; Destination</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728375925630/bf9e874a-8c2a-4ef9-b178-39ed2ed90408.png" alt class="image--center mx-auto" /></p>
<p><strong>Security Rule Parameter for</strong></p>
<p><strong>Ipsec Tunnel</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728375943440/9d5f2b7c-da04-4593-a4f6-01c444c3336c.png" alt class="image--center mx-auto" /></p>
<p><strong>SNAT Configuration</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728375958385/81156521-f3ad-40c8-afdf-911ec3e37c30.png" alt class="image--center mx-auto" /></p>
<p><strong>SNAT Parameter</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728375974361/7ec45db8-f62f-478c-8a8f-a41b9619a7ea.png" alt class="image--center mx-auto" /></p>
<p><strong>Default Route Configuration</strong></p>
<p><strong>Network &gt;&gt; Virtual Routers &gt;&gt; Click default &gt;&gt; Click Static Routes &gt;&gt; Add &gt;&gt; Configure Static Route &gt;&gt; Click OK</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728375996552/9b3c9996-9615-4ccf-b4b3-2c029e8b8ae1.png" alt class="image--center mx-auto" /></p>
<p><strong>Configure Route for Checkpoint Internal Network</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728376011394/d3187ed9-2e88-4231-b96f-07802ab69a62.png" alt class="image--center mx-auto" /></p>
<p><strong>IKE Crypto Profile Configuration</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728376039004/0fda0a9d-d54c-45da-885e-88b96adfd69d.png" alt class="image--center mx-auto" /></p>
<p><strong>IPSec Crypto Profile Configuration</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728376056934/ebf08311-ac35-42e7-bac5-6fe638aeda6c.png" alt class="image--center mx-auto" /></p>
<p><strong>IKE Gateway Configuration</strong></p>
<p><strong>Click Network &gt;&gt; IKE Gateways &gt;&gt; Add &gt;&gt; Name &gt;&gt; Version &gt;&gt; Interface &gt;&gt; Local IP Address &gt;&gt; Peer Address &gt;&gt; Authentication &gt;&gt;</strong></p>
<p> <strong>Pre-shared Key &gt;&gt; Click OK</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728376080800/9402f069-f502-430b-b071-a4d97f5c95bb.png" alt class="image--center mx-auto" /></p>
<p><strong>IKE Parameter</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728376095220/375367d2-d730-46b4-91f2-f341f6a61661.png" alt class="image--center mx-auto" /></p>
<p><strong>IPSec Tunnel Configuration</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728376111465/92983aed-03cc-4222-ba87-c335091df121.png" alt class="image--center mx-auto" /></p>
<p><strong>After All Parameter Configure Sucessfully Your IPSec Tunnel Will be up !!!</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728376297710/8394db10-a8a3-4ea6-964f-254ed6b338e0.png" alt class="image--center mx-auto" /></p>
<p><strong>Monitor Traffic From PA Side</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728376316936/56af88e8-7c92-4dcc-9d64-82cd3969b978.png" alt class="image--center mx-auto" /></p>
<p><strong>Monitor Traffic From CheckPoint Side</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728376332534/7c47c085-1279-4130-bebb-9586fef40dc3.png" alt class="image--center mx-auto" /></p>
<p><strong>Monitor From CheckPoint Side(Details)</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728376348158/5615f2bc-f664-469c-8539-e273891ddeb7.png" alt class="image--center mx-auto" /></p>
<p><strong>THANK FOR YOUR ATTENTION !!!!!</strong></p>
]]></content:encoded></item><item><title><![CDATA[Step By Step guide to install Veritas Backup Exec licenses]]></title><description><![CDATA[ဒီနေ့မှာတော့ ကျွန်တော်တို့ Veritas Backup Exec မှာ License ဘယ်လို ထည့်ရမလဲဆိုတာ ပြောပြပေးသွားမှာဖြစ်ပါတယ်။ ဒီ article ရဲ့ ရည်ရွယ်ချက်ကတော့ ပုံမှန် License တွေ update လုပ်တဲ့အခါ Error မတက်ပေမဲ့ BackupExec Version နဲ့ License Version မတူတဲ့အခါမျိုးမှာ ...]]></description><link>https://blog.vitaltechmyanmar.com/step-by-step-guide-to-install-veritas-backup-exec-licenses</link><guid isPermaLink="true">https://blog.vitaltechmyanmar.com/step-by-step-guide-to-install-veritas-backup-exec-licenses</guid><category><![CDATA[VeritasLicense]]></category><category><![CDATA[Install Veritas License]]></category><dc:creator><![CDATA[PoneMyat]]></dc:creator><pubDate>Fri, 04 Oct 2024 09:34:28 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1728034327838/424648f4-8961-4c0d-b941-a76ef14a39be.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>ဒီနေ့မှာတော့ ကျွန်တော်တို့ Veritas Backup Exec မှာ License ဘယ်လို ထည့်ရမလဲဆိုတာ ပြောပြပေးသွားမှာဖြစ်ပါတယ်။ ဒီ article ရဲ့ ရည်ရွယ်ချက်ကတော့ ပုံမှန် License တွေ update လုပ်တဲ့အခါ Error မတက်ပေမဲ့ BackupExec Version နဲ့ License Version မတူတဲ့အခါမျိုးမှာ License Key ထည့်မရတာမျိုးဖြစ်တတ်ပါတယ်။ အဲ့အချိန်ကျရင် ဘယ်လိုမျိုးထည့်ရမလဲဆိုတာ ပြောပြပေးသွားမှာပဲဖြစ်ပါတယ်။</p>
<ol>
<li><p>Delete Old License Directory</p>
</li>
<li><p>Download License Key</p>
</li>
<li><p>Install License</p>
</li>
<li><p>Review License</p>
</li>
</ol>
<hr />
<h2 id="heading-delete-old-license-directory">Delete Old License Directory.</h2>
<h2 id="heading-download-license-key">Download License Key.</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728033134821/0317a8d9-5ba1-4890-b886-1790d288f8d9.jpeg" alt class="image--center mx-auto" /></p>
<p>အရင်ဆုံး ကျွန်တော်တို့က Licenses Folder ကို Directory မှာ ရှာပြီးဖျက်ပေးရမှာဖြစ်ပါတယ်။ ဖျက်ပြီးသွားရင် အောက်က Step တွေအတိုင်း တစ်ဆင့်ချင်းလုပ်သွားရုံပါပဲ။</p>
<p>License Key ကိုလဲ Portal ကနေ Generate &amp; Download လုပ်ထားပေးဖို့လဲလိုပါတယ်။</p>
<hr />
<h2 id="heading-install-license-key">Install License Key</h2>
<p>A) Go To <strong>Backup Exec</strong> --&gt; <strong>Installation and Licensing</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728033197379/8c1917de-dbd0-4358-9e91-d25725b8e638.png" alt class="image--center mx-auto" /></p>
<p>B) Select --&gt; <strong>Install Features and Licenses on this Backup Exec Server</strong>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728033219789/6d8eab04-86fb-4f8e-89da-14a1cbc42b83.png" alt class="image--center mx-auto" /></p>
<p>C) Installing Licenses using .SFL files (Offline Installation):</p>
<p>•Click <strong>Import License File.</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728033239495/8247706a-bb4c-4649-a4ee-bfcb6a49b085.png" alt class="image--center mx-auto" /></p>
<p>•Select the <strong>.SLF</strong> file and click <strong>Open</strong>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728033254324/38abc012-e8b4-4e66-81cf-452fa76db6cc.png" alt class="image--center mx-auto" /></p>
<p>•Click <strong>Next</strong>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728033270371/5b31e531-639c-479c-b6fd-34cf7548790d.png" alt class="image--center mx-auto" /></p>
<p>•Select a Backup Exec edition license to install and click <strong>Next</strong>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728033288618/966d6904-f979-4362-92c0-bde2f4fd85f5.png" alt class="image--center mx-auto" /></p>
<p>•Select required features to install and click <strong>Next</strong>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728033304749/a9d39da2-693a-4f0a-a9cd-492bdb6f7ebc.png" alt class="image--center mx-auto" /></p>
<p>•Select the additional languages to be installed and click <strong>Next</strong>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728033322250/cba69c89-6d05-4f4f-92f0-aab57a8a00fe.png" alt class="image--center mx-auto" /></p>
<p>•Review install summary and click <strong>Install</strong>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728033335313/2de8c6e4-6d54-4fd2-a42d-0072ac661c55.png" alt class="image--center mx-auto" /></p>
<p>•Click <strong>Yes</strong> to close <strong>Backup Exec console</strong> and continue installation.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728033373335/df455da1-db39-49c4-997e-edc71185bd8a.png" alt class="image--center mx-auto" /></p>
<p>•Installation progress will be displayed.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728033383871/8f3d717f-32e5-4daa-97b4-3eef0c7ffa85.png" alt class="image--center mx-auto" /></p>
<p>•Click <strong>Finish</strong>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728033396740/e6832fae-24ee-4f33-9f4d-fdb0249c80d8.png" alt class="image--center mx-auto" /></p>
<hr />
<h2 id="heading-reviewing-license-information">Reviewing License information:</h2>
<p>A) Go To <strong>Backup Exec</strong> --&gt; <strong>Installation and Licensing</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728033606286/63504413-0e01-4b17-a699-1477a17e9802.png" alt class="image--center mx-auto" /></p>
<p>B) Select <strong>License Information</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728033610011/142fac71-049d-44b7-a7e3-34e3e21d335d.png" alt class="image--center mx-auto" /></p>
<p>C) License Information page is displays:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1728033612496/c2bed9ad-bc78-4263-b5df-0b95e5a560f0.png" alt class="image--center mx-auto" /></p>
<p>ဒါဆိုရင် License Key ထည့်တာ Success ဖြစ်ပါတယ်။</p>
<hr />
<p>အားလုံးပဲ အချိန်ပေးပြီး ဖတ်ရှုပေးတဲ့အတွက်လဲ ကျေးဇူးတင်ပါတယ် ခင်ဗျ။</p>
<p>Author By <a class="user-mention" href="https://hashnode.com/@ponemyat110">PoneMyat</a></p>
]]></content:encoded></item><item><title><![CDATA[How to Monitor VCenter With Zabbix]]></title><description><![CDATA[အားလုံးပဲ မင်္ဂလာပါ။ ဒီနေ့ ပြောပြပေးသွားပေးမဲ့အကြောင်းအရာက ကျွန်တော်တို့ရဲ့ Vcenter ကို Zabbix အသုံးပြုပြီး Monitoring ဘယ်လိုလုပ်ရမလဲဆိုတာ ပြောပြပေးသွားမှာပဲဖြစ်ပါတယ်။
ပထမဦးဆုံး Zabbix ကို Download & Install လုပ်ထားရပါမယ်။
Install လုပ်ပြီးရင်တော့ ကျ...]]></description><link>https://blog.vitaltechmyanmar.com/how-to-monitor-vcenter-with-zabbix</link><guid isPermaLink="true">https://blog.vitaltechmyanmar.com/how-to-monitor-vcenter-with-zabbix</guid><category><![CDATA[Montior Vcenter with Zabbix]]></category><category><![CDATA[Howtomonitorvcenterwithzabbix]]></category><category><![CDATA[Vcenter & Zabbix]]></category><category><![CDATA[Zabbix montior]]></category><category><![CDATA[Vcenter Monitor]]></category><dc:creator><![CDATA[PoneMyat]]></dc:creator><pubDate>Thu, 12 Sep 2024 09:34:02 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1726128456877/39bf9060-abd8-4b25-b04f-b752b59deb71.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>အားလုံးပဲ မင်္ဂလာပါ။ ဒီနေ့ ပြောပြပေးသွားပေးမဲ့အကြောင်းအရာက ကျွန်တော်တို့ရဲ့ Vcenter ကို Zabbix အသုံးပြုပြီး Monitoring ဘယ်လိုလုပ်ရမလဲဆိုတာ ပြောပြပေးသွားမှာပဲဖြစ်ပါတယ်။</p>
<p>ပထမဦးဆုံး Zabbix ကို <a target="_blank" href="https://www.zabbix.com/download">Download &amp; Install</a> လုပ်ထားရပါမယ်။</p>
<p>Install လုပ်ပြီးရင်တော့ ကျွန်တော်တို့ စပြီး Config ချလို့ရပါပြီ။</p>
<h2 id="heading-configure-zabbix-server"><strong>Configure Zabbix server</strong></h2>
<ol>
<li>Open Zabbix server configuration file</li>
</ol>
<pre><code class="lang-plaintext">vi /etc/zabbix/zabbix_server.conf
</code></pre>
<ol start="2">
<li><p>Change <a target="_blank" href="https://www.zabbix.com/documentation/current/en/manual/appendix/config/zabbix_server#startvmwarecollectors">StartVMwaeCollectors</a> parameter</p>
<pre><code class="lang-plaintext"> ### Option: StartVMwareCollectors
        #       Number of pre-forked vmware collector instances.
        #
        # Mandatory: no
        # Range: 0-250
        # Default:
        # StartVMwareCollectors=0

        StartVMwareCollectors=2
</code></pre>
</li>
<li><p>Restart Zabbix Server.</p>
<pre><code class="lang-plaintext"> systemctl restart zabbix-server
</code></pre>
</li>
</ol>
<hr />
<h2 id="heading-configure-zabbix-frontend"><strong>Configure Zabbix Frontend</strong></h2>
<ol>
<li><p>Login to Zabbix</p>
</li>
<li><p>Create Host in Zabbix.</p>
<p> <code>In the Host name field, enter a host name (for example, "VMware environment").</code></p>
<p> <code>In the Templates field, type or select the "VMware FQDN" (or "VMware") template.</code></p>
<p> <code>In the Host groups field, type or select a host group (for example, a new host group "VMware").</code></p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1726132986363/939f86be-527b-4512-8108-d9083292a7d9.png" alt class="image--center mx-auto" /></p>
<ul>
<li><p><code>In the Macros tab, set the following host macros:</code></p>
<p>  <code>{$VMWARE.URL} - VMware service (vCenter or ESXi hypervisor) SDK URL (</code><a target="_blank" href="https://servername/sdk"><code>https://servername/sdk</code></a><code>)</code></p>
<p>  <code>{$VMWARE.USERNAME} - VMware service user name</code></p>
<p>  <code>{$VMWARE.PASSWORD} - VMware service {$VMWARE.USERNAME} user password</code></p>
</li>
<li><p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1726133163564/eb07e01b-0903-440b-aa26-59db87258910.png" alt class="image--center mx-auto" /></p>
</li>
</ul>
</li>
<li><p>Click Add to create host.</p>
</li>
</ol>
<hr />
<h2 id="heading-view-collected-metrics"><strong>View collected metrics</strong></h2>
<p>Zabbix is already monitoring your VCenter.</p>
<p>To View Create Host, navigate to <a target="_blank" href="https://www.zabbix.com/documentation/current/en/manual/web_interface/frontend_sections/data_collection/hosts">Data Collection » Hosts</a></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1726133308143/4506498f-faf6-41cb-9685-9b527a39dad3.png" alt class="image--center mx-auto" /></p>
<p>To View Collected Metrics, navigate to Monitoring » Hosts</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1726133363182/20528cdd-667a-4cd8-a99e-8a4109c628b8.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1726133398873/f0872347-cd42-4458-9a13-af5b726763a6.png" alt class="image--center mx-auto" /></p>
<hr />
<p>အခုဆိုရင်တော့ Zabbix ကို အသုံးပြုပြီး ကိုယ့်ရဲ့ VCenter ကို Monitor လုပ်လို့ရပြီပဲဖြစ်ပါတယ်။</p>
<p>အဆင်ပြေကျမယ်လို့ မျှော်လင့်ပါတယ် ။ အားလုံးပဲ အချိန်ပေးပြီး ဖတ်ရှုပေးတဲ့အတွက်လဲ ကျေးဇူးတင်ပါတယ် ခင်ဗျ ။</p>
<p>Author By <a class="user-mention" href="https://hashnode.com/@ponemyat110">PoneMyat</a></p>
]]></content:encoded></item><item><title><![CDATA[Hosting Static Website using Amazon S3]]></title><description><![CDATA[Hello everyone. ကျွန်တော်ဒီနေ့ sharing လုပ်ပေးမှာကတော့ Amazon S3 ကိုအသုံးပြီး static website တစ်ခုဘယ်လိုတည်‌ဆောက်မလဲဆိုတာကို sharing လုပ်ပေးမှာဖြစ်ပါတယ် ။
Demo အနေနဲ့ကိုတော့ ကျွန်‌‌တော်ကတော့ html file တစ်ခုကိုအသုံးပြုပြီး static website အနေနဲ့ host လ...]]></description><link>https://blog.vitaltechmyanmar.com/hosting-static-website-using-amazon-s3</link><guid isPermaLink="true">https://blog.vitaltechmyanmar.com/hosting-static-website-using-amazon-s3</guid><category><![CDATA[S3 static website hosting]]></category><dc:creator><![CDATA[Min Chan Mon]]></dc:creator><pubDate>Fri, 06 Sep 2024 19:36:02 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1725647352237/b4529ae5-2b5f-4ff7-9f2b-bb076e46da57.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hello everyone. ကျွန်တော်ဒီနေ့ sharing လုပ်ပေးမှာကတော့ Amazon S3 ကိုအသုံးပြီး static website တစ်ခုဘယ်လိုတည်‌ဆောက်မလဲဆိုတာကို sharing လုပ်ပေးမှာဖြစ်ပါတယ် ။</p>
<p>Demo အနေနဲ့ကိုတော့ ကျွန်‌‌တော်ကတော့ html file တစ်ခုကိုအသုံးပြုပြီး static website အနေနဲ့ host လုပ်ပြသွားပါမယ်. So let’s get started ။</p>
<p>ပထမဆုံးအနေနဲ့ Amazon Portal ‌ကိုအရင်ဝင်ပြီး‌ ပြီး‌တော့ S3 bucket တစ်ခုကို create အရင်လုပ်ပါမယ် ။</p>
<p>click Search bar and type “S3”</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725648046986/267f1e7f-54dc-4493-bbb4-007f1278c493.png" alt class="image--center mx-auto" /></p>
<p>and then click s3 button and create a bucket</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725648073669/02b96671-209f-45cd-b348-7012d367d97e.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725648086077/969137a7-12af-43f7-99c7-43f21f5b1115.png" alt class="image--center mx-auto" /></p>
<p>create bucket လုပ်ပြီးသွားတဲ့အခါ ပထမဆုံး bucket အတွက် name တစ်ခုပေးရပါမယ် ။ Name ကတော့ ကိုယ်အဆင်ပြေတဲ့ naming ကိုပေးလို့ရပါတယ် ။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725648152105/9465bb08-4f54-4712-baac-302a25fe4e2d.png" alt class="image--center mx-auto" /></p>
<p>ပြီးသွားရင်တော့ ဒီနေရာမှာသတိထားရမှာက <strong><mark>Block public access</mark></strong> ပါပဲ, AWS က default အရ bucket ကို public access မရအောင် block လုပ်ထားပါတယ် ။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725648269562/0de6675e-20d3-4ce5-9a56-9183d698de26.png" alt class="image--center mx-auto" /></p>
<p>အကယ်၍ block public access ကို off မလုပ်ခဲ့ရင်တော့ user တွေက bucket ကို public ကနေ access လုပ်လို့ရမှာမဟုတ်ပါဘူး ။ ဒီတော့ ကျွန်တော်တို့ block access ကို untick လုပ်ပြီး‌တော့ current setting changes လုပ်ထားတာကို acknowledge လုပ်ပါတယ်ဆိုပြီး box မှာ tick လုပ်‌ပေးရပါမယ် ။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725648459651/f1c01580-5adf-4b77-949b-b6340ae4e07b.png" alt class="image--center mx-auto" /></p>
<p>ပြီးရင်တော့ ကျန်တဲ့ setting တွေကို default အတိုင်းထားပြီး bucket ကို create လုပ်လိုက်ပါမယ် ။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725648600115/3a0e6d24-8c36-447d-b4cd-3e165549b36f.png" alt class="image--center mx-auto" /></p>
<p>ဒါဆိုရင်တော့ S3 dashboard မှာ create လုပ်ထားတဲ့ bucket လေးပေါ်လာပါပြီ ။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725648644995/db7108dc-e6cf-45bc-afd0-ca72b3f72e42.png" alt class="image--center mx-auto" /></p>
<hr />
<p>အခုကျွန်တော်တို့ backet create လုပ်ပြီးသွာပြီဆိုတော့ website အတွက်လိုအပ်တဲ့ content file ကို upload လုပ်ပါမယ် ။ Upload လုပ်ဖို့အတွက် create လုပ်ထားတဲ့ bucket ကို double click လုပ်ပြီးတော့ဝင်ပြီး file ကို upload လုပ်ပေးရပါမယ် ။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725649047615/31868b7f-373f-43f3-b237-93f3c48357e0.png" alt class="image--center mx-auto" /></p>
<p>Demo မှာ‌‌တော့ html file ‌‌လေးကို upload လုပ်ပြီးသုံးထားပါတယ်. Add file ကိုနှိပ်ပြီး content file ကို ရွေးပြီး upload လုပ်လိုက်ယုံပါပဲ ။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725649093793/e4f48165-8357-498c-a158-0c3848c53def.png" alt class="image--center mx-auto" /></p>
<p>ပြီးရင်တော့ upload ကို click လုပ်ပြီး save လုပ်လိုက်ရပါမယ် ။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725649202699/c18321f7-4fa2-4c9a-941c-edfb1e09c163.png" alt class="image--center mx-auto" /></p>
<p>Now the file has been uploaded.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725649403856/0970d9e5-c21b-4ab4-ad9d-06d7369d3e94.png" alt class="image--center mx-auto" /></p>
<hr />
<p>File upload လုပ်ပြီးသွားတဲ့အခါကျရင် bucket က static website hosting လုပ်လို့ရအောင် static website hosing feature ကို on လုပ်ပေးရပါမယ် ။ Feature ကို on လုပ်ဖို့ဆိုရင် Properties ထဲကိုသွားရပါမယ် ။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725649539531/6bfed79b-8afa-4376-baba-4329a473406e.png" alt class="image--center mx-auto" /></p>
<p>Scroll down to the end . Static website hosting ဆိုပြီးတွေ့ပါလိမ့်မယ် ။ Edit button ကို click လုပ်ပြီးတော့ enable box ကို tick လုပ်ပေးပြီး‌‌တော့ index document ဆိုတဲ့နေရမှာ index.html ဆို ပြီး ဖြည့်ရပါမယ် ပြီးရင်တော့ကျန်တာကို default အတိုင်းထားပြီး save changes လုပ်လိုက်ပါမယ် ။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725649590477/4ff88b79-9a4a-489c-a2cc-982227d0963f.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725649651714/8930c8e9-cdc7-459a-85ac-52bf28dec364.png" alt class="image--center mx-auto" /></p>
<p>အခု static website hosting feature ကို enable လုပ်ပြီးသွားပြီဆိုတော့ နောက်ထက်တစ်ခုအနေနဲ့ bucket အတွက် policy တခုကို attach လုပ်ပေးရပါမယ် ။ Policy attach လုပ်ဖို့ဆိုရင် Permission tab ထဲက bucket policy ထဲမှာသွားပြီး edit လုပ်ပေးရပါမယ် ။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725649814558/b8a6b413-73d3-4040-8944-3def33851323.png" alt class="image--center mx-auto" /></p>
<p>Edit လုပ်တဲ့အခါမှာ policy ရဲ့ resource နေရာမှာကိုယ့်ရဲ့ bucket name ကိုထည့်ပေးရပါမယ် ။ ဒီနေရာမှာတော့ ကျွန်တော် bucket create လုပ်ထားတဲ့ name ဖြစ်တဲ့ <code>vitaltechmyanmar</code> ဆိုတာကိုထည့်လိုက်မှာဖြစ်ပါတယ် ။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725649890787/ba25cbd0-62a1-4f3d-b98f-7642eb08dbdc.png" alt class="image--center mx-auto" /></p>
<p>ပြီးသွားရင်တော့ scroll down ‌and save changes လုပ်လိုက်ပြီးရင်ရပါပြီ ။ ဒါဆိုရင် ကျွန်တော်တို့ website hosting လုပ်တဲ့ step တွေပြီးသွားပြီဆိုတော့ website ကို access တာအဆင်ပြေလားမပြေလားတချက်ကြည့်ကြည့်ရအောင် ။</p>
<hr />
<p>ကျွန်တော်တို့ create လုပ်ထားတဲ့ website က accessရမရစမ်းဖို့အတွက်ဆိုရင်တော့ bucket ထဲက index.html ထဲကိုဝင် ပြီးတော့ properties ထဲက Object URL ကို copy လုပ်ပြီး တခြား tab တစ်ခုမှာ paste လုပ်ကြည့်ပါမယ် ။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725650150645/7c9e39ee-d74d-42f4-859f-e2d66e318550.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725650157856/aa33787f-69b8-487b-8793-a8c8922a5fce.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725650212962/5b9f2e49-c27c-448a-a322-4a03c841fe9f.png" alt class="image--center mx-auto" /></p>
<p>ဒါဆို ကျွန်တော်တို့ host လုပ်ထားတဲ့ static website လေးကို public ကနေ access လုပ်လိုရသွားပါပြီ .......</p>
<hr />
<p>အခုဆိုရင်တော့ကျွန်တော်တို့က static website တစ်ခုကို amazon ရဲ့ s3 bucket ကိုအသုံးပြုပြီးတော့ လွယ်လွယ်ကူကူတည်ဆောက်သွားတာဖြစ်ပါတယ် ။ အဆင်ပြေကျမယ်လို့ မျှော်လင့်ပါတယ် ။ အားလုံးပဲ အချိန်ပေးပြီး ဖတ်ရှုပေးတဲ့အတွက်လဲ ကျေးဇူးတင်ပါတယ် ခင်ဗျ ။</p>
]]></content:encoded></item><item><title><![CDATA[Step-by-Step Guide: Building Infrastructure on Google Cloud with Terraform]]></title><description><![CDATA[အားလုံးပဲ မဂ်လာပါ
ကျနော်ဒီနေ့ Sharing လုပ်ပေးမှာကတာ့ Google Cloud Platform (GCP) ပေါ်မှာ terraform နဲ့ Infrastructure တစ်ခုကို ဘယ်လို တည်ဆောက်မလဲ ဆိုတာ ပြော‌‌ပြ ပေးသွားမှာဖြစ်ပါတယ် ။
ပထမဆုံး အနေ နဲ့ Terraform ဆိုတာဘာလဲ၊ Terraform ကို ဘာလို့ သုံးသင့်တ...]]></description><link>https://blog.vitaltechmyanmar.com/step-by-step-guide-building-infrastructure-on-google-cloud-with-terraform</link><guid isPermaLink="true">https://blog.vitaltechmyanmar.com/step-by-step-guide-building-infrastructure-on-google-cloud-with-terraform</guid><category><![CDATA[GCP DevOps]]></category><category><![CDATA[Terraform]]></category><dc:creator><![CDATA[Kyaw Thet Htun]]></dc:creator><pubDate>Fri, 06 Sep 2024 18:52:05 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1725648662052/1e905912-642f-4735-b035-7378252a7f6b.avif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>အားလုံးပဲ မဂ်လာပါ</p>
<p>ကျနော်ဒီနေ့ Sharing လုပ်ပေးမှာကတာ့ Google Cloud Platform (GCP) ပေါ်မှာ terraform နဲ့ Infrastructure တစ်ခုကို ဘယ်လို တည်ဆောက်မလဲ ဆိုတာ ပြော‌‌ပြ ပေးသွားမှာဖြစ်ပါတယ် ။</p>
<p>ပထမဆုံး အနေ နဲ့ Terraform ဆိုတာဘာလဲ၊ Terraform ကို ဘာလို့ သုံးသင့်တယ် ဆိုတာ အကျဉ်းချုပ်အနေ နဲ့ မိတ်ဆက်ပေးပါမယ်။ ဒီမှာတာ့ Terraform ကို deep မပြောတော့ပါဖူး ။ ဘာလို့ဆို ဒါကို ဖတ်ပြီဆိုတည်းက Terraform ကို ဘာကြောင့် သုံးလဲ ဆိုတာ သိမယ် ထင်လို့ပါ ။ အခု blog မှာလဲ Terraform ကို အသေးစိတ် ရှင်းပြတာမဟုတ်လို့ Terraform နဲ့ Infrastructure ဘယ်လို တည်ဆောက်မလဲ ဆိုတာ ပြောပြမှာ ဖြစ်လို့ပါ။</p>
<h3 id="heading-terraform-overview"><strong>Terraform Overview</strong></h3>
<p>Terraform ဆိုတာ HashiCorp ကထုတ် ပေးထားတဲ့ Infrastructure as Code (IaC) နည်းပညာတစ်ခုဖြစ်ပါတယ်။ ဒီ tool ကိုအသုံးပြုပြီး Infrastructure ကို building, changing, managing လုပ်နိုင်ပြီး safe ဖြစ်စွာ ထပ်ခါထပ်ခါ အသုံးပြုနိုင်ပါတယ် ကိုယ့်လူတို့ ဘယ်လောက်မိုက်လဲ ဒီ tool ကြီးက အမြဲတမ်း ထပ်ခါခါ ခေါင်း မကိုက်ချင်တဲ့ ကိုယ်တွေ အတွက် အဆင်ပြေတယ် ။Operator နဲ့ Infrastructure team တွေက ဒီ tool ကိုအသုံးပြုပြီး environment တွေကို automated deployment လုပ်ဖို့ (HCL )လို့ခေါ်တဲ့ သုံး HashiCorp Configuration Language ကိုသုံးထား တယ် ။ HCL က Human-readable ဖြစ်တဲ့ အတွက် ဖတ်ရတာ လွယ်ကူတယ် ကျက်ရတာ လွယ်ကူတာ မဟုတ်ဖူးနော် ။ IaC လို့ ပြောခဲ့တယ် နော် IaC ဆိုတာက User Interface မှာ သုံးရတာမဟုတ်ပဲ file ထဲ မှာ Configuration ထည့်ပြီး Infrastructure ကို management လုပ်ရတာကို ပြောချင်တာ ပါ။ Configuration ထဲမှာ Resources တွေထည့်ရမှာ Resource type/name တို့ Resources ဆိုတာ Infrastructure ရဲ့ အစိတ် အပိုင်းတွေ ဖြစ်တဲ့ VM, Security Group, Network Interface, etc...blah blah ပေါ့နော်။ အဲ့မှာ Resources ဆိုလို့ ပြောရဦးမယ် Terraform က ဘယ် Provider အတွက်လဲ ဆိုတာ အရင် အသိပေးရမှာပါ AWS လား Azure လား GCP လား Docker လား တစ်ခြား Provider တွေလဲ အများကြီးရှိပါသေးတယ် အဲ့တာမှ ဘယ် Provider ရဲ့ resources ဆိုတာ သိမှာ ဖြစ်ပါတယ်။</p>
<p>Terraform မှာပုံမှန် လုပ်ဆောင်ရမယ့် flow လေးတွေပြောပြပါမယ်</p>
<p>-Scope : ပေးထားတဲ့ Project အတွက် ဘယ် resources တွေလဲ ဆိုတာ အရင် Confirm လုပ်ရပါမယ်</p>
<p>-Author : Scoped parameter ပေါ်မူတည်ပြီး HCL နဲ့ Configuration file ရေးရပါမယ်</p>
<p>-Initialize : Project Directory အတွင်းမှာ Terraform init command run လိုက်မှသာ Project အတွက် လိုအပ်တဲ့ Provider plug-in download လုပ်သွားမှာဖြစ်ပါတယ်။</p>
<p>-Plan : Terraform plan ဆိုတဲ့ command run ရမှာပါ ဘာလို့ဆို ငါတို့ ဘာလုပ်ချင်တယ် ဆိုတာ ကြိုတင် ပြပေးတာပါ အကယ်၍ လိုအပ်တာ/မလိုအပ်တာ ရှိရင် ပြန်ပြင်လို့ ရအောင်ပါ။ အမှားအယွင်း နည်းအောင် ပေါ့။</p>
<p>-Apply : Terraform apply command က Configuration ထဲ အတိုင်း အကုန် အကောင်အထည် ဖော်တော့မှာပါ ။ State file ပါ တစ်ခါတည်း ဖန်တီး ပေးသွားမှာပါ။</p>
<p>State file ဆိုတာက တော့ လုပ်သမျှ Configuration တွေကို အဲ့ထဲမှာ မှတ်ပြီး ပြန်သုံးလို့လဲ ရသလို modify လဲ ပြန်လုပ်လို့ရပါတယ် ။ အဲ့ State file ကြောင့် Project တစ်ခုလုံး တစ်ခါထဲလဲ destroy လုပ်လို့ရပါတယ် ၊အမှားအယွင်းဖြစ်မှာ စိုးရိမ်ရင် backup လုပ် ကိုလုပ်သင့်ပါတယ်။ ‌‌</p>
<p>State file ရဲ့ feature တွေက Meta Data တွေကို Map လုပ်ပေးတယ်၊ Performance ပိုကောင်းစေတယ် (cache function)၊ Syncing လုပ်ပေးတယ် ၊ State Locking လုပ်ပေးတယ် ၊ Workspaces ခွဲပေးထားတယ် ၊ ဘာတွေလဲ ဆိုတာကတော့ ရှာဖတ်လိုက်တာ့ ရှင်းပြရင် အရမ်းရှည်သွားမှာဆိုးလို့။</p>
<p>ကဲ အဲ့လောက် ဆိုရင် အခုလုပ်ပြမဲ့ Infrastructure တည်ဆောက်တာကို စလိုက်ကြရအောင်ပါ။ အဓိက Project တစ်ခုလုံး မဟုတ်ပါဖူး အခြေခံ နဲ့ Sample အနေနဲ့ ပြမှာ ဖြစ်ပါတယ် ။</p>
<h3 id="heading-step-1-create-the-configuration-files"><strong>Step 1 : Create the configuration files</strong></h3>
<p>ပထမဆုံး ဒီ Lab အတွက်လိုအပ်တဲ့ Configuration file တွေအရင် တည်ဆောက်ပါမယ်။</p>
<p>Google Cloud Console ကို၀င်ပါ ။Activate Cloud Shell ကိုနှိပ်ပါ ။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725641154199/328e0dc3-ebf8-4071-8b3d-f5780e2f4181.png" alt class="image--center mx-auto" /></p>
<p>အရင်ဆုံး account name ကိုစစ်ပါ ။</p>
<pre><code class="lang-plaintext">gcloud auth list
</code></pre>
<p>ကိုယ် အသုံးပြုမဲ့ project id မှန်မမှန်စစ်ပါ။</p>
<pre><code class="lang-plaintext">gcloud config list project
</code></pre>
<pre><code class="lang-plaintext">mkdir -p modules/instances modules/storage
touch main.tf variables.tf
touch modules/instances/{instances.tf,outputs.tf,variables.tf}
touch modules/storage/{storage.tf,outputs.tf,variables.tf}
</code></pre>
<pre><code class="lang-plaintext">main.tf
variables.tf
modules/
└── instances
    ├── instances.tf
    ├── outputs.tf
    └── variables.tf
└── storage
    ├── storage.tf
    ├── outputs.tf
    └── variables.tf
</code></pre>
<p>အခုလက်ရှိမှာ main.tf နဲ့ variables.tf က Root အနေနဲ့ ရှိနေပါတယ် သူတို့က အဓိကလုပ်ဆာင်မှာပါ။ Modules အောက်မှာရှိနေတဲ့ instances နဲ့ Storage ကို module အနေနဲ့ ခေါ်သုံးမှာ ဖြစ်ပါတယ် local module ပေါ့ဗျာ။ Terraform Registry မှာ လဲ module တွေခေါ်သုံးလို့ရပါတယ် ။ဒီ lab မှာလဲ registry ကခေါ်သုံးတာပြ ပေးမှာပါ။အောက်က ပုံထဲက အတိုင်း Cloud Shell မှာ Open Editor လေးရှိပါတယ် နှိပ်လိုက်ပါ</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725641508334/7e381add-d25c-40ca-b3d0-4045d7accec7.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-step-2-build-infrastructure"><strong>Step 2 : Build infrastructure</strong></h3>
<p>Cloud Shell မှာ ပေါ်နေတဲ့ Editor ဆိုတာလေးဖွင့်လိုက်ပါ ကျနော်တို့ခုနက ဆောက်ထားတဲ့ root variables.tf ဆိုတဲ့ file ထဲမှာ variables တွေကိုကြေညာပါမယ်။</p>
<pre><code class="lang-plaintext">variable "region" {
  default = "us-east4"
}

variable "zone" {
  default = "us-east4-a"
}

variable "project_id" {
  default = "your project id"
}
</code></pre>
<p>‌ဒါက instance နဲ့ storage modules ရဲ့ variables တွေဖြစ်ပါတယ်။ အဓိကကတော့ root ရဲ့ variables ကိုပဲ main.tf ကယူသုံးမှာဖြစ်ပါတယ်။ instance နဲ့ storage modules ရဲ့ variables.tf file မှာထည့်ပါမယ်။</p>
<pre><code class="lang-plaintext">variable "region" {
  type = string
}

variable "zone" {
  type = string
}

variable "project_id" {
  type = string
}
</code></pre>
<p>main.tf file မှာ ကိုယ်သုံးမည့် Provider ကို အရင်ကြေညာပေးရမှာပါ</p>
<pre><code class="lang-plaintext">terraform {
  required_providers {
    google = {
      source  = "hashicorp/google"
      version = "~&gt; 4.0"
    }
  }
}

provider "google" {
  project = var.project_id
  region  = var.region
  zone    = var.zone
}
</code></pre>
<p>VPC တည်ဆောက်ဖို့ အတွက် main.tf file ထဲသို့ ထပ်ထည့်ပါ။</p>
<pre><code class="lang-plaintext">resource "google_compute_network" "vpc_network" {
  name = "terraform-network"
  auto_create_subnetworks  = false
}
resource "google_compute_subnetwork" "subnet_1" {
  name          = "subnet-1"
  ip_cidr_range = "10.10.10.0/24"
  region        = var.region
  network       = google_compute_network.vpc_network.self_link
}
</code></pre>
<p>Provider အတွက် လိုအပ်တဲ့ plug-in download ယူရန်နှင့် အကောင်ထည် ဖော်ဖို့အတွက် အောက်ပါ commands တွေ ကို တစ်ခုချင်းဆီ Run ပါ။</p>
<pre><code class="lang-plaintext">terraform init
terraform plan
terraform apply
</code></pre>
<p>Google Cloud Console ကနေ စစ်ကြည့်ပါ terraform-network ဆိုတဲ့ VPC လေး create လုပ်ပြီးပါပြီ</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725642390592/c818b5fe-953b-45d3-ab5d-c0eea6ea7b64.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-step-3-create-instances"><strong>Step 3 : Create Instances</strong></h3>
<p>Instances Modules မှ instances များကို ခေါ်သုံးမှာ ဖြစ်တဲ့ အတွက် instances.tf file ထဲ instances အတွက် Configuration ကို အရင် ရေးရပါမယ်</p>
<pre><code class="lang-plaintext">resource "google_compute_instance" "instance-1" {
  name         = "instance-1"
  machine_type = "e2-standard-2"
  boot_disk {
    initialize_params {
      image = "debian-11-bullseye-v20240815"
    }
  }
  network_interface {
    network = var.network_name
    subnetwork = var.subnet_name
  }
}

resource "google_compute_instance" "instance-2" {
  name         = "instance-2"
  machine_type = "e2-standard-2"
  boot_disk {
    initialize_params {
      image = "debian-11-bullseye-v20240815"
    }
  }
  network_interface {
    network = var.network_name
    subnetwork = var.subnet_name
  }
}
</code></pre>
<p>instances.tf file ထဲမှာ network_interface မှ ခေါ်သုံးဖို့ အတွက် instances module ရဲ့ variables.tf file ထဲ ထည့်ပါ</p>
<pre><code class="lang-plaintext">variable "network_name" {
  description = "The name of the Google Compute Network"
  type        = string
}
variable "subnet_name" {
  type = string
}
</code></pre>
<p>Instance module ကို main.tf file တွင် ညွှန်းပေးရပါမယ်။ အဲ့တာမှ instance.tf file ထဲ configuration ကိုယူသုံးမှာဖြစ်ပါတယ်။ Source မှန်အောင် ထည့်ဖို့ လိုအပ်ပါတယ်။</p>
<pre><code class="lang-plaintext">module "instances" {
  source    = "./modules/instances"
  region    = var.region
  zone      = var.zone
  project_id = var.project_id
  network_name = google_compute_network.vpc_network.self_link
  subnet_name = google_compute_subnetwork.subnet_1.self_link
}
</code></pre>
<p>အပြောင်းအလဲ လုပ်ပြီးတိုင်း လုပ်ဆောင်ပါ။</p>
<pre><code class="lang-plaintext">terraform init
terraform plan
terraform apply
</code></pre>
<p>instance-1 နှင့် instance-2 ဖန်တီးပြီး ဖြစ်ကြောင်း တွေ့ရပါလိမ့်မယ်</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725642606294/7a7bd4fe-854f-4a28-a52a-5cbc2992923c.png" alt class="image--center mx-auto" /></p>
<p>cloud console တွင် instance-1 ကိုနှိပ်ပြီး ပေးထားတဲ့ machine type, boot_disk, Network မှန်/မမှန်စစ်ဆေးကြည့်ပါ</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725642622635/95493fad-f8b8-4040-b6f1-dab3c480a2c6.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725642639243/2dfd9ece-5893-4979-be10-d7a645cb3d99.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-step-4-import-infrastructure"><strong>Step 4 : Import Infrastructure</strong></h3>
<p>Import Infrastructure ဆိုတာကတော့ ကျနော်တို့က user interface ကနေ manual ဆောက်ထားတဲ့ objects တွေက Terraform နဲ့ ဆက်စပ်မူ မရှိပါဖူး ။ Manual ဆောက်ထားခဲ့ resources တွေကို Terraform နဲ့ manage လုပ်ချင်တယ် ဆိုရင် Terraform state file ထဲကို import လုပ်ပေးရမှာ ဖြစ်ပါတယ် ။ ဘယ်လို လုပ်ရမလဲ ပြောပြ ပေးပါမယ်။ အရင်ဆုံး ကိုယ် import လုပ်ချင်တဲ့ VM ရဲ့ machine type, boot-disk, network_interface, တွေကို configuration file မှာ တူအောင် ရေးရပါမယ် ။ အဲ့မှာ အရေးကြီး တာက meta_startup_script နဲ့ allow_stopping_for_update ကို ထည့်ပေးရမှာပါ ။ ကျနော် example တစ်ခု ပြပါမယ်</p>
<pre><code class="lang-plaintext">resource "google_compute_instance" "tf-instance-1" {
  name         = "tf-instance-1"
  machine_type = "e2-standard-2"
  boot_disk {
    initialize_params {
      image = "debian-11-bullseye-v20240815"
    }
  }
  network_interface {
    network = "default"
  }
  metadata_startup_script = &lt;&lt;-EOT
    #!/bin/bash
  EOT
  allow_stopping_for_update = true
}
</code></pre>
<p>ကျနော် အခု ပြထားတာ example configuration ပါ machine type တွေ name တွေ boot_disk တွေ network_interface တွေ ကိုယ် import လုပ်ချင်တဲ့ instance အသုံးပြုထားတဲ့ အတိုင်း ပြန် ပြင်ပါ ။ ပြောချင်တာ ရောက်လာပါပြီ metadata_startup_script ဆိုတာ VM up တဲ့အခါ အလိုအလျောက် လုပ်ဆောင်မည့် script ပါ bash script နဲ့လုပ်မယ်လို့လဲ ကြေညာထားပါတယ် အဲ့ VM ထဲမှာ run software တွေ setting တွေ configure ချထားတာ တွေ automated ပြန်လုပ်ပေးမယ် ပြောတာပါ ။ allow_stopping_for_update ကို true လို့ သတ်မှတ်ထားတာက instance ကိုပြန်ဖျက်ပြီး အသစ် ပြန်ဖန်တီး စရာမလိုပဲ update လုပ်ဖို့ အတွက်ပါ ။ဒါက instance configuration ကို downtime မရှိပဲ ပြင်ဖို့ အထောက်အကူ ပေးတာပါ ။ ဒီလောက်ဆို နားလည်မယ် ထင်ပါတယ် ။ကျနော်တို့ ဆက်သွားပါမယ် ။</p>
<p>အဲ့တာ တွေ အကုန်ပြီးသွားရင် import စလုပ်ပါမယ် ။ instance တွေကို import လုပ်ပါမယ် ။ အခု အောက်မှာ ပြထားတဲ့ Terraform import command နဲ့ import လုပ်ပါမယ် ။ ဒီနေရာမှာ မင်းအခု module အောက်မှာ ရေးထားတဲ့ configuration နဲ့ import လုပ်ချင်တဲ့ instance ရဲ့ instance id နဲ့ map လုပ်ပေးပါ ။ VM ပဲ သုံးသုံး instance ပဲ သုံး သုံး အတူတူပဲ လို့ယူဆပေးပါ အခေါ်အဝေါ်ပဲ ကွဲတာမို့။import လုပ်ရင် သတိထားရမှာက import လုပ်ထားတဲ့ instance တိုင်းကို Terraform က life cycle management ဖြစ်တဲ့ အတွက် Terraform destroy run အကုန် ပျက်မှာဖြစ်ပါတယ်</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725642778123/d463eb93-372e-4388-b688-2a2e292a9d7b.png" alt class="image--center mx-auto" /></p>
<p>စာဖတ်သူ import လုပ်ချင်တဲ့ instance ရဲ့ id ကိုယူပြီး အောက်ပါ command အတိုင်း run ပါ</p>
<pre><code class="lang-plaintext">terraform import module.instances.google_compute_instance.tf-instance-1 &lt;tf-instance-1-id&gt;
</code></pre>
<pre><code class="lang-plaintext">terraform init 
terraform apply
</code></pre>
<h3 id="heading-step-5-configure-a-remote-backend"><strong>Step 5 : Configure a remote backend</strong></h3>
<p>ဒါက ဘာကို ‌‌‌ပြောချင်တာလဲ ဆိုရင် Terraform state file ကို remote ကနေ ယူသုံးပြီး modify လုပ်မယ် create လုပ်မယ်ပေါ့ဗျာ ။ အရင်ဆုံး google bucket တစ်ခု ဆောက်လိုက်မယ် ဗျာ။ storage module မှာ storage.tf file မှာ configuration ရေးကြမယ် let's go ။ bucket name က unique ဖြစ်ရမယ် နော် ။</p>
<pre><code class="lang-plaintext">resource "google_storage_bucket" "bucket_01" {
  name                        = "qwiklabs-gcp-00-3712a4245aff"
  location                    = "US"
  force_destroy               = true
  uniform_bucket_level_access = true
}
</code></pre>
<p>နောက်တစ်ဆင့် module ကို main.tf file ထဲမှာ ပြန်ညွှန်းမယ် ။</p>
<pre><code class="lang-plaintext">module "storage" {
  source    = "./modules/storage"
  project_id = var.project_id
  region    = var.region
  zone = var.zone
}
</code></pre>
<pre><code class="lang-plaintext">terraform init
terraform plan
terraform apply
</code></pre>
<p>Bucket တစ်ခု ဖန်တီးထားကြောင်း တွေ့ရပါလိမ့်မယ် ။ bucket name က unique ဖြစ်လို့ ကျနော် က project id ထည့်သုံးထားတာပါ။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725643270979/a4b7dfd8-7196-4aa2-9e1e-a5aff8610fda.png" alt class="image--center mx-auto" /></p>
<p>နောက်တစ်ဆင့် cloud bucket ပေါ် remote backend ကိုတင်ဖို့ main.tf file ထဲ ထည့်ရမယ် ။ ပြောရမယ် ဆို ဒီ Terraform state file တစ်ခုထဲ မှာ store လုပ်ထားတဲ့ configuration တွေ Workspace လို့ခေါ်တယ် ပေါ့ဗျာ။</p>
<pre><code class="lang-plaintext">terraform {
  backend "gcs" {
    bucket = "qwiklabs-gcp-00-3712a4245aff"
    prefix = "terraform/state"
  }
}
</code></pre>
<pre><code class="lang-plaintext">terraform init
</code></pre>
<p>အခုဆို Terraform ဆိုတဲ့ state file ရဲ့ folder လေးရာက် နေပါပြီ</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725643329955/c8a85ef7-690d-40fd-9fd9-1d7eba1b4da8.png" alt class="image--center mx-auto" /></p>
<p>Remote backend ကို local ကို revert ပြန်လုပ်ချင်ရင် main.tf file တွင် အောက်ပါ configuration ကို change ပါ</p>
<pre><code class="lang-plaintext">terraform {
  backend "local" {
    path = "terraform/state/terraform.tfstate"
  }
}
</code></pre>
<p>-migrate-state argument ကို ထည့်ပေးရမယ် ။</p>
<pre><code class="lang-plaintext">terraform init -migrate-state
</code></pre>
<p>ls command နဲ့ စစ်ကြည့်ပါ local ထဲကို ပေးထားတဲ့ PATH အတိုင်း ရောက် နေပါပြီ</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725643441588/b4cd28f5-8f7e-41f9-b2d5-8a5e7661aea1.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-step-6-modify-and-update-infrastructure"><strong>Step 6 : Modify and update infrastructure</strong></h3>
<p>နမူနာ အနေ နဲ့ Infrastructure ကို Modify လုပ်ပြမယ် ။ အခု လုပ်ပြမှာက instance တစ်ခုကို ထပ် add ပြပါမယ် ။ Instance.tf file ထဲတွင် ထပ် ထည့်ပါ။</p>
<pre><code class="lang-plaintext">resource "google_compute_instance" "instance-3" {
  name         = "instance-3"
  machine_type = "e2-standard-2"
  boot_disk {
    initialize_params {
      image = "debian-11-bullseye-v20240815"
    }
  }
  network_interface {
    network = var.network_name
    subnetwork = var.subnet_name 
  }
}
</code></pre>
<pre><code class="lang-plaintext">terraform apply
</code></pre>
<p>အခုဆို instance-3 ဆိုတဲ့ instance လေးတစ်လုံးထပ်ရာက် နေပါပြီ</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725643544486/58a8d578-3a82-4465-8959-efc41c6cd627.png" alt class="image--center mx-auto" /></p>
<p>နောက်တစ်ခုက အခု ထပ်ထည့်လိုက်တဲ့ instance ကိုပဲ ဖျက်ပြမှာပါ ။ Instance.tf file မှာ instance အသစ် အတွက် Configuration ကို ဖျက်ပစ် လိုက် ။ ဒါမှ မဟုတ် # sign ခံပြီး comment ပိတ် လိုက် ရပါတယ် ။ ပြီးသွားရင် Terraform apply command ပြန်run ပါ။</p>
<pre><code class="lang-plaintext">terraform apply
</code></pre>
<p>configuration ပြင်ပြီး apply ပြန်စစ် ကြည့်ပါ instance မရှိတော့ကြောင်း တွေ့ရပါလိမ့်မယ်</p>
<p>ဒါက ကျနော်တို့က Terraform ကနေ manage လုပ်တာ ဖြစ်ပါတယ် ။အကယ်၍ ကျနော်တို့ က user interface ကနေ change လိုက် တယ် tag တို့ label တို့ အစရှိ သဖြင့်ပေါ့ ဗျာ အဲ့တာဆို ရင် state file မှာပါ update ဖြစ်အောင် ‌‌‌‌refresh ဆိုတဲ့ command နဲ့ update လုပ်ရမှာဖြစ်ပါတယ်။ ဥပမာ အနေ နဲ့ ကျနော် အပေါ် ‌create လုပ်ထားခဲ့ တဲ့ bucket file ကို label ထည့်ပြပါမယ် ။ Bucket ကို အမှန်ခြစ် ပေးပြီး LABELS ကိုနှိပ်လိုက်ပါ</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725643616325/7d70a377-08db-446a-97b0-45c441c40a79.png" alt class="image--center mx-auto" /></p>
<p>ဒီမှာဆို Add Label နှိပ်ပြီး key နဲ့ value ဆိုပြီးပေးခဲ့ပါတယ် ။Save ခဲ့ပါ</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725643633895/66a3d143-5f85-4cf1-b088-3ea01f14e898.png" alt class="image--center mx-auto" /></p>
<p>ပြီးရင် Terraform state file မှာ update လုပ်ဖို့ refresh ဆိုတဲ့ command ကို runပါ</p>
<pre><code class="lang-plaintext">terraform refresh
</code></pre>
<p>ပြီးရင် Terraform state file မှာ update ဖြစ်လား ပြန်ကြည့်ဖို့ အောက်ပါ command ကို run ပါ</p>
<pre><code class="lang-plaintext">terraform show
</code></pre>
<p>အခုဆို label ပေးထားခဲ့တဲ့ key နဲ့ value ကိုမြင်နရပါပြီ</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725643721539/6527f66b-225e-45a7-bf2d-f17873db50c7.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-step-7-configure-a-firewall"><strong>Step 7 : Configure a Firewall</strong></h3>
<p>အခု တစ်ခါ မှာ တော့ အပေါ်မှာ ဆောက်ထား ခဲ့တဲ့ VPC network ကို All IP (0.0.0.0/0)ကို Port 80 ကနေ ingress connection ကို allow ပေးမှာ ဖြစ်ပါတယ် ။ ဒီတော့ main.tf file မှာ firewall resources တွေကို ကြေညာပါမယ် ။</p>
<pre><code class="lang-plaintext">resource "google_compute_firewall" "tf-firewall" {
  name    = "tf-firewall"
  network = google_compute_network.vpc_network.name

  allow {
    protocol = "tcp"
    ports    = ["80"]
  }

  source_ranges = ["0.0.0.0/0"]
}
</code></pre>
<pre><code class="lang-plaintext">terraform init
terraform apply
</code></pre>
<p>အခုဆို tf-firewall ဆိုတဲ့ firewall rule ကိုတွေ့ရပါလိမ့်မယ်</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725643810776/a2898ea3-78c1-425d-937d-b3d71447f68d.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-step-8-use-a-module-from-the-registry"><strong>Step 8 : Use a module from the Registry</strong></h3>
<p>အခု ပြောပြ ပေးမဲ့ အရာက တော့ Network module ကို Terraform Registry ကနေ ခေါ်သုံးမှာ ဖြစ်တယ် ။ အ‌‌ပေါ်မှာ ပြောပြခဲ့တာတွေက local မှာပဲ module ကို တည်ဆောက်ပြီး ပြောပြခဲ့တာတွေပါ ။ Version 6.0 ကို သုံးပြပါမယ် ။ Main.tf file ထဲမှာ ထည့်ပါ ။ Subnets 2 ခုနဲ့ ဆောက်ပြ ပေးထားပါတယ် ။</p>
<pre><code class="lang-plaintext">module "vpc" {
  source  = "terraform-google-modules/network/google"
  version = "6.0.0"

  project_id   = var.project_id
  network_name = "test-vpc"
  routing_mode = "GLOBAL"

  subnets = [
    {
      subnet_name   = "subnet-01"
      subnet_ip     = "10.10.20.0/24"
      subnet_region = var.region
    },
    {
      subnet_name   = "subnet-02"
      subnet_ip     = "10.10.30.0/24"
      subnet_region = var.region
    },
  ]
}
</code></pre>
<p>Terraform Registry ရဲ့ source ကိုမှန် အောင်ထည့်ပါ။ အောက်မှာ link ချပေးထားပါတယ် ။</p>
<p><a target="_blank" href="https://registry.terraform.io/modules/terraform-google-modules/network/google/6.0.0">https://registry.terraform.io/modules/terraform-google-modules/network/google/6.0.0</a></p>
<pre><code class="lang-plaintext">terraform init
terraform apply
</code></pre>
<p>Terraform Registry မှ ယူသုံးထားတဲ့ Network Module နဲ့ create လုပ်ထားတဲ့ VPC လေး တွေ့ရပါလိမ့်မယ်</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725643877604/65809abf-d44b-4ca2-9bbf-5cf90a3132bd.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-step-9-destroy-infrastructure"><strong>Step 9 : Destroy Infrastructure</strong></h3>
<p>Terraform နဲ့ ဖန်တီးတဲ့ အရာတွေ အကုန်ဖျက်ချင်ရင် destroy ဆိုတဲ့ command နဲ့ ဖျက်လို့ပါတယ် ။ command run ပြီးတဲ့ အခါ စတင်ဖျက်မဲ့ resources list တွေ ပြပြီး အတည်ပြချက် တောင်းဆိုပါတယ် ။terraform state file ကနေ ကြည့်ပြီး အကုန် ဖျက်ပစ်မှာ ဖြစ်ပါတယ်</p>
<pre><code class="lang-plaintext">terraform destroy
</code></pre>
<p>ကျနော် ဆောက်ထားခဲ့တဲ့ resources တွေ အကုန်ဖျက်သွားမည် ဖြစ်တယ် ။Google Cloud Console တွင် ပြန်ကြည့်ကြည့်ပါ ဘာမှ မရှိတော့ ဖူး ကြည့်မ နေနဲ့ 😁</p>
<p>ဒီစာကို ဒီလောက်နဲ့ ပဲ နားပါမယ် စာဖတ်သူ တွေ တစ်ခုခု ရမယ်လို့ မျော် လင့်ပါတယ် ။</p>
<p>Author by Kyaw Thet Htun</p>
<p>My Linkedin Profile - <a target="_blank" href="https://www.linkedin.com/in/kyaw-thet-htun/">https://www.linkedin.com/in/kyaw-thet-htun/</a></p>
]]></content:encoded></item><item><title><![CDATA[How to Monitor Network With Windows Script]]></title><description><![CDATA[အားလုံးပဲ မင်္ဂလာပါ။ ဒီနေ့မှာတော့ Windows Bat File ကို သုံးပြီးတော့ Network Monitoring script လေး ရေးပြသွားမှာဖြစ်ပါတယ်။
အရင်ဆုံး ကျွန်တော်တို့ Text Document အလွတ်တစ်ခု Create လုပ်ပါမယ်။ ပြီးရင် ကျွန်တော် command လေး ထည့်ပါမယ်။ Command ကို အောက်မှာ c...]]></description><link>https://blog.vitaltechmyanmar.com/how-to-monitor-network-with-windows-script</link><guid isPermaLink="true">https://blog.vitaltechmyanmar.com/how-to-monitor-network-with-windows-script</guid><category><![CDATA[monitornetworkwithscript]]></category><category><![CDATA[batfilefornetworkmonitor]]></category><dc:creator><![CDATA[PoneMyat]]></dc:creator><pubDate>Fri, 06 Sep 2024 06:19:21 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1725599518049/eb8e3b49-1f1e-46dc-beba-8ab191bafa1b.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>အားလုံးပဲ မင်္ဂလာပါ။ ဒီနေ့မှာတော့ Windows Bat File ကို သုံးပြီးတော့ Network Monitoring script လေး ရေးပြသွားမှာဖြစ်ပါတယ်။</p>
<p>အရင်ဆုံး ကျွန်တော်တို့ Text Document အလွတ်တစ်ခု Create လုပ်ပါမယ်။ ပြီးရင် ကျွန်တော် command လေး ထည့်ပါမယ်။ Command ကို အောက်မှာ copy ယူပါ။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725599824411/da93e813-af3a-4e47-a44b-a08399d5a0e9.png" alt class="image--center mx-auto" /></p>
<pre><code class="lang-plaintext">@echo off &amp; cls

set IP=8.8.8.8

:top

PING -n 1 %IP% | FIND "TTL="

IF ERRORLEVEL 1 (
    SET OUT=4F
    echo Request timed out.
) ELSE (
    SET OUT=2F
)

color %OUT%

ping -n 2 -w 1000 127.0.0.1 &gt;nul

GoTo top
</code></pre>
<p>set IP = 8.8.8.8 နေရာမှာ ကိုယ် Ping ထားချင်တဲ့ Server IP ဒါမှမဟုတ် Website (amazonaws.com) စသဖြင့် ကိုယ်ထားချင်တဲ့ဟာကို ပြောင်းထားလို့ရပါတယ်။</p>
<hr />
<p>ပြီးရင် ကျွန်တော်တို့ Text File လေးကို Save ပါမယ်။ Save တဲ့အခါ bat file အနေနဲ့ Extension ပြောင်းပြီး save ပေးရပါမယ်။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725600094468/76211b0d-fb6b-40da-872c-a7bcb4fec189.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725600112017/e9202d33-a1ae-4753-aa7d-f8c380ad676d.png" alt class="image--center mx-auto" /></p>
<p>ဒီ ping.bat File လေးကို Double Click or Run As Administrator နှိပ်ပြီး Run လိုက်မယ်ဆိုရင်</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725601031186/9696df3f-eff5-439f-b49a-4b39f27e007b.png" alt class="image--center mx-auto" /></p>
<p>reply ပြန်ရင် Background က စိမ်းနေမှာဖြစ်ပြီး</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725601124416/ee36cdc9-6149-45f2-9149-41712781abb5.png" alt class="image--center mx-auto" /></p>
<p>reply မပြန်ရင် Background က အနီရောင်ဖြစ်နေမှာပါ။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725601138856/82314aa2-f210-41ae-ba32-b8de82490c9b.png" alt class="image--center mx-auto" /></p>
<p>Ping ပြန်မိသွားရင်တော့ Background က ပြန်စိမ်းလာမှာပဲဖြစ်ပါတယ်။</p>
<hr />
<p>ဒီ Tips &amp; Trick လေးက လွယ်ကူပြီး ရိုးရှင်းတဲ့အတွက် အသုံးတည့်မယ်လို့ မျှော်လင့်ပါတယ်။ အားလုံးပဲ အချိန်ပေးပြီး ဖတ်ရှုပေးတဲ့အတွက်လဲ ကျေးဇူးတင်ပါတယ် ခင်ဗျ။</p>
<p>Author By <a class="user-mention" href="https://hashnode.com/@ponemyat110">PoneMyat</a></p>
]]></content:encoded></item><item><title><![CDATA[What is ADVPN? How to Config ADVPN on Fortigate]]></title><description><![CDATA[What is ADVPN?
အားလုံးပဲ မင်္ဂလာပါခင်ဗျ၊ ကျွန်‌တော် ဒီနေ့ပြောပြပေးသွားမှာကတော့ ADVPN အကြောင်းလေးပဲဖြစ်ပါတယ်၊ Auto Discovery VPN (ADVPN) က Spoke sites တွေက topology ရဲ့ Hub ကို route မသွားတော့ပဲ Spoke တစ်ခုနဲ့တစ်ခု လိုအပ်ချက်အရ direct tunnels (dynamic...]]></description><link>https://blog.vitaltechmyanmar.com/what-is-advpn-how-to-config-advpn-on-fortigate</link><guid isPermaLink="true">https://blog.vitaltechmyanmar.com/what-is-advpn-how-to-config-advpn-on-fortigate</guid><dc:creator><![CDATA[San Htut Zaw]]></dc:creator><pubDate>Fri, 06 Sep 2024 05:26:39 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1725597249448/d860dd37-e15f-47d8-a8ce-deda7df6d19b.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-what-is-advpn">What is ADVPN?</h2>
<p>အားလုံးပဲ မင်္ဂလာပါခင်ဗျ၊ ကျွန်‌တော် ဒီနေ့ပြောပြပေးသွားမှာကတော့ ADVPN အကြောင်းလေးပဲဖြစ်ပါတယ်၊ Auto Discovery VPN (ADVPN) က Spoke sites တွေက topology ရဲ့ Hub ကို route မသွားတော့ပဲ Spoke တစ်ခုနဲ့တစ်ခု လိုအပ်ချက်အရ direct tunnels (dynamic) တွေရဖို့ အသုံးပြုတဲ့ IPsec Technology ရဲ့ traditional hub and spoke vpn ဖြစ်ပါတယ်၊</p>
<p>ADVPN ရဲ့ main advantage ကတော့ hub and spoke topology မှာ full mesh ပေးနိုင်တာပဲဖြစ်တယ်၊ ၎င်းက spoke to spoke ကြား connection အပြည့်အဝရရှိဖို့အတွက် delay ဖြစ်မှုကို ‌လျှော့ချ‌ပေးတယ်၊ နောက် အလွန်ကြီးမားတဲ့ full mesh VPN network က issues တွေကိုလဲ ဖြေရှင်းပေးနိုင်တယ် ဖြစ်ပါတယ်၊</p>
<p>Hub နဲ့ Spoke offices တွေမှာ internet connections နှစ်ခု(or)နှစ်ခုထက်ပိုရှိရင် dual-hub ADVPN network လဲတည်ဆောက်နိုင်သလို၊ SD-WAN technology သုံးပြီး Spoke offices တွေကို dynamic tunnels ‌တွေနဲ့ user တွေရဲ့ traffic တွေကို load balance အနေနဲ့လဲ အသုံးပြုနိုင်မယ် ဖြစ်ပါတယ်၊</p>
<h2 id="heading-how-to-config-advpn-on-fortigate-firewall">How to Config ADVPN on Fortigate Firewall?</h2>
<p>Topology အနေနဲ့ကတော့ Hub တစ်ခု၊ Spoke နှစ်ခုနဲ့ သုံးပြသွားမှာဖြစ်ပါတယ်၊</p>
<p>ADVPN ကတော့ other spokes တွေရဲ့ routesတွေကို affect မဖြစ်စေပဲ spoke နှစ်ခုကြား route traffic တွေ peer connection တွေရှိစေဖို့ internal routing protocol တစ်ခုသုံးပေးဖို့လိုအပ်ပါတယ်၊</p>
<p>Fortigate ရဲ့ ADVPN ကတော့ internal routing protocol အနေနဲ့ BGP, OSPF, RIP တွေကို support တယ်၊ အဲ့တော့ ကိုယ်နှစ်သက်တဲ့ routing protocol ကိုအသုံးပြုနိုင်ပါတယ်၊ ဒီ LAB မှာ‌တော့ ကျွန်တော်က routing protocol ကို iBGP နဲ့သုံးသွားမှာဖြစ်ပါတယ်၊</p>
<p>ပြီးသွားရင်တော့ hub and spoke tunnel ထိုးမှာဖြစ်တဲ့အတွက် IPsec hub and spoke ကိုအသုံးပြုသွားမှာဖြစ်ပါတယ်၊</p>
<p>Ok, Let’s start with Lab!</p>
<h3 id="heading-lab-topology">Lab Topology</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725597321696/cb2ef049-725b-4296-b599-074352053c89.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-tasks">Tasks</h3>
<p>Configure BGP settings on FGT-Hub:</p>
<ol>
<li><p>On FGT-Hub, go to Network &gt; BGP</p>
</li>
<li><p>In the Local AS field, enter 65400</p>
</li>
<li><p>In the Router ID field, enter 0.0.0.101</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725597517919/cfb2f8c7-65ac-43bc-ab6f-9d728416cb40.png" alt /></p>
</li>
<li><p>Under Neighbor Groups, click Create New</p>
</li>
<li><p>Enter the following settings:</p>
<ul>
<li><p>Name : Branch-Peers</p>
</li>
<li><p>Remote AS : 65400</p>
</li>
<li><p>Activate IPv4 : Enable</p>
</li>
<li><p>Attribute unchanged : Disable</p>
</li>
<li><p>Route Reflector client : Enable</p>
</li>
<li><p>Capability: route refresh : Enable</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725597566295/679ae5dd-04d5-4a60-a92c-2de3ecac90eb.png" alt /></p>
</li>
</ul>
</li>
<li><p>Click Ok</p>
</li>
<li><p>Click Apply to save the BGP settings.</p>
</li>
</ol>
<p>Configure BGP settings on FGT-Spoke1:</p>
<ol>
<li><p>On FGT-Spoke1, go to Network &gt; BGP</p>
</li>
<li><p>In the Local AS field, enter 65400</p>
</li>
<li><p>In the Router ID field, enter 0.0.0.111</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725597598689/7a855ca3-93b0-4831-9a5c-984907af049d.png" alt /></p>
</li>
<li><p>Click Apply to save the BGP settings.</p>
</li>
</ol>
<p>Configure BGP settings on FGT-Spoke2:</p>
<ol>
<li><p>On FGT-Spoke2, go to Network &gt; BGP</p>
</li>
<li><p>In the Local AS field, enter 65400</p>
</li>
<li><p>In the Router ID field, enter 0.0.0.112</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725597680398/32024af5-edb9-4d24-92f2-c09f82e7091c.png" alt /></p>
</li>
<li><p>Click Apply to save the BGP settings.</p>
</li>
</ol>
<p>လိုအပ်တဲ့ routing protocol ကို create လုပ်ပြီးသွားပြီဖြစ်တဲ့အတွက် IPsec VPN (Hub and Spoke) ကို ထပ်မံ create လုပ်သွားမှာဖြစ်ပါတယ်၊</p>
<h3 id="heading-configuration-of-ipsec-hub-and-spoke">Configuration of IPsec Hub and Spoke</h3>
<p>Configure VPN on FGT-Hub with the IPsec Wizard:</p>
<ol>
<li><p>On FGT-Hub, navigate to VPN &gt; IPsec Wizard.</p>
</li>
<li><p>On the VPN Setup page, use the following settings:</p>
<ul>
<li><p>Name : Branches</p>
</li>
<li><p>Template type : Hub-and-Spoke</p>
</li>
<li><p>Role : Hub</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725598202000/ee0cc72a-6b48-4709-9ed3-41fd5b4adaee.png" alt /></p>
</li>
</ul>
</li>
<li><p>Click Next</p>
</li>
<li><p>On the Authentication page, use the following settings:</p>
<ul>
<li><p>Incoming Interface: ISP (port4)</p>
</li>
<li><p>Authentication Method: Pre-shared Key</p>
</li>
<li><p>Pre-shared Key: Labtest098&amp;</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725598232372/3fee51cf-a1c7-4a64-9144-9dac20539b6e.png" alt /></p>
</li>
</ul>
</li>
<li><p>Click Next &gt;</p>
</li>
<li><p>On the Tunnel interface page, use the following settings:</p>
<ul>
<li><p>Tunnel IP : 10.10.1.101</p>
</li>
<li><p>Remote IP/Netmask : 10.10.1.1/24</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725598286799/a54147e7-a652-4a3e-9fe0-24266970771a.png" alt /></p>
</li>
</ul>
</li>
<li><p>Click Next &gt;</p>
</li>
<li><p>On the Policy &amp; Routing page, use the following settings:</p>
<ul>
<li><p>Local AS : 65400</p>
</li>
<li><p>Local interface : LAN</p>
</li>
<li><p>Local subnet. Click the +button to add more subnets:</p>
<ol>
<li>192.168.101.0/24</li>
</ol>
</li>
<li><p>Spoke type : Range</p>
</li>
<li><p>Spoke range prefix : 10.10.1.0/24</p>
</li>
<li><p>Spoke neighbor group : Branch-Peers</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725598317596/2465688c-39a9-4449-b580-c14a1e7eac8c.png" alt /></p>
</li>
</ul>
</li>
<li><p>Click Next &gt;</p>
</li>
<li><p>Click Create</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725598359627/92d52c90-4f2a-4393-befc-fd0792c7bb2f.png" alt /></p>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725598388352/1ae77a7f-4a04-4662-9a03-1daa6052bf40.png" alt /></p>
<p>Spoke ဘက်တွေကိုကျတော့ အလွယ်တကူ config ချလို့ရအောင် Configuration Key ကို Generate ထုတ်သွားရမယ်ဖြစ်ပါတယ်၊ နောက် Spoke sites တွေထပ်တိုးချင်ရင်လဲ ထပ်တိုးလို့ရပါတယ်၊</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725598476363/12060ec7-9f29-4150-b01a-ca54faf395a0.png" alt /></p>
<p>Configure VPN on FGT-Spoke1 with the IPsec Wizard:</p>
<ol>
<li><p>On FGT-Spoke, navigate to VPN &gt; IPsec Wizard.</p>
</li>
<li><p>On the VPN Setup page, use the following settings:</p>
<ul>
<li><p>Name : Hub</p>
</li>
<li><p>Template type : Hub-and-Spoke</p>
</li>
<li><p>Role : Spoke</p>
</li>
<li><p>Easy Configuration Key : Spoke #1 ရဲ့ key ထည့်မယ်</p>
</li>
</ul>
</li>
</ol>
<p>    <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725598520616/09dc82bc-3ca7-489c-b377-be1b9bdaf417.png" alt /></p>
<ol start="3">
<li><p>Click Next &gt;</p>
</li>
<li><p>On the Authentication page, use the following settings:</p>
<ul>
<li><p>Pre-shared key : Labtest098&amp;</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725598576561/f0795e8d-b93c-4e21-88d7-14a1eeef14ad.png" alt /></p>
</li>
</ul>
</li>
<li><p>Click Next &gt;</p>
</li>
<li><p>On the Tunnel interface page, Click Next &gt;</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725598604081/caff0a93-fd4e-4eee-8900-b5c6af6c7b52.png" alt /></p>
</li>
<li><p>On the Policy &amp; Routing page, use the following settings:</p>
<ul>
<li><p>Local AS : 65400</p>
</li>
<li><p>Local interface : LAN</p>
</li>
<li><p>Local subnets : 192.168.111.0/24</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725598643233/b59173df-a34e-4c47-bdef-123c4398595d.png" alt /></p>
</li>
</ul>
</li>
<li><p>Click Next &gt;</p>
</li>
<li><p>Click Create</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725598683293/1f62c22c-a3fc-4234-afd8-549adb23af57.png" alt /></p>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725598691399/b3c47ee3-375f-41cb-b740-bf9e9ef9bacf.png" alt /></p>
<p>ထိုနည်း၎င်းအတိုင်းပဲ Spoke2 ကိုလဲ Spoke1 အတိုင်း config ထပ်လုပ်ရမယ်ဖြစ်ပါတယ်၊</p>
<p>ပြီးသွားရင်တော့ နောက်ဆုံး ကျွန်တော်တို့ Hub ဘက်မှာကော၊ Spoke1, Spoke2 ဘက်တွေမှာပါ VPN Tunnels တွေ up နေပြီဆိုတာ တွေ့ရမှာဖြစ်ပါတယ်၊</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725598850007/4dbd74eb-f0e2-48f4-9775-cd18e85b5054.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725598908073/235522bd-3083-4aef-b656-067f174b2cf1.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725598922404/8c15263e-6672-460a-a517-ac9c60e197ea.png" alt class="image--center mx-auto" /></p>
<p>အချိန်ခဏနေကြာရင် Spoke to Spoke ကြား direct tunnels တွေထပ် up လာတာကိုတွေ့ရလိမ့်မယ်ဖြစ်ပါတယ်၊</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725599158555/dc8993cf-b1e1-45cb-a73a-8b75e289bdc9.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725599181825/08c6c5a8-aa2f-4c35-8ca5-0ba34a567727.png" alt class="image--center mx-auto" /></p>
<p>Result အနေနဲ့ကတော့ အပေါ်က ပြောခဲ့သလို Auto Discovery VPN သည် Spoke sites တွေက topology ရဲ့ Hub ကို route မသွားတော့ပဲ Spoke တစ်ခုနဲ့တစ်ခု direct tunnel (dynamic)ကို အသုံးပြုသွားတာ တွေ့ရမှာဖြစ်ပါတယ်၊</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725599301675/9108eb33-f576-4be1-bf27-f7294f77518f.png" alt /></p>
<p>Spoke1 ရဲ့ Local ကနေ Spoke2 ရဲ့ Local ကို တကယ်အလုပ်လုပ်မလုပ် testing လှမ်း ping ခြင်းဖြစ်ပါတယ်</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725599420730/a93b0b5a-cb84-44db-b0bb-dc9c41dc068b.png" alt /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725599430639/d150e19a-0302-4dcd-81a9-b9be5875e6f4.png" alt /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725599443390/5c8955df-5af5-43aa-9d10-49a697892c41.png" alt /></p>
<p>Spoke1 ကနေ Spoke2ကို traffic route သွားတာတွေ့ရမှာဖြစ်ပါတယ်၊ ဒါပေမယ့် Hub ဆီကိုတော့ route သွားခြင်းမတွေ့ရပါဘူး၊ Spoke to Spoke direct tunnel အသုံးပြုသွားတာပဲ တွေ့ရမှာဖြစ်ပါတယ်၊ အားလုံးပဲ ကျွန်တော် Lab လေးကို အချိန်ပေးပြီး ဖတ်ရှုပေးတဲ့ ကျေးဇူးတင်ပါတယ် ခင်ဗျ၊ အမှားများပါခဲ့ရင်လဲ ကျွန်တော့်ကို လာရောက်ပြောပြပေးနိုင်ပါတယ်ခင်ဗျ။</p>
]]></content:encoded></item><item><title><![CDATA[How To Build A File Server?]]></title><description><![CDATA[အားလုံးပဲ မင်္ဂလာပါ။ ဒီနေ့ ကျွန်တော် ပြောပြပေးသွားမဲ့ အကြောင်းအရာကတော့ ကျွန်တော်တို့ File Server တစ်ခု ဘယ်လို Setup လုပ်ရမလဲဆိုတဲ့ အကြောင်းပဲဖြစ်ပါတယ်။
ဆိုတော့ ကျွန်တော်တို့ NAS လဲ သုံးချင်တယ်။ ‌Synology NAS တွေကျတော့လဲ စျေးကြီးတယ်။ ဒါဆို ဘယ်လိုလုပ်မ...]]></description><link>https://blog.vitaltechmyanmar.com/how-to-build-a-file-server</link><guid isPermaLink="true">https://blog.vitaltechmyanmar.com/how-to-build-a-file-server</guid><category><![CDATA[#how to build a file server]]></category><category><![CDATA[ubuntusamba]]></category><category><![CDATA[sambafileserver]]></category><category><![CDATA[howtoconfigresambainubuntu]]></category><category><![CDATA[samba]]></category><category><![CDATA[Samba Server]]></category><dc:creator><![CDATA[PoneMyat]]></dc:creator><pubDate>Fri, 06 Sep 2024 04:47:01 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1725594059509/420da3c0-8227-4c8c-a7fa-bdc6e70e1508.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>အားလုံးပဲ မင်္ဂလာပါ။ ဒီနေ့ ကျွန်တော် ပြောပြပေးသွားမဲ့ အကြောင်းအရာကတော့ ကျွန်တော်တို့ File Server တစ်ခု ဘယ်လို Setup လုပ်ရမလဲဆိုတဲ့ အကြောင်းပဲဖြစ်ပါတယ်။</p>
<p>ဆိုတော့ ကျွန်တော်တို့ NAS လဲ သုံးချင်တယ်။ ‌Synology NAS တွေကျတော့လဲ စျေးကြီးတယ်။ ဒါဆို ဘယ်လိုလုပ်မလဲ??</p>
<h3 id="heading-ubuntu-as-nas"><strong>Ubuntu As NAS</strong></h3>
<p>ကျွန်တော်တို့ သုံးနေတဲ့ Ubuntu ကိုပဲ Samba အသုံးပြုပြီး File Server တစ်ခုအနေနဲ့ Setup လုပ်သွားပါမယ်။</p>
<ol>
<li><h3 id="heading-installing-samba"><strong>Installing Samba</strong></h3>
</li>
</ol>
<pre><code class="lang-plaintext">sudo apt update
sudo apt install samba
</code></pre>
<p>Check Installation success or not?</p>
<pre><code class="lang-plaintext">whereis samba
</code></pre>
<p>The Result may</p>
<pre><code class="lang-plaintext">samba: /usr/sbin/samba /usr/lib/samba /etc/samba /usr/share/samba /usr/share/man/man7/samba.7.gz /usr/share/man/man8/samba.8.gz
</code></pre>
<hr />
<ol start="2">
<li><h3 id="heading-setting-up-samba"><strong>Setting Up Samba</strong></h3>
</li>
</ol>
<p>Samba ကို Install လုပ်ပြီးသွားပြီဆိုတော့ Share ဖို့အတွက် Directory တစ်ခု ဖန်တီးပါမယ်။</p>
<pre><code class="lang-plaintext">mkdir /home/&lt;username&gt;/sambashare/
</code></pre>
<p>ဒီ cmd က smabashare ဆိုတဲ့ Folder လေးကို Directory မှာ ဆောက်သွားတာပါ။</p>
<p>samba configuration file က ဒီလမ်းကြောင်းထဲမှာ ရှိတာပါ။ ( /etc/samba/smb.conf )</p>
<p>ကျွန်တော်တို့က ဒီ လမ်းကြောင်းထဲက File ကိုသွားပြီး configure ချပါမယ်။</p>
<pre><code class="lang-plaintext">sudo nano /etc/samba/smb.conf
</code></pre>
<p>ဒီ Config လေး ထည့်ပါမယ်။</p>
<pre><code class="lang-plaintext">[sambashare]
    comment = SambaShare
    path = /home/username/sambashare
    read only = no
    browsable = yes
</code></pre>
<p>ပီးရင် Save လုပ်ပါမယ်။ save လုပ်ပြီးရင် effect ဖြစ်ဖို့အတွက် service restart ချပေးရပါမယ်။</p>
<pre><code class="lang-plaintext">sudo service smbd restart
</code></pre>
<p>နောက်ပြီး Firewall မှာ smb traffic တွေအတွက် Rule update လုပ်ပေးဖို့လိုပါတယ်။</p>
<pre><code class="lang-plaintext">sudo ufw allow samba
</code></pre>
<hr />
<ol start="3">
<li><h3 id="heading-setting-up-user-accounts"><strong>Setting up User Accounts</strong></h3>
</li>
</ol>
<p>User Acc တစ်ခု Create လုပ်ပါမယ်။</p>
<pre><code class="lang-plaintext">sudo smbpasswd -a username
</code></pre>
<ol start="4">
<li><h3 id="heading-connecting-to-share"><strong>Connecting to Share</strong></h3>
</li>
</ol>
<p>Ubuntu Share</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725596514495/a8fc3d13-6321-4f2f-a05e-e6d7805f8e45.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725597049896/3d2d9f27-162c-49a6-af19-c8bf37a8c1e6.png" alt class="image--center mx-auto" /></p>
<p>Mac Share</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725597234941/b7e975d3-b649-4803-9ae6-059853a53ee9.png" alt class="image--center mx-auto" /></p>
<p>Windows</p>
<pre><code class="lang-plaintext">\\ip-address\sambashare
</code></pre>
<hr />
<p>အခုဆိုရင်တော့ Ubuntu မှာ File Server Setup လုပ်နည်းလေး သိသွားပြီဆိုတော့ ဒီ lab လေးကို ဒီမှာပဲ အဆုံးသတ်ချင်ပါတယ်။ ကိုယ်တိုင်လဲ စမ်းလုပ်ကြည့်လို့ရပါတယ်။ အားလုံးပဲ အချိန်ပေးပြီး ဖတ်ရှုပေးတဲ့အတွက်လဲ ကျေးဇူးတင်ပါတယ် ခင်ဗျ။</p>
<p>Author By <a class="user-mention" href="https://hashnode.com/@ponemyat110">PoneMyat</a></p>
]]></content:encoded></item><item><title><![CDATA[How to backup and restore WSL Linux]]></title><description><![CDATA[Hi Guys အားလုံးပဲမင်္ဂလာပါခင်ဗျာ။ ဒီနေ့မှာတော့ ကျွန်တော်တို့ Windows ထဲမှာအသုံးပြုနေတဲ့ Windows Subsystem for Linux (WSL) လေးကို ဘယ်လို backup လုပ်ပြီး restore ပြန်လုပ်ရမလဲ ဆိုတာကိုပြောပြပေးမှာပဲဖြစ်ပါတယ်။ backup လုပ်ထားခြင်းဖြင့် ကျွန်တော်တို့ရဲ့ ws...]]></description><link>https://blog.vitaltechmyanmar.com/how-to-backup-and-restore-wsl-linux</link><guid isPermaLink="true">https://blog.vitaltechmyanmar.com/how-to-backup-and-restore-wsl-linux</guid><category><![CDATA[WSL]]></category><category><![CDATA[Linux]]></category><dc:creator><![CDATA[Htet Oo Wai Yan]]></dc:creator><pubDate>Thu, 05 Sep 2024 12:47:30 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1725540401297/3542a897-9e08-480b-ad47-e06b30c56c0a.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hi Guys အားလုံးပဲမင်္ဂလာပါခင်ဗျာ။ ဒီနေ့မှာတော့ ကျွန်တော်တို့ Windows ထဲမှာအသုံးပြုနေတဲ့ Windows Subsystem for Linux (WSL) လေးကို ဘယ်လို backup လုပ်ပြီး restore ပြန်လုပ်ရမလဲ ဆိုတာကိုပြောပြပေးမှာပဲဖြစ်ပါတယ်။ backup လုပ်ထားခြင်းဖြင့် ကျွန်တော်တို့ရဲ့ wsl linux လေးကို အကြောင်းအမျိုးမျိုးကြောင့် ဖျက်မိသွားမယ်ဆိုရင်တောင် restore ပြန်လုပ်လိုက်ခြင်းဖြင့် အရင်က backup လုပ်ခဲ့တဲ့ အခြေအနေအတိုင်း configuration တွေ file တွေကို ပြန်လည်ရရှိမှာပဲဖြစ်ပါတယ်။ wsl ကို windows terminal ကနေပဲ အလွယ်တကူ backup လုပ်လို့ရမှာဖြစ်ပါတယ်။</p>
<p>ပထမဆုံး အနေနဲ့ ကျွန်တော်ရဲ့ wsl linux လေးတွေ ဘယ်နှစ်ခု ရှိနေလဲဆိုတာကို စစ်ကြည့်ဖို့အတွက်</p>
<pre><code class="lang-bash">wsl -l
</code></pre>
<p>ဆိုတဲ့ command ကို အသုံးပြုပါမယ်။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725538388950/e50e3145-8eb8-46fb-a64e-31eb0deb3926.png" alt class="image--center mx-auto" /></p>
<p>wsl -l ဆိုပြီး စစ်လိုက်တာနဲ့ ကျွန်တော်တို့ wsl linux တွေကျလာမည်ဖြစ်ပြီးတော့ ကျွန်တော့်စက်ထဲမှာတော့ Ubuntu နဲ့ AlmaLinuxOS-9 ဆိုတဲ့ wsl linux လေး ၂ခု ရှိနေပါတယ်။ အဲ့ဒီထဲကမှ ကျွန်တော်က AlmaLinuxOS-9 ဆိုတဲ့ wsl လေးကို backup ထုတ်မှာပဲဖြစ်ပါတယ်။ backup ထုတ်မယ်ဆိုရင် အသုံးပြုရမည့် command ကတော့</p>
<pre><code class="lang-bash">wsl --<span class="hljs-built_in">export</span> (distribution) (file path)
</code></pre>
<p>ပဲဖြစ်ပါတယ်။ distribution နေရာမှာ ကျွန်တော်တို့ backup လုပ်ချင်တဲ့ distribution name ကိုထည့်ရမှာဖြစ်ပြီးတော့ file path ကတော့ backup file သိမ်းမယ့် လမ်းကြောင်းကိုထည့်ခိုင်းတာဖြစ်ပါတယ်။</p>
<pre><code class="lang-bash">wsl --<span class="hljs-built_in">export</span> AlmaLinuxOS-9 <span class="hljs-string">"D:\wsl\almalinux.tar"</span>
</code></pre>
<p>အိုကေဒါဆို AlmaLinuxOS-9 လေးကို backup လုပ်သွားမည်ဖြစ်ပါသည်။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725538781383/26bd46c7-68bb-4fcb-8ec4-fdf9b5dc4a0f.png" alt class="image--center mx-auto" /></p>
<p>backup လုပ်ပြီးသွားရင်တော့ ပုံပါအတိုင်း the operation completed successfully ပြမည်ဖြစ်ပါသည်။ backup လဲလုပ်ပြီးသွားပြီဆိုတော့ AlmaLinuxOS-9 ဆိုတဲ့ wsl လေးကို unregister လုပ်လိုက်ပါမယ်။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725538842976/96a792af-9a5c-43ad-9201-e8c36b256c84.png" alt class="image--center mx-auto" /></p>
<p>unregister successfully ဖြစ်သွားပြီဆိုတော့အရင်ဆုံး wsl လေးကို အရင်ဆုံးဖွင့်ကြည့်လိုက်ပါမယ်။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725538918259/eff2f69d-89e8-4999-92a0-a7c9733bcf82.png" alt class="image--center mx-auto" /></p>
<p>ဒါပေမယ့် ဖွင့်လိုက်တဲ့ အချိန်မှာ wsl linux လေးမှာ unregister လုပ်ထားပြီဖြစ်တဲ့အတွက်ကြောင့် အသုံးပြုလို့ရတော့မှာ မဟုတ်တော့ပါဘူး။ အိုကေဒါဆို ကျွန်တော်တို့ wsl backup file အရင်ဆုံးသွား check လိုက်ပါမယ်။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725539044398/61acddc2-a658-4fa4-8dc1-09cd7f8a6a99.png" alt class="image--center mx-auto" /></p>
<p>ကျွန်တော်တို့ backup လုပ်ခဲ့တဲ့ wsl လေး ရှိတယ်ဆိုတော့ ပြန်ပြီးတော့အသုံးပြုလို့ရအောင် restore ပြန်လုပ်ပါမယ်။ restore ပြန်လုပ်ရမယ့် command ကတော့</p>
<pre><code class="lang-bash">wsl --import (Distribution) (Install Location) (File Path)
</code></pre>
<p>wsl linux လေးကို restore ပြန်လုပ်မယ့် အချိန်မှာတော့ install location ဆိုတယ့် လမ်းကြောင်းလေး တစ်ခုတိုးလာပဲဖြစ်ပါတယ်။ အဲ့ဒါကတော့ ကျွန်တော်တို့ wsl linux လေးကို restore လုပ်သည့် အခါ install location သတ်မှတ်ထားသည့် directory မှာ ပြန် restore လုပ်သွားမှာပဲဖြစ်ပါတယ်။ အရင်ဆုံးအနေနဲ့ ကျွန်တော်က C Partition ထဲမှာ WSL ဆိုပြီး အရင်ဆုံး directory ဆောက်လိုက်ပါမယ်။ လမ်းကြောင်းကတော့ "C:\WSL" ဒီအတိုင်းပေါ့။ အိုကေ ဒါဆို directory ဆောက်ပြီးသွားပြီ ဆိုတော့ ကျွန်တော်တို့ backup လုပ်ထားတဲ့ wsl linux ကို restore ပြန်လုပ်တော့မှာပဲ ဖြစ်ပါတယ်။</p>
<pre><code class="lang-bash">wsl --import AlmaLinuxOS-9 <span class="hljs-string">"C:\WSL"</span> <span class="hljs-string">"D:\wsl\almalinux.tar"</span>
</code></pre>
<p>ဆိုပြီးတော့ restore ပြန်လုပ်လိုက်ပါမယ်။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725539588617/0ec0ca8e-b04f-4c10-a544-3a7b43880684.png" alt class="image--center mx-auto" /></p>
<p>restore လုပ်တဲ့အချိန်ကတော့ မိမိရဲ့ wsl file size ပေါ်မူတည်ပြီးတော့ အချိန်ကြာမှာဖြစ်ပါတယ်။ restore ပြီးသွားရင် The operation completed successfully ပြမည်ဖြစ်ပါသည်။ ဒါဆိုရင်တော့ restore လုပ်သွားပြီဖြစ်သည့် အတွက် ကျွန်တော် AlmaLinuxOS-9 wsl လေးကို ပြန်ဖွင့်ကြည့်လိုက်ရအောင်။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725539820662/a2ce6d63-c6f3-46ac-b2b9-de5bba4b0595.png" alt class="image--center mx-auto" /></p>
<p>အခုဆိုရင်တော့ ကျွန်တော်တို့ AlmaLinuxOS-9 wsl လေးကပြန်အသုံးလို့ရနေပြီဖြစ်ပြီးတော့ backup မလုပ်ခင်က သေချာအောင် hello.txt ဆိုတဲ့ file လေးဆောက်ခဲ့ပြီးမှ backup လုပ်ခဲ့တာဖြစ်ပြီးတော့ restore လုပ်သည့်အခါမှာ hello.txt ဆိုတယ့် file လေးပါပြန်ပါလာတာပဲဖြစ်ပါသည်။ ဒါကတော့ data ပြန်ရတယ်ဆိုတာကို စမ်းပြထားခြင်းပဲဖြစ်ပါတယ်။</p>
<p>အိုကေ ဒါဆိုရင်တော့ wsl တွေပျက်သွားတိုင်း အစကနေ config တွေပြန်ချစရာမလိုအောင် ဒီလိုမျိုး backup သိမ်းထားသင့်တယ် ဆိုတာကို ပြောပြရင်း ဒီ lab လေးကို ဒီမှာပဲ အဆုံးသတ်ချင်ပါတယ်။ အားလုံးပဲ အချိန်ပေးပြီး ဖတ်ရှုပေးတဲ့အတွက်လဲ ကျေးဇူးတင်ပါတယ် ခင်ဗျ။</p>
]]></content:encoded></item><item><title><![CDATA[Step-by-Step Guide to Migrate from CentOS to Red Hat Enterprise Linux Using Convert2RHEL]]></title><description><![CDATA[Introduction: Benefits of Migrating from CentOS to RHEL
CentOS မှ Red Hat Enterprise Linux (RHEL) သို့ Migratingလုပ်ခြင်းသည် အများအပြား အကျိုးကျေးဇူးများကို ပေးစွမ်းနိုင်ပါသည်။ အောက်ပါအချက်များသည် RHEL သို့ Migratingလုပ်ခြင်း၏ အဓိက အကျိုးကျေးဇူးများဖ...]]></description><link>https://blog.vitaltechmyanmar.com/step-by-step-guide-to-migrate-from-centos-to-red-hat-enterprise-linux-using-convert2rhel</link><guid isPermaLink="true">https://blog.vitaltechmyanmar.com/step-by-step-guide-to-migrate-from-centos-to-red-hat-enterprise-linux-using-convert2rhel</guid><category><![CDATA[kyawthethtun.hashnode.dev]]></category><dc:creator><![CDATA[Kyaw Thet Htun]]></dc:creator><pubDate>Wed, 04 Sep 2024 19:30:34 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1725477156001/bf97dc4a-1800-4048-a5d4-5bea05629675.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-introduction-benefits-of-migrating-from-centos-to-rhel">Introduction: Benefits of Migrating from CentOS to RHEL</h3>
<p>CentOS မှ Red Hat Enterprise Linux (RHEL) သို့ Migratingလုပ်ခြင်းသည် အများအပြား အကျိုးကျေးဇူးများကို ပေးစွမ်းနိုင်ပါသည်။ အောက်ပါအချက်များသည် RHEL သို့ Migratingလုပ်ခြင်း၏ အဓိက အကျိုးကျေးဇူးများဖြစ်ပါသည်။</p>
<ol>
<li><p><strong>Official Support and Assurance</strong><br /> RHEL သည် Red Hat မှ official support and assurance ကို ပေးသည်။ critical situations များတွင် အချိန်မရွေး professional help ရရှိနိုင်ခြင်းကြောင့် system stability and security ကို မြှင့်တင်ပေးသည်။</p>
</li>
<li><p><strong>Enhanced Security</strong><br /> RHEL သည် advanced security features and technologies များကို ပံ့ပိုးပေးသည်။ security vulnerabilities အတွက် အရေးကြီးသောupdates and patches များကို အချိန်မီရရှိနိုင်သည်။</p>
</li>
<li><p><strong>High Performance</strong><br /> RHEL သည် high performance system တစ်ခုဖြစ်ပြီး, robust capabilities and efficiency ကို ပံ့ပိုးပေးသည်။ အထူးသဖြင့်, reliable and powerful systems များ လိုအပ်သည့် large enterprises and organizations များအတွက် သင့်တော်သည်။</p>
</li>
<li><p><strong>Advanced Technologies</strong><br /> RHEL သည် the latest technologies and innovations support ပေးသည်။ ၎င်းသည် သင့် system’s capabilities ကို မြှင့်တင်ရန်အတွက် နောက်ဆုံးပေါ် tools and features များကို အသုံးချနိုင်စေပါသည်။</p>
</li>
<li><p><strong>Superior Management</strong><br /> RHEL သည် system management အတွက် advanced management tools and technologies များကို ပံ့ပိုးပေးသည့် အတွက် system management ကို လွယ်ကူစွာ ပြုလုပ်နိုင်သည်။၎င်းတွင် monitoring, automation, and configuration management အတွက် tools များ ပါဝင်သည်။</p>
</li>
<li><p><strong>Scalability and Flexibility</strong><br /> RHEL သည် highly scalable and flexible ဖြစ်သောကြောင့် အမျိုးမျိုးသော workloads and environments များတွင် လွယ်ကူစွာ လိုက်လျောညီထွေဖြစ်စေပါသည်။ ၎င်းသည် ကြီးထွားလာသော businesses and dynamic IT landscapes များအတွက် အကောင်းဆုံး ရွေးချယ်မှုတစ်ခု ဖြစ်စေပါသည်။</p>
<p> CentOS မှ RHEL သို့ migrating လုပ်ခြင်းသည် official support, enhanced security, high performance, advanced technologies, superior management, scalability များအတွက် အကျိုးကျေးဇူးများကို ပေးစွမ်းနိုင်သည်။ ဒီအကျိုးကျေးဇူးများကြောင့် RHEL သို့ migration လုပ်ခြင်းသည် မည်သည့် enterprise အတွက်မဆို ဆွဲဆောင်မှုရှိသော ရွေးချယ်မှုတစ်ခုဖြစ်စေသည်။</p>
<h1 id="heading-introduction">Introduction</h1>
<p> CentOS မှ Red Hat Enterprise Linux (RHEL) သို့ Migrating လုပ်ခြင်းသည် ရှုပ်ထွေးနိုင်ပါသည်။ သို့သော် <strong>Convert2RHEL</strong> utility tool ကို အသုံးပြုခြင်းဖြင့် လုပ်ငန်းစဉ်ကို လွယ်ကူစေသည်။ ယင်း tool သည် RHEL-like distributions များမှ officially supported ထားသော RHEL instances များဆီသို့ ချောမွေ့စွာ Migrating နိုင်စေပြီး သင့်ရဲ့ customizations, configurations, နှင့် workloads များကို ထိန်းသိမ်းထားကြောင်း သေချာစေပါသည်။</p>
<p> Convert2RHEL သည် Red Hat မှ supported သော tool တစ်ခုဖြစ်ပြီး Migrating လုပ်စဉ်အတွင်း ပြဿနာတစ်စုံတစ်ရာ ကြုံတွေ့ပါက Red Hat Support မှ ဆက်သွယ် အကူအညီတောင်းနိုင်ပါသည်။ RHEL installation/Migration process မစခင်မှာ သင့် CentOS Linux system ကို up-to-date ဖြစ်ကြောင်း သေချာစေရန် လိုအပ်ပါသည်။</p>
</li>
</ol>
<h3 id="heading-step-1-verifying-your-centos-version"><strong>Step 1 : Verifying Your CentOS Version</strong></h3>
<p>Migrating မလုပ်ဆောင်မီ သင်၏ CentOS Version သည် နောက်ဆုံးထွက်ထားသည့် Version ဖြစ်ကြောင်း အတည်ပြုရန်လိုအပ်ပါသည်။</p>
<pre><code class="lang-plaintext">cat /etc/centos-release
</code></pre>
<p>ထွက်လာမည့် output သည် အောက်ပါအတိုင်း ဖြစ်ပါသည်။</p>
<pre><code class="lang-plaintext">CentOS Linux release 7.9.2009 (Core)
</code></pre>
<h3 id="heading-step-2-enabling-the-convert2rhel-repository"><strong>Step 2 : Enabling the Convert2RHEL Repository</strong></h3>
<p>Convert2RHEL သည် Red Hat က ထုတ်ဝေသည့် package တစ်ခုဖြစ်ပြီး Red Hat CDN မှ download ပြုလုပ်နိုင်ပါသည်။ သင်၏ CentOS server သည် Red Hat CDN နှင့် subscribed မရှိသေးပါက Convert2RHEL repository ကို အရင်ဆုံး enable လုပ်ရန်လိုအပ်ပါသည်။</p>
<h3 id="heading-step-21-pull-down-the-gpg-signing-key"><strong>Step 2.1 : Pull Down the GPG Signing Key</strong></h3>
<p>GPG key ကို download လုပ်ရန် အောက်ပါ command ကို အသုံးပြုပါ။</p>
<pre><code class="lang-plaintext">curl -o /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release https://www.redhat.com/security/data/fd431d51.txt
</code></pre>
<pre><code class="lang-plaintext"># curl -o /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release https://www.redhat.com/security/data/fd431d51.txt
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1855  100  1855    0     0   2324      0 --:--:-- --:--:-- --:--:--  2324
</code></pre>
<h3 id="heading-step-22-download-the-ssl-certificate"><strong>Step 2.2 : Download the SSL Certificate</strong></h3>
<p>SSL certificate ကို download လုပ်ပြီး connection ကို လုံခြုံစေရန် အောက်ပါ command ကို အသုံးပြုပါ။</p>
<pre><code class="lang-plaintext">curl --create-dirs -o /etc/rhsm/ca/redhat-uep.pem https://ftp.redhat.com/redhat/convert2rhel/redhat-uep.pem
</code></pre>
<pre><code class="lang-plaintext"># curl --create-dirs -o /etc/rhsm/ca/redhat-uep.pem https://ftp.redhat.com/redhat/convert2rhel/redhat-uep.pem
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7411  100  7411    0     0  15260      0 --:--:-- --:--:-- --:--:-- 15280
</code></pre>
<h3 id="heading-step-23-download-the-convert2rhel-repository-file"><strong>Step 2.3 : Download the Convert2RHEL Repository File</strong></h3>
<p>Convert2RHEL repository ကို server တွင် ထည့်သွင်းရန် အောက်ပါ command ကို အသုံးပြုပါ။</p>
<pre><code class="lang-plaintext">curl -o /etc/yum.repos.d/convert2rhel.repo https://ftp.redhat.com/redhat/convert2rhel/7/convert2rhel.repo
</code></pre>
<pre><code class="lang-plaintext"># curl -o /etc/yum.repos.d/convert2rhel.repo https://ftp.redhat.com/redhat/convert2rhel/7/convert2rhel.repo
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   247  100   247    0     0    509
</code></pre>
<h3 id="heading-step-3-installing-convert2rhel"><strong>Step 3 : Installing Convert2RHEL</strong></h3>
<p>Repository ကို enabled လုပ်ပြီးသည့်အခါ Convert2RHEL utility ကို install လုပ်နိုင်ပါပြီ။ယခင်အဆင့်တွင် သင်သည် Convert2RHEL software repository ကို enabled လုပ်ထားသည်။ ၎င်းသည် သင်၏ CentOS Linux server အား convert2rhel RPM packages နှင့် Red Hat CDN မှ ၎င်း၏ dependencies များကို အသုံးပြုနိုင်စေခဲ့သည်။ Convert2RHEL repo ကို enabled လုပ်ထားကြောင်းစစ်ဆေးပါ-</p>
<h3 id="heading-step-31-verify-the-repository"><strong>Step 3.1 : Verify the Repository</strong></h3>
<p>Convert2RHEL repository ကို enabled ဖြစ်ကြောင်း စစ်ဆေးရန် အောက်ပါ command ကို အသုံးပြုပါ။</p>
<pre><code class="lang-plaintext">yum repolist
</code></pre>
<pre><code class="lang-plaintext"># yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.pasteur.fr
 * extras: centos.mirror.ate.info
 * updates: ftp.pasteur.fr
repo id                                                                                   repo name                                                                          status
base/7/x86_64                                                                             CentOS-7 - Base                                                                    10,072
convert2rhel-for-rhel-7-rpms                                                              Convert2RHEL for OS 7                                                                   5
extras/7/x86_64                                                                           CentOS-7 - Extras                                                                     512
updates/7/x86_64                                                                          CentOS-7 - Updates                                                                  4,053
repolist: 14,642
</code></pre>
<h3 id="heading-step-32-install-the-convert2rhel-utility"><strong>Step 3.2 : Install the Convert2RHEL Utility</strong></h3>
<p>Convert2RHEL ကို အောက်ပါအတိုင်း Install လုပ်ပါ။</p>
<pre><code class="lang-plaintext">yum install -y convert2rhel
</code></pre>
<pre><code class="lang-plaintext"># yum install -y convert2rhel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.pasteur.fr
 * extras: centos.mirror.ate.info
 * updates: ftp.pasteur.fr
Resolving Dependencies
--&gt; Running transaction check

... output truncated ...

Installed:
  convert2rhel.noarch 0:0.26-1.el7

Dependency Installed:
  libxml2-python.x86_64 0:2.9.1-6.el7_9.6  pexpect.noarch 0:2.3-11.el7             python-backports.x86_64 0:1.0-8.el7  python-backports-ssl_match_hostname.noarch 0:3.5.0.1-1.el7
  python-chardet.noarch 0:2.2.1-3.el7      python-ipaddress.noarch 0:1.0.16-2.el7  python-kitchen.noarch 0:1.1.1-5.el7  python-setuptools.noarch 0:0.9.8-7.el7
  python-six.noarch 0:1.9.0-2.el7          yum-utils.noarch 0:1.1.31-54.el7_8

Complete!
</code></pre>
<p>Convert2RHEL Install လုပ်ပြီးပါက Migrating Process ကို ဆက်လက်ဆောင်ရွက်နိုင်ပါပြီ။</p>
<h3 id="heading-step-4-pre-conversion-analysis"><strong>Step 4 : Pre-Conversion Analysis</strong></h3>
<p><strong>Understanding the Convert2RHEL command</strong></p>
<p>Conversion process ကို အကောင်အထည်ဖော်ရန် အသုံးပြုနိုင်သော arguments များစွာ ရှိသည်။ အဓိကအချက်မှာ သင်၏ new RHEL system ကို active subscription တစ်ခုနှင့် တွဲဖက်registering လုပ်ခြင်း ဖြစ်သည်။ သင့်အနေဖြင့် ရွေးချယ်နိုင်သော နည်းလမ်းများမှာ:</p>
<ol>
<li><p>Fully interactive session: Conversion ၏ အစိတ်အပိုင်းတစ်ခုအဖြစ် မေးခွန်းများကို ဖြေဆိုခြင်းနှင့် username နှင့် password ကို ထည့်သွင်းရန် လိုအပ်သည်။</p>
</li>
<li><p>convert2rhel command အတွင်း username နှင့် password ကို ထည့်သွင်းခြင်း။ ၎င်းသည် သင်၏ Red Hat customer portal အတွက် credentials များကို server ၏ Bash history တွင် plain text အဖြစ် သိမ်းဆည်းထားရန်ဖြစ်သောကြောင့် ကောင်းမွန်သော နည်းလမ်း မဟုတ်ပါ။</p>
</li>
<li><p>command ၏ အစိတ်အပိုင်းတစ်ခုအဖြစ် သင့် Organization ID နှင့် Activation Key ကို ထည့်သွင်းခြင်း။ ၎င်းသည် more secure ဖြစ်တယ် သင့် org-id ကို ရှာဖွေပါ၊ activation key ကို ဖန်တီးပါ။</p>
</li>
</ol>
<h3 id="heading-step-41-running-the-convert2rhel-analyze-utility"><strong>Step 4.1 : Running the Convert2RHEL analyze utility</strong></h3>
<p>Conversion ကို automate လုပ်ရန် အောက်ပါ command ကို အသုံးပြုပါ။</p>
<pre><code class="lang-plaintext">convert2rhel --org &lt; ORG ID &gt; --activationkey  &lt; KEY &gt;
</code></pre>
<p>ဤလုပ်ငန်းစဉ်ကို automated ဖြစ်စေရန်အတွက်၊ အပေါ်တွင်ဖော်ပြထားသော နံပါတ် 3 မှ activation key combination ကို အသုံးပြုပြီး conversion analysis ကို စတင်မည်ဖြစ်သည်။</p>
<pre><code class="lang-plaintext">convert2rhel analyze --org 12451665 --activationkey convert2rhel
</code></pre>
<p>Note: This process will take some time!</p>
<pre><code class="lang-plaintext"># convert2rhel analyze --org 12451665 --activationkey convert2rhel -y

[07/22/2022 18:40:54] TASK - [Prepare: Show Red Hat software EULA] ******************************
The following text is a copy of the November 18, 2019 version of Red Hat GPLv2-Based End User License Agreement (EULA) [1].
For up-to-date version of the EULA, visit [2].
[1] https://www.redhat.com/licenses/Red_Hat_GPLv2-Based_EULA_20191118.pdf
[2] https://www.redhat.com/en/about/agreements

... output truncated ...

Package                                                  Vendor/Packager  Repository
-------                                                  ---------------  ----------
epel-release-7-14.noarch                                 Fedora Project   /epel-release-latest-7.noarch
google-compute-engine-oslogin-20220714.00-g1.el7.x86_64  N/A              google-compute-engine
google-guest-agent-20220713.00-g1.el7.x86_64             N/A              google-compute-engine
google-compute-engine-20220211.00-g1.el7.noarch          N/A              google-compute-engine
gce-disk-expand-20200716.00-g1.el7.x86_64                N/A              google-compute-engine
google-osconfig-agent-20220711.00-g1.el7.x86_64          N/A              google-compute-engine
google-cloud-sdk-396.0.0-1.x86_64                        N/A              google-cloud-sdk
</code></pre>
<p>Process ကို ဆက်လက်လုပ်ဆောင်ရန် <strong><mark>y</mark></strong> ရိုက်ထည့်ပြီး enter နှိပ်ပါ။</p>
<h3 id="heading-step-42-reviewing-the-analysis"><strong>Step 4.2 : Reviewing the analysis</strong></h3>
<p>Outdated/Invalid kernel ကဲ့သို့သော error များကို တွေ့ရှိပါက၊ Convert2RHEL tool သည် ပြန်လည်ပြင်ဆင်ခြင်း steps များကို ပေးပါလိမ့်မည်။ ဥပမာအားဖြင့်၊ သင်သည် kernel ဗားရှင်းမတူညီမှုကို ကြုံတွေ့ရပါက၊</p>
<pre><code class="lang-plaintext">========== Error (Must fix before conversion) ==========
(ERROR) IS_LOADED_KERNEL_LATEST::INVALID_KERNEL_VERSION - Invalid kernel version detected
     Description: The loaded kernel version mismatch the latest one available in the enabled system repositories
     Diagnosis: The version of the loaded kernel is different from the latest version in the enabled system repositories.
     Latest kernel version available in updates: 3.10.0-1160.108.1.el7
     Loaded kernel version: 3.10.0-1160.102.1.el7
     Remediation: To proceed with the conversion, update the kernel version by executing the following step:

    1. yum install kernel-3.10.0-1160.108.1.el7 -y
    2. reboot
</code></pre>
<p>ဤပြဿနာကို ပြန်လည်ဖြေရှင်းရန်၊ အောက်ပါ command ကိုရိုက်ထည့်ပါ။</p>
<pre><code class="lang-plaintext">yum update -y &amp;&amp; reboot
</code></pre>
<h3 id="heading-step-5-running-convert2rhel"><strong>Step 5 : Running Convert2RHEL</strong></h3>
<p>ယခုသင် inhibitor ကို fixed လုပ်ပြီးသည်နှင့်သင်၏ system ကို RHEL သို့ပြောင်းမည်ဖြစ်သည်။</p>
<h3 id="heading-step-51-running-the-conversion"><strong>Step 5.1 : Running the conversion</strong></h3>
<pre><code class="lang-plaintext">convert2rhel --org 12451665 --activationkey convert2rhel -y
</code></pre>
<pre><code class="lang-plaintext">... output truncated ...

[07/22/2022 18:42:43] TASK - [Convert: Final system checks before main conversion] **************
Comparing the loaded kernel modules with the modules available in the following RHEL kernel packages available in the enabled repositories:

... output truncated ...

[07/22/2022 18:48:33] TASK - [Final: Remove temporary folder /var/lib/convert2rhel/] ************
Temporary folder /var/lib/convert2rhel/ removed

Conversion successful!

WARNING - In order to boot the RHEL kernel, restart of the system is needed.
</code></pre>
<p>Conversion ပြီးမြောက်ရန် 15 မိနစ်ခန့် ကြာနိုင်သည်။အပြောင်းအလဲများကို effect ဖြစ်စေရန် သင်သည် system အား reboot လုပ်ရန် လိုအပ်မည်ဖြစ်ပါသည်။</p>
<pre><code class="lang-plaintext">reboot
</code></pre>
<p>convert2rhel utility ကို run ခြင်းဖြင့်၊ System သည် ယခု CentOS signed packages များကို Red Hat signed versions များဖြင့် အစားထိုးပါမည်။ System ည် အချိန်အနည်းငယ် Reboot ပါမည်-</p>
<p>1: first time - ဤအပြောင်းအလဲများပြုလုပ်ရန် temporary environment သို့ boot စတင်</p>
<p>2: second time - SELinux contexts များပေါ်တွင် relabel ထည့်သွင်းရန်</p>
<p>3: final time - အသစ်ဖန်တီးထားသော RHEL environment သို့ boot စတင်</p>
<h3 id="heading-step-6-verifying-the-upgrade"><strong>Step 6 : Verifying the upgrade</strong></h3>
<p>ယခု သင်သည် သင်၏ New RHEL System သို့ ချိတ်ဆက်ထားပြီး၊ အောက်ပါ command ဖြင့် အတည်ပြုပါ။</p>
<pre><code class="lang-plaintext">cat /etc/redhat-release
</code></pre>
<pre><code class="lang-plaintext"># cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.9 (Maipo)
</code></pre>
<p>လိုအပ်သော Red Hat repositories များကို enabled လုပ်ထားကြောင်း စစ်ဆေးပါ။ ထို့အပြင်၊ Old CentOS repos များကို မရရှိနိုင်ကြောင်း သတိပြုပါ။</p>
<pre><code class="lang-plaintext">yum repolist
</code></pre>
<pre><code class="lang-plaintext">[root@centos ~]# yum repolist
Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager
Loading mirror speeds from cached hostfile
repo id                                                            repo name                                                                  status
convert2rhel-for-rhel-7-rpms                                       Convert2RHEL for OS 7                                                          10
rhel-7-server-rpms/7Server/x86_64                                  Red Hat Enterprise Linux 7 Server (RPMs)                                   33,833
repolist: 33,843
</code></pre>
<p>ယခု သင်သည် Conversion မှ Logs များကို ပြန်လည် review လုပ်နိုင်သည်။</p>
<pre><code class="lang-plaintext">less /var/log/convert2rhel/convert2rhel.log
</code></pre>
<pre><code class="lang-plaintext"># less /var/log/convert2rhel/convert2rhel.log

[07/22/2022 17:55:00] TASK - [Prepare: Show Red Hat software EULA] ******************************
The following text is a copy of the November 18, 2019 version of Red Hat GPLv2-Based End User License Agreement (EULA) [1].
For up-to-date version of the EULA, visit [2].
[1] https://www.redhat.com/licenses/Red_Hat_GPLv2-Based_EULA_20191118.pdf
[2] https://www.redhat.com/en/about/agreements

... output truncated ...
</code></pre>
<p>Tag - <code>#Linux</code>, <code>#RHEL</code>, <code>#CentOS</code>, <code>#Migration</code></p>
<p>My Linkedin Profile - <a target="_blank" href="https://www.linkedin.com/in/kyaw-thet-htun/">https://www.linkedin.com/in/kyaw-thet-htun/</a></p>
<h3 id="heading-thank-you-for-watching"><strong>Thank You For Watching</strong></h3>
]]></content:encoded></item><item><title><![CDATA[How to setup a password less SSH Connection between Windows and Linux]]></title><description><![CDATA[အားလုံးပဲ မင်္ဂလာပါ။ ကျွန်တော်အခုပြောပြမယ့် အကြောင်းအရာကတော့ ကျွန်တော်တို့ အသုံးပြုနေတယ့် windows ကနေ linux server ကို ssh နဲ့ login ဝင်တယ့် အကြောင်းကိုပြောပြပေးမှာဖြစ်ပါတယ်။ ဒီ lab မှာ linux ssh login ကို password less login နဲ့ အသုံးပြုမည့်အပြင် ss...]]></description><link>https://blog.vitaltechmyanmar.com/how-to-setup-a-password-less-ssh-connection-between-windows-and-linux</link><guid isPermaLink="true">https://blog.vitaltechmyanmar.com/how-to-setup-a-password-less-ssh-connection-between-windows-and-linux</guid><category><![CDATA[Linux]]></category><category><![CDATA[ssh]]></category><dc:creator><![CDATA[Htet Oo Wai Yan]]></dc:creator><pubDate>Wed, 04 Sep 2024 15:03:43 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1725462500314/6c8c8a96-4c32-4206-8d3c-ee471312240e.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>အားလုံးပဲ မင်္ဂလာပါ။ ကျွန်တော်အခုပြောပြမယ့် အကြောင်းအရာကတော့ ကျွန်တော်တို့ အသုံးပြုနေတယ့် windows ကနေ linux server ကို ssh နဲ့ login ဝင်တယ့် အကြောင်းကိုပြောပြပေးမှာဖြစ်ပါတယ်။ ဒီ lab မှာ linux ssh login ကို password less login နဲ့ အသုံးပြုမည့်အပြင် ssh login ကို 3rd party software တွေအသုံးပြုမပဲ ssh config file ရေးပြီး တော့ windows command prompt ကနေပဲ အသုံးပြုပြမှာပါ။ example အနေဖြင့်</p>
<pre><code class="lang-bash">ssh web01
</code></pre>
<p>ဆိုပြီးတော့ command prompt မှာ ရိုက်လိုက်တာနဲ့ linux server ထဲကို password မတောင်းပဲ တစ်ခါတည်း login ဝင်သွားအောင် setup လုပ်မှာဖြစ်ပါတယ်။ ဒီလိုအသုံးပြုခြင်းဖြင့် ကျွန်တော်တို့ server တွေထဲကို login ဝင်တဲ့ အခါမှာ ပိုမိုမြန်ဆန်ပြီးတော့ ကိုယ့် Server ရဲ့ ip address တွေကိုလဲ အပေါ်ယံအနေဖြင့် မသိနိုင်တော့ဘူးပေါ့။ ဆိုတော့ စလိုက်ကြရအောင်။</p>
<p>ကျွန်တော်တို့ linux server တွေထဲကို ပုံမှန်အတိုင်း login ဝင်တဲ့အခါမျိုးမှာ command prompt ကနေ</p>
<pre><code class="lang-bash">ssh redhat@192.168.109.136
</code></pre>
<p>ဆိုပြီးတော့ username ရယ် server ip ရယ်ရိုက်ထည့်လိုက်တာနဲ့ password ရိုက်ထည့်ခိုင်းမှာဖြစ်ပြီး password မှန်ရင်တော့ server ထဲကို login ဝင်သွားမည်ပဲဖြစ်ပါတယ်။ ဒီလိုအသုံးပြုခြင်းက server တစ်လုံးနှစ်လုံးဆို အဆင်ပြေပေမယ့် များစွာသော server တွေကို login ဝင်ရမယ့်အချိန်မှာ အဲ့လိုမျိုး အများကြီးထိုင်ရိုက်နေရတော့မယ်ဆိုရင် အဆင်ပြေမှာမဟုတ်တော့ပါဘူး။ အဲ့လိုမျိုးအခြေအနေမျိုးမှာ MobaXterm လိုမျိုး 3rd party software တွေ သုံးပြီး မိမိဝင်ချင်တယ့် server တွေကို တစ်ခါတည်း add ထားလို့ရပါတယ်။ ကျွန်တော်ကတော့ 3rd party software မသုံးပဲ Windows ရဲ့ command prompt ပဲအသုံးပြုပြီး setup လုပ်သွားမှာဖြစ်ပါတယ်။</p>
<p>First Step - ပထမဆုံးအနေနဲ့ ဘာအရင်လုပ်ရမလဲ ဆိုတော့ ကျွန်တော်တို့ အသုံးပြုနေတယ့် Windows မှာ ssh key ကို အရင်ဆုံး generate ထုတ်ရပါတယ်။ ဆိုတော့ command prompt ကိုဖွင့်ပြီး ssh-keygen ကိုပြီး ရိုက်ပါမယ်။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725455227680/4c85d569-519f-427d-bd36-2b5843d8ef0d.png" alt class="image--center mx-auto" /></p>
<p>ssh-keygen ရိုက်လိုက်တာနဲ့ generate ကိုထုတ်မယ့် file လမ်းကြောင်းလာပြပေးမှာဖြစ်ပြီးတော့ default အတိုင်းမလိုချင်ရင်တော့ ကိုယ်ဘာကို custom ပြန်ရေးပြီး ထုတ်လို့ရပါတယ်။ ကျွန်တော်ကတော့ ဒီမှာ လက်ရှိ directory အောက်မှာပဲ lab_key ဆိုပြီးတော့ထုတ်လိုက်ပါတယ်။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725460378716/19e9bd06-ea07-4c36-a6e4-6af4f68f5b20.png" alt class="image--center mx-auto" /></p>
<p>ထုတ်ပြီးသွားပီဆိုတော့ လက်ရှိ directory အောက်မှာ lab_key နဲ့ lab_key.pub ဆိုပြီး file လေးနှစ်ခု ရနေပါပီ။ အဲ့ဒီ file လေး နှစ်ဖိုင်ထဲကမှ ကျွန်တော်တို့ login ဝင်ချင်တဲ့ linux server ထဲကို public key file လေးကို copy ကူးပါမယ်။ scp ဆိုသည့် command ကိုအသုံးပြုပြီး windows command prompt ကိုပဲအသုံးပြုသွားပါမယ်။</p>
<pre><code class="lang-bash">scp lab_key.pub redhat@192.168.109.136:/home/redhat/.ssh/authorized_keys
</code></pre>
<p>ဒီလိုရိုက်လိုက်တာနဲ့ password ရိုက်ခိုင်းမည်ဖြစ်ပြီး server ရဲ့ redhat user ရဲ့ password ရိုက်ပေးရမည်ဖြစ်ပါသည်။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725461023172/190466a7-bf03-4025-a0a8-6428c616fc5b.png" alt class="image--center mx-auto" /></p>
<p>ပုံပါအတိုင်း server ထဲကို lab_key.pub ဆိုသည့် file ကို copy ကူးပြီးသွားပြီဖြစ်ပါသည်။ ဒါဆိုရင်တော့ server ထဲကို password မလိုပဲ login ဝင်လို့ရပြီဖြစ်ပါသည်။ အသုံးပြုသည့် command ကတော့</p>
<pre><code class="lang-bash">ssh -i lab_key redhat@192.168.109.136
</code></pre>
<p>ဒီလိုဆိုရင်တော့ server ထဲကို password မတောင်းပဲ login ဝင်သွားမှာပဲဖြစ်ပါတယ်။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725461347685/825ef1c4-2272-4524-b5d7-9a9a706d0364.png" alt /></p>
<p>ကျွန်တော်တို့ထပ်ပြီး လုပ်ချင်တာက server ရဲ့ username နဲ့ ip address ကြီးကို မရိုက်ချင်တာဆိုတော့ နောက်ထပ် ထပ်ပြီးတော့ လုပ်ဆောင်ပေးရမှာရှိပါတယ်။</p>
<p><strong>C:\Users\user_name\.ssh\</strong> ထဲမှာ Config ဆိုပြီးတော့ file လေး တစ်ဖိုင်ကို သွားဆောက်ပါမယ်။ file ဆောက်ပြီးပြီဆိုရင်တော့ အဲ့ ဖိုင်လေးကို ဖွင့်ပြီးတော့ ssh config လေးတွေရေးပါမယ်။</p>
<pre><code class="lang-bash">Host web01
  HostName 192.168.109.136
  User redhat
</code></pre>
<p>အဲ့ဒီ file လေးထဲမှာ အခုလိုမျိုး ရေးလိုက်ပါမယ်။ Host ကတော့ ကျွန်တော်ကတော့ ssh နဲ့ login ဝင်ရင် ကိုယ်အသုံးပြုချင်သည့် name ကို ထည့်ပေးရမည်ဖြစ်ပြီး , HostName မှာတော့ Server IP , User မှာတော့ သူ့ username ထည့်ပေးရပါမယ်။ ဒါဆိုရင် ကျွန်တော်တို့အသုံးပြုချင်သည့် ပုံစံအတိုင်းရပီပဲ ဖြစ်ပါသည်။</p>
<pre><code class="lang-bash">ssh -i lab_key web01
</code></pre>
<p>ဒါဆိုရင် ပထမကလို အရှည်ကြီး ရိုက်စရာမလိုတော့ပဲ name လေးပဲရိုက်လိုက်တာနဲ့ server ထဲ login ဝင်သွားပီပဲဖြစ်ပါသည်။</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1725461898262/29d59f0e-55ff-4482-a0c0-ce51e4193201.png" alt class="image--center mx-auto" /></p>
<p>ssh အနောက်က -i ဆိုတဲ့ options ကိုသုံးနေရခြင်းကတော့ ကျွန်တော်တို့က ssh key generate file ကို သူရဲ့ default key name ကိုမသုံးထားလို့ ရိုက်နေရခြင်းပြဖြစ်ပါတယ်။ key-gen ထုတ်တဲ့နေရာမှာ default အတိုင်းပဲထားခဲ့မယ် ဆိုရင် -i options သုံးစရာမလိုပဲ ssh web01 ဆိုပြီးပဲ အသုံးပြုလို့ရမည်ပဲဖြစ်ပါသည်။</p>
]]></content:encoded></item></channel></rss>