Ansible 101 – Introduction to Ansible

ကျွန်တော် sharing လုပ်ချင်တာ က DevOps Automation Tool တစ်ခုဖြစ်တဲ့ Ansible အကြောင်း ကို sharing လုပ်ချင်ပါတယ်.

Ansible ကို သုံးပြီး Infrastructure as Code ( IaC ) and Configuration as Code ( CAC ) practice ကို Implement လုပ်လို့ရပါတယ်.

ကျွန်တော်တို့ Linux or Windows System Administration မှာ ခနခန run ရမဲ tasks တွေကို shell scripts or Powershell script တွေကို သုံးပြီး Automate လုပ်ကြပါတယ်. Shell scripts and Powershell script တွေကို သုံးရတာ ကောင်းပါတယ်, ဒါပေမဲ့ ရေးရတာနဲ့ maintain လုပ်ရတာ ခက်ပါတယ်.

Ansible ကို သုံးဖို programming ကို အနည်းငယ် နားလည်ဖို့ လိုပါတယ်. Ansible ကို Python နဲ့ ရေးထားလို့ Python Programming Language ကို နားလည်ရင်ပိုကောင်းပါတယ်.

Ansible ကို သုံးဖို့ managed node မှာ agent ရှိဖို့ မလိုပါဘူး. Ansible က Agentless Architecture ပါ.

Linux အတွက် OpenSSH ကို သုံးပြီး, Windows အတွက် WinRM ကိုသုံးပါတယ်.

Image by Red Hat

Ansible ကို သုံးပြီး IT Teams အလိုက် ကိုယ်သက်ဆိုင်ရာ အပိုင်းတွေကို Automate လုပ်လို့ရပါတယ်.

Image by Red Hat
Image by Red Hat
Image by Red Hat

Ansible ကိုသုံး ပြီး Automate လုပ်လိုရတဲ့ resources တွေကများပါတယ်.

Image by Red Hat
Image by Red Hat

*Ansible Infrastructure*

Ansible Infrastructure ကို အရင်ဆုံးကြည့်ရအောင်.

  • Ansible Automation Engine
  • Ansible Tower
  • Ansible SaaS

*Ansible Automation Engine*

Image by Red Hat

*Ansible Playbook*

Ansible Playbook ကို ကျွန်တော်တို့ YAML Syntax ကို သုံးပြီးရေးရပါတယ်. YAML က data serialization language ဖြစ်ပြီး configuration အတွက် သုံးတာများပါတယ်. Data ကို သိမ်းပြီး ပြန် transmit လုပ်တဲ့နေရာမှာ YAML and JSON ကအဆင်ပြေပါတယ်.

*Ansible Modules*

Ansible Modules တွေကို YAML file ထဲမှာ ထည့်ပြီး ခေါ်သုံးလို့ ရပါတယ်.

Ansible Modules တွေကို Python, Powershell ,အခြား Programming Language တွေနဲ့ ရေးထားပါတယ်. ကိုယ်တိုင် Module ရေးလို့လဲရပါတယ်.

Image by Red Hat

Ansible Modules တွေကို အောက်ပါ links မှာ ကြည့်ပါ. Ansible Modules တွေကို Ansible version 2.10 မှာ collections အနေနဲ့ သိမ်းထားပါတယ်.

https://docs.ansible.com/ansible/latest/collections/index.html#list-of-collections

*Ansible Plugins*

Ansible Engine ရဲ့ core function တွေကို Ansible Plugins သုံးပြီး ပိုကောင်းအောင်လုပ်လို့ရပါတယ်. Ansible plugins ကိုကိုယ်တိုင်ရေးလို့ရပါတယ်.

Image by Red Hat

Ansible built-in plugins တွေကိုအောက်ပါ links မှာ ကြည့်ပါ.

https://docs.ansible.com/ansible/latest/plugins/plugins.html

*Ansible Inventory*

Ansible Inventory ကိုကျွန်တော်တို့ Automate လုပ်မဲ့ Infrastructure ရဲ့ System တွေကို မှတ်ရာမှာသုံးပါတယ်. Cloud or on-premise အကုန်သုံးလို့ရပါတယ်.

Ansible Inventory ကို ini or yaml format ကိုသုံးပြီးရေးရပါတယ်.

Image by Red Hat

*Ansible CLI*

Ansible CLI မှာ ansible ( ad-hoc ) and ansible-plabook ကို အသုံးများပါတယ်.

အခြား Ansible CLI များကို အောက်ပါ links မှာကြည့်ပါ.

https://docs.ansible.com/ansible/latest/user_guide/command_line_tools.html

ansible-doc ကို သုံးပြီး Ansible Modules တွေရဲ့ manual ကို ဖတ်လို့ရပါတယ်.

 ansible-doc -l
 ansible-doc -l | grep -i 'aws'
 ansible-doc <module name>

*Ansible Cloud Provisioning*

Ansible Modules တွေကိုသုံးပြီး Public/Private Cloud တွေကို Infrastructure as Code (IaC) and Configuration as Code (CAC) practice နဲ့ Automate လုပ်လို့ရပါတယ်.

Image by Red Hat

Cloud Integration with Ansible

https://www.ansible.com/integrations/cloud

Image by Red Hat

*CMDB Integrate with Ansible*

Ansible ကို Configuration Management Database service တွေနဲ့ လဲ Integrate လုပ်လို့ရပါတယ်.

https://ansible-cmdb.readthedocs.io/en/latest/usage/

Image by Red Hat

*Infrastructure Automation with Ansible*

Ansible ကို သုံးပြီး IT Infrastructure တစ်ခုလုံးကို Automate လုပ််လို့ရပါတယ်.

Network, Database, Linux, Windows, Virtualization, Container and Security တော်တော်များကို Automate လုပ်လို့ရပါတယ်.

Cloud or on-premise အကုန်သုံးလို့ရပါတယ်.

https://www.ansible.com/integrations/infrastructure

Image by Red Hat

Ansible Projects ကို Red Hat က sponsor ပေးထားပါတယ်.

https://www.ansible.com/

Ansible ကို လေ့လာလိုလျှင်.

https://www.ansiblefordevops.com/

https://www.jeffgeerling.com/blog/2020/ansible-101-jeff-geerling-youtube-streaming-series

“Thanks”

Leave a Reply

Your email address will not be published. Required fields are marked *