빠른 시작: Nginx를 사용하여 CNF(컨테이너화된 네트워크 기능) 네트워크 서비스 디자인 설계

이 빠른 시작에서는 az aosm Azure CLI 확장을 사용하여 기본 네트워크 서비스 디자인을 만들고 게시하는 방법을 설명합니다.

필수 조건

입력 파일 만들기

네트워크 서비스 디자인 버전 및 관련 리소스를 게시하기 위한 입력 파일을 만듭니다. 다음 명령을 실행하여 NSDV(네트워크 서비스 디자인 버전)에 대한 입력 구성 파일을 생성합니다.

az aosm nsd generate-config

이전 명령을 실행하면 nsd-input.jsonc 파일이 생성됩니다.

참고 항목

input.json 파일을 편집합니다. 아래 샘플에 표시된 값으로 바꿉니다. 파일을 input-cnf-nsd.jsonc에 저장합니다.

NFDV를 게시할 때 게시자 이름을 변경한 경우 publisher_namepublisher 필드 모두에 게시자 이름을 사용합니다(후자는 resource_element_templates 배열 내에 있음).

다른 리소스 그룹 이름을 사용한 경우 publisher_resource_group_namepublisher_resource_group 필드를 모두 업데이트합니다(후자는 resource_element_templates 배열 내에 있음).

다음은 input-cnf-nsd.jsonc 샘플입니다.

{
  // Azure location to use when creating resources e.g uksouth
  "location": "uksouth",
  // Name of the Publisher resource you want your definition published to.
  // Will be created if it does not exist.
  "publisher_name": "nginx-publisher",
  // Resource group for the Publisher resource.
  // Will be created if it does not exist.
  "publisher_resource_group_name": "nginx-publisher-rg",
  // Name of the ACR Artifact Store resource.
  // Will be created if it does not exist.
  "acr_artifact_store_name": "nginx-nsd-acr",
  // Network Service Design (NSD) name. This is the collection of Network Service Design Versions. Will be created if it does not exist.
  "nsd_name": "nginx-nsdg",
  // Version of the NSD to be created. This should be in the format A.B.C
  "nsd_version": "1.0.0",
  // Optional. Description of the Network Service Design Version (NSDV).
  "nsdv_description": "Deploys a basic NGINX CNF",
  // List of Resource Element Templates (RETs).
  // There must be at least one NF RET.
  // ArmTemplate RETs are optional. Delete if not required.
  "resource_element_templates": [
    {
      // Type of Resource Element. Either NF or ArmTemplate
      "resource_element_type": "NF",
      "properties": {
        // The name of the existing publisher for the NSD.
        "publisher": "nginx-publisher",
        // The resource group that the publisher is hosted in.
        "publisher_resource_group": "nginx-publisher-rg",
        // The name of the existing Network Function Definition Group to deploy using this NSD.
        // This will be the same as the NF name if you published your NFDV using the CLI.
        "name": "nginx",
        // The version of the existing Network Function Definition to base this NSD on.
        // This NSD will be able to deploy any NFDV with deployment parameters compatible with this version.
        "version": "1.0.0",
        // The region that the NFDV is published to.
        "publisher_offering_location": "uksouth",
        // Type of Network Function. Valid values are 'cnf' or 'vnf'.
        "type": "cnf"
      }
    }
  ]
}
  • publisher_name - 정의를 게시하려는 게시자 리소스의 이름입니다. 아직 존재하지 않는 경우 만들어집니다.
  • publisher_resource_group_name - 게시자 리소스에 대한 리소스 그룹입니다. 아직 존재하지 않는 경우 만들어집니다. 이 빠른 시작에서는 네트워크 기능 정의를 게시할 때 사용한 것과 동일한 리소스 그룹을 사용하는 것이 좋습니다.
  • acr_artifact_store_name - ACR 아티팩트 저장소 리소스의 이름입니다. 아직 존재하지 않는 경우 만들어집니다.
  • location - 리소스를 만들 때 사용할 Azure 위치입니다.
  • nsd_name - 네트워크 서비스 디자인 그룹 이름입니다. 네트워크 서비스 디자인 버전 컬렉션입니다. 아직 존재하지 않는 경우 만들어집니다.
  • nsd_version - 만들기 중인 NSD의 버전입니다. A.B.C 형식으로
  • nsdv_description - NSDV에 대한 설명입니다.
  • resource_element_templates:
    • publisher - 이 NFDV가 게시된 게시자의 이름입니다.
    • publisher_resource_group - 게시자가 호스트되는 리소스 그룹입니다.
    • name - 이 NSD를 사용하여 배포할 기존 네트워크 기능 정의 그룹의 이름입니다. CLI를 사용하여 NFDV를 게시한 경우 NF 이름과 동일합니다.
    • 버전 - 이 NSD의 기반이 되는 기존 네트워크 기능 정의의 버전입니다. 이 NSD는 이 버전과 호환되는 배포 매개 변수를 사용하여 모든 NFDV를 배포할 수 있습니다.
    • publisher_offering_location - NFDV가 게시되는 지역입니다.
    • type - 네트워크 기능의 형식입니다. 유효한 값은 cnf 또는 vnf입니다.

NSDV(네트워크 서비스 디자인 버전) 빌드

다음 명령을 사용하여 NSDV에 대한 빌드 프로세스를 시작합니다.

az aosm nsd build -f input-cnf-nsd.jsonc

빌드 프로세스는 nsd-cli-output(이)라는 폴더를 생성합니다. 빌드 프로세스가 완료되면 생성된 파일을 검토하여 NSDV 아키텍처 및 구조 및 관련 리소스에 대한 인사이트를 얻습니다.

다음 파일이 만들어집니다.

디렉터리/파일 설명
nsdDefinition/config-group-schema.json 이 NSDV에서 SNS(사이트 네트워크 서비스)를 만드는 데 필요한 배포 매개 변수에 대한 스키마를 정의합니다.
nsdDefinition/nginx-nsd-mappings.json NSDV의 매개 변수를 NF ARM 템플릿에 필요한 값에 매핑합니다.
nsdDefinition/deploy.bicep NSDV 자체를 만들기 위한 Bicep 템플릿입니다.
artifacts NF ARM 템플릿에 대한 bicep 템플릿과 아티팩트 매니페스트에 포함할 아티팩트 목록을 포함합니다.
artifactManifest/deploy.bicep 아티팩트 매니페스트를 만들기 위한 Bicep 템플릿입니다.
base/deploy.bicep 게시자, 네트워크 서비스 디자인 그룹 및 아티팩트 저장소 리소스를 만들기 위한 Bicep 템플릿

NSDV(네트워크 서비스 디자인 버전) 게시

NSDV 및 관련 아티팩트 게시하려면 다음 명령을 실행합니다.

az aosm nsd publish --build-output-folder nsd-cli-output

게시 프로세스가 완료되면 게시자 리소스 그룹으로 이동하여 생성된 리소스와 아티팩트를 관찰하고 검토합니다.

다음 단계