閱讀227 返回首頁    go 阿裏雲 go 技術社區[雲棲]


ALIYUN::CS::Cluster__資源列表_資源編排-阿裏雲

ALIYUN::CS::Cluster 類型可用於創建阿裏雲 Docker 集群

語法

  1. {
  2. "Type" : "ALIYUN::CS::Cluster",
  3. "Properties" : {
  4. "VpcId" : String,
  5. "Name" : String,
  6. "ImageId" : String,
  7. "VSwitchId" : String,
  8. "SubnetCidr" : String,
  9. "Password" : String,
  10. "InstanceType" : String,
  11. "ZoneId" : String,
  12. "Size" : Integer
  13. }
  14. }

屬性

屬性名稱 類型 必須 描述 約束
Name string 指定Docker集群的名稱 名稱為1-64個字符,可包含數字、漢字、英文字符,或”-“
InstanceType string 指定創建Docker集群所用 ECS 的規格
Size integer 指定集群使用多少台 ECS 實例
VpcId string 指定專有網絡 ID
ImageId string 指定 ECS 實例所用的鏡像 ID
VSwitchId string 指定 VpcId 下的虛擬交換機 ID
SubnetCidr string 指定 Docker 容器的子網地址. 允許的子網段為:172.17.0.0/24 - 172.31.0.0/24. 確保此網段不能和專有網絡相同
Password string 指定 ECS 實例的登錄密碼 實例的密碼。8 - 30 個字符,同時包含大小寫字母和數字,不支持特殊符號
ZoneId string 指定創建 Cluster 的可用區

返回值

Fn::GetAtt

  • MasterUrl 集群的主 URL 地址
  • Ca CA 證書
  • ClusterId 集群 ID
  • Cert 客戶端證書
  • Key 客戶端主鍵

示例

  1. {
  2. "ROSTemplateFormatVersion": "2015-09-01",
  3. "Resources": {
  4. "MyCluster": {
  5. "Properties": {
  6. "InstanceType": "ecs.s1.small",
  7. "Name": "stormcluster",
  8. "Password": "Test1234",
  9. "Size": "1"
  10. },
  11. "Type": "ALIYUN::CS::Cluster"
  12. }
  13. },
  14. "Outputs": {
  15. "CaCert": {
  16. "Description": "CA cert of the cluster.",
  17. "Value": {
  18. "Fn::GetAtt": [
  19. "MyCluster",
  20. "Ca"
  21. ]
  22. }
  23. },
  24. "ClientCert": {
  25. "Description": "Client cert of the cluster.",
  26. "Value": {
  27. "Fn::GetAtt": [
  28. "MyCluster",
  29. "Cert"
  30. ]
  31. }
  32. },
  33. "ClientKey": {
  34. "Description": "Client key of the cluster.",
  35. "Value": {
  36. "Fn::GetAtt": [
  37. "MyCluster",
  38. "Key"
  39. ]
  40. }
  41. },
  42. "ClusterId": {
  43. "Description": "Id of the cluster.",
  44. "Value": {
  45. "Fn::GetAtt": [
  46. "MyCluster",
  47. "ClusterId"
  48. ]
  49. }
  50. },
  51. "Endpoints": {
  52. "Description": "Endpoints of the app.",
  53. "Value": {
  54. "Fn::GetAtt": [
  55. "App",
  56. "Endpoints"
  57. ]
  58. }
  59. },
  60. "MasterUrl": {
  61. "Description": "Master url of the cluster.",
  62. "Value": {
  63. "Fn::GetAtt": [
  64. "MyCluster",
  65. "MasterUrl"
  66. ]
  67. }
  68. }
  69. }
  70. }

最後更新:2016-12-20 17:12:42

  上一篇:go ALIYUN::CS::App__資源列表_資源編排-阿裏雲
  下一篇:go ALIYUN::ECS::BandwidthPackage__資源列表_資源編排-阿裏雲