분류 전체보기 29

airflow configuration 주요 파라미터

간단하게 적어본 주요 airflow configuration 파라미터 airflow web에 hostname출력여부 expose_hostname= True metrics 사용 statsd_on= True custom xcom사용시 xcom_backend=plugins.airflow-plugin.custom_xcom.CustomXComBackendS3 - DagFileProcessManager관련(dag객체로 전환할 파일감지/제외) ## 300, 신규(또는 수정된)dag파일 scan주기 dag_dir_list_interval=120 기본적인 dag패치 loop주기(변경안된파일, 최근 수정된 파일은 list제외) min_file_process_interval=30 - DagFileProcessorProces..

airflow 2024.03.19

calico설치 &upgrade

tigera-operator를 활용한 calcio권장 *버전 확인: https://docs.tigera.io/calico/latest/getting-started/kubernetes/requirements System requirements | Calico Documentation Review requirements before installing Calico to ensure success. docs.tigera.io * calico 3.26을 쓰다가 버그문제로,3.27로 업글 (이거였나, sts, deployment삭제하면, pod삭제가안됨..https://github.com/projectcalico/calico/issues/5715 ) 1.이미지준비 *폐쇄망에서는 operator이미지 받고,, 아래..

폐쇄망 onpremise k8s 셋업

os: centos7 1.기본 리눅스 설정 1-0. dns설정 #dns서버추가설정 /etc/resolv.conf /etc/hosts 1-1.selinux 설정 production환경에서는 selinux를 활용하는것이 좋다. + securitycontext로 시스템접근제한을 거는게 좋다. 우리는 편의를 위해서 disable sudo sed -i 's/^SELINUX=enforcing$/SELINUX=disabled/' /etc/selinux/config #확인 sestatus 1-2. swap off설정 # swap off하고 fstab의 swap 주석처리 sudo swapoff -a && sudo sed -i '/swap / s/^/$/' /etc/fstab 1-3 firewall 해제 sudo syst..

vGPU활용한 학습/serving환경

1.vGPU환경 -특징1: 클라우드기반 vGPU환경 vGPU: 물리 GPU를 vm에 할당하여 사용 gpu: slice방식으로 공유 gpu memory: 전용할당 특징2: 가상Container환경 gpu를 사용한 딥러닝학습위해서는 driver와 cuda, cudnn라이브러리 필요 => gpu driver는 vm 서버에 설치, cuda 및 cudnn은 설치된 이미지를 가상 컨테이너환경으로 사용자에게 제공 이점: 1.모델학습 측면: gpu학습환경(cuda, cudnn등)을 유저가 직접설치하기에는 복잡-> 모델개발에 필요한 환경을 편리하게 제공 2.모델의 비지니스서비스화 측면: 학습환경과 동일한 dependency를 가진 환경을 쉽게 제공함으로써 모델성능의 재현성을 높일수 있다. 2.vGPU container학..

MLOps/GPU 2024.03.18

prometheus operator

https://prometheus-operator.dev/docs/operator/high-availability/ High Availability High Availability is a must for the monitoring infrastructure. prometheus-operator.dev HA prometheus는 기본적으로 고가용성을 제공하지않는다. 고가용성을 이루기위해서는 thanos를 함께 사용해야한다. prometheus instance를 여러개 (kubernetis에서는 replica)로 구성시 각 prometheus는 독립적으로 metric을 수집하고 독립적으로 alert 룰을 평가한다. 이때 각 pod(instance)별로 수집시간이 조금씩 다를수있으며 완전히 동일한 metri..

grafana metric 수집이슈

grafana exporter 및 servicemonitor 셋업을 하고 prometheus에 잘수집되는지 확인해보았더니 다음과같은 에러가 났다. x509: certificate signed by unknown authority for prometheus Hi, 사실 이 에러자체는 prometheus에 tls insecure설정을 함으로써 회피가 가능하나. 나는 그것외에도 특이한점을 발견했다. endpoint는 pod ip:pod port/metrics 로 되어있는데 ERROR로그에는 Get :/metrics로 redirect되어있는것이다. 이로인해 발생한 에러였고, 이 원인을 먼저확인해야했다. k8s서버에서 curl pod ip:pod port를 날리면 아래와 같이 redirect 경로를 return해..

prometheus operator

prometheus의 단점은 polling방식의 수집으로 인해서, 새로운 exporter가 추가될 경우, prometheus서버의 config 또는 configmap의 해당 exporter수집경로를 등록하고, prometheus를 재시작해야한다는점이다. prometheus operator를 통해서 해결할수있다. 기존에는 app -> exporter -> prometehus서버 순으로 수집된다면, app->exporter->servicemonitor->prometheus 서버로 수집된다. 조금더 보면 servicemonitor는 k8s CRD 리소스로 샘플 매니페스트는 다음과같다. apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: na..

DAG ~ seems to be missing from DagBag

1.현상 DAG ~ seems to be missing from DagBag 특정 dag가 안보이는 문제가 생김 ->scheduler 로그 확인해봄 pq: could not resize shared memory segment "/PostgreSQL.2058389254" to 12615680 bytes: No space left on device 2.원인 airflow의 external database인 postgresql 3개 pod 의 shm size 확인 -> 1번 data pod의 shm이 full shm 64M 64M 176K 100% /dev/shm 3.조치 - postgresql statefulset의 memory limit 늘림 - memory사이즈에 이어서 shared memory 사이즈 ..

airflow 2024.03.13