AWS Automation With AWX ( Ansible Tower Upstream Project )

ကျွန်တော် sharing လုပ်ချင်တာက AWS ကို AWX သုံးပြီး Automation ( IaC & CAC ) နဲ့ ဘယ်လို manage လုပ်ရမလဲကို sharing လုပ်ချင်ပါတယ်.

ကျွန်တော်တို့ High Level Design ( HLD ) ကို အရင်ကြည့်ရအောင်.

*Prerequisites*

  • Linux host for AWX or Ansible Tower Installation
  • AWS Root Account or IAM Account
  • AWS Programmatic Access
  • Git Account
  • Microsoft VSCode or IDE
  • AWX Installation
  • AWX Inventory, Credentials, Projects, and Templates Usage

*Linux host for AWX or Ansible Tower Installation*

ကျွန်တော်တို့ Linux host အတွက် Redhat or Debian ကြိုက်တာ သုံးလို့ရပါတယ်.

on-premises or cloud ပေါ်မှာ Install လုပ်လို့ရပါတယ်.

https://github.com/ansible/awx

ကျွန်တော်က kvm (virtualization) ပေါ်မှာ deploy လုပ်ထားပါတယ်, ကိုယ်ကြိုက်တဲ့ virtualization ကိုသုံးလို့ရပါတယ်.

*AWS Root Account or IAM Account*

အရင်ဆုံး ကျွန်တော်တို့ AWS Root Account or IAM Account တစ်ခု create လုပ်ပါ.

IAM Account ကို Admin Policy attach လုပ်ပါ.

*AWS Programmatic Access*

ကျွန်တော်တို့ access key & secret access key id ကို Download ယူထားပါ.

*Git Account*

AWS ကို AWX မှာ Automation ( IaC or CAC ) နဲ့ manage လုပ်ဖို့ git account တစ်ခု လိုအပ်ပါတယ်.

https://github.com/

*Microsoft VSCode or IDE*

Ansible playbook ရေးဖို့နဲ့ github ပေါ်တင်ထားတဲ့ project တွေကို manage လုပ်ဖို့ ပါ.

*AWX Installation*

AWX ကို CentOS or Ubuntu ပေါ်မှာ Deploy လုပ်ပြီးရင် ကျွန်တော်တို့ လိုအပ်တဲ့ inventory, credentials, projects တို့ကို create လုပ်ရပါမယ်.

ကျွန်တော်က AWX ကို CentOS 8 ပေါ်မှာ Docker နဲ့ Install လုပ်ထားပါတယ်. AWX က Ansible Tower ရဲ့ upstream project ဖြစ်လို့ Ansible Tower နဲ့ စမ်းရင်လဲရပါတယ်.

AWX Latest Version ကို minikube ပေါ်မှာ လဲ deploy လုပ်ထားပါတယ်.

#For Ansible Tower

https://docs.ansible.com/ansible-tower/latest/html/quickinstall/index.html#

https://ansible.github.io/workshops/exercises/ansible_f5/4.0-explore-tower/

#For AWX

https://github.com/ansible/awx

*AWX*

AWX UI ကိုကြိုက်ရာ browser သုံးပြီး login ဝင်ပါ.

*AWX Inventory, Credentials, Projects, Inventory ,and Templates Usage*

AWS ကို Automation နဲ့ manage လုပ်ဖို့ လိုအပ်တဲ့ Inventory, project, credentials and templates ကို AWX မှာ create လုပ်ပါ.

#Inventory

#credentials

ကျွန်တော်တို့ aws programmatic access အတွက် ထုတ်ထားတဲ့ access key & secret key ကိုဖြည့်ပါ.

#projects

ကျွန်တော်က project အတွက် git ကိုသုံးထားပါတယ်.

#aws sample project

https://github.com/Htunn/ansible_aws

*Templates*

AWS ကို Automation နဲ့ manage လုပ်ဖို့ templates တစ်ခု create လုပ်ပါ.

ကျွန်တော်တို့ aws console မှာ check လုပ်လို့ရပါတယ်.

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

https://ansible.github.io/workshops/

https://www.ansiblefordevops.com/

“Thanks For Your Time, Mate”

Leave a Reply

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