PlAwAnSaI
Administrator
Azure Pipeline:
Thread นี้ให้คำแนะนำเกี่ยวกับการ Deploy Private Workload บน Amazon EKS โดยใช้ Azure Pipeline การรวมกันระหว่าง Azure Pipeline และ AWS ช่วยให้สามารถ Deploy และจัดการ Kubernetes App ได้อย่างราบรื่นใน Private Environment ของ AWS
วัตถุประสงค์ของการใช้ Azure Pipeline สำหรับ Workload บน AWS คือการใช้ประโยชน์จาก Platform CI/CD ที่ทรงพลังและยืดหยุ่น ซึ่งรองรับการทำงานข้ามผู้ให้บริการ Cloud หลายราย ช่วยเพิ่มประสิทธิภาพในกระบวนการพัฒนาและ Deploy App ที่ทำงานบน AWS วิธีการนี้สอดคล้องกับหลักการของ DevOps ที่เน้นความร่วมมือ การทำงานอัตโนมัติ และการส่งมอบ Software อย่างรวดเร็ว
Thread นี้เป็นคู่มือแบบย่อสำหรับการนำ Azure Pipeline และการผสานรวมกับ AWS มาใช้งาน โดยมุ่งเน้นที่ Best Practice ด้าน CI/CD, คุณภาพของ Code และการ Deploy App บน Elastic Kubernetes Service (EKS)
ด้วยการผสานรวม Azure Pipeline กับ AWS EKS อย่างไร้รอยต่อ Solution นี้ช่วยให้งาน CI/CD เป็นไปโดยอัตโนมัติสำหรับการ Deploy ที่มีประสิทธิภาพและคุณภาพสูง นอกจากนี้ยังส่งเสริมความร่วมมือและเพิ่มประสิทธิภาพในการ Deploy บน EKS อีกด้วย
ผมจะใช้ Amazon Elastic Container Registry (ECR) แทน Docker Hub นะคับ ใช้ Free Tier น่าจะ Free สำหรับ Private Repo 500 MB, Data Transfer Out ภายใน Region เดียวกัน Free
มาเริ่มกันเลยคับ:
school.borntodev.com
github.com

Code:
https://medium.com/@abdulfayis/azure-pipelines-and-aws-workloads-02b1b979c22e
Thread นี้ให้คำแนะนำเกี่ยวกับการ Deploy Private Workload บน Amazon EKS โดยใช้ Azure Pipeline การรวมกันระหว่าง Azure Pipeline และ AWS ช่วยให้สามารถ Deploy และจัดการ Kubernetes App ได้อย่างราบรื่นใน Private Environment ของ AWS
วัตถุประสงค์ของการใช้ Azure Pipeline สำหรับ Workload บน AWS คือการใช้ประโยชน์จาก Platform CI/CD ที่ทรงพลังและยืดหยุ่น ซึ่งรองรับการทำงานข้ามผู้ให้บริการ Cloud หลายราย ช่วยเพิ่มประสิทธิภาพในกระบวนการพัฒนาและ Deploy App ที่ทำงานบน AWS วิธีการนี้สอดคล้องกับหลักการของ DevOps ที่เน้นความร่วมมือ การทำงานอัตโนมัติ และการส่งมอบ Software อย่างรวดเร็ว
Thread นี้เป็นคู่มือแบบย่อสำหรับการนำ Azure Pipeline และการผสานรวมกับ AWS มาใช้งาน โดยมุ่งเน้นที่ Best Practice ด้าน CI/CD, คุณภาพของ Code และการ Deploy App บน Elastic Kubernetes Service (EKS)
ด้วยการผสานรวม Azure Pipeline กับ AWS EKS อย่างไร้รอยต่อ Solution นี้ช่วยให้งาน CI/CD เป็นไปโดยอัตโนมัติสำหรับการ Deploy ที่มีประสิทธิภาพและคุณภาพสูง นอกจากนี้ยังส่งเสริมความร่วมมือและเพิ่มประสิทธิภาพในการ Deploy บน EKS อีกด้วย
ผมจะใช้ Amazon Elastic Container Registry (ECR) แทน Docker Hub นะคับ ใช้ Free Tier น่าจะ Free สำหรับ Private Repo 500 MB, Data Transfer Out ภายใน Region เดียวกัน Free
มาเริ่มกันเลยคับ:
School borntoDev
- อันดับแรกสร้าง Organization ใน Azure DevOps กันก่อน:
Code:https://www.youtube.com/watch?v=1nPKdG2EZT8&list=PLHJYxRaIqrLR4WH9ZQT-BXRcqotC8MVrv&index=1
- สร้าง 2 Project: สำหรับเก็บ Code และ Security
- ตัวอย่างนี้เราจะลองทำ Website Valentine กัน ก็ไป Import repository มา (https://github.com/goragodwiriya/valentine.git)
- สร้าง Dockerfile (Azure DevOps จะทำ Version Control ให้เราโดยอัตโนมัติทุก File)
Code:# ใช้ Nginx เป็น Base Image FROM nginx:latest # คัดลอก File HTML และ Folder ทั้งหมดไปยังตำแหน่งที่ Nginx ใช้เก็บ File COPY ./ /usr/share/nginx/html/ # เปิด Port 80 สำหรับให้บริการ Web EXPOSE 80
- ทำ Pipeline CI Push ไป AWS ECR
Share Tip ในการสร้างและจัดการ AWS Account เพื่อใช้ Lab ของผม
https://nopnithi.medium.com/a86e5d6abd16 ก็คล้ายๆ กันคับ สรุปเป็นข้อๆ ตามนี้: สร้าง Email Forwarding ชื่อใหม่ https://nopnithi.medium.com/tips-and-tricksในการสมัครใช้งาน-aws-account-free-tier-เพื่อ-lab-921c33a54ff8 สร้าง Account AWS Root ใหม่ ผูก Multi Factor Authentication (MFA) ทั้ง Root &...thaicpe.com
Code:{ "Version": "2012-10-17", "Statement": [ { "Sid": "ListImagesInRepository", "Effect": "Allow", "Action": [ "ecr:ListImages" ], "Resource": "arn:aws:ecr:ap-southeast-7:381491935:repository/valentine" }, { "Sid": "GetAuthorizationToken", "Effect": "Allow", "Action": [ "ecr:GetAuthorizationToken" ], "Resource": "*" }, { "Sid": "ManageRepositoryContents", "Effect": "Allow", "Action": [ "ecr:GetDownloadUrlForLayer", "ecr:BatchGetImage", "ecr:CompleteLayerUpload", "ecr:DescribeImages", "ecr:DescribeRepositories", "ecr:UploadLayerPart", "ecr:ListImages", "ecr:InitiateLayerUpload", "ecr:BatchCheckLayerAvailability", "ecr:GetRepositoryPolicy", "ecr:PutImage" ], "Resource": "arn:aws:ecr:ap-southeast-7:381491935:repository/valentine" } ] }Code:https://docs.aws.amazon.com/AmazonECR/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-access-one-bucket
- https://github.com/ThaiCPE/90DaysOfDevOps/blob/main/ci.yaml
GitHub - ThaiCPE/platform-engineering-1
Contribute to ThaiCPE/platform-engineering-1 development by creating an account on GitHub.
Last edited: