CycleCloud 叢集中的自訂映射

根據預設,Azure CycleCloud 安裝會針對叢集使用建議的 OS 映射,但也支援使用Azure Marketplace映射、資源庫映射 (預覽版) 或節點和 nodearrays 中的自訂映射。 自訂映射適用于叢集中預先安裝的應用程式,或滿足商務或安全性需求。

透過叢集 UI 指定自訂映射

叢集 UI 支援自訂和市集映射。 核取 [ 自訂映射 ] 方塊並指定映射的完整 資源 識別碼或 URN ,而不是選取內建映射:

自訂映射

注意

這僅在 CycleCloud > 7.7.0 版中受到支援

在 CycleCloud 範本中使用自訂映射

屬性 ImageName 是用來指定叢集節點應該使用私人自訂 Azure 映射或 Marketplace 映射。 您可以在Azure 入口網站中找到此識別碼做為映射的資源識別碼,而且通常會採用下列格式:

/subscriptions/$SUBSCRIPTION-ID/resourceGroups/$RESOURCEGROUPNAME/providers/Microsoft.Compute/images/$CustomImageName

[[node custom]]

  ImageName = /subscriptions/xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/images/MyCustomImage

URN 或資源識別碼會定義要使用的市集映射。 擷取 URN 或識別碼最簡單的方式是透過 Azure CLI

您也可以使用 URN 來指定 Marketplace 或資源庫映射:

[[node marketplace]]

 ImageName = publisher:offer:sku:version

注意

7.7.0 之前的 CycleCloud 版本 需要不同的標記法

搭配定價方案使用Azure Marketplace映射

您可以使用 Marketplace 映射搭配相關聯的定價方案,但必須啟用映射,才能以程式設計方式使用。 若要這樣做,請找出您想要使用的 Marketplace 映射。 按一下[想要以程式設計方式部署]、[開始使用] - >,然後輸入任何必要資訊並加以儲存。

若要讓 CycleCloud 代表您自動接受授權條款,請在 Web 介面的訂用帳戶上啟用 [代表我接受市集條款] 選項:

接受 Marketplace 條款

若要接受來自 Azure CLI 的授權條款:

az vm image accept-terms --urn publisher:offer:sku:version

az vm image accept-terms --publisher PUBLISHER --offer OFFER --plan SKU

CycleCloud 8.0.2 和更新版本支援使用定價方案從映射建立的自訂映射。 這需要使用自訂範本:

[[node custom_image]]

 ImageName = /subscriptions/xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/galleries/MyGallery/images/MyImage/versions/1.0.0
 ImagePlan.Publisher = PUBLISHER
 ImagePlan.Product = PRODUCT (sometimes called OFFER)
 ImagePlan.Name = NAME (sometimes called SKU)

如果共用映射庫有購買方案中繼資料,則會自動使用它,而且您不需要指定方案詳細資料。

建立自訂映射

您可以遵循本教學課程來建立自訂 Azure 映射。

注意

請使用一般化映射,因為特殊化映射尚未通過移除電腦特定資訊和帳戶的程式,而且特殊化映射不包含 CycleCloud 所需的 osProfile。

舊版 CycleCloud 上的自訂映射 (< 7.7.0)

7.7.0 之前的 CycleCloud 版本支援自訂和市集映射,但它們使用不同的標記法。 若要在 7.7.0 版之前的 CycleCloud 範本中使用自訂映射,屬性 ImageId 會用來指定自訂 Azure 映射。 您可以在Azure 入口網站中找到此識別碼做為映射的資源識別碼,而且通常會採用下列格式:

/subscriptions/$SUBSCRIPTION-ID/resourceGroups/$RESOURCEGROUPNAME/providers/Microsoft.Compute/images/$CustomImageName

必須明確使用發行者/供應專案/Sku/版本來指定 7.7.0 版之前的 Marketplace 映射。 它們也需要指定 JetpackPlatform ,才能安裝正確的 jetpack 套件。 可接受的 JetpackPlatform 值為: centos-6centos-7ubuntu-14.04ubuntu-16.04windows 。 這應該符合Azure Marketplace映射的作業系統。 此外, InstallJetpack 必須設定為 true。

[[node custom]]
  ImageId = /subscriptions/xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/images/MyCustomImage
  InstallJetpack = true

[[node marketplace]]
  Azure.Publisher = OpenLogic
  Azure.Offer = CentOS-HPC
  Azure.Sku = 7.4
  Azure.ImageVersion = 7.4.20180301

  # Azure CycleCloud < 7.7.0 jetpack selection attributes
  InstallJetpack = true
  JetpackPlatform = centos-7