티스토리 뷰
안녕하세요. AWS Blueprints Hands On 내용을 공유하기 위해 작성한 글입니다.
참고 : https://catalog.workshops.aws/eks-blueprints-for-cdk/en-US
1. Create multiple EKS clusters using Pipelines
2. Implement Blueprints add-ons
3. Deploy your teams’ workloads
GitOps를 쓰는 이유
- 개발자에게 익숙한 절차
- 빠른 복구와 자동화
- 여러 배포 모드 작동 가능
- 확장성 및 안정성
- 실행 중인 환경에서 애플리케이션 분리됨
ArgoCD
Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. The Argo CD add-on provisions ArgoCD into an EKS cluster, and can optionally bootstrap your workloads from public and private Git repositories.
Configure and Deploy EKS Clusters
argo addon 참고 : https://aws-quickstart.github.io/cdk-eks-blueprints/getting-started/
// lib/pipeline.ts
import * as cdk from 'aws-cdk-lib';
import { Construct } from 'constructs';
import * as blueprints from '@aws-quickstart/eks-blueprints';
import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions';import { TeamPlatform, TeamApplication } from '../teams'; // HERE WE IMPORT TEAMSexport default class PipelineConstruct extends Construct {
constructor(scope: Construct, id: string, props?: cdk.StackProps){
super(scope, id)const account = props?.env?.account!;
const region = props?.env?.region!;
const blueprint = blueprints.EksBlueprint.builder()
.account(account)
.region(region)
.addOns(
new blueprints.ClusterAutoScalerAddOn,
new blueprints.ArgoCDAddOn
)
.teams(new TeamPlatform(account), new TeamApplication('burnham',account)); // HERE WE ADD THE TEAMS
blueprints.CodePipelineStack.builder()
.name("eks-blueprints-workshop-pipeline")
.codeBuildPolicies(blueprints.DEFAULT_BUILD_POLICIES)
.repository({
codeCommitRepoName: 'my-eks-blueprints-pipeline',
targetRevision: 'main',
codeCommitOptions:{
trigger: cpactions.CodeCommitTrigger.EVENTS
}
})
// WE ADD THE STAGES IN WAVE FROM THE PREVIOUS CODE
.wave({
id: "envs",
stages: [
{ id: "dev", stackBuilder: blueprint.clone('us-west-2')},
{ id: "test", stackBuilder: blueprint.clone('us-east-2')},
{ id: "prod", stackBuilder: blueprint.clone('us-east-1')}
]
})
.build(scope, id+'-stack', props);
}
}
//new blueprints.ArgoCDAddOn 추가
// lib/pipeline.ts
.addOns(
new blueprints.ClusterAutoScalerAddOn,
new blueprints.ArgoCDAddOn
)
kubectl update
aws eks update-kubeconfig — region us-west-2 — name dev-blueprint — role-arn <arn:aws:iam::XXXXXXXXXXX>
Manage workloads on ArgoCD
Expose argocd-server
kubectl patch svc blueprints-addon-argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'export ARGOCD_SERVER=`kubectl get svc blueprints-addon-argocd-server -n argocd -o json | jq --raw-output '.status.loadBalancer.ingress[0].hostname'`kubectl get svc -n argocd
EKS Blueprints 오픈소스
- https://github.com/aws-quickstart/cdk-eks-blueprints
- 샘플 워크로드/애플리케이션 : https://github.com/aws-samples/eks-blueprints-workloads
- 샘플 패턴 : https://github.com/aws-samples/cdk-eks-blueprints-patterns
blog migration project
written in 2022.10.5
https://medium.com/techblog-hayleyshim/aws-eks-hands-on-blueprints-b44d6083ce8f
'IT > Infra&Cloud' 카테고리의 다른 글
[aws] Developing on AWS (0) | 2023.10.29 |
---|---|
[aws] EKS Hands On — EKS Anywhere (0) | 2023.10.29 |
[aws] EKS Hands On — Security (0) | 2023.10.29 |
[aws] EKS Hands On — deploy MSA, health checks (0) | 2023.10.29 |
[aws] GuardDuty, Macie, Inspector (0) | 2023.10.29 |
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- 파이썬
- SDWAN
- AI
- k8s calico
- k8s
- NW
- k8s cni
- 도서
- cni
- gcp serverless
- 국제 개발 협력
- GKE
- 혼공단
- operator
- controltower
- PYTHON
- handson
- VPN
- EKS
- cloud
- NFT
- AWS
- 혼공파
- OS
- terraform
- S3
- security
- GCP
- IaC
- 혼공챌린지
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함