|
| 1 | +ROSTemplateFormatVersion: '2015-09-01' |
| 2 | +Description: |
| 3 | + zh-cn: 在ECS实例上搭建WordPress博客平台。 |
| 4 | + en: Build a WordPress blog platform. |
| 5 | +Parameters: |
| 6 | + InstanceSource: |
| 7 | + Type: String |
| 8 | + Default: CreateNew |
| 9 | + Label: |
| 10 | + zh-cn: 实例来源 |
| 11 | + en: Instance Source |
| 12 | + AllowedValues: |
| 13 | + - CreateNew |
| 14 | + - UseExisted |
| 15 | + AssociationPropertyMetadata: |
| 16 | + ValueLabelMapping: |
| 17 | + CreateNew: |
| 18 | + zh-cn: 创建新实例 |
| 19 | + en: Create New Instance |
| 20 | + UseExisted: |
| 21 | + zh-cn: 选择已有实例 |
| 22 | + en: Select Existed Instance |
| 23 | + ZoneId: |
| 24 | + Type: String |
| 25 | + Default: null |
| 26 | + Required: true |
| 27 | + Label: |
| 28 | + en: Availability Zone |
| 29 | + zh-cn: 可用区 |
| 30 | + AssociationProperty: ALIYUN::ECS::Instance::ZoneId |
| 31 | + AssociationPropertyMetadata: |
| 32 | + AutoSelectFirst: true |
| 33 | + Visible: |
| 34 | + Condition: |
| 35 | + Fn::Equals: |
| 36 | + - ${InstanceSource} |
| 37 | + - CreateNew |
| 38 | + ImageId: |
| 39 | + Type: String |
| 40 | + Default: aliyun_3_9_x64_20G_alibase_20231219.vhd |
| 41 | + Required: true |
| 42 | + Label: |
| 43 | + en: Image of Instance |
| 44 | + zh-cn: 实例镜像 |
| 45 | + AssociationProperty: ALIYUN::ECS::Image::ImageId |
| 46 | + AssociationPropertyMetadata: |
| 47 | + SupportedImageOwnerAlias: |
| 48 | + - system |
| 49 | + IsSupportCloudinit: true |
| 50 | + Visible: |
| 51 | + Condition: |
| 52 | + Fn::Equals: |
| 53 | + - ${InstanceSource} |
| 54 | + - CreateNew |
| 55 | + InstanceType: |
| 56 | + Type: String |
| 57 | + Default: null |
| 58 | + Required: true |
| 59 | + Label: |
| 60 | + en: Instance Type |
| 61 | + zh-cn: 实例类型 |
| 62 | + AssociationProperty: ALIYUN::ECS::Instance::InstanceType |
| 63 | + AssociationPropertyMetadata: |
| 64 | + ZoneId: ${ZoneId} |
| 65 | + SpotStrategy: SpotAsPriceGo |
| 66 | + InstanceChargeType: PostPaid |
| 67 | + SystemDiskCategory: cloud_essd |
| 68 | + Visible: |
| 69 | + Condition: |
| 70 | + Fn::Equals: |
| 71 | + - ${InstanceSource} |
| 72 | + - CreateNew |
| 73 | + InstancePassword: |
| 74 | + Type: String |
| 75 | + NoEcho: true |
| 76 | + Default: null |
| 77 | + Confirm: true |
| 78 | + Description: |
| 79 | + en: >- |
| 80 | + Server login password, Length 8-30, must contain three(Capital letters, |
| 81 | + lowercase letters, numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special |
| 82 | + symbol in) |
| 83 | + zh-cn: >- |
| 84 | + 服务器登录密码,长度8-30,必须包含三项(大写字母、小写字母、数字、 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ |
| 85 | + 中的特殊符号) |
| 86 | + Label: |
| 87 | + en: Instance Password |
| 88 | + zh-cn: 实例密码 |
| 89 | + ConstraintDescription: |
| 90 | + en: >- |
| 91 | + Length 8-30, must contain three(Capital letters, lowercase letters, |
| 92 | + numbers, ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ Special symbol in) |
| 93 | + zh-cn: '长度8-30,必须包含三项(大写字母、小写字母、数字、 ()`~!@#$%^&*_-+=|{}[]:;''<>,.?/ 中的特殊符号)' |
| 94 | + AssociationProperty: 'ALIYUN::ECS::Instance::Password' |
| 95 | + AssociationPropertyMetadata: |
| 96 | + Visible: |
| 97 | + Condition: |
| 98 | + Fn::Equals: |
| 99 | + - ${InstanceSource} |
| 100 | + - CreateNew |
| 101 | + EcsInstanceId: |
| 102 | + Type: String |
| 103 | + Default: null |
| 104 | + Label: |
| 105 | + en: ECS Instance ID |
| 106 | + zh-cn: ECS实例ID |
| 107 | + AssociationProperty: ALIYUN::ECS::Instance::InstanceId |
| 108 | + AssociationPropertyMetadata: |
| 109 | + Status: Running |
| 110 | + Visible: |
| 111 | + Condition: |
| 112 | + Fn::Equals: |
| 113 | + - ${InstanceSource} |
| 114 | + - UseExisted |
| 115 | + CommonName: |
| 116 | + Type: String |
| 117 | + Default: wordpress |
| 118 | +Conditions: |
| 119 | + CreateInstance: |
| 120 | + Fn::Equals: |
| 121 | + - Ref: InstanceSource |
| 122 | + - CreateNew |
| 123 | + UseExistedInstance: |
| 124 | + Fn::Equals: |
| 125 | + - Ref: InstanceSource |
| 126 | + - UseExisted |
| 127 | +Resources: |
| 128 | + Vpc: |
| 129 | + Type: 'ALIYUN::ECS::VPC' |
| 130 | + Condition: CreateInstance |
| 131 | + Properties: |
| 132 | + CidrBlock: 192.168.0.0/16 |
| 133 | + VpcName: |
| 134 | + Fn::Sub: ${CommonName}-vpc |
| 135 | + VSwitch: |
| 136 | + Type: 'ALIYUN::ECS::VSwitch' |
| 137 | + Condition: CreateInstance |
| 138 | + Properties: |
| 139 | + VpcId: |
| 140 | + Ref: Vpc |
| 141 | + CidrBlock: 192.168.0.0/24 |
| 142 | + ZoneId: |
| 143 | + Ref: ZoneId |
| 144 | + VSwitchName: |
| 145 | + Fn::Sub: ${CommonName}-vsw |
| 146 | + SecurityGroup: |
| 147 | + Type: 'ALIYUN::ECS::SecurityGroup' |
| 148 | + Condition: CreateInstance |
| 149 | + Properties: |
| 150 | + VpcId: |
| 151 | + Ref: Vpc |
| 152 | + SecurityGroupName: |
| 153 | + Fn::Sub: ${CommonName}-sg |
| 154 | + SecurityGroupIngress: |
| 155 | + - PortRange: 22/22 |
| 156 | + SourceCidrIp: 0.0.0.0/0 |
| 157 | + IpProtocol: tcp |
| 158 | + - PortRange: 3389/3389 |
| 159 | + SourceCidrIp: 0.0.0.0/0 |
| 160 | + IpProtocol: tcp |
| 161 | + - PortRange: 80/80 |
| 162 | + SourceCidrIp: 0.0.0.0/0 |
| 163 | + IpProtocol: tcp |
| 164 | + - PortRange: '-1/-1' |
| 165 | + SourceCidrIp: 0.0.0.0/0 |
| 166 | + IpProtocol: icmp |
| 167 | + EcsInstance: |
| 168 | + Type: 'ALIYUN::ECS::InstanceGroup' |
| 169 | + Condition: CreateInstance |
| 170 | + Properties: |
| 171 | + VpcId: |
| 172 | + Ref: Vpc |
| 173 | + ZoneId: |
| 174 | + Ref: ZoneId |
| 175 | + VSwitchId: |
| 176 | + Ref: VSwitch |
| 177 | + SecurityGroupId: |
| 178 | + Ref: SecurityGroup |
| 179 | + ImageId: |
| 180 | + Ref: ImageId |
| 181 | + InstanceName: |
| 182 | + Fn::Sub: ${CommonName}-ecs |
| 183 | + InstanceType: |
| 184 | + Ref: InstanceType |
| 185 | + SystemDiskCategory: cloud_essd |
| 186 | + MaxAmount: 1 |
| 187 | + InternetMaxBandwidthOut: 100 |
| 188 | + SpotStrategy: SpotAsPriceGo |
| 189 | + Password: |
| 190 | + Ref: InstancePassword |
| 191 | + ModuleInstallWordpress: |
| 192 | + Version: default |
| 193 | + Type: 'MODULE::ACS::OOS::Extension' |
| 194 | + Properties: |
| 195 | + EcsInstanceIds: |
| 196 | + - Fn::If: |
| 197 | + - UseExistedInstance |
| 198 | + - Ref: EcsInstanceId |
| 199 | + - Ref: EcsInstance |
| 200 | + PackageName: ACS-Extension-WordPress-One-Click-1853370294850618 |
| 201 | + DsEcs: |
| 202 | + Type: 'DATASOURCE::ECS::Instances' |
| 203 | + Properties: |
| 204 | + InstanceIds: |
| 205 | + - Fn::If: |
| 206 | + - UseExistedInstance |
| 207 | + - Ref: EcsInstanceId |
| 208 | + - Ref: EcsInstance |
| 209 | +Outputs: |
| 210 | + EcsLoginAddress: |
| 211 | + Description: |
| 212 | + en: Ecs login address. |
| 213 | + zh-cn: ECS登录地址。 |
| 214 | + Value: |
| 215 | + Fn::Sub: |
| 216 | + - https://ecs-workbench.aliyun.com/?from=EcsConsole&instanceType=ecs®ionId=${ALIYUN::Region}&instanceId=${InstanceId} |
| 217 | + - InstanceId: |
| 218 | + Fn::If: |
| 219 | + - UseExistedInstance |
| 220 | + - Ref: EcsInstanceId |
| 221 | + - Ref: EcsInstance |
| 222 | +Metadata: |
| 223 | + ALIYUN::ROS::Interface: |
| 224 | + ParameterGroups: |
| 225 | + - Parameters: |
| 226 | + - InstanceSource |
| 227 | + - ZoneId |
| 228 | + - ImageId |
| 229 | + - InstanceType |
| 230 | + - InstancePassword |
| 231 | + - EcsInstanceId |
| 232 | + Hidden: |
| 233 | + - CommonName |
| 234 | + - Ipv6CidrBlockNumber |
| 235 | + TemplateTags: |
| 236 | + - acs:document-help:ecs:在ECS实例上搭建WordPress博客平台 |
0 commit comments