

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

# EcsProperties를 사용하여 작업 정의 생성
<a name="multi-container-jobs"></a>

를 사용하는 AWS Batch 작업 정의를 사용하면 별도의 컨테이너에서 하드웨어, 센서, 3D 환경 및 기타 시뮬레이션을 모델링[https://docs.aws.amazon.com/batch/latest/APIReference/API_EcsProperties.html](https://docs.aws.amazon.com/batch/latest/APIReference/API_EcsProperties.html)할 수 있습니다. 이 기능을 사용하여 워크로드 구성 요소를 논리적으로 구성하고 기본 애플리케이션과 분리할 수 있습니다. 이 기능은 Amazon Elastic Container Service(Amazon ECS), Amazon Elastic Kubernetes Service(Amazon EKS) 및 AWS Batch 에서와 함께 사용할 수 있습니다 AWS Fargate.

## `ContainerProperties` 및 `EcsProperties` 작업 정의
<a name="containerpropertions-vs-ecsproperties"></a>

사용 사례에 따라 [https://docs.aws.amazon.com/batch/latest/APIReference/API_ContainerProperties.html](https://docs.aws.amazon.com/batch/latest/APIReference/API_ContainerProperties.html) 또는 [https://docs.aws.amazon.com/batch/latest/APIReference/API_EcsProperties.html](https://docs.aws.amazon.com/batch/latest/APIReference/API_EcsProperties.html) 작업 정의를 사용하도록 선택할 수 있습니다. 상위 수준에서를 사용하여 AWS Batch 작업을 실행하는 `EcsProperties` 것은를 사용하여 작업을 실행하는 것과 유사합니다`ContainerProperties`.

`ContainerProperties`를 사용하는 레거시 작업 정의 구조는 계속 지원됩니다. 현재 이 구조를 사용하는 워크플로가 있는 경우 워크플로를 계속 실행할 수 있습니다.

주요 차이점은 작업 정의에 `EcsProperties` 기반 정의를 수용할 새 객체가 추가되었다는 것입니다.

예를 들어 Amazon ECS 및 Fargate에서 `ContainerProperties`를 사용하는 작업 정의의 구조는 다음과 같습니다.

```
{
   "containerProperties": {
     ...
     "image": "my_ecr_image1",
     ...
  },
...
}
```

Amazon ECS 및 Fargate에서 `EcsProperties`를 사용하는 작업 정의의 구조는 다음과 같습니다.

```
{
  "ecsProperties": {
    "taskProperties": [{
      "containers": [
        { 
          ...
          "image": "my_ecr_image1",
          ...
        },
        { 
          ...
          "image": "my_ecr_image2",
          ...
        },
```

## AWS Batch APIs에 대한 일반 변경 사항
<a name="multi-container-general"></a>

다음은 `ContainerProperties`를 사용할 때와 `EcsProperties` API 데이터 유형을 사용할 때의 몇 가지 주요 차이점에 대한 간략한 설명입니다.
+ `ContainerProperties` 내에서 사용되는 많은 파라미터가 `TaskContainerProperties` 내에 표시됩니다. 몇 가지 예는 `command`, `image`, `privileged`, `secrets` 및 `users`입니다. 모두 [TaskContainerProperties](https://docs.aws.amazon.com/batch/latest/APIReference/API_TaskContainerProperties.html)에서 찾을 수 있습니다.
+ 일부 `TaskContainerProperties` 파라미터에는 레거시 구조에 기능적 등가물이 없습니다. 몇 가지 예는 `dependsOn`, `essential`, `name`, `ipcMode` 및 `pidMode`입니다. 자세한 내용은 [EcsTaskDetails](https://docs.aws.amazon.com/batch/latest/APIReference/API_EcsTaskDetails.html) 및 [TaskContainerProperties](https://docs.aws.amazon.com/batch/latest/APIReference/API_TaskContainerProperties.html)를 참조하세요.

  또한 일부 `ContainerProperties` 파라미터에는 `EcsProperties` 구조에 등가물 또는 애플리케이션이 없습니다. [https://docs.aws.amazon.com/batch/latest/APIReference/API_EcsProperties.html#Batch-Type-EcsProperties-taskProperties](https://docs.aws.amazon.com/batch/latest/APIReference/API_EcsProperties.html#Batch-Type-EcsProperties-taskProperties)에서 새 객체가 최대 10개의 요소를 수용할 수 있도록 `container`가 `containers`로 대체되었습니다. 자세한 내용은 [RegisterJobDefinition:containerProperties](https://docs.aws.amazon.com/batch/latest/APIReference/API_RegisterJobDefinition.html#Batch-RegisterJobDefinition-request-containerProperties) 및 [EcsTaskProperties:containers](https://docs.aws.amazon.com/batch/latest/APIReference/API_EcsTaskProperties.html)를 참조하세요.
+ `taskRoleArn`은 기능면에서 `jobRoleArn`과 동일합니다. 자세한 내용은 [EcsTaskProperties:taskRoleArn](https://docs.aws.amazon.com/batch/latest/APIReference/API_EcsTaskProperties.html) 및 [ContainerProperties:jobRoleArn](https://docs.aws.amazon.com/batch/latest/APIReference/API_ContainerProperties.html)을 참조하세요.
+ `EcsProperties` 구조에 컨테이너를 1개에서 10개까지 포함할 수 있습니다. 자세한 내용은 [EcsTaskProperties:containers](https://docs.aws.amazon.com/batch/latest/APIReference/API_EcsTaskProperties.html)를 참조하세요.
+ `taskProperties` 및 instanceTypes 객체는 배열이지만 현재는 하나의 요소만 수용합니다. 예를 들어 [EcsProperties:taskProperties](https://docs.aws.amazon.com/batch/latest/APIReference/API_EcsProperties.html) 및 [NodeRangeProperty:instanceTypes](https://docs.aws.amazon.com/batch/latest/APIReference/API_NodeRangeProperty.html)가 있습니다.

## Amazon ECS용 다중 컨테이너 작업 정의
<a name="multi-container-ecs-updates"></a>

Amazon ECS의 다중 컨테이너 구조를 수용하기 위해 일부 API 데이터 유형이 다릅니다. 예:
+ [https://docs.aws.amazon.com/batch/latest/APIReference/API_RegisterJobDefinition.html#Batch-RegisterJobDefinition-request-ecsProperties](https://docs.aws.amazon.com/batch/latest/APIReference/API_RegisterJobDefinition.html#Batch-RegisterJobDefinition-request-ecsProperties)는 단일 컨테이너 정의에서 `containerProperties`와 동일한 수준입니다. 자세한 내용은AWS Batch API 참조 안내서의 [EcsProperties](https://docs.aws.amazon.com/batch/latest/APIReference/API_EcsProperties.html)를 참조하세요.**
+ [https://docs.aws.amazon.com/batch/latest/APIReference/API_EcsProperties.html#Batch-Type-EcsProperties-taskProperties](https://docs.aws.amazon.com/batch/latest/APIReference/API_EcsProperties.html#Batch-Type-EcsProperties-taskProperties)에는 Amazon ECS 작업에 대해 정의된 속성이 포함되어 있습니다. 자세한 내용은AWS Batch API 참조 안내서의 [EcsProperties](https://docs.aws.amazon.com/batch/latest/APIReference/API_EcsProperties.html)를 참조하세요.**
+ [https://docs.aws.amazon.com/batch/latest/APIReference/API_EcsTaskProperties.html#Batch-Type-EcsTaskProperties-containers](https://docs.aws.amazon.com/batch/latest/APIReference/API_EcsTaskProperties.html#Batch-Type-EcsTaskProperties-containers)는 단일 컨테이너 정의에서 `containerProperties`와 유사한 정보를 포함합니다. 주요 차이점은 `containers`를 사용하면 최대 10개의 컨테이너를 정의할 수 있다는 점입니다. 자세한 내용은 *AWS Batch API 참조 안내서*의 [ECSTaskProperties:containers](https://docs.aws.amazon.com/batch/latest/APIReference/API_EcsTaskProperties.html)를 참조하세요.
+ [https://docs.aws.amazon.com/batch/latest/APIReference/API_TaskContainerProperties.html#Batch-Type-TaskContainerProperties-essential](https://docs.aws.amazon.com/batch/latest/APIReference/API_TaskContainerProperties.html#Batch-Type-TaskContainerProperties-essential) 파라미터는 컨테이너가 작업에 미치는 영향을 나타냅니다. 작업이 진행되려면 모든 필수 컨테이너가 성공적으로 완료(0으로 종료)되어야 합니다. 필수로 표시된 컨테이너가 실패(0이 아닌 상태로 종료)하면 작업이 실패합니다.

  기본값은 `true`이며 적어도 하나의 컨테이너가 `essential`로 표시되어야 합니다. 자세한 내용은AWS Batch API 참조 안내서의 [https://docs.aws.amazon.com/batch/latest/APIReference/API_TaskContainerProperties.html#Batch-Type-TaskContainerProperties-essential](https://docs.aws.amazon.com/batch/latest/APIReference/API_TaskContainerProperties.html#Batch-Type-TaskContainerProperties-essential) 섹션을 참조하세요.**
+ [https://docs.aws.amazon.com/batch/latest/APIReference/API_TaskContainerProperties.html#Batch-Type-TaskContainerProperties-dependsOn](https://docs.aws.amazon.com/batch/latest/APIReference/API_TaskContainerProperties.html#Batch-Type-TaskContainerProperties-dependsOn) 파라미터를 사용하여 컨테이너 종속성 목록을 정의할 수 있습니다. 자세한 내용은AWS Batch API 참조 안내서의 [https://docs.aws.amazon.com/batch/latest/APIReference/API_TaskContainerProperties.html#Batch-Type-TaskContainerProperties-dependsOn](https://docs.aws.amazon.com/batch/latest/APIReference/API_TaskContainerProperties.html#Batch-Type-TaskContainerProperties-dependsOn) 섹션을 참조하세요.**
**참고**  
`dependsOn` 목록의 복잡성과 관련 컨테이너 런타임은 작업의 시작 시간에 영향을 미칠 수 있습니다. 종속성을 실행하는 데 오랜 시간이 걸리는 경우 작업이 완료될 때까지 `STARTING` 상태가 유지됩니다.

`ecsProperties` 및 구조에 대한 자세한 내용은 [ecsProperties](https://docs.aws.amazon.com/batch/latest/APIReference/API_RegisterJobDefinition.html#Batch-RegisterJobDefinition-request-ecsProperties)에 대한 [RegisterJobDefinition](https://docs.aws.amazon.com/batch/latest/APIReference/API_RegisterJobDefinition.html#API_RegisterJobDefinition_RequestBody) 요청 구문을 참조하세요.

## Amazon EKS에 대한 다중 컨테이너 작업 정의
<a name="multi-container-eks-updates"></a>

Amazon EKS의 다중 컨테이너 구조를 수용하기 위해 일부 API 데이터 유형이 다릅니다. 예:
+ [https://docs.aws.amazon.com/batch/latest/APIReference/API_EksContainer.html#Batch-Type-EksContainer-name](https://docs.aws.amazon.com/batch/latest/APIReference/API_EksContainer.html#Batch-Type-EksContainer-name)은 컨테이너의 고유 식별자입니다. 이 객체는 단일 컨테이너에는 필요하지 않으며 포드에 여러 컨테이너를 정의할 때 필요합니다. `name`이 단일 컨테이너에 정의되지 않은 경우 기본 이름인 `default`가 적용됩니다.
+ [https://docs.aws.amazon.com/batch/latest/APIReference/API_EksPodProperties.html#Batch-Type-EksPodProperties-initContainers](https://docs.aws.amazon.com/batch/latest/APIReference/API_EksPodProperties.html#Batch-Type-EksPodProperties-initContainers)는 [eksPodProperties](https://docs.aws.amazon.com/batch/latest/APIReference/API_EksPodProperties.html) 데이터 유형 내에 정의됩니다. 이들은 애플리케이션 컨테이너 전에 실행되며, 항상 완료될 때까지 실행되고, 다음 컨테이너가 시작되기 전에 성공적으로 완료되어야 합니다.

  이러한 컨테이너는 Amazon EKS Connector 에이전트에 등록되며 Amazon Elastic Kubernetes Service 백엔드 데이터 스토어에 등록 정보를 유지합니다. `initContainers` 객체는 최대 10개의 요소를 수용할 수 있습니다. 자세한 내용은 Kubernetes 설명서의 [Init Containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/)를 참조하세요.**
**참고**  
`initContainers` 객체는 작업의 시작 시간에 영향을 미칠 수 있습니다. `initContainers`를 실행하는 데 오랜 시간이 걸리는 경우 작업이 완료될 때까지 `STARTING` 상태가 유지됩니다.
+ [https://docs.aws.amazon.com/batch/latest/APIReference/API_EksPodProperties.html#Batch-Type-EksPodProperties-shareProcessNamespace](https://docs.aws.amazon.com/batch/latest/APIReference/API_EksPodProperties.html#Batch-Type-EksPodProperties-shareProcessNamespace)는 포드의 컨테이너가 동일한 프로세스 네임스페이스를 공유할 수 있는지 여부를 나타냅니다. 기본값은 `false`입니다. 이 값을 `true`로 설정하여 컨테이너가 동일한 포드에 위치한 다른 컨테이너의 프로세스를 보고 신호를 보낼 수 있게 합니다.
+ 모든 컨테이너가 중요합니다. 작업이 성공하려면 모든 컨테이너가 성공적으로 완료(0으로 종료)되어야 합니다. 컨테이너 하나가 실패하면(0이 아닌 값으로 종료) 작업이 실패합니다.

`eksProperties` 및 구조에 대한 자세한 내용은 [eksProperties](https://docs.aws.amazon.com/batch/latest/APIReference/API_RegisterJobDefinition.html#Batch-RegisterJobDefinition-request-eksProperties)에 대한 [RegisterJobDefinition](https://docs.aws.amazon.com/batch/latest/APIReference/API_RegisterJobDefinition.html#API_RegisterJobDefinition_RequestBody) 요청 구문을 참조하세요.