CI CD with Azure pipeline - HiroSung/Study GitHub Wiki

Intro

  • 2020-07-17 . 정자 806.
  • 계정정보 : ~~ RG : admin29-rg / 클러스터 : admin29-k8s / 컨테이너 레지스트리 : admin29acr /
  • 복습
az account set --subscription "종량제3"
# Azure 클러스터 생성
az aks create --resource-group admin29-rg --name admin29-k8s --node-count 1 --enable-addons monitoring --generate-ssh-keys
# Azure 클러스터 토큰 가져오기
az aks get-credentials --resource-group admin29-rg --name admin29-k8s
# Azure 컨테이너 레지스트리 생성
az acr create --resource-group admin29-rg --name admin29acr --sku Basic
kubecel get all  : 생성정보 확인
ls -al
# Azure 클러스터에 레지스트리 붙이기
az aks update -n admin29-k8s -g admin29-rg --attach-acr admin29acr

1. DevOps Process and Tools / Deploy Strategies

  • MSA -> CNA, DevOps -> Biz DevOps
  • Dockering CI : Containering -> CD
  • CI의 첫 출발은 소스코드 레파지토리 도착은 ACR
  • CD의 출발은 CR 종착은 쿠버네티스
  • 지속적인 서비스 제공 (Continuous Deploy) 지속적인 배포 (Continuous Deployment)
  • Consumer Driven Testing (Contract Test)
    • 서비스 제공자가 내 서비스를 사용하는 소비자에 대한 정보 및 규약 유지

2.Version Control , Source Code Management

2.1 git

admin29@Azure:~/git$ git init
Initialized empty Git repository in /home/admin29/git/.git/
admin29@Azure:~/git$ git add 파일
admin29@Azure:~/git$ git commit -m "메시지"
admin29@Azure:~/git$ git remote add origin [git 경로]
  • git config --global user.name : 이름/이메일로 누가 처리했는지 확인하기 위함.
  • git push -u origin master

3.Java build automation tools

  • 빌드 자동화 툴

3.1 Maven 핵심 개념

  • Plugin
  • Lifecycle :compile > test > package > install > deploy
  • Dependency : jar 파일
  • Profile
  • POM : pom.xml

4.Azure Devops

5.Azure Pipeline

  1. 리소스를 찍는다.
  2. 파이프라인의 템플릿을 지정함.
  • Container registry : 전체 경로
  • Container repository : 이미지명

5.1 CI/CD #1 Dockerizing & API Based Containerizing

5.2 CI/CD #2 Dockerizing & YAML 기반 CD Pipeline

CF