Infrastructure as code with Terraform on AWS

Netflix လို ထောင်နဲ့သောင်းနဲ့ ချီတဲ့ AWS Resource တွေကို Manually Manage လုပ်ဖို့ဆိုတာ အတော်ခက်ခဲပါတယ်။
Blue/Green Architecture လိုမျိုး Continuous Integration/Continuous Deployment လုပ်ဖို့ အတွက်ဆို ကျတော်တို့တွေ အရင်လို Manual လုပ်နေလို့မရပါဘူး။

Cloud Computing ခေတ်မှာ Resource တွေက ကြိုက်သလောက်သုံးကျသလောက် ရှင်းပုံစံနဲ့ သွားနေသလို။ Compute/Resource တခုခုကို Start/Stop လုပ်ရတာလဲ အရမ်းကို လွယ်ကူမြန်ဆန်လာပါတယ်။

ဒီတော့ ခုနောက်ပိုင်း Infrastructure as Code ဆိုတာ အရမ်းခေတ်စားလာတော့တာပေါ့။

Cloud ပေါ်မှာ Business Application တခုကို Distributed System, Micro-Service ပုံစံတွေ ဆောက်တဲ့ အခါ Resource တွေကို မြန်မြန်ဆန်ဆန်ဆောက်ပြီး စမ်းကြပါတယ်။ Staging, UAT လို မျိုးက အမြဲတမ်း Run ထားဖို့ မလိုပဲ လိုအပ်တဲ့ အခါမှ Resource တွေကို ချက်ချင်းဆောက်ပြီး Run and Test လုပ်နိုင်လာကြပါပြီ။

 ဒီတော့  လိုချင်တဲ့ Infrastructure မျိုးကို Code ရေး၊Template ထုတ်သိမ်းထားပြီး လိုအပ်တဲ့ အချိန်မှာ ကောက် Run လိုက်တဲ့အခါ အချိန်လဲကုန် သက်သာ အမှားကင်းတဲ့ Infra မျိုးရပြီး စမ်းလို့ရတာပေါ့။ စမ်းပြီး မလိုတော့တဲ့ အချိန်မှာလဲ Resource တွေကို Terminate လုပ်ပြီး ငွေကြေးကုန်ကျမှုကို ခြွေတာနိုင်ပါသေးတယ်။

ဒီအတွက် Infra as a code ဆိုတာဘာလဲ။ ဘယ်လိုမျိုးလဲဆိုတာ သိရအောင် အောက်က Youtube Video မှာ ကျတော်က Terraform ကို သုံးပြီး AWS ပေါ်မှာ VPC, Subnet နဲ့ EC2 Instance တွေကို အခြေခံ နမူနာ ဆောက်ပြထားပါတယ်။

https://youtu.be/dkJ1fr8-6h0

ကျေးဇူးတင်ပါတယ်။

ပျော်ရွှင်ပါစေဗျာ။
(Be knowledgeable, pass it on then)

No comments :

Post a Comment