Skip to main content
NetApp Solutions
본 한국어 번역은 사용자 편의를 위해 제공되는 기계 번역입니다. 영어 버전과 한국어 버전이 서로 어긋나는 경우에는 언제나 영어 버전이 우선합니다.

Apache Airflow Deployment

기여자

이 섹션에서는 Kubernetes 클러스터에 공기 흐름을 구축하기 위해 완료해야 하는 작업에 대해 설명합니다.

참고 Kubernetes 이외의 플랫폼에 공기 흐름을 배포할 수 있습니다. Kubernetes가 아닌 다른 플랫폼에 공기 흐름을 배포하는 것은 이 솔루션의 범위를 벗어납니다.

필수 구성 요소

이 섹션에 요약된 배포 연습을 수행하기 전에 이미 다음 작업을 수행했다고 가정합니다.

  1. Kubernetes 클러스터 작업이 이미 진행 중입니다.

  2. Kubernetes 클러스터에 NetApp Astra Trident를 이미 설치하고 구성했습니다. Astra Trident에 대한 자세한 내용은 를 참조하십시오 "Astra Trident 문서".

제어 장치를 설치합니다

Kubernetes의 유명 패키지 매니저인 Helm을 사용하여 공기 흐름을 구축합니다. 공기 흐름을 배치하기 전에 배포 점프 호스트에 Helm을 설치해야 합니다. 배포 점프 호스트에 Helm을 설치하려면 에 따르십시오 "설치 지침" 공식 Helm 문서.

기본 Kubernetes StorageClass를 설정합니다

공기 흐름을 구축하기 전에 Kubernetes 클러스터 내에서 기본 StorageClass를 지정해야 합니다. Airflow 배포 프로세스는 기본 StorageClass를 사용하여 새 영구 볼륨의 프로비저닝을 시도합니다. 기본 StorageClass로 지정된 StorageClass가 없으면 배포가 실패합니다. 클러스터 내에서 기본 StorageClass를 지정하려면 에 설명된 지침을 따릅니다 "Kubeflow 구축" 섹션을 참조하십시오. 클러스터 내에서 기본 StorageClass를 이미 지정한 경우에는 이 단계를 건너뛸 수 있습니다.

Helm을 사용하여 공기 흐름을 전개하십시오

Helm을 사용하여 Kubernetes 클러스터에 공기 흐름을 배포하려면 배포 점프 호스트에서 다음 작업을 수행하십시오.

  1. 에 따라 헬름으로 공기 흐름을 전개하십시오 "배포 지침" Artifact Hub의 공식 공기 흐름 도표입니다. 다음 명령 예는 Helm을 사용한 공기 흐름의 배치를 보여줍니다. 환경과 원하는 구성에 따라 필요에 따라 'custom-values.yAML' 파일에서 값을 수정, 추가 및/또는 제거합니다.

    $ cat << EOF > custom-values.yaml
    ###################################
    # Airflow - Common Configs
    ###################################
    airflow:
      ## the airflow executor type to use
      ##
      executor: "CeleryExecutor"
      ## environment variables for the web/scheduler/worker Pods (for airflow configs)
      ##
      #
    ###################################
    # Airflow - WebUI Configs
    ###################################
    web:
      ## configs for the Service of the web Pods
      ##
      service:
        type: NodePort
    ###################################
    # Airflow - Logs Configs
    ###################################
    logs:
      persistence:
        enabled: true
    ###################################
    # Airflow - DAGs Configs
    ###################################
    dags:
      ## configs for the DAG git repository & sync container
      ##
      gitSync:
        enabled: true
        ## url of the git repository
        ##
        repo: "git@github.com:mboglesby/airflow-dev.git"
        ## the branch/tag/sha1 which we clone
        ##
        branch: master
        revision: HEAD
        ## the name of a pre-created secret containing files for ~/.ssh/
        ##
        ## NOTE:
        ## - this is ONLY RELEVANT for SSH git repos
        ## - the secret commonly includes files: id_rsa, id_rsa.pub, known_hosts
        ## - known_hosts is NOT NEEDED if `git.sshKeyscan` is true
        ##
        sshSecret: "airflow-ssh-git-secret"
        ## the name of the private key file in your `git.secret`
        ##
        ## NOTE:
        ## - this is ONLY RELEVANT for PRIVATE SSH git repos
        ##
        sshSecretKey: id_rsa
        ## the git sync interval in seconds
        ##
        syncWait: 60
    EOF
    $ helm install airflow airflow-stable/airflow -n airflow --version 8.0.8 --values ./custom-values.yaml
    ...
    Congratulations. You have just deployed Apache Airflow!
    1. Get the Airflow Service URL by running these commands:
       export NODE_PORT=$(kubectl get --namespace airflow -o jsonpath="{.spec.ports[0].nodePort}" services airflow-web)
       export NODE_IP=$(kubectl get nodes --namespace airflow -o jsonpath="{.items[0].status.addresses[0].address}")
       echo http://$NODE_IP:$NODE_PORT/
    2. Open Airflow in your web browser
  2. 모든 공기 흐름 포드가 실행 중인지 확인합니다. 모든 Pod를 시작하는 데 몇 분 정도 걸릴 수 있습니다.

    $ kubectl -n airflow get pod
    NAME                                READY   STATUS    RESTARTS   AGE
    airflow-flower-b5656d44f-h8qjk      1/1     Running   0          2h
    airflow-postgresql-0                1/1     Running   0          2h
    airflow-redis-master-0              1/1     Running   0          2h
    airflow-scheduler-9d95fcdf9-clf4b   2/2     Running   2          2h
    airflow-web-59c94db9c5-z7rg4        1/1     Running   0          2h
    airflow-worker-0                    2/2     Running   2          2h
  3. 1단계에서 제어 장치를 사용하여 공기 흐름을 배포할 때 콘솔에 인쇄된 지침에 따라 공기 흐름 웹 서비스 URL을 얻습니다.

    $ export NODE_PORT=$(kubectl get --namespace airflow -o jsonpath="{.spec.ports[0].nodePort}" services airflow-web)
    $ export NODE_IP=$(kubectl get nodes --namespace airflow -o jsonpath="{.items[0].status.addresses[0].address}")
    $ echo http://$NODE_IP:$NODE_PORT/
  4. Airflow 웹 서비스에 액세스할 수 있는지 확인합니다.

aicp 영상1