본문 바로가기

DevOps

(36)
[AWS CLI] ECS 서비스 우선순위 기반 Task 분배 자동화 스크립트 작성 배경AWS ECS에는 Auto Scaling 기능이 있다. 하지만 때로는 두개 또는 세개의 서비스가 n개의 task 수를 적절히 나눠가져야 할 때가 생긴다..,그러나 기본 Auto Scaling으로는 안 된다. 그래서 Jenkins에서 AWS CLI로 오토스케일링을 구현했다. 스크립트- total은 31개 유지하기- svc-high-priority가 svc-low-priority 보다 우선순위가 높다.- svc-high-priority의 max capacity는 30으로 유지, svc-low-priority은 최소 1개는 유지- svc-high-priority가 30일 때, svc-low-priority는 1개만 가능- svc-high-priority가 15일 때, svc-low-prior..
[Helm] Spring Batch Helm으로 GKE Job 배포(젠킨스에서 배포) * 배치 잡을 GKE 파드 생성해서 돌리기 위한 여정 중🏃‍♀️ TODO https://juyeonee826.tistory.com/188 [Helm] Spring Batch Helm으로 GKE Job 배포(로컬 테스트) * 배치 잡을 GKE 파드 생성해서 돌리기 위한 여정 중🏃‍♀️ TODO https://juyeonee826.tistory.com/187 [GKE/K8S] GKE 생성, Spring batch job 실행(Cloud Shell 사용) * 배치 잡을 GKE 파드 생성해서 돌리기 위한 여정 중 juyeonee826.tistory.com 이것을 젠킨스에서 해내야한다. helm 차트 배포 jenkins 다시 띄우기 helm, gcloud, google-cloud-sdk-gke-gcloud-aut..
[Helm] Spring Batch Helm으로 GKE Job 배포(로컬 테스트) * 배치 잡을 GKE 파드 생성해서 돌리기 위한 여정 중🏃‍♀️ TODO https://juyeonee826.tistory.com/187 [GKE/K8S] GKE 생성, Spring batch job 실행(Cloud Shell 사용) * 배치 잡을 GKE 파드 생성해서 돌리기 위한 여정 중🏃‍♀️ TODO 이제 이미지를 배포했으니 쿠버네티스에서 spring batch job을 실행해야 한다. VPC, Subnet 생성 Cloud SQL 접근을 위한 Cloud NAT 게이트웨이 juyeonee826.tistory.com 위에서 진행한 GKE job 배포를 helm을 사용해서 할 것이다. helm 설치 brew install helm helm version helm 디렉토리 생성 헬름 차트를 생성할 디렉토리..
[GKE/K8S] GKE 생성, Spring batch job 실행(Cloud Shell 사용) * 배치 잡을 GKE 파드 생성해서 돌리기 위한 여정 중🏃‍♀️ TODO 이제 이미지를 배포했으니 쿠버네티스에서 spring batch job을 실행해야 한다. VPC, Subnet 생성 Cloud SQL 접근을 위한 Cloud NAT 게이트웨이 생성 비공개 클러스터 생성 VPC, Subnet 생성 default vpc가 있지만 개발 환경에 따라 네트워크를 분리하고, NAT 게이트웨이를 적용하기 위해 VPC, Subnet을 새로 생성했다. vpc 생성 gcloud compute networks create VPC_NAME \ --subnet-mode custom 서브넷 생성 IP 범위는 공식 문서에 있는대로 했다. gcloud compute networks subnets create SUBNET_NAME..
Spring Batch 프로젝트 GCP Artifact Registry 배포(젠킨스에서 배포) * 배치 잡을 GKE 파드 생성해서 돌리기 위한 여정 중🏃‍♀️ TODO https://juyeonee826.tistory.com/185 Spring Batch 프로젝트 GCP Artifact Registry 배포(로컬에서 배포) * 배치 잡을 GKE 파드 생성해서 돌리기 위한 여정 중🏃‍♀️ TODO Spring Batch 프로젝트를 Jenkins를 이용해서 GCP Artifact Registry에 배포할 것이다. 로컬에 gcloud CLI 설치 공식 문서에서는 SDK 다운로드 해 juyeonee826.tistory.com 이제 Spring batch GCP Artifact Registry 배포를 젠킨스에서 해내야한다. gcloud CLI 사용 가능한 jenkins로 컨테이너 다시 띄울 것이고, jen..
Spring Batch 프로젝트 GCP Artifact Registry 배포(로컬에서 배포) * 배치 잡을 GKE 파드 생성해서 돌리기 위한 여정 중🏃‍♀️ TODO Spring Batch 프로젝트를 Jenkins를 이용해서 GCP Artifact Registry에 배포할 것이다. 로컬에 gcloud CLI 설치 공식 문서에서는 SDK 다운로드 해서 압축 풀고 그렇게 하라길래 지선생이 알려준 방법으로 설치했다. brew install --cask google-cloud-sdk gcloud init gcloud init을 하면 gcp 콘솔 창이 켜지면서 로그인이 완료된다. 저장소 생성 Artifact Registry에 이미지를 배포할 저장소를 만들어준다. gcloud artifacts repositories create quickstart-docker-repo --repository-format=..
[Github Actions] Workflow에 JDK 17 설정하기 소나큐브를 위해 github actions를 사용하고 있었는데, jdk 17을 사용하는 프로젝트에서 문제가 일어났다. java 17을 만나고 너무 자주 본 메세지다,,,invalid source release: 17 Step 추가아래와 같이 jdk 17 설정을 추가하면 된다.- name: Set up JDK 17 uses: actions/setup-java@v3 with: java-version: '17' distribution: 'adopt' 참고https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-ant Building and testing Java with Ant - GitHub Doc..
[Jenkins] Job DSL로 Pipeline 프로젝트 생성 TODOhttps://juyeonee826.tistory.com/180 NodeJS 애플리케이션 Docker 배포하는 Jenkins Pipeline 생성* 아래 강의 학습 중📚 Udemy - DevOps 학습: 파이프라인 및 Docker를 이용한 Jenkins 와의 CI/CD 환경 jenkins 2.401.3 TODO https://juyeonee826.tistory.com/177 Jenkins로 NodeJs 애플리케이션 Docker 배포 * 아래 강의 학습 중juyeonee826.tistory.com여기서 UI로 생성하는 Pipeline Project를 Job DSL로 생성해보려고 한다.  job dsl 코드 작성docker_demo_pipeline.groovypipelineJob('nodejs pi..