Tatyana Leontovich | c8b8ca2 | 2017-05-19 13:37:05 +0300 | [diff] [blame] | 1 | # Set the repository suite, one of the: 'nightly', 'testing', 'stable', or any other required |
| 2 | {% set REPOSITORY_SUITE = os_env('REPOSITORY_SUITE', 'stable') %} |
| 3 | |
| 4 | {% import 'virtual-mcp11-k8s-calico/underlay--meta-data.yaml' as CLOUDINIT_META_DATA with context %} |
| 5 | {% import 'virtual-mcp11-k8s-calico/underlay--user-data-cfg01.yaml' as CLOUDINIT_USER_DATA_CFG01 with context %} |
| 6 | {% import 'virtual-mcp11-k8s-calico/underlay--user-data1604.yaml' as CLOUDINIT_USER_DATA_1604 with context %} |
| 7 | |
Sergii Golovatiuk | 57bb8e7 | 2017-05-16 19:49:49 +0200 | [diff] [blame] | 8 | --- |
| 9 | aliases: |
Tatyana Leontovich | c8b8ca2 | 2017-05-19 13:37:05 +0300 | [diff] [blame] | 10 | - &interface_model {{ os_env('INTERFACE_MODEL', 'virtio') }} |
| 11 | - &cloudinit_meta_data {{ CLOUDINIT_META_DATA }} |
| 12 | - &cloudinit_user_data_cfg01 {{ CLOUDINIT_USER_DATA_CFG01 }} |
| 13 | - &cloudinit_user_data_1604 {{ CLOUDINIT_USER_DATA_1604 }} |
Sergii Golovatiuk | 57bb8e7 | 2017-05-16 19:49:49 +0200 | [diff] [blame] | 14 | |
| 15 | {% set DOMAIN_NAME = os_env('LAB_CONFIG_NAME', 'virtual-mcp11-k8s-calico.local') + '.local' %} |
| 16 | {% set HOSTNAME_CFG01 = os_env('HOSTNAME_CFG01', 'cfg01.' + DOMAIN_NAME) %} |
| 17 | {% set HOSTNAME_CTL01 = os_env('HOSTNAME_CTL01', 'ctl01.' + DOMAIN_NAME) %} |
| 18 | {% set HOSTNAME_CTL02 = os_env('HOSTNAME_CTL02', 'ctl02.' + DOMAIN_NAME) %} |
| 19 | {% set HOSTNAME_CTL03 = os_env('HOSTNAME_CTL03', 'ctl03.' + DOMAIN_NAME) %} |
| 20 | {% set HOSTNAME_CMP01 = os_env('HOSTNAME_CMP01', 'cmp01.' + DOMAIN_NAME) %} |
| 21 | {% set HOSTNAME_CMP02 = os_env('HOSTNAME_CMP02', 'cmp02.' + DOMAIN_NAME) %} |
| 22 | {% set HOSTNAME_MON01 = os_env('HOSTNAME_MON01', 'mon01.' + DOMAIN_NAME) %} |
| 23 | {% set HOSTNAME_MON02 = os_env('HOSTNAME_MON02', 'mon02.' + DOMAIN_NAME) %} |
| 24 | {% set HOSTNAME_MON03 = os_env('HOSTNAME_MON03', 'mon03.' + DOMAIN_NAME) %} |
| 25 | {% set HOSTNAME_PRX01 = os_env('HOSTNAME_PRX01', 'prx01.' + DOMAIN_NAME) %} |
| 26 | |
| 27 | template: |
| 28 | devops_settings: |
Tatyana Leontovich | c8b8ca2 | 2017-05-19 13:37:05 +0300 | [diff] [blame] | 29 | env_name: {{ os_env('ENV_NAME', 'virtual-mcp11-k8s-calico_' + REPOSITORY_SUITE + "_" + os_env('BUILD_NUMBER', '')) }} |
Sergii Golovatiuk | 57bb8e7 | 2017-05-16 19:49:49 +0200 | [diff] [blame] | 30 | |
| 31 | address_pools: |
| 32 | admin-pool01: |
Tatyana Leontovich | e4fe531 | 2017-05-19 14:40:06 +0300 | [diff] [blame] | 33 | net: {{ os_env('ADMIN_ADDRESS_POOL01', '10.70.0.0/16:24') }} |
Sergii Golovatiuk | 57bb8e7 | 2017-05-16 19:49:49 +0200 | [diff] [blame] | 34 | params: |
| 35 | ip_reserved: |
| 36 | gateway: +1 |
| 37 | l2_network_device: +1 |
| 38 | default_{{ HOSTNAME_CFG01 }}: +100 |
| 39 | default_{{ HOSTNAME_CTL01 }}: +101 |
| 40 | default_{{ HOSTNAME_CTL02 }}: +102 |
| 41 | default_{{ HOSTNAME_CTL03 }}: +103 |
| 42 | default_{{ HOSTNAME_CMP01 }}: +105 |
| 43 | default_{{ HOSTNAME_CMP02 }}: +106 |
| 44 | default_{{ HOSTNAME_MON01 }}: +107 |
| 45 | default_{{ HOSTNAME_MON02 }}: +108 |
| 46 | default_{{ HOSTNAME_MON03 }}: +109 |
| 47 | default_{{ HOSTNAME_PRX01 }}: +110 |
| 48 | ip_ranges: |
| 49 | dhcp: [+90, -10] |
| 50 | |
| 51 | private-pool01: |
Tatyana Leontovich | e4fe531 | 2017-05-19 14:40:06 +0300 | [diff] [blame] | 52 | net: {{ os_env('PRIVATE_ADDRESS_POOL01', '10.60.0.0/16:24') }} |
Sergii Golovatiuk | 57bb8e7 | 2017-05-16 19:49:49 +0200 | [diff] [blame] | 53 | params: |
| 54 | ip_reserved: |
| 55 | gateway: +1 |
| 56 | l2_network_device: +1 |
| 57 | default_{{ HOSTNAME_CFG01 }}: +100 |
| 58 | default_{{ HOSTNAME_CTL01 }}: +101 |
| 59 | default_{{ HOSTNAME_CTL02 }}: +102 |
| 60 | default_{{ HOSTNAME_CTL03 }}: +103 |
| 61 | default_{{ HOSTNAME_CMP01 }}: +105 |
| 62 | default_{{ HOSTNAME_CMP02 }}: +106 |
| 63 | default_{{ HOSTNAME_MON01 }}: +107 |
| 64 | default_{{ HOSTNAME_MON02 }}: +108 |
| 65 | default_{{ HOSTNAME_MON03 }}: +109 |
| 66 | default_{{ HOSTNAME_PRX01 }}: +110 |
| 67 | ip_ranges: |
| 68 | dhcp: [+90, -10] |
| 69 | |
| 70 | groups: |
| 71 | - name: default |
| 72 | driver: |
| 73 | name: devops.driver.libvirt |
| 74 | params: |
| 75 | connection_string: !os_env CONNECTION_STRING, qemu:///system |
| 76 | storage_pool_name: !os_env STORAGE_POOL_NAME, default |
| 77 | stp: False |
| 78 | hpet: False |
| 79 | enable_acpi: true |
| 80 | use_host_cpu: !os_env DRIVER_USE_HOST_CPU, true |
| 81 | |
| 82 | network_pools: |
| 83 | admin: admin-pool01 |
| 84 | private: private-pool01 |
| 85 | |
| 86 | l2_network_devices: |
| 87 | private: |
| 88 | address_pool: private-pool01 |
| 89 | dhcp: true |
| 90 | |
| 91 | admin: |
| 92 | address_pool: admin-pool01 |
| 93 | dhcp: true |
| 94 | forward: |
| 95 | mode: nat |
| 96 | |
| 97 | group_volumes: |
Sergii Golovatiuk | 57bb8e7 | 2017-05-16 19:49:49 +0200 | [diff] [blame] | 98 | - name: cloudimage1604 # This name is used for 'backing_store' option for node volumes. |
| 99 | source_image: !os_env IMAGE_PATH1604 # https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img or |
| 100 | # http://apt.tcpcloud.eu/images/ubuntu-16-04-x64-201608231004.qcow2 |
| 101 | format: qcow2 |
| 102 | |
| 103 | nodes: |
| 104 | - name: {{ HOSTNAME_CFG01 }} |
| 105 | role: salt_master |
| 106 | params: |
| 107 | vcpu: !os_env SLAVE_NODE_CPU, 4 |
| 108 | memory: !os_env SLAVE_NODE_MEMORY, 1536 |
| 109 | boot: |
| 110 | - hd |
| 111 | cloud_init_volume_name: iso |
| 112 | cloud_init_iface_up: ens3 |
| 113 | volumes: |
| 114 | - name: system |
| 115 | capacity: !os_env NODE_VOLUME_SIZE, 150 |
| 116 | backing_store: cloudimage1604 |
| 117 | format: qcow2 |
| 118 | - name: iso # Volume with name 'iso' will be used |
| 119 | # for store image with cloud-init metadata. |
| 120 | capacity: 1 |
| 121 | format: raw |
| 122 | device: cdrom |
| 123 | bus: ide |
| 124 | cloudinit_meta_data: !include underlay--meta-data.yaml |
| 125 | cloudinit_user_data: !include underlay--user-data-cfg01.yaml |
| 126 | |
| 127 | interfaces: |
| 128 | - label: ens3 |
| 129 | l2_network_device: admin |
| 130 | interface_model: *interface_model |
| 131 | - label: ens4 |
| 132 | l2_network_device: private |
| 133 | interface_model: *interface_model |
| 134 | network_config: |
| 135 | ens3: |
| 136 | networks: |
| 137 | - admin |
| 138 | ens4: |
| 139 | networks: |
| 140 | - private |
| 141 | |
| 142 | - name: {{ HOSTNAME_CTL01 }} |
| 143 | role: salt_minion |
| 144 | params: |
| 145 | vcpu: !os_env SLAVE_NODE_CPU, 4 |
Tatyana Leontovich | 64126da | 2017-06-12 15:28:11 +0300 | [diff] [blame] | 146 | memory: !os_env SLAVE_NODE_MEMORY, 2048 |
Sergii Golovatiuk | 57bb8e7 | 2017-05-16 19:49:49 +0200 | [diff] [blame] | 147 | boot: |
| 148 | - hd |
| 149 | cloud_init_volume_name: iso |
| 150 | cloud_init_iface_up: ens3 |
| 151 | volumes: |
| 152 | - name: system |
| 153 | capacity: !os_env NODE_VOLUME_SIZE, 150 |
| 154 | backing_store: cloudimage1604 |
| 155 | format: qcow2 |
| 156 | - name: cinder |
| 157 | capacity: 50 |
| 158 | format: qcow2 |
| 159 | - name: iso # Volume with name 'iso' will be used |
| 160 | # for store image with cloud-init metadata. |
| 161 | capacity: 1 |
| 162 | format: raw |
| 163 | device: cdrom |
| 164 | bus: ide |
| 165 | cloudinit_meta_data: !include underlay--meta-data.yaml |
| 166 | cloudinit_user_data: !include underlay--user-data1604.yaml |
| 167 | |
| 168 | interfaces: &interfaces |
| 169 | - label: ens3 |
| 170 | l2_network_device: admin |
| 171 | interface_model: *interface_model |
| 172 | - label: ens4 |
| 173 | l2_network_device: private |
| 174 | interface_model: *interface_model |
| 175 | network_config: &network_config |
| 176 | ens3: |
| 177 | networks: |
| 178 | - admin |
| 179 | ens4: |
| 180 | networks: |
| 181 | - private |
| 182 | |
| 183 | - name: {{ HOSTNAME_CTL02 }} |
vrovachev | 99228d3 | 2017-06-08 19:46:10 +0400 | [diff] [blame^] | 184 | role: k8s_virtlet |
Sergii Golovatiuk | 57bb8e7 | 2017-05-16 19:49:49 +0200 | [diff] [blame] | 185 | params: |
| 186 | vcpu: !os_env SLAVE_NODE_CPU, 4 |
Tatyana Leontovich | 64126da | 2017-06-12 15:28:11 +0300 | [diff] [blame] | 187 | memory: !os_env SLAVE_NODE_MEMORY, 2048 |
Sergii Golovatiuk | 57bb8e7 | 2017-05-16 19:49:49 +0200 | [diff] [blame] | 188 | boot: |
| 189 | - hd |
| 190 | cloud_init_volume_name: iso |
| 191 | cloud_init_iface_up: ens3 |
| 192 | volumes: |
| 193 | - name: system |
| 194 | capacity: !os_env NODE_VOLUME_SIZE, 150 |
| 195 | backing_store: cloudimage1604 |
| 196 | format: qcow2 |
| 197 | - name: cinder |
| 198 | capacity: 50 |
| 199 | format: qcow2 |
| 200 | - name: iso # Volume with name 'iso' will be used |
| 201 | # for store image with cloud-init metadata. |
| 202 | capacity: 1 |
| 203 | format: raw |
| 204 | device: cdrom |
| 205 | bus: ide |
| 206 | cloudinit_meta_data: !include underlay--meta-data.yaml |
| 207 | cloudinit_user_data: !include underlay--user-data1604.yaml |
| 208 | |
| 209 | interfaces: *interfaces |
| 210 | network_config: *network_config |
| 211 | |
| 212 | - name: {{ HOSTNAME_CTL03 }} |
| 213 | role: salt_minion |
| 214 | params: |
| 215 | vcpu: !os_env SLAVE_NODE_CPU, 4 |
Tatyana Leontovich | 64126da | 2017-06-12 15:28:11 +0300 | [diff] [blame] | 216 | memory: !os_env SLAVE_NODE_MEMORY, 2048 |
Sergii Golovatiuk | 57bb8e7 | 2017-05-16 19:49:49 +0200 | [diff] [blame] | 217 | boot: |
| 218 | - hd |
| 219 | cloud_init_volume_name: iso |
| 220 | cloud_init_iface_up: ens3 |
| 221 | volumes: |
| 222 | - name: system |
| 223 | capacity: !os_env NODE_VOLUME_SIZE, 150 |
| 224 | backing_store: cloudimage1604 |
| 225 | format: qcow2 |
| 226 | - name: cinder |
| 227 | capacity: 50 |
| 228 | format: qcow2 |
| 229 | - name: iso # Volume with name 'iso' will be used |
| 230 | # for store image with cloud-init metadata. |
| 231 | capacity: 1 |
| 232 | format: raw |
| 233 | device: cdrom |
| 234 | bus: ide |
| 235 | cloudinit_meta_data: !include underlay--meta-data.yaml |
| 236 | cloudinit_user_data: !include underlay--user-data1604.yaml |
| 237 | |
| 238 | interfaces: *interfaces |
| 239 | network_config: *network_config |
| 240 | |
| 241 | - name: {{ HOSTNAME_CMP01 }} |
| 242 | role: salt_minion |
| 243 | params: |
| 244 | vcpu: !os_env SLAVE_NODE_CPU, 4 |
| 245 | memory: !os_env SLAVE_NODE_MEMORY, 2048 |
| 246 | boot: |
| 247 | - hd |
| 248 | cloud_init_volume_name: iso |
| 249 | cloud_init_iface_up: ens3 |
| 250 | volumes: |
| 251 | - name: system |
| 252 | capacity: !os_env NODE_VOLUME_SIZE, 150 |
| 253 | backing_store: cloudimage1604 |
| 254 | format: qcow2 |
| 255 | - name: iso # Volume with name 'iso' will be used |
| 256 | # for store image with cloud-init metadata. |
| 257 | capacity: 1 |
| 258 | format: raw |
| 259 | device: cdrom |
| 260 | bus: ide |
| 261 | cloudinit_meta_data: !include underlay--meta-data.yaml |
| 262 | cloudinit_user_data: !include underlay--user-data1604.yaml |
| 263 | |
| 264 | interfaces: &all_interfaces |
| 265 | - label: ens3 |
| 266 | l2_network_device: admin |
| 267 | interface_model: *interface_model |
| 268 | - label: ens4 |
| 269 | l2_network_device: private |
| 270 | interface_model: *interface_model |
| 271 | network_config: &all_network_config |
| 272 | ens3: |
| 273 | networks: |
| 274 | - admin |
| 275 | ens4: |
| 276 | networks: |
| 277 | - private |
| 278 | |
| 279 | - name: {{ HOSTNAME_CMP02 }} |
| 280 | role: salt_minion |
| 281 | params: |
| 282 | vcpu: !os_env SLAVE_NODE_CPU, 4 |
| 283 | memory: !os_env SLAVE_NODE_MEMORY, 2048 |
| 284 | boot: |
| 285 | - hd |
| 286 | cloud_init_volume_name: iso |
| 287 | cloud_init_iface_up: ens3 |
| 288 | volumes: |
| 289 | - name: system |
| 290 | capacity: !os_env NODE_VOLUME_SIZE, 150 |
| 291 | backing_store: cloudimage1604 |
| 292 | format: qcow2 |
| 293 | - name: iso # Volume with name 'iso' will be used |
| 294 | # for store image with cloud-init metadata. |
| 295 | capacity: 1 |
| 296 | format: raw |
| 297 | device: cdrom |
| 298 | bus: ide |
| 299 | cloudinit_meta_data: !include underlay--meta-data.yaml |
| 300 | cloudinit_user_data: !include underlay--user-data1604.yaml |
| 301 | |
| 302 | interfaces: *interfaces |
| 303 | network_config: *network_config |
| 304 | |
| 305 | - name: {{ HOSTNAME_MON01 }} |
| 306 | role: salt_minion |
| 307 | params: |
| 308 | vcpu: !os_env SLAVE_NODE_CPU, 4 |
Tatyana Leontovich | 64126da | 2017-06-12 15:28:11 +0300 | [diff] [blame] | 309 | memory: !os_env SLAVE_NODE_MEMORY, 4096 |
Sergii Golovatiuk | 57bb8e7 | 2017-05-16 19:49:49 +0200 | [diff] [blame] | 310 | boot: |
| 311 | - hd |
| 312 | cloud_init_volume_name: iso |
| 313 | cloud_init_iface_up: ens3 |
| 314 | volumes: |
| 315 | - name: system |
| 316 | capacity: !os_env NODE_VOLUME_SIZE, 150 |
| 317 | backing_store: cloudimage1604 |
| 318 | format: qcow2 |
| 319 | - name: iso # Volume with name 'iso' will be used |
| 320 | # for store image with cloud-init metadata. |
| 321 | capacity: 1 |
| 322 | format: raw |
| 323 | device: cdrom |
| 324 | bus: ide |
| 325 | cloudinit_meta_data: !include underlay--meta-data.yaml |
| 326 | cloudinit_user_data: !include underlay--user-data1604.yaml |
| 327 | |
| 328 | interfaces: *interfaces |
| 329 | network_config: *network_config |
| 330 | |
| 331 | - name: {{ HOSTNAME_MON02 }} |
| 332 | role: salt_minion |
| 333 | params: |
| 334 | vcpu: !os_env SLAVE_NODE_CPU, 4 |
Tatyana Leontovich | 64126da | 2017-06-12 15:28:11 +0300 | [diff] [blame] | 335 | memory: !os_env SLAVE_NODE_MEMORY, 4096 |
Sergii Golovatiuk | 57bb8e7 | 2017-05-16 19:49:49 +0200 | [diff] [blame] | 336 | boot: |
| 337 | - hd |
| 338 | cloud_init_volume_name: iso |
| 339 | cloud_init_iface_up: ens3 |
| 340 | volumes: |
| 341 | - name: system |
| 342 | capacity: !os_env NODE_VOLUME_SIZE, 150 |
| 343 | backing_store: cloudimage1604 |
| 344 | format: qcow2 |
| 345 | - name: iso # Volume with name 'iso' will be used |
| 346 | # for store image with cloud-init metadata. |
| 347 | capacity: 1 |
| 348 | format: raw |
| 349 | device: cdrom |
| 350 | bus: ide |
| 351 | cloudinit_meta_data: !include underlay--meta-data.yaml |
| 352 | cloudinit_user_data: !include underlay--user-data1604.yaml |
| 353 | |
| 354 | interfaces: *interfaces |
| 355 | network_config: *network_config |
| 356 | |
| 357 | - name: {{ HOSTNAME_MON03 }} |
| 358 | role: salt_minion |
| 359 | params: |
| 360 | vcpu: !os_env SLAVE_NODE_CPU, 4 |
Tatyana Leontovich | 64126da | 2017-06-12 15:28:11 +0300 | [diff] [blame] | 361 | memory: !os_env SLAVE_NODE_MEMORY, 4096 |
Sergii Golovatiuk | 57bb8e7 | 2017-05-16 19:49:49 +0200 | [diff] [blame] | 362 | boot: |
| 363 | - hd |
| 364 | cloud_init_volume_name: iso |
| 365 | cloud_init_iface_up: ens3 |
| 366 | volumes: |
| 367 | - name: system |
| 368 | capacity: !os_env NODE_VOLUME_SIZE, 150 |
| 369 | backing_store: cloudimage1604 |
| 370 | format: qcow2 |
| 371 | - name: iso # Volume with name 'iso' will be used |
| 372 | # for store image with cloud-init metadata. |
| 373 | capacity: 1 |
| 374 | format: raw |
| 375 | device: cdrom |
| 376 | bus: ide |
| 377 | cloudinit_meta_data: !include underlay--meta-data.yaml |
| 378 | cloudinit_user_data: !include underlay--user-data1604.yaml |
| 379 | |
| 380 | interfaces: *interfaces |
| 381 | network_config: *network_config |
| 382 | |
| 383 | - name: {{ HOSTNAME_PRX01 }} |
| 384 | role: salt_minion |
| 385 | params: |
| 386 | vcpu: !os_env SLAVE_NODE_CPU, 4 |
| 387 | memory: !os_env SLAVE_NODE_MEMORY, 1024 |
| 388 | boot: |
| 389 | - hd |
| 390 | cloud_init_volume_name: iso |
| 391 | cloud_init_iface_up: ens3 |
| 392 | volumes: |
| 393 | - name: system |
| 394 | capacity: !os_env NODE_VOLUME_SIZE, 150 |
| 395 | backing_store: cloudimage1604 |
| 396 | format: qcow2 |
| 397 | - name: iso # Volume with name 'iso' will be used |
| 398 | # for store image with cloud-init metadata. |
| 399 | capacity: 1 |
| 400 | format: raw |
| 401 | device: cdrom |
| 402 | bus: ide |
| 403 | cloudinit_meta_data: !include underlay--meta-data.yaml |
| 404 | cloudinit_user_data: !include underlay--user-data1604.yaml |
| 405 | |
| 406 | interfaces: *interfaces |
| 407 | network_config: *network_config |