3.9.11. Azure 인프라에 대한 RHCOS 클러스터 이미지 배포

OpenShift Container Platform 노드에 대해서는 Microsoft Azure에 유효한 RHCOS(Red Hat Enterprise Linux CoreOS) 이미지를 사용해야 합니다.

사전 요구 사항

  • Azure 계정을 구성하십시오.
  • 클러스터에 대한 Ignition 구성 파일을 생성하십시오.
  • RHCOS VHD(가상 하드 디스크) 클러스터 이미지를 Azure 스토리지 컨테이너에 저장하십시오.
  • 부트스트랩 ignition 구성 파일을 Azure 스토리지 컨테이너에 저장하십시오.

프로세스

  1. 이 항목의 이미지 스토리지에 대한 ARM 템플릿 섹션에서 템플릿을 복사하여 클러스터의 설치 디렉터리에 02_storage.json으로 저장합니다. 이 템플릿은 클러스터에 필요한 이미지 스토리지를 설명합니다.
  2. RHCOS VHD BLOB URL을 변수 형태로 내보냅니다.

    $ export VHD_BLOB_URL=`az storage blob url --account-name ${CLUSTER_NAME}sa --account-key ${ACCOUNT_KEY} -c vhd -n "rhcos.vhd" -o tsv`
  3. 클러스터 이미지를 배포합니다.

    $ az deployment group create -g ${RESOURCE_GROUP} \
      --template-file "<installation_directory>/02_storage.json" \
      --parameters vhdBlobURL="${VHD_BLOB_URL}" \ 1
      --parameters baseName="${INFRA_ID}"2
    1
    마스터 및 작업자 시스템을 생성하는 데 사용되는 RHCOS VHD의 Blob URL.
    2
    리소스 이름에 사용될 기본 이름; 일반적으로 클러스터의 인프라 ID입니다.

3.9.11.1. 이미지 스토리지를 위한 ARM 템플릿

다음 ARM(Azure Resource Manager) 템플릿을 사용하여 OpenShift Container Platform 클러스터에 필요한 저장된 RHCOS(Red Hat Enterprise Linux CoreOS) 이미지를 배포할 수 있습니다.

예 3.2. 02_storage.json ARM 템플릿

{
  "$schema" : "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  "contentVersion" : "1.0.0.0",
  "parameters" : {
    "baseName" : {
      "type" : "string",
      "minLength" : 1,
      "metadata" : {
        "description" : "Base name to be used in resource names (usually the cluster's Infra ID)"
      }
    },
    "vhdBlobURL" : {
      "type" : "string",
      "metadata" : {
        "description" : "URL pointing to the blob where the VHD to be used to create master and worker machines is located"
      }
    }
  },
  "variables" : {
    "location" : "[resourceGroup().location]",
    "imageName" : "[concat(parameters('baseName'), '-image')]"
  },
  "resources" : [
    {
      "apiVersion" : "2018-06-01",
      "type": "Microsoft.Compute/images",
      "name": "[variables('imageName')]",
      "location" : "[variables('location')]",
      "properties": {
        "storageProfile": {
          "osDisk": {
            "osType": "Linux",
            "osState": "Generalized",
            "blobUri": "[parameters('vhdBlobURL')]",
            "storageAccountType": "Standard_LRS"
          }
        }
      }
    }
  ]
}