

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

# 예시
<a name="examples"></a>

다음 예제 구성은 Slurm, Torque및 AWS Batch 스케줄러를 사용한 AWS ParallelCluster 구성을 보여줍니다.

**참고**  
버전 2.11.5부터 SGE 또는 Torque 스케줄러 사용을 지원하지 AWS ParallelCluster 않습니다.

**Contents**
+ [Slurm Workload Manager (`slurm`)](#example.slurm)
+ [Son of Grid Engine(`sge`) 및 Torque Resource Manager(`torque`)](#example.torque)
+ [AWS Batch (`awsbatch`)](#example.awsbatch)

## Slurm Workload Manager (`slurm`)
<a name="example.slurm"></a>

다음 예제는 `slurm` 스케줄러를 사용하는 클러스터를 시작합니다. 예제 구성에서는 2개의 작업 대기열이 있는 클러스터 1개를 시작합니다. 첫 번째 대기열에는 처음에 `spot` 사용할 수 있는 `t3.micro` 스팟 인스턴스 2개가 있습니다. 최대 10개의 인스턴스까지 스케일 업할 수 있으며, 10분 동안 작업이 실행되지 않은 경우 최소 1개의 인스턴스로 스케일 다운할 수 있습니다([`scaledown_idletime`](scaling-section.md#scaledown-idletime) 설정을 사용하여 조정 가능). 두 번째 대기열인 `ondemand`는 인스턴스 없이 시작하여 최대 5개의 `t3.micro` 온디맨드 인스턴스까지 스케일 업할 수 있습니다.

```
[global]
update_check = true
sanity_check = true
cluster_template = slurm

[aws]
aws_region_name = <your AWS 리전>

[vpc public]
master_subnet_id = <your subnet>
vpc_id = <your VPC>

[cluster slurm]
key_name = <your EC2 keypair name>
base_os = alinux2                   # optional, defaults to alinux2
scheduler = slurm
master_instance_type = t3.micro     # optional, defaults to t3.micro
vpc_settings = public
queue_settings = spot,ondemand

[queue spot]
compute_resource_settings = spot_i1
compute_type = spot                 # optional, defaults to ondemand

[compute_resource spot_i1]
instance_type = t3.micro
min_count = 1                       # optional, defaults to 0
initial_count = 2                   # optional, defaults to 0

[queue ondemand]
compute_resource_settings = ondemand_i1

[compute_resource ondemand_i1]
instance_type = t3.micro
max_count = 5                       # optional, defaults to 10
```

## Son of Grid Engine(`sge`) 및 Torque Resource Manager(`torque`)
<a name="example.torque"></a>

**참고**  
이 예제는 AWS ParallelCluster 버전 2.11.4까지의 버전에만 적용됩니다. 버전 2.11.5부터는 AWS ParallelCluster 가 SGE 또는 Torque 스케줄러의 사용을 지원하지 않습니다.

다음 예제는 `torque` 또는 `sge` 스케줄러를 사용하는 클러스터를 시작합니다. SGE을 사용하려면 `scheduler = torque`를 `scheduler = sge`로 변경하세요. 예제 구성은 최대 5개의 동시 실행 노드를 허용하고 10분 동안 작업이 실행되지 않으면 2개로 스케일 다운됩니다.

```
[global]
update_check = true
sanity_check = true
cluster_template = torque

[aws]
aws_region_name = <your AWS 리전>

[vpc public]
master_subnet_id = <your subnet>
vpc_id = <your VPC>

[cluster torque]
key_name = <your EC2 keypair name>but they aren't eligible for future updates
base_os = alinux2                   # optional, defaults to alinux2
scheduler = torque                  # optional, defaults to sge
master_instance_type = t3.micro     # optional, defaults to t3.micro
vpc_settings = public
initial_queue_size = 2              # optional, defaults to 0
maintain_initial_size = true        # optional, defaults to false
max_queue_size = 5                  # optional, defaults to 10
```

**참고**  
버전 2.11.5부터 SGE 또는 Torque 스케줄러 사용을 지원하지 AWS ParallelCluster 않습니다. 이러한 버전을 사용하는 경우 해당 버전을 계속 사용하거나 AWS 서비스 및 지원 팀의 AWS 지원 문제를 해결할 수 있습니다.

## AWS Batch (`awsbatch`)
<a name="example.awsbatch"></a>

다음 예제는 `awsbatch` 스케줄러를 사용하는 클러스터를 시작합니다. 작업 리소스 요구 사항에 따라 더 나은 인스턴스 유형을 선택하도록 설정되어 있습니다.

예제 구성은 최대 40개의 동시 실행 vCPU를 허용하고 10분 동안 작업이 실행되지 않으면 0으로 스케일 다운됩니다([`scaledown_idletime`](scaling-section.md#scaledown-idletime) 설정을 사용하여 조정 가능).

```
[global]
update_check = true
sanity_check = true
cluster_template = awsbatch

[aws]
aws_region_name = <your AWS 리전>

[vpc public]
master_subnet_id = <your subnet>
vpc_id = <your VPC>

[cluster awsbatch]
scheduler = awsbatch
compute_instance_type = optimal # optional, defaults to optimal
min_vcpus = 0                   # optional, defaults to 0
desired_vcpus = 0               # optional, defaults to 4
max_vcpus = 40                  # optional, defaults to 20
base_os = alinux2               # optional, defaults to alinux2, controls the base_os of
                                # the head node and the docker image for the compute fleet
key_name = <your EC2 keypair name>
vpc_settings = public
```