sgudz | b881972 | 2019-05-16 22:34:31 +0300 | [diff] [blame^] | 1 | --- |
| 2 | |
| 3 | heat_template_version: queens |
| 4 | |
| 5 | description: MCP environment for heat-cicd-k8s-genie |
| 6 | |
| 7 | parameters: |
| 8 | instance_domain: |
| 9 | type: string |
| 10 | default: heat-cicd-k8s-genie.local |
| 11 | mcp_version: |
| 12 | type: string |
| 13 | env_name: |
| 14 | type: string |
| 15 | control_subnet_cidr: |
| 16 | type: string |
| 17 | management_subnet_cidr: |
| 18 | type: string |
| 19 | management_subnet_pool_start: |
| 20 | type: string |
| 21 | management_subnet_pool_end: |
| 22 | type: string |
| 23 | management_subnet_cfg01_ip: |
| 24 | type: string |
| 25 | management_subnet_gateway_ip: |
| 26 | type: string |
| 27 | |
| 28 | key_pair: |
| 29 | type: string |
| 30 | |
| 31 | ctl_flavor: |
| 32 | type: string |
| 33 | cfg_flavor: |
| 34 | type: string |
| 35 | cid_flavor: |
| 36 | type: string |
| 37 | kvm_fake_flavor: |
| 38 | type: string |
| 39 | mon_flavor: |
| 40 | type: string |
| 41 | log_flavor: |
| 42 | type: string |
| 43 | mtr_flavor: |
| 44 | type: string |
| 45 | cmp_flavor: |
| 46 | type: string |
| 47 | foundation_flavor: |
| 48 | type: string |
| 49 | |
| 50 | net_public: |
| 51 | type: string |
| 52 | |
| 53 | resources: |
| 54 | networks: |
| 55 | type: MCP::Networks |
| 56 | properties: |
| 57 | stack_name: { get_param: "OS::stack_name" } |
| 58 | env_name: { get_param: env_name } |
| 59 | |
| 60 | #flavors: |
| 61 | # type: MCP::Flavors |
| 62 | |
| 63 | cfg01_node: |
| 64 | type: MCP::MasterNode |
| 65 | depends_on: [networks] |
| 66 | properties: |
| 67 | env_name: { get_param: env_name } |
| 68 | mcp_version: { get_param: mcp_version } |
| 69 | cfg01_flavor: { get_param: cfg_flavor } |
| 70 | instance_name: cfg01 |
| 71 | instance_domain: {get_param: instance_domain} |
| 72 | network: { get_attr: [networks, network] } |
| 73 | |
| 74 | control_cluster: |
| 75 | type: MCP::MultipleInstance |
| 76 | depends_on: [cfg01_node] |
| 77 | properties: |
| 78 | env_name: { get_param: env_name } |
| 79 | mcp_version: { get_param: mcp_version } |
| 80 | instance_domain: {get_param: instance_domain} |
| 81 | instance01_name: ctl01 |
| 82 | instance02_name: ctl02 |
| 83 | instance03_name: ctl03 |
| 84 | instance01_role: [k8s_controller] |
| 85 | instance_flavor: {get_param: ctl_flavor} |
| 86 | network: { get_attr: [networks, network] } |
| 87 | underlay_userdata: { get_file: ./underlay-userdata.yaml } |
| 88 | instance01_control_net_static_ip: |
| 89 | list_join: |
| 90 | - '.' |
| 91 | - [ { get_attr: [networks, control_net_prefix] }, '11' ] |
| 92 | instance02_control_net_static_ip: |
| 93 | list_join: |
| 94 | - '.' |
| 95 | - [ { get_attr: [networks, control_net_prefix] }, '12' ] |
| 96 | instance03_control_net_static_ip: |
| 97 | list_join: |
| 98 | - '.' |
| 99 | - [ { get_attr: [networks, control_net_prefix] }, '13' ] |
| 100 | |
| 101 | instance_config_host: { get_attr: [cfg01_node, instance_address] } |
| 102 | |
| 103 | fake_kvm_cluster: |
| 104 | type: MCP::MultipleInstance |
| 105 | depends_on: [control_cluster] |
| 106 | properties: |
| 107 | env_name: { get_param: env_name } |
| 108 | mcp_version: { get_param: mcp_version } |
| 109 | instance_domain: {get_param: instance_domain} |
| 110 | instance01_name: kvm01 |
| 111 | instance02_name: kvm02 |
| 112 | instance03_name: kvm03 |
| 113 | instance_flavor: {get_param: kvm_fake_flavor} |
| 114 | network: { get_attr: [networks, network] } |
| 115 | underlay_userdata: { get_file: ./underlay-userdata.yaml } |
| 116 | instance01_control_net_static_ip: |
| 117 | list_join: |
| 118 | - '.' |
| 119 | - [ { get_attr: [networks, control_net_prefix] }, '241' ] |
| 120 | instance02_control_net_static_ip: |
| 121 | list_join: |
| 122 | - '.' |
| 123 | - [ { get_attr: [networks, control_net_prefix] }, '242' ] |
| 124 | instance03_control_net_static_ip: |
| 125 | list_join: |
| 126 | - '.' |
| 127 | - [ { get_attr: [networks, control_net_prefix] }, '243' ] |
| 128 | |
| 129 | instance_config_host: { get_attr: [cfg01_node, instance_address] } |
| 130 | |
| 131 | cicd_cluster: |
| 132 | type: MCP::MultipleInstance |
| 133 | depends_on: [fake_kvm_cluster] |
| 134 | properties: |
| 135 | env_name: { get_param: env_name } |
| 136 | mcp_version: { get_param: mcp_version } |
| 137 | instance_domain: {get_param: instance_domain} |
| 138 | instance01_name: cid01 |
| 139 | instance02_name: cid02 |
| 140 | instance03_name: cid03 |
| 141 | instance_flavor: {get_param: cid_flavor} |
| 142 | network: { get_attr: [networks, network] } |
| 143 | underlay_userdata: { get_file: ./underlay-userdata.yaml } |
| 144 | instance01_control_net_static_ip: |
| 145 | list_join: |
| 146 | - '.' |
| 147 | - [ { get_attr: [networks, control_net_prefix] }, '91' ] |
| 148 | instance02_control_net_static_ip: |
| 149 | list_join: |
| 150 | - '.' |
| 151 | - [ { get_attr: [networks, control_net_prefix] }, '92' ] |
| 152 | instance03_control_net_static_ip: |
| 153 | list_join: |
| 154 | - '.' |
| 155 | - [ { get_attr: [networks, control_net_prefix] }, '93' ] |
| 156 | |
| 157 | instance_config_host: { get_attr: [cfg01_node, instance_address] } |
| 158 | |
| 159 | prx01_virtual: |
| 160 | type: MCP::SingleInstance |
| 161 | depends_on: [cicd_cluster] |
| 162 | properties: |
| 163 | env_name: { get_param: env_name } |
| 164 | mcp_version: { get_param: mcp_version } |
| 165 | instance_domain: {get_param: instance_domain} |
| 166 | instance_name: prx01 |
| 167 | instance_flavor: {get_param: cid_flavor} |
| 168 | network: { get_attr: [networks, network] } |
| 169 | underlay_userdata: { get_file: ./underlay-userdata.yaml } |
| 170 | control_net_static_ip: |
| 171 | list_join: |
| 172 | - '.' |
| 173 | - [ { get_attr: [networks, control_net_prefix] }, '221' ] |
| 174 | instance_config_host: { get_attr: [cfg01_node, instance_address] } |
| 175 | |
| 176 | prx02_virtual: |
| 177 | type: MCP::SingleInstance |
| 178 | depends_on: [prx01_virtual] |
| 179 | properties: |
| 180 | env_name: { get_param: env_name } |
| 181 | mcp_version: { get_param: mcp_version } |
| 182 | instance_domain: {get_param: instance_domain} |
| 183 | instance_name: prx02 |
| 184 | instance_flavor: {get_param: cid_flavor} |
| 185 | network: { get_attr: [networks, network] } |
| 186 | underlay_userdata: { get_file: ./underlay-userdata.yaml } |
| 187 | control_net_static_ip: |
| 188 | list_join: |
| 189 | - '.' |
| 190 | - [ { get_attr: [networks, control_net_prefix] }, '222' ] |
| 191 | instance_config_host: { get_attr: [cfg01_node, instance_address] } |
| 192 | |
| 193 | cmp001_virtual: |
| 194 | type: MCP::Compute |
| 195 | depends_on: [prx02_virtual] |
| 196 | properties: |
| 197 | env_name: { get_param: env_name } |
| 198 | mcp_version: { get_param: mcp_version } |
| 199 | instance_domain: {get_param: instance_domain} |
| 200 | instance_name: cmp001 |
| 201 | instance_flavor: {get_param: cmp_flavor} |
| 202 | network: { get_attr: [networks, network] } |
| 203 | underlay_userdata: { get_file: ./underlay-userdata.yaml } |
| 204 | control_net_static_ip: |
| 205 | list_join: |
| 206 | - '.' |
| 207 | - [ { get_attr: [networks, control_net_prefix] }, '101' ] |
| 208 | instance_config_host: { get_attr: [cfg01_node, instance_address] } |
| 209 | |
| 210 | cmp002_virtual: |
| 211 | type: MCP::Compute |
| 212 | depends_on: [cmp001_virtual] |
| 213 | properties: |
| 214 | env_name: { get_param: env_name } |
| 215 | mcp_version: { get_param: mcp_version } |
| 216 | instance_domain: {get_param: instance_domain} |
| 217 | instance_name: cmp002 |
| 218 | instance_flavor: {get_param: cmp_flavor} |
| 219 | network: { get_attr: [networks, network] } |
| 220 | underlay_userdata: { get_file: ./underlay-userdata.yaml } |
| 221 | control_net_static_ip: |
| 222 | list_join: |
| 223 | - '.' |
| 224 | - [ { get_attr: [networks, control_net_prefix] }, '102' ] |
| 225 | instance_config_host: { get_attr: [cfg01_node, instance_address] } |
| 226 | |
| 227 | cmp003_virtual: |
| 228 | type: MCP::Compute |
| 229 | depends_on: [cmp002_virtual] |
| 230 | properties: |
| 231 | env_name: { get_param: env_name } |
| 232 | mcp_version: { get_param: mcp_version } |
| 233 | instance_domain: {get_param: instance_domain} |
| 234 | instance_name: cmp003 |
| 235 | instance_flavor: {get_param: cmp_flavor} |
| 236 | network: { get_attr: [networks, network] } |
| 237 | underlay_userdata: { get_file: ./underlay-userdata.yaml } |
| 238 | control_net_static_ip: |
| 239 | list_join: |
| 240 | - '.' |
| 241 | - [ { get_attr: [networks, control_net_prefix] }, '103' ] |
| 242 | instance_config_host: { get_attr: [cfg01_node, instance_address] } |
| 243 | |
| 244 | cmp004_virtual: |
| 245 | type: MCP::Compute |
| 246 | depends_on: [cmp003_virtual] |
| 247 | properties: |
| 248 | env_name: { get_param: env_name } |
| 249 | mcp_version: { get_param: mcp_version } |
| 250 | instance_domain: {get_param: instance_domain} |
| 251 | instance_name: cmp004 |
| 252 | instance_flavor: {get_param: cmp_flavor} |
| 253 | network: { get_attr: [networks, network] } |
| 254 | underlay_userdata: { get_file: ./underlay-userdata.yaml } |
| 255 | control_net_static_ip: |
| 256 | list_join: |
| 257 | - '.' |
| 258 | - [ { get_attr: [networks, control_net_prefix] }, '104' ] |
| 259 | instance_config_host: { get_attr: [cfg01_node, instance_address] } |
| 260 | |
| 261 | foundation_node: |
| 262 | type: MCP::FoundationNode |
| 263 | depends_on: [networks] |
| 264 | properties: |
| 265 | env_name: { get_param: env_name } |
| 266 | mcp_version: { get_param: mcp_version } |
| 267 | instance_domain: {get_param: instance_domain} |
| 268 | instance_name: foundation |
| 269 | instance_flavor: {get_param: foundation_flavor} |
| 270 | network: { get_attr: [networks, network] } |
| 271 | underlay_userdata: { get_file: ./underlay--user-data-foundation.yaml } |
| 272 | control_net_static_ip: |
| 273 | list_join: |
| 274 | - '.' |
| 275 | - [ { get_attr: [networks, control_net_prefix] }, '5' ] |
| 276 | instance_config_host: { get_attr: [cfg01_node, instance_address] } |
| 277 | |
| 278 | outputs: |
| 279 | |
| 280 | control_subnet_cidr: |
| 281 | description: Control network CIDR |
| 282 | value: { get_param: control_subnet_cidr } |
| 283 | |
| 284 | management_subnet_cidr: |
| 285 | description: Admin network CIDR |
| 286 | value: { get_param: management_subnet_cidr } |
| 287 | |
| 288 | foundation_floating: |
| 289 | description: foundation node IP address (floating) from external network |
| 290 | value: |
| 291 | get_attr: |
| 292 | - foundation_node |
| 293 | - instance_floating_address |
| 294 | ... |