edit-icon download-icon

ALIYUN::CS::Cluster

Last Updated: Jun 13, 2018

The ALIYUN::CS::Cluster type is used to create an Alibaba Cloud Docker cluster.

Syntax

  1. {
  2. "Type" : "ALIYUN::CS::Cluster",
  3. "Properties" : {
  4. "SystemDiskCategory" : String,
  5. "VpcId" : String,
  6. "Name" : String,
  7. "DataDiskCategory" : String,
  8. "Password" : String,
  9. "ZoneId" : String,
  10. "ImageId" : String,
  11. "VSwitchId" : String,
  12. "SubnetCidr" : String,
  13. "DataDiskSize" : Integer,
  14. "IoOptimized" : Boolean,
  15. "CreateSlbByDefault" : Boolean,
  16. "InstanceType" : String,
  17. "InstanceIds" : List,
  18. "Size" : Integer
  19. }
  20. }

Attributes

Attribute name Type Required Description Constraint
Name string Yes Name of the Docker cluster The cluster name is a string of 1 to 64 characters including digits, Chinese characters and English letters, and hyphens(-)
InstanceType string Yes ECS type used to create the Docker cluster N/A
Size integer Yes Number of ECS instances used for the cluster N/A
VpcId string No VPC ID N/A
ImageId string No Image ID used by the ECS instances N/A
VSwitchId string No ID of the VSwitch in VPC N/A
SubnetCidr string No Subnet of the Docker container The allowed subnet segment ranges from 172.17.0.0/24 to 172.31.0.0/24. Make sure that the subnet segment is different from that of the VPC
Password string No ECS instance logon password Instance password is a string of 8 to 30 characters and must contain digits and uppercase/lowercase letters. It cannot contain special symbols
ZoneId string No Zone ID N/A
SystemDiskCategory string No System disk type Value options: cloud, cloud_efficiency, cloud_ssd, and ephemeral_ssd. Default value: cloud
DataDiskCategory string No Data disk type Value options: cloud, cloud_efficiency, cloud_ssd, and ephemeral_ssd. Default value: cloud
DataDiskSize integer No Data disk size Unit: GB
IoOptimized boolean No Whether the created ECS instance is I/O optimized Value options: true and false; default value: false
CreateSlbByDefault boolean No Whether to create Server Load Balancer for the Docker cluster Value options: true and false; default value: false
InstanceIds list No IDs of the ECS instances used to create a Docker cluster IDs in the list are separated by commas(,). This parameter is ignored if InstanceType is specified. If this parameter is specified, the value of the Size attribute indicates the number of IDs in the list. Other attributes are ignored. System disks of all ECS instances corresponding to the IDs are replaced. When specifying this parameter to create a Docker cluster, make sure you have a data back up of the system disk

Return values

Fn::GetAtt

  • MasterUrl: master URL of the cluster.-Ca: CA certificate.
  • ClusterId: cluster ID.-Cert: client certificate.
  • Key: client primary key.

Example

  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. }
Thank you! We've received your feedback.