Artem Panchenko | edf70ef | 2017-06-13 09:14:34 +0300 | [diff] [blame] | 1 | # Set the repository suite, one of the: 'nightly', 'testing', 'stable', or any other required |
Dennis Dmitriev | 492813e | 2017-08-09 15:08:58 +0300 | [diff] [blame] | 2 | {% set REPOSITORY_SUITE = os_env('REPOSITORY_SUITE', 'testing') %} |
Artem Panchenko | edf70ef | 2017-06-13 09:14:34 +0300 | [diff] [blame] | 3 | |
| 4 | {% import 'virtual-mcp11-k8s-calico-minimal/underlay--meta-data.yaml' as CLOUDINIT_META_DATA with context %} |
| 5 | {% import 'virtual-mcp11-k8s-calico-minimal/underlay--user-data-cfg01.yaml' as CLOUDINIT_USER_DATA_CFG01 with context %} |
| 6 | {% import 'virtual-mcp11-k8s-calico-minimal/underlay--user-data1604.yaml' as CLOUDINIT_USER_DATA_1604 with context %} |
| 7 | |
| 8 | --- |
| 9 | aliases: |
| 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 }} |
| 14 | |
Dennis Dmitriev | 5ec4d57 | 2017-09-27 00:47:54 +0300 | [diff] [blame] | 15 | {% set LAB_CONFIG_NAME = os_env('LAB_CONFIG_NAME', 'virtual-mcp11-k8s-calico-minimal.local') %} |
| 16 | {% set DOMAIN_NAME = os_env('DOMAIN_NAME', LAB_CONFIG_NAME) + '.local' %} |
Artem Panchenko | edf70ef | 2017-06-13 09:14:34 +0300 | [diff] [blame] | 17 | {% set HOSTNAME_CFG01 = os_env('HOSTNAME_CFG01', 'cfg01.' + DOMAIN_NAME) %} |
| 18 | {% set HOSTNAME_CTL01 = os_env('HOSTNAME_CTL01', 'ctl01.' + DOMAIN_NAME) %} |
| 19 | {% set HOSTNAME_CTL02 = os_env('HOSTNAME_CTL02', 'ctl02.' + DOMAIN_NAME) %} |
| 20 | {% set HOSTNAME_CTL03 = os_env('HOSTNAME_CTL03', 'ctl03.' + DOMAIN_NAME) %} |
| 21 | {% set HOSTNAME_CMP01 = os_env('HOSTNAME_CMP01', 'cmp01.' + DOMAIN_NAME) %} |
| 22 | |
| 23 | |
| 24 | template: |
| 25 | devops_settings: |
| 26 | env_name: {{ os_env('ENV_NAME', 'virtual-mcp11-k8s-calico-minimal_' + REPOSITORY_SUITE + "_" + os_env('BUILD_NUMBER', '')) }} |
| 27 | |
| 28 | address_pools: |
| 29 | admin-pool01: |
| 30 | net: {{ os_env('ADMIN_ADDRESS_POOL01', '10.70.0.0/16:24') }} |
| 31 | params: |
| 32 | ip_reserved: |
| 33 | gateway: +1 |
| 34 | l2_network_device: +1 |
Tatyana Leontovich | e0286ed | 2017-09-12 11:55:06 +0300 | [diff] [blame] | 35 | default_{{ HOSTNAME_CFG01 }}: +90 |
Artem Panchenko | edf70ef | 2017-06-13 09:14:34 +0300 | [diff] [blame] | 36 | default_{{ HOSTNAME_CTL01 }}: +101 |
| 37 | default_{{ HOSTNAME_CTL02 }}: +102 |
| 38 | default_{{ HOSTNAME_CTL03 }}: +103 |
| 39 | default_{{ HOSTNAME_CMP01 }}: +105 |
| 40 | ip_ranges: |
| 41 | dhcp: [+90, -10] |
| 42 | |
| 43 | private-pool01: |
| 44 | net: {{ os_env('PRIVATE_ADDRESS_POOL01', '10.60.0.0/16:24') }} |
| 45 | params: |
| 46 | ip_reserved: |
| 47 | gateway: +1 |
| 48 | l2_network_device: +1 |
| 49 | default_{{ HOSTNAME_CFG01 }}: +100 |
| 50 | default_{{ HOSTNAME_CTL01 }}: +101 |
| 51 | default_{{ HOSTNAME_CTL02 }}: +102 |
| 52 | default_{{ HOSTNAME_CTL03 }}: +103 |
| 53 | default_{{ HOSTNAME_CMP01 }}: +105 |
| 54 | ip_ranges: |
| 55 | dhcp: [+90, -10] |
| 56 | |
| 57 | groups: |
| 58 | - name: default |
| 59 | driver: |
| 60 | name: devops.driver.libvirt |
| 61 | params: |
| 62 | connection_string: !os_env CONNECTION_STRING, qemu:///system |
| 63 | storage_pool_name: !os_env STORAGE_POOL_NAME, default |
| 64 | stp: False |
| 65 | hpet: False |
| 66 | enable_acpi: true |
| 67 | use_host_cpu: !os_env DRIVER_USE_HOST_CPU, true |
Dennis Dmitriev | b3fc424 | 2017-07-14 16:01:51 +0300 | [diff] [blame] | 68 | use_hugepages: !os_env DRIVER_USE_HUGEPAGES, false |
Artem Panchenko | edf70ef | 2017-06-13 09:14:34 +0300 | [diff] [blame] | 69 | |
| 70 | network_pools: |
| 71 | admin: admin-pool01 |
| 72 | private: private-pool01 |
| 73 | |
| 74 | l2_network_devices: |
| 75 | private: |
| 76 | address_pool: private-pool01 |
| 77 | dhcp: true |
| 78 | |
| 79 | admin: |
| 80 | address_pool: admin-pool01 |
| 81 | dhcp: true |
| 82 | forward: |
| 83 | mode: nat |
| 84 | |
| 85 | group_volumes: |
| 86 | - name: cloudimage1604 # This name is used for 'backing_store' option for node volumes. |
| 87 | source_image: !os_env IMAGE_PATH1604 # https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img or |
| 88 | # http://apt.tcpcloud.eu/images/ubuntu-16-04-x64-201608231004.qcow2 |
| 89 | format: qcow2 |
| 90 | |
| 91 | nodes: |
| 92 | - name: {{ HOSTNAME_CFG01 }} |
| 93 | role: salt_master |
| 94 | params: |
Dennis Dmitriev | 5b0e5f3 | 2017-07-22 11:30:26 +0300 | [diff] [blame] | 95 | vcpu: !os_env SLAVE_NODE_CPU, 2 |
Artem Panchenko | edf70ef | 2017-06-13 09:14:34 +0300 | [diff] [blame] | 96 | memory: !os_env SLAVE_NODE_MEMORY, 1536 |
| 97 | boot: |
| 98 | - hd |
| 99 | cloud_init_volume_name: iso |
| 100 | cloud_init_iface_up: ens3 |
| 101 | volumes: |
| 102 | - name: system |
| 103 | capacity: !os_env NODE_VOLUME_SIZE, 150 |
| 104 | backing_store: cloudimage1604 |
| 105 | format: qcow2 |
| 106 | - name: iso # Volume with name 'iso' will be used |
| 107 | # for store image with cloud-init metadata. |
| 108 | capacity: 1 |
| 109 | format: raw |
| 110 | device: cdrom |
| 111 | bus: ide |
Dennis Dmitriev | 80a0180 | 2017-08-11 09:49:37 +0300 | [diff] [blame] | 112 | cloudinit_meta_data: *cloudinit_meta_data |
| 113 | cloudinit_user_data: *cloudinit_user_data_cfg01 |
Artem Panchenko | edf70ef | 2017-06-13 09:14:34 +0300 | [diff] [blame] | 114 | |
| 115 | interfaces: |
| 116 | - label: ens3 |
| 117 | l2_network_device: admin |
| 118 | interface_model: *interface_model |
| 119 | - label: ens4 |
| 120 | l2_network_device: private |
| 121 | interface_model: *interface_model |
| 122 | network_config: |
| 123 | ens3: |
| 124 | networks: |
| 125 | - admin |
| 126 | ens4: |
| 127 | networks: |
| 128 | - private |
| 129 | |
| 130 | - name: {{ HOSTNAME_CTL01 }} |
Victor Ryzhenkin | 66d3937 | 2017-09-28 19:25:48 +0400 | [diff] [blame] | 131 | role: k8s_controller |
Artem Panchenko | edf70ef | 2017-06-13 09:14:34 +0300 | [diff] [blame] | 132 | params: |
Dennis Dmitriev | 5b0e5f3 | 2017-07-22 11:30:26 +0300 | [diff] [blame] | 133 | vcpu: !os_env SLAVE_NODE_CPU, 2 |
Artem Panchenko | edf70ef | 2017-06-13 09:14:34 +0300 | [diff] [blame] | 134 | memory: !os_env SLAVE_NODE_MEMORY, 4096 |
| 135 | boot: |
| 136 | - hd |
| 137 | cloud_init_volume_name: iso |
| 138 | cloud_init_iface_up: ens3 |
| 139 | volumes: |
| 140 | - name: system |
| 141 | capacity: !os_env NODE_VOLUME_SIZE, 150 |
| 142 | backing_store: cloudimage1604 |
| 143 | format: qcow2 |
| 144 | - name: cinder |
| 145 | capacity: 50 |
| 146 | format: qcow2 |
| 147 | - name: iso # Volume with name 'iso' will be used |
| 148 | # for store image with cloud-init metadata. |
| 149 | capacity: 1 |
| 150 | format: raw |
| 151 | device: cdrom |
| 152 | bus: ide |
Dennis Dmitriev | 80a0180 | 2017-08-11 09:49:37 +0300 | [diff] [blame] | 153 | cloudinit_meta_data: *cloudinit_meta_data |
| 154 | cloudinit_user_data: *cloudinit_user_data_1604 |
Artem Panchenko | edf70ef | 2017-06-13 09:14:34 +0300 | [diff] [blame] | 155 | |
| 156 | interfaces: &interfaces |
| 157 | - label: ens3 |
| 158 | l2_network_device: admin |
| 159 | interface_model: *interface_model |
| 160 | - label: ens4 |
| 161 | l2_network_device: private |
| 162 | interface_model: *interface_model |
| 163 | network_config: &network_config |
| 164 | ens3: |
| 165 | networks: |
| 166 | - admin |
| 167 | ens4: |
| 168 | networks: |
| 169 | - private |
| 170 | |
| 171 | - name: {{ HOSTNAME_CTL02 }} |
| 172 | role: salt_minion |
| 173 | params: |
Dennis Dmitriev | 5b0e5f3 | 2017-07-22 11:30:26 +0300 | [diff] [blame] | 174 | vcpu: !os_env SLAVE_NODE_CPU, 2 |
Artem Panchenko | edf70ef | 2017-06-13 09:14:34 +0300 | [diff] [blame] | 175 | memory: !os_env SLAVE_NODE_MEMORY, 4096 |
| 176 | boot: |
| 177 | - hd |
| 178 | cloud_init_volume_name: iso |
| 179 | cloud_init_iface_up: ens3 |
| 180 | volumes: |
| 181 | - name: system |
| 182 | capacity: !os_env NODE_VOLUME_SIZE, 150 |
| 183 | backing_store: cloudimage1604 |
| 184 | format: qcow2 |
| 185 | - name: cinder |
| 186 | capacity: 50 |
| 187 | format: qcow2 |
| 188 | - name: iso # Volume with name 'iso' will be used |
| 189 | # for store image with cloud-init metadata. |
| 190 | capacity: 1 |
| 191 | format: raw |
| 192 | device: cdrom |
| 193 | bus: ide |
Dennis Dmitriev | 80a0180 | 2017-08-11 09:49:37 +0300 | [diff] [blame] | 194 | cloudinit_meta_data: *cloudinit_meta_data |
| 195 | cloudinit_user_data: *cloudinit_user_data_1604 |
Artem Panchenko | edf70ef | 2017-06-13 09:14:34 +0300 | [diff] [blame] | 196 | |
| 197 | interfaces: *interfaces |
| 198 | network_config: *network_config |
| 199 | |
| 200 | - name: {{ HOSTNAME_CTL03 }} |
| 201 | role: salt_minion |
| 202 | params: |
Dennis Dmitriev | 5b0e5f3 | 2017-07-22 11:30:26 +0300 | [diff] [blame] | 203 | vcpu: !os_env SLAVE_NODE_CPU, 2 |
Artem Panchenko | edf70ef | 2017-06-13 09:14:34 +0300 | [diff] [blame] | 204 | memory: !os_env SLAVE_NODE_MEMORY, 4096 |
| 205 | boot: |
| 206 | - hd |
| 207 | cloud_init_volume_name: iso |
| 208 | cloud_init_iface_up: ens3 |
| 209 | volumes: |
| 210 | - name: system |
| 211 | capacity: !os_env NODE_VOLUME_SIZE, 150 |
| 212 | backing_store: cloudimage1604 |
| 213 | format: qcow2 |
| 214 | - name: cinder |
| 215 | capacity: 50 |
| 216 | format: qcow2 |
| 217 | - name: iso # Volume with name 'iso' will be used |
| 218 | # for store image with cloud-init metadata. |
| 219 | capacity: 1 |
| 220 | format: raw |
| 221 | device: cdrom |
| 222 | bus: ide |
Dennis Dmitriev | 80a0180 | 2017-08-11 09:49:37 +0300 | [diff] [blame] | 223 | cloudinit_meta_data: *cloudinit_meta_data |
| 224 | cloudinit_user_data: *cloudinit_user_data_1604 |
Artem Panchenko | edf70ef | 2017-06-13 09:14:34 +0300 | [diff] [blame] | 225 | |
| 226 | interfaces: *interfaces |
| 227 | network_config: *network_config |
| 228 | |
| 229 | - name: {{ HOSTNAME_CMP01 }} |
| 230 | role: salt_minion |
| 231 | params: |
Dennis Dmitriev | 5b0e5f3 | 2017-07-22 11:30:26 +0300 | [diff] [blame] | 232 | vcpu: !os_env SLAVE_NODE_CPU, 3 |
Artem Panchenko | edf70ef | 2017-06-13 09:14:34 +0300 | [diff] [blame] | 233 | memory: !os_env SLAVE_NODE_MEMORY, 2048 |
| 234 | boot: |
| 235 | - hd |
| 236 | cloud_init_volume_name: iso |
| 237 | cloud_init_iface_up: ens3 |
| 238 | volumes: |
| 239 | - name: system |
| 240 | capacity: !os_env NODE_VOLUME_SIZE, 150 |
| 241 | backing_store: cloudimage1604 |
| 242 | format: qcow2 |
| 243 | - name: iso # Volume with name 'iso' will be used |
| 244 | # for store image with cloud-init metadata. |
| 245 | capacity: 1 |
| 246 | format: raw |
| 247 | device: cdrom |
| 248 | bus: ide |
Dennis Dmitriev | 80a0180 | 2017-08-11 09:49:37 +0300 | [diff] [blame] | 249 | cloudinit_meta_data: *cloudinit_meta_data |
| 250 | cloudinit_user_data: *cloudinit_user_data_1604 |
Artem Panchenko | edf70ef | 2017-06-13 09:14:34 +0300 | [diff] [blame] | 251 | |
| 252 | interfaces: &all_interfaces |
| 253 | - label: ens3 |
| 254 | l2_network_device: admin |
| 255 | interface_model: *interface_model |
| 256 | - label: ens4 |
| 257 | l2_network_device: private |
| 258 | interface_model: *interface_model |
| 259 | network_config: &all_network_config |
| 260 | ens3: |
| 261 | networks: |
| 262 | - admin |
| 263 | ens4: |
| 264 | networks: |
| 265 | - private |