

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# Terraform 및 DRA를 사용하여 고성능 데이터 처리를 위한 Lustre 파일 시스템 배포
<a name="deploy-lustre-file-system-for-high-performance-data-processing-with-terraform-dra"></a>

*Arun Bagal 및 Ishwar Chauthaiwale, Amazon Web Services*

## 요약
<a name="deploy-lustre-file-system-for-high-performance-data-processing-with-terraform-dra-summary"></a>

이 패턴은에 Lustre 파일 시스템을 자동으로 배포 AWS 하고 Amazon Elastic Compute Cloud(Amazon EC2) 및 Amazon Simple Storage Service(Amazon S3)와 통합합니다.

이 솔루션을 사용하면 통합 스토리지, 컴퓨팅 리소스 및 Amazon S3 데이터 액세스를 통해 고성능 컴퓨팅(HPC) 환경을 빠르게 설정할 수 있습니다. Lustre의 스토리지 기능과 Amazon EC2에서 제공하는 유연한 컴퓨팅 옵션 및 Amazon S3의 확장 가능한 객체 스토리지를 결합하여 기계 학습, HPC 및 빅 데이터 분석에서 데이터 집약적인 워크로드를 처리할 수 있습니다.

이 패턴은 HashiCorp Terraform 모듈과 Amazon FSx for Lustre를 사용하여 다음 프로세스를 간소화합니다.
+ Lustre 파일 시스템 프로비저닝
+ FSx for Lustre와 S3 버킷 간에 데이터 리포지토리 연결(DRA)을 설정하여 Lustre 파일 시스템을 Amazon S3 객체와 연결
+ EC2 인스턴스 생성
+ EC2 인스턴스에 Amazon S3 연결 DRA를 사용하여 Lustre 파일 시스템 탑재

이 패턴의 이점은 다음과 같습니다.
+ 모듈식 설계. 이 솔루션의 개별 구성 요소를 쉽게 유지 관리하고 업데이트할 수 있습니다.
+ 확장성. AWS 계정 또는 리전 간에 일관된 환경을 빠르게 배포할 수 있습니다.
+ 유연성 구체적인 니즈에 맞게 배포를 사용자 지정할 수 있습니다.
+ 모범 사례 이 패턴은 AWS 모범 사례를 따르는 사전 구성된 모듈을 사용합니다.

Lustre에 대한 자세한 내용은 [Lustre 웹 사이트](https://www.lustre.org/)를 참조하세요.

## 사전 조건 및 제한 사항
<a name="deploy-lustre-file-system-for-high-performance-data-processing-with-terraform-dra-prereqs"></a>

**사전 조건 **
+ 활성 AWS 계정
+ 최소 권한 AWS Identity and Access Management (IAM) 정책([지침](https://aws.amazon.com/blogs/security/techniques-for-writing-least-privilege-iam-policies/) 참조)

**제한 사항 **

FSx for Lustre는 Lustre 파일 시스템을 단일 가용 영역으로 제한하므로 고가용성 요구 사항이 있는 경우 문제가 될 수 있습니다. 파일 시스템이 포함된 가용 영역에 장애가 발생하면 복구할 때까지 파일 시스템에 대한 액세스 권한이 손실됩니다. 고가용성을 달성하기 위해 DRA를 사용하여 Lustre 파일 시스템을 Amazon S3와 연결하고 가용 영역 간에 데이터를 전송할 수 있습니다.

**제품 버전**
+ [Terraform 버전 1.9.3 이상](https://developer.hashicorp.com/terraform/install?product_intent=terraform)
+ [HashiCorp AWS Provider 버전 4.0.0 이상](https://registry.terraform.io/providers/hashicorp/aws/latest)

## 아키텍처
<a name="deploy-lustre-file-system-for-high-performance-data-processing-with-terraform-dra-architecture"></a>

다음 다이어그램은에서 FSx for Lustre 및 보완 아키텍처 AWS 서비스 를 보여줍니다 AWS 클라우드.

![\[AWS KMS, Amazon EC2, Amazon CloudWatch Logs 및 Amazon S3를 사용한 FSx for Lustre 배포.\]](http://docs.aws.amazon.com/ko_kr/prescriptive-guidance/latest/patterns/images/pattern-img/51d38589-e752-42cd-9f46-59c3c8d0bfd3/images/c1c21952-fd6f-4b1d-9bf8-09b2f4f4459f.png)


이 아키텍처에는 다음 이벤트가 포함됩니다.
+ S3 버킷은 데이터의 내구성, 확장성 및 비용 효율적인 스토리지 위치로 사용됩니다. FSx for Lustre와 Amazon S3 간의 통합은 Amazon S3와 원활하게 연결되는 고성능 파일 시스템을 제공합니다.
+ FSx for Lustre는 Lustre 파일 시스템을 실행하고 관리합니다.
+ Amazon CloudWatch Logs는 파일 시스템에서 로그 데이터를 수집하고 모니터링합니다. 이러한 로그는 Lustre 파일 시스템의 성능, 상태 및 활동에 대한 인사이트를 제공합니다.
+ Amazon EC2는 오픈 소스 Lustre 클라이언트를 사용하여 Lustre 파일 시스템에 액세스하는 데 사용됩니다. EC2 인스턴스는 동일한 Virtual Private Cloud(VPC) 내의 다른 가용 영역에서 파일 시스템에 액세스할 수 있습니다. 네트워킹 구성을 사용하면 VPC 내의 서브넷 간에 액세스할 수 있습니다. Amazon FSx for Lustre 파일 시스템을 마운트한 후에는 로컬 파일 시스템에서와 마찬가지로 파일 및 디렉터리를 사용할 수 있습니다.
+ AWS Key Management Service (AWS KMS)는 저장 데이터에 대한 암호화를 제공하여 파일 시스템의 보안을 강화합니다.

**자동화 및 규모 조정**

Terraform을 사용하면 여러 환경에서 Lustre 파일 시스템을 더 쉽게 배포, 관리 및 확장할 수 있습니다. FSx for Lustre에서는 단일 파일 시스템에 크기 제한이 있으므로 여러 파일 시스템을 생성하여 수평적으로 확장해야 할 수 있습니다. Terraform을 사용하여 워크로드 니즈에 따라 여러 Lustre 파일 시스템을 프로비저닝할 수 있습니다.

## 도구
<a name="deploy-lustre-file-system-for-high-performance-data-processing-with-terraform-dra-tools"></a>

**AWS 서비스**
+ [Amazon CloudWatch Logs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html)를 사용하면 모든 시스템, 애플리케이션 및의 로그를 중앙 집중화 AWS 서비스 하여 모니터링하고 안전하게 보관할 수 있습니다.
+ [Amazon Elastic Compute Cloud(Amazon EC2)](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html)는 AWS 클라우드에서 확장 가능한 컴퓨팅 용량을 제공합니다. 필요한 만큼 가상 서버를 시작하고 빠르게 스케일 업하거나 스케일 다운할 수 있습니다.
+ FSx for Lustre를 사용하면 널리 사용되는 고성능 Lustre 파일 시스템을 쉽고 비용 효율적으로 시작하고 실행할 수 있습니다.
+ [AWS Key Management Service (AWS KMS)](https://docs.aws.amazon.com/kms/latest/developerguide/overview.html)를 사용하면 암호화 키를 생성하고 제어하여 데이터를 보호할 수 있습니다.
+ [Amazon Simple Storage Service(S3)](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html)는 원하는 양의 데이터를 저장, 보호 및 검색하는 데 도움이 되는 클라우드 기반 객체 스토리지 서비스입니다.

**코드 리포지토리**

이 패턴의 코드는 Terraform 리포지토리를 사용하는 GitHub Provision FSx for Lustre Filesystem에서 사용할 수 있습니다. [ FSx ](https://github.com/aws-samples/provision-fsx-lustre-with-terraform) 

## 모범 사례
<a name="deploy-lustre-file-system-for-high-performance-data-processing-with-terraform-dra-best-practices"></a>
+ 다음 변수는 Lustre 파일 시스템을 정의합니다. 에[픽](#deploy-lustre-file-system-for-high-performance-data-processing-with-terraform-dra-epics) 섹션의 지침에 따라 환경에 따라 올바르게 구성해야 합니다.
  + `storage_capacity` - GiBs. 최소 및 기본 설정은 1200GiB입니다.
  + FSx for Lustre 파일 시스템의 배포 유형을 지정합니다. 두 옵션 `PERSISTENT_1` 및 `PERSISTENT_2`(기본값)에 대한 설명은 [FSx for Lustre 설명서](https://docs.aws.amazon.com/fsx/latest/LustreGuide/using-fsx-lustre.html#persistent-file-system)를 참조하세요.
  + `per_unit_storage_throughput` - TiB당 초당 MBs 읽기 및 쓰기 처리량입니다. 
  + `subnet_id` - FSx for Lustre를 배포하려는 프라이빗 서브넷의 ID입니다.
  + `vpc_id` - FSx for Lustre를 배포 AWS 하려는 가상 프라이빗 클라우드의 ID입니다.
  + `data_repository_path` - Lustre 파일 시스템에 연결할 S3 버킷의 경로입니다.
  + `iam_instance_profile` - EC2 인스턴스를 시작하는 데 사용할 IAM 인스턴스 프로파일입니다.
  + `kms_key_id` - 데이터 암호화에 사용할 AWS KMS 키의 Amazon 리소스 이름(ARN)입니다.
+ `security_group` 및 `vpc_id` 변수를 사용하여 VPC 내에서 적절한 네트워크 액세스 및 배치를 보장합니다.
+ 에[픽](#deploy-lustre-file-system-for-high-performance-data-processing-with-terraform-dra-epics) 섹션에 설명된 대로 `terraform plan` 명령을 실행하여 변경 사항을 적용하기 전에 미리 보고 확인합니다. 이렇게 하면 잠재적 문제를 포착하고 배포할 내용을 파악할 수 있습니다.
+ 에[픽](#deploy-lustre-file-system-for-high-performance-data-processing-with-terraform-dra-epics) 섹션에 설명된 대로 `terraform validate` 명령을 사용하여 구문 오류를 확인하고 구성이 올바른지 확인합니다.

## 에픽
<a name="deploy-lustre-file-system-for-high-performance-data-processing-with-terraform-dra-epics"></a>

### 환경을 설정합니다
<a name="set-up-your-environment"></a>


| 작업 | 설명 | 필요한 기술 | 
| --- | --- | --- | 
| Terraform 설치 | 로컬 시스템에 Terraform을 설치하려면 [Terraform 설명서](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli)의 지침을 따릅니다. | AWS DevOps, DevOps 엔지니어 | 
|  AWS 자격 증명을 설정합니다. | 계정에 대한 AWS Command Line Interface (AWS CLI) 프로파일을 설정하려면 [AWS 설명서](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)의 지침을 따릅니다. | AWS DevOps, DevOps 엔지니어 | 
| GitHub 리포지토리를 복제합니다. | 다음 명령을 실행하여 GitHub 리포지토리를 복제합니다.<pre>git clone https://github.com/aws-samples/provision-fsx-lustre-with-terraform.git</pre> | AWS DevOps, DevOps 엔지니어 | 

### FSx for Lustre 구성 및 배포
<a name="configure-and-deploy-fsxlustre"></a>


| 작업 | 설명 | 필요한 기술 | 
| --- | --- | --- | 
| 배포 구성 파일을 업데이트합니다. | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/prescriptive-guidance/latest/patterns/deploy-lustre-file-system-for-high-performance-data-processing-with-terraform-dra.html) | AWS DevOps, DevOps 엔지니어 | 
| Terraform 환경을 초기화합니다. | 환경을 초기화하여 Terraform `fsx_deployment` 모듈을 실행하려면 다음을 실행합니다.<pre>terraform init</pre> | AWS DevOps, DevOps 엔지니어 | 
| Terraform 구문을 검증합니다. | 구문 오류를 확인하고 구성이 올바른지 확인하려면 다음을 실행합니다.<pre>terraform validate </pre> | AWS DevOps, DevOps 엔지니어 | 
| Terraform 구성을 검증합니다. | Terraform 실행 계획을 생성하고 배포를 미리 보려면 다음을 실행합니다.<pre>terraform plan -var-file terraform.tfvars</pre> | AWS DevOps, DevOps 엔지니어 | 
| Terraform 파일을 배포합니다. | FSx for Lustre 리소스를 배포하려면 다음을 실행합니다.<pre>terraform apply -var-file terraform.tfvars</pre> | AWS DevOps, DevOps 엔지니어 | 

### AWS 리소스 정리
<a name="clean-up-aws-resources"></a>


| 작업 | 설명 | 필요한 기술 | 
| --- | --- | --- | 
|  AWS 리소스를 제거합니다. | FSx for Lustre 환경 사용을 완료한 후 Terraform에서 배포한 AWS 리소스를 제거하여 불필요한 요금이 발생하지 않도록 할 수 있습니다. 코드 리포지토리에 제공된 Terraform 모듈은이 정리를 자동화합니다.[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/prescriptive-guidance/latest/patterns/deploy-lustre-file-system-for-high-performance-data-processing-with-terraform-dra.html) | AWS DevOps, DevOps 엔지니어 | 

## 문제 해결
<a name="deploy-lustre-file-system-for-high-performance-data-processing-with-terraform-dra-troubleshooting"></a>


| 문제 | Solution | 
| --- | --- | 
| FSx for Lustre는 오류를 반환합니다. | FSx for Lustre 문제에 대한 도움말은 [FSx for Lustre 설명서의 Amazon FSx for Lustre 문제 해결을](https://docs.aws.amazon.com/fsx/latest/LustreGuide/troubleshooting.html) 참조하세요. FSx  | 

## 관련 리소스
<a name="deploy-lustre-file-system-for-high-performance-data-processing-with-terraform-dra-resources"></a>
+ [Terraform을 사용하여 Amazon FSx for Lustre 빌드](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/fsx_lustre_file_system)(Terraform 설명서의AWS 공급자 참조)
+ [Amazon FSx for Lustre 시작하기](https://docs.aws.amazon.com/fsx/latest/LustreGuide/getting-started.html)(FSx for Lustre 설명서)
+ [AWS Amazon FSx for Lustre에 대한 블로그 게시물](https://aws.amazon.com/blogs/storage/tag/amazon-fsx-for-lustre/)