Add required nodes for cookiecutter config cicd+ovs+dvr

Change-Id: Ief997750fe42ddb7f4185ae5689d41206dc5cbbc
Reviewed-on: https://review.gerrithub.io/376568
Reviewed-by: Dennis Dmitriev <dis.xcom@gmail.com>
Tested-by: Dennis Dmitriev <dis.xcom@gmail.com>
diff --git a/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/common-services.yaml b/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/common-services.yaml
index 0a80e82..27783f8 100644
--- a/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/common-services.yaml
+++ b/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/common-services.yaml
@@ -103,6 +103,13 @@
   retry: {count: 1, delay: 5}
   skip_fail: false
 
+- description: Install nginx on prx nodes
+  cmd: salt --hard-crash --state-output=mixed --state-verbose=False
+    -C 'I@nginx:server' state.sls nginx
+  node_name: {{ HOSTNAME_CFG01 }}
+  retry: {count: 1, delay: 5}
+  skip_fail: false
+
 - description: Restart rsyslog
   cmd: salt --hard-crash --state-output=mixed --state-verbose=False
     -C 'I@haproxy:proxy' service.restart rsyslog
diff --git a/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/openstack.yaml b/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/openstack.yaml
index 79ae1bc..b220186 100644
--- a/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/openstack.yaml
+++ b/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/openstack.yaml
@@ -295,11 +295,11 @@
   retry: {count: 1, delay: 30}
   skip_fail: false
 
-- description: Set disks 03
-  cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
-  node_name: {{ HOSTNAME_CTL03 }}
-  retry: {count: 1, delay: 30}
-  skip_fail: false
+#- description: Set disks 03
+#  cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
+#  node_name: {{ HOSTNAME_CTL03 }}
+#  retry: {count: 1, delay: 30}
+#  skip_fail: false
 
 - description: Create partitions 01
   cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
@@ -349,11 +349,11 @@
   retry: {count: 1, delay: 30}
   skip_fail: false
 
-- description: Temporary WR set enabled backends value 03
-  cmd: salt-call cmd.run 'crudini --verbose --set /etc/cinder/cinder.conf DEFAULT enabled_backends lvm'
-  node_name: {{ HOSTNAME_CTL03 }}
-  retry: {count: 1, delay: 30}
-  skip_fail: false
+#- description: Temporary WR set enabled backends value 03
+#  cmd: salt-call cmd.run 'crudini --verbose --set /etc/cinder/cinder.conf DEFAULT enabled_backends lvm'
+#  node_name: {{ HOSTNAME_CTL03 }}
+#  retry: {count: 1, delay: 30}
+#  skip_fail: false
 
 - description: Install docker.io on gtw
   cmd: salt-call cmd.run 'apt-get install docker.io -y'
diff --git a/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/salt.yaml b/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/salt.yaml
index 47dfc5e..eff7e90 100644
--- a/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/salt.yaml
+++ b/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/salt.yaml
@@ -28,20 +28,24 @@
     sed -i 's/cluster_name:.*/cluster_name: {{ LAB_CONFIG_NAME }}/g' /tmp/cookiecutter-templates/contexts/openstack_ovs_dvr_vxlan.yml
     sed -i 's/cluster_domain:.*/cluster_domain: {{ DOMAIN_NAME }}/g' /tmp/cookiecutter-templates/contexts/openstack_ovs_dvr_vxlan.yml
 
+    # Temporary workaround (with hardcoded address .90 -> .15) of bug https://mirantis.jira.com/browse/PROD-14377
+    sed -i 's/salt_master_address:.*/salt_master_address: {{ SHARED.IPV4_NET_CONTROL_PREFIX }}.15/g' /tmp/cookiecutter-templates/contexts/openstack_ovs_dvr_vxlan.yml
+    sed -i 's/salt_master_management_address:.*/salt_master_management_address: {{ SHARED.IPV4_NET_ADMIN_PREFIX }}.15/g' /tmp/cookiecutter-templates/contexts/openstack_ovs_dvr_vxlan.yml
+
     # Replace firstly to an intermediate value to avoid intersection between
     # already replaced and replacing networks.
     # For example, if generated IPV4_NET_ADMIN_PREFIX=10.16.0 , then there is a risk of replacing twice:
     # 192.168.10 -> 10.16.0 (generated network for admin)
     # 10.16.0 -> <external network>
     # So let's replace constant networks to the keywords, and then keywords to the desired networks.
-    sed -i 's/10\.167\.5\./==IPV4_NET_ADMIN_PREFIX==/g' /tmp/cookiecutter-templates/contexts/openstack_ovs_dvr_vxlan.yml
-    sed -i 's/10\.167\.4\./==IPV4_NET_CONTROL_PREFIX==/g' /tmp/cookiecutter-templates/contexts/openstack_ovs_dvr_vxlan.yml
-    sed -i 's/10\.167\.6\./==IPV4_NET_TENANT_PREFIX==/g' /tmp/cookiecutter-templates/contexts/openstack_ovs_dvr_vxlan.yml
+    sed -i 's/10\.167\.5/==IPV4_NET_ADMIN_PREFIX==/g' /tmp/cookiecutter-templates/contexts/openstack_ovs_dvr_vxlan.yml
+    sed -i 's/10\.167\.4/==IPV4_NET_CONTROL_PREFIX==/g' /tmp/cookiecutter-templates/contexts/openstack_ovs_dvr_vxlan.yml
+    sed -i 's/10\.167\.6/==IPV4_NET_TENANT_PREFIX==/g' /tmp/cookiecutter-templates/contexts/openstack_ovs_dvr_vxlan.yml
     sed -i 's/172\.17\.16\./==IPV4_NET_EXTERNAL_PREFIX==/g' /tmp/cookiecutter-templates/contexts/openstack_ovs_dvr_vxlan.yml
 
-    sed -i 's/==IPV4_NET_ADMIN_PREFIX==/{{ SHARED.IPV4_NET_ADMIN_PREFIX }}./g' /tmp/cookiecutter-templates/contexts/openstack_ovs_dvr_vxlan.yml
-    sed -i 's/==IPV4_NET_CONTROL_PREFIX==/{{ SHARED.IPV4_NET_CONTROL_PREFIX }}./g' /tmp/cookiecutter-templates/contexts/openstack_ovs_dvr_vxlan.yml
-    sed -i 's/==IPV4_NET_TENANT_PREFIX==/{{ SHARED.IPV4_NET_TENANT_PREFIX }}./g' /tmp/cookiecutter-templates/contexts/openstack_ovs_dvr_vxlan.yml
+    sed -i 's/==IPV4_NET_ADMIN_PREFIX==/{{ SHARED.IPV4_NET_ADMIN_PREFIX }}/g' /tmp/cookiecutter-templates/contexts/openstack_ovs_dvr_vxlan.yml
+    sed -i 's/==IPV4_NET_CONTROL_PREFIX==/{{ SHARED.IPV4_NET_CONTROL_PREFIX }}/g' /tmp/cookiecutter-templates/contexts/openstack_ovs_dvr_vxlan.yml
+    sed -i 's/==IPV4_NET_TENANT_PREFIX==/{{ SHARED.IPV4_NET_TENANT_PREFIX }}/g' /tmp/cookiecutter-templates/contexts/openstack_ovs_dvr_vxlan.yml
     sed -i 's/==IPV4_NET_EXTERNAL_PREFIX==/{{ SHARED.IPV4_NET_EXTERNAL_PREFIX }}./g' /tmp/cookiecutter-templates/contexts/openstack_ovs_dvr_vxlan.yml
 
     for i in $(ls /tmp/cookiecutter-templates/cluster_product/); do
diff --git a/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/underlay--user-data-cfg01.yaml b/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/underlay--user-data-cfg01.yaml
index 905842d..8c75753 100644
--- a/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/underlay--user-data-cfg01.yaml
+++ b/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/underlay--user-data-cfg01.yaml
@@ -31,6 +31,9 @@
    - sudo echo "nameserver {gateway}" >> /etc/resolvconf/resolv.conf.d/base
    - sudo resolvconf -u
 
+   # Enable grub menu using updated config below
+   - update-grub
+
    # Prepare network connection
    - sudo ifup ens3
    #- sudo route add default gw {gateway} {interface_name}
@@ -72,6 +75,12 @@
    ########################################################
 
   write_files:
+   - path: /etc/default/grub.d/97-enable-grub-menu.cfg
+     content: |
+         GRUB_RECORDFAIL_TIMEOUT=30
+         GRUB_TIMEOUT=3
+         GRUB_TIMEOUT_STYLE=menu
+
    - path: /etc/network/interfaces
      content: |
           auto ens3
diff --git a/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/underlay--user-data-cicd.yaml b/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/underlay--user-data-cicd.yaml
new file mode 100644
index 0000000..3bc891d
--- /dev/null
+++ b/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/underlay--user-data-cicd.yaml
@@ -0,0 +1,94 @@
+| # All the data below will be stored as a string object
+  #cloud-config, see http://cloudinit.readthedocs.io/en/latest/topics/examples.html
+
+  ssh_pwauth: True
+  users:
+   - name: root
+     sudo: ALL=(ALL) NOPASSWD:ALL
+     shell: /bin/bash
+     ssh_authorized_keys:
+     {% for key in config.underlay.ssh_keys %}
+      - ssh-rsa {{ key['public'] }}
+     {% endfor %}
+
+  disable_root: false
+  chpasswd:
+   list: |
+    root:r00tme
+   expire: False
+
+  bootcmd:
+   # Block access to SSH while node is preparing
+   - cloud-init-per once sudo iptables -A INPUT -p tcp --dport 22 -j DROP
+   # Enable root access
+   - sed -i -e '/^PermitRootLogin/s/^.*$/PermitRootLogin yes/' /etc/ssh/sshd_config
+   - service sshd restart
+  output:
+    all: '| tee -a /var/log/cloud-init-output.log /dev/tty0'
+
+  runcmd:
+   - export TERM=linux
+   - export LANG=C
+   # Configure dhclient
+   - sudo echo "nameserver {gateway}" >> /etc/resolvconf/resolv.conf.d/base
+   - sudo resolvconf -u
+
+   # Enable grub menu using updated config below
+   - update-grub
+
+   # Prepare network connection
+   # WARNING! On CID* nodes, admin network is connected to ens4, and control network to ens3 (as in the model)
+   # On other nodes (cfg01 and openstack), admin network is connected to ens3, and control network to ens4
+   - sudo ifup ens4
+
+   # Create swap
+   - fallocate -l 8G /swapfile
+   - chmod 600 /swapfile
+   - mkswap /swapfile
+   - swapon /swapfile
+   - echo "/swapfile   none    swap    defaults   0   0" >> /etc/fstab
+
+
+   ############## TCP Cloud cfg01 node ##################
+   #- sleep 120
+   - echo "Preparing base OS"
+   - which wget >/dev/null || (apt-get update; apt-get install -y wget)
+
+   - echo "deb [arch=amd64] http://apt.mirantis.com/xenial {{ REPOSITORY_SUITE }} salt extra" > /etc/apt/sources.list.d/mcp_salt.list;
+   - wget -O - http://apt.mirantis.com/public.gpg | apt-key add -;
+   - echo "deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3 xenial main" > /etc/apt/sources.list.d/saltstack.list;
+   - wget -O - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3/SALTSTACK-GPG-KEY.pub | apt-key add -;
+
+   - apt-get clean
+   - eatmydata apt-get update && apt-get -y upgrade
+
+   # Install common packages
+   - eatmydata apt-get install -y python-pip git curl tmux byobu iputils-ping traceroute htop tree mc
+
+   # Install salt-minion and stop it until it is configured
+   - eatmydata apt-get install -y salt-minion && service salt-minion stop
+
+   # Install latest kernel
+   - eatmydata apt-get install -y linux-generic-hwe-16.04
+
+   ########################################################
+   # Node is ready, allow SSH access
+   #- echo "Allow SSH access ..."
+   #- sudo iptables -D INPUT -p tcp --dport 22 -j DROP
+   - reboot
+   ########################################################
+
+  write_files:
+   - path: /etc/default/grub.d/97-enable-grub-menu.cfg
+     content: |
+         GRUB_RECORDFAIL_TIMEOUT=30
+         GRUB_TIMEOUT=3
+         GRUB_TIMEOUT_STYLE=menu
+
+   - path: /etc/network/interfaces
+     content: |
+          auto ens3
+          iface ens3 inet manual
+          auto ens4
+          iface ens4 inet dhcp
+
diff --git a/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/underlay--user-data1604.yaml b/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/underlay--user-data1604.yaml
index e6ceb1a..410a639 100644
--- a/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/underlay--user-data1604.yaml
+++ b/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/underlay--user-data1604.yaml
@@ -33,6 +33,9 @@
    - sudo echo "nameserver {gateway}" >> /etc/resolvconf/resolv.conf.d/base
    - sudo resolvconf -u
 
+   # Enable grub menu using updated config below
+   - update-grub
+
    # Prepare network connection
    - sudo ifup ens3
    #- sudo route add default gw {gateway} {interface_name}
@@ -65,13 +68,23 @@
    # Install salt-minion and stop it until it is configured
    - eatmydata apt-get install -y salt-minion && service salt-minion stop
 
+   # Install latest kernel
+   - eatmydata apt-get install -y linux-generic-hwe-16.04
+
    ########################################################
    # Node is ready, allow SSH access
-   - echo "Allow SSH access ..."
-   - sudo iptables -D INPUT -p tcp --dport 22 -j DROP
+   #- echo "Allow SSH access ..."
+   #- sudo iptables -D INPUT -p tcp --dport 22 -j DROP
+   - reboot
    ########################################################
 
   write_files:
+   - path: /etc/default/grub.d/97-enable-grub-menu.cfg
+     content: |
+         GRUB_RECORDFAIL_TIMEOUT=30
+         GRUB_TIMEOUT=3
+         GRUB_TIMEOUT_STYLE=menu
+
    - path: /etc/network/interfaces
      content: |
           auto ens3
diff --git a/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/underlay.yaml b/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/underlay.yaml
index af1062f..d092a06 100644
--- a/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/underlay.yaml
+++ b/tcp_tests/templates/cookieshape-mcp-ocata-dvr-vxlan/underlay.yaml
@@ -4,19 +4,29 @@
 {% set LAB_CONFIG_NAME = os_env('LAB_CONFIG_NAME', 'virtual-mcp-ocata-dvr') %}
 {% set DOMAIN_NAME = os_env('DOMAIN_NAME', LAB_CONFIG_NAME) + '.local' %}
 {% set HOSTNAME_CFG01 = os_env('HOSTNAME_CFG01', 'cfg01.' + DOMAIN_NAME) %}
+{% set HOSTNAME_CID01 = os_env('HOSTNAME_CID01', 'cid01.' + DOMAIN_NAME) %}
+{% set HOSTNAME_CID02 = os_env('HOSTNAME_CID02', 'cid02.' + DOMAIN_NAME) %}
+{% set HOSTNAME_CID03 = os_env('HOSTNAME_CID03', 'cid03.' + DOMAIN_NAME) %}
+{% set HOSTNAME_KVM01 = os_env('HOSTNAME_KVM01', 'kvm01.' + DOMAIN_NAME) %}
+{% set HOSTNAME_KVM02 = os_env('HOSTNAME_KVM02', 'kvm02.' + DOMAIN_NAME) %}
+{% set HOSTNAME_KVM03 = os_env('HOSTNAME_KVM03', 'kvm03.' + DOMAIN_NAME) %}
 {% set HOSTNAME_CTL01 = os_env('HOSTNAME_CTL01', 'ctl01.' + DOMAIN_NAME) %}
 {% set HOSTNAME_CTL02 = os_env('HOSTNAME_CTL02', 'ctl02.' + DOMAIN_NAME) %}
 {% set HOSTNAME_CTL03 = os_env('HOSTNAME_CTL03', 'ctl03.' + DOMAIN_NAME) %}
+{% set HOSTNAME_DBS01 = os_env('HOSTNAME_DBS01', 'dbs01.' + DOMAIN_NAME) %}
+{% set HOSTNAME_DBS02 = os_env('HOSTNAME_DBS02', 'dbs02.' + DOMAIN_NAME) %}
+{% set HOSTNAME_DBS03 = os_env('HOSTNAME_DBS03', 'dbs03.' + DOMAIN_NAME) %}
+{% set HOSTNAME_MSG01 = os_env('HOSTNAME_MSG01', 'msg01.' + DOMAIN_NAME) %}
+{% set HOSTNAME_MSG02 = os_env('HOSTNAME_MSG02', 'msg02.' + DOMAIN_NAME) %}
+{% set HOSTNAME_MSG03 = os_env('HOSTNAME_MSG03', 'msg03.' + DOMAIN_NAME) %}
 {% set HOSTNAME_CMP01 = os_env('HOSTNAME_CMP01', 'cmp001.' + DOMAIN_NAME) %}
 {% set HOSTNAME_CMP02 = os_env('HOSTNAME_CMP02', 'cmp002.' + DOMAIN_NAME) %}
-{% set HOSTNAME_MON01 = os_env('HOSTNAME_MON01', 'mon01.' + DOMAIN_NAME) %}
-{% set HOSTNAME_MON02 = os_env('HOSTNAME_MON02', 'mon02.' + DOMAIN_NAME) %}
-{% set HOSTNAME_MON03 = os_env('HOSTNAME_MON03', 'mon03.' + DOMAIN_NAME) %}
 {% set HOSTNAME_GTW01 = os_env('HOSTNAME_GTW01', 'gtw01.' + DOMAIN_NAME) %}
 {% set HOSTNAME_PRX01 = os_env('HOSTNAME_PRX01', 'prx01.' + DOMAIN_NAME) %}
 
 {% import 'cookieshape-mcp-ocata-dvr-vxlan/underlay--meta-data.yaml' as CLOUDINIT_META_DATA with context %}
 {% import 'cookieshape-mcp-ocata-dvr-vxlan/underlay--user-data-cfg01.yaml' as CLOUDINIT_USER_DATA_CFG01 with context %}
+{% import 'cookieshape-mcp-ocata-dvr-vxlan/underlay--user-data-cicd.yaml' as CLOUDINIT_USER_DATA_CICD with context %}
 {% import 'cookieshape-mcp-ocata-dvr-vxlan/underlay--user-data1604.yaml' as CLOUDINIT_USER_DATA_1604 with context %}
 
 ---
@@ -24,6 +34,7 @@
  - &interface_model {{ os_env('INTERFACE_MODEL', 'virtio') }}
  - &cloudinit_meta_data {{ CLOUDINIT_META_DATA }}
  - &cloudinit_user_data_cfg01 {{ CLOUDINIT_USER_DATA_CFG01 }}
+ - &cloudinit_user_data_cicd {{ CLOUDINIT_USER_DATA_CICD }}
  - &cloudinit_user_data_1604 {{ CLOUDINIT_USER_DATA_1604 }}
 
 template:
@@ -37,7 +48,18 @@
           ip_reserved:
             gateway: +1
             l2_network_device: +1
-            default_{{ HOSTNAME_CFG01 }}: +90
+            default_{{ HOSTNAME_CFG01 }}: +15
+
+            default_{{ HOSTNAME_CID }}: +90
+            default_{{ HOSTNAME_CID01 }}: +91
+            default_{{ HOSTNAME_CID02 }}: +92
+            default_{{ HOSTNAME_CID03 }}: +93
+
+            default_{{ HOSTNAME_KVM }}: +240
+            default_{{ HOSTNAME_KVM01 }}: +241
+            default_{{ HOSTNAME_KVM02 }}: +242
+            default_{{ HOSTNAME_KVM03 }}: +243
+
             default_{{ HOSTNAME_CTL }}: +10
             default_{{ HOSTNAME_CTL01 }}: +11
             default_{{ HOSTNAME_CTL02 }}: +12
@@ -66,10 +88,6 @@
             default_{{ HOSTNAME_LOG01 }}: +61
             default_{{ HOSTNAME_LOG02 }}: +62
             default_{{ HOSTNAME_LOG03 }}: +63
-            default_{{ HOSTNAME_MON }}: +70
-            default_{{ HOSTNAME_MON01 }}: +71
-            default_{{ HOSTNAME_MON02 }}: +72
-            default_{{ HOSTNAME_MON03 }}: +73
             default_{{ HOSTNAME_MTR }}: +85
             default_{{ HOSTNAME_MTR01 }}: +86
             default_{{ HOSTNAME_MTR02 }}: +87
@@ -86,7 +104,18 @@
           ip_reserved:
             gateway: +1
             l2_network_device: +1
-            default_{{ HOSTNAME_CFG01 }}: +90
+            default_{{ HOSTNAME_CFG01 }}: +15
+
+            default_{{ HOSTNAME_CID }}: +90
+            default_{{ HOSTNAME_CID01 }}: +91
+            default_{{ HOSTNAME_CID02 }}: +92
+            default_{{ HOSTNAME_CID03 }}: +93
+
+            default_{{ HOSTNAME_KVM }}: +240
+            default_{{ HOSTNAME_KVM01 }}: +241
+            default_{{ HOSTNAME_KVM02 }}: +242
+            default_{{ HOSTNAME_KVM03 }}: +243
+
             default_{{ HOSTNAME_CTL }}: +10
             default_{{ HOSTNAME_CTL01 }}: +11
             default_{{ HOSTNAME_CTL02 }}: +12
@@ -115,10 +144,7 @@
             default_{{ HOSTNAME_LOG01 }}: +61
             default_{{ HOSTNAME_LOG02 }}: +62
             default_{{ HOSTNAME_LOG03 }}: +63
-            default_{{ HOSTNAME_MON }}: +70
-            default_{{ HOSTNAME_MON01 }}: +71
-            default_{{ HOSTNAME_MON02 }}: +72
-            default_{{ HOSTNAME_MON03 }}: +73
+
             default_{{ HOSTNAME_MTR }}: +85
             default_{{ HOSTNAME_MTR01 }}: +86
             default_{{ HOSTNAME_MTR02 }}: +87
@@ -135,7 +161,18 @@
           ip_reserved:
             gateway: +1
             l2_network_device: +1
-            default_{{ HOSTNAME_CFG01 }}: +90
+            default_{{ HOSTNAME_CFG01 }}: +15
+
+            default_{{ HOSTNAME_CID }}: +90
+            default_{{ HOSTNAME_CID01 }}: +91
+            default_{{ HOSTNAME_CID02 }}: +92
+            default_{{ HOSTNAME_CID03 }}: +93
+
+            default_{{ HOSTNAME_KVM }}: +240
+            default_{{ HOSTNAME_KVM01 }}: +241
+            default_{{ HOSTNAME_KVM02 }}: +242
+            default_{{ HOSTNAME_KVM03 }}: +243
+
             default_{{ HOSTNAME_CTL }}: +10
             default_{{ HOSTNAME_CTL01 }}: +11
             default_{{ HOSTNAME_CTL02 }}: +12
@@ -164,10 +201,6 @@
             default_{{ HOSTNAME_LOG01 }}: +61
             default_{{ HOSTNAME_LOG02 }}: +62
             default_{{ HOSTNAME_LOG03 }}: +63
-            default_{{ HOSTNAME_MON }}: +70
-            default_{{ HOSTNAME_MON01 }}: +71
-            default_{{ HOSTNAME_MON02 }}: +72
-            default_{{ HOSTNAME_MON03 }}: +73
             default_{{ HOSTNAME_MTR }}: +85
             default_{{ HOSTNAME_MTR01 }}: +86
             default_{{ HOSTNAME_MTR02 }}: +87
@@ -184,7 +217,18 @@
           ip_reserved:
             gateway: +1
             l2_network_device: +1
-            default_{{ HOSTNAME_CFG01 }}: +90
+            default_{{ HOSTNAME_CFG01 }}: +15
+
+            default_{{ HOSTNAME_CID }}: +90
+            default_{{ HOSTNAME_CID01 }}: +91
+            default_{{ HOSTNAME_CID02 }}: +92
+            default_{{ HOSTNAME_CID03 }}: +93
+
+            default_{{ HOSTNAME_KVM }}: +240
+            default_{{ HOSTNAME_KVM01 }}: +241
+            default_{{ HOSTNAME_KVM02 }}: +242
+            default_{{ HOSTNAME_KVM03 }}: +243
+
             default_{{ HOSTNAME_CTL }}: +10
             default_{{ HOSTNAME_CTL01 }}: +11
             default_{{ HOSTNAME_CTL02 }}: +12
@@ -213,10 +257,6 @@
             default_{{ HOSTNAME_LOG01 }}: +61
             default_{{ HOSTNAME_LOG02 }}: +62
             default_{{ HOSTNAME_LOG03 }}: +63
-            default_{{ HOSTNAME_MON }}: +70
-            default_{{ HOSTNAME_MON01 }}: +71
-            default_{{ HOSTNAME_MON02 }}: +72
-            default_{{ HOSTNAME_MON03 }}: +73
             default_{{ HOSTNAME_MTR }}: +85
             default_{{ HOSTNAME_MTR01 }}: +86
             default_{{ HOSTNAME_MTR02 }}: +87
@@ -280,7 +320,7 @@
             role: salt_master
             params:
               vcpu: !os_env SLAVE_NODE_CPU, 2
-              memory: !os_env SLAVE_NODE_MEMORY, 2048
+              memory: !os_env SLAVE_NODE_MEMORY, 3072
               boot:
                 - hd
               cloud_init_volume_name: iso
@@ -314,7 +354,7 @@
                   networks:
                     - private
 
-          - name: {{ HOSTNAME_CTL01 }}
+          - name: {{ HOSTNAME_CID01 }}
             role: salt_minion
             params:
               vcpu: !os_env SLAVE_NODE_CPU, 2
@@ -322,15 +362,103 @@
               boot:
                 - hd
               cloud_init_volume_name: iso
+              cloud_init_iface_up: ens4
+              volumes:
+                - name: system
+                  capacity: !os_env NODE_VOLUME_SIZE, 150
+                  backing_store: cloudimage1604
+                  format: qcow2
+                - name: iso  # Volume with name 'iso' will be used
+                             # for store image with cloud-init metadata.
+                  capacity: 1
+                  format: raw
+                  device: cdrom
+                  bus: ide
+                  cloudinit_meta_data: *cloudinit_meta_data
+                  cloudinit_user_data: *cloudinit_user_data_cicd
+
+              interfaces: &cid_interfaces
+                - label: ens3
+                  l2_network_device: private
+                  interface_model: *interface_model
+                - label: ens4
+                  l2_network_device: admin
+                  interface_model: *interface_model
+              network_config: &cid_network_config
+                ens3:
+                  networks:
+                    - private
+                ens4:
+                  networks:
+                    - admin
+
+#          - name: {{ HOSTNAME_CID02 }}
+#            role: salt_minion
+#            params:
+##              vcpu: !os_env SLAVE_NODE_CPU, 2
+#              memory: !os_env SLAVE_NODE_MEMORY, 6144
+#              boot:
+#                - hd
+#              cloud_init_volume_name: iso
+#              cloud_init_iface_up: ens4
+#              volumes:
+#                - name: system
+#                  capacity: !os_env NODE_VOLUME_SIZE, 150
+#                  backing_store: cloudimage1604
+#                  format: qcow2
+#                - name: iso  # Volume with name 'iso' will be used
+#                             # for store image with cloud-init metadata.
+#                  capacity: 1
+#                  format: raw
+#                  device: cdrom
+#                  bus: ide
+#                  cloudinit_meta_data: *cloudinit_meta_data
+#                  cloudinit_user_data: *cloudinit_user_data_cicd
+#
+#              interfaces: *cid_interfaces
+#              network_config: *cid_network_config
+
+#          - name: {{ HOSTNAME_CID03 }}
+#            role: salt_minion
+#            params:
+#              vcpu: !os_env SLAVE_NODE_CPU, 2
+#              memory: !os_env SLAVE_NODE_MEMORY, 6144
+#              boot:
+#                - hd
+#              cloud_init_volume_name: iso
+#              cloud_init_iface_up: ens4
+#              volumes:
+#                - name: system
+#                  capacity: !os_env NODE_VOLUME_SIZE, 150
+#                  backing_store: cloudimage1604
+#                  format: qcow2
+#                - name: iso  # Volume with name 'iso' will be used
+#                             # for store image with cloud-init metadata.
+#                  capacity: 1
+#                  format: raw
+#                  device: cdrom
+#                  bus: ide
+#                  cloudinit_meta_data: *cloudinit_meta_data
+#                  cloudinit_user_data: *cloudinit_user_data_cicd
+#
+#              interfaces: *cid_interfaces
+#              network_config: *cid_network_config
+
+          # KVM* nodes required for services like glusterfs.server
+          - name: {{ HOSTNAME_KVM01 }}
+            role: salt_minion
+            params:
+              vcpu: !os_env SLAVE_NODE_CPU, 1
+              memory: !os_env SLAVE_NODE_MEMORY, 2048
+              boot:
+                - hd
+              cloud_init_volume_name: iso
               cloud_init_iface_up: ens3
               volumes:
                 - name: system
                   capacity: !os_env NODE_VOLUME_SIZE, 150
                   backing_store: cloudimage1604
                   format: qcow2
-                - name: cinder
-                  capacity: 50
-                  format: qcow2
                 - name: iso  # Volume with name 'iso' will be used
                              # for store image with cloud-init metadata.
                   capacity: 1
@@ -355,15 +483,252 @@
                   networks:
                     - private
 
+          - name: {{ HOSTNAME_KVM02 }}
+            role: salt_minion
+            params:
+              vcpu: !os_env SLAVE_NODE_CPU, 1
+              memory: !os_env SLAVE_NODE_MEMORY, 2048
+              boot:
+                - hd
+              cloud_init_volume_name: iso
+              cloud_init_iface_up: ens3
+              volumes:
+                - name: system
+                  capacity: !os_env NODE_VOLUME_SIZE, 150
+                  backing_store: cloudimage1604
+                  format: qcow2
+                - name: iso  # Volume with name 'iso' will be used
+                             # for store image with cloud-init metadata.
+                  capacity: 1
+                  format: raw
+                  device: cdrom
+                  bus: ide
+                  cloudinit_meta_data: *cloudinit_meta_data
+                  cloudinit_user_data: *cloudinit_user_data_1604
+
+              interfaces: *interfaces
+              network_config: *network_config
+
+          - name: {{ HOSTNAME_KVM03 }}
+            role: salt_minion
+            params:
+              vcpu: !os_env SLAVE_NODE_CPU, 1
+              memory: !os_env SLAVE_NODE_MEMORY, 2048
+              boot:
+                - hd
+              cloud_init_volume_name: iso
+              cloud_init_iface_up: ens3
+              volumes:
+                - name: system
+                  capacity: !os_env NODE_VOLUME_SIZE, 150
+                  backing_store: cloudimage1604
+                  format: qcow2
+                - name: iso  # Volume with name 'iso' will be used
+                             # for store image with cloud-init metadata.
+                  capacity: 1
+                  format: raw
+                  device: cdrom
+                  bus: ide
+                  cloudinit_meta_data: *cloudinit_meta_data
+                  cloudinit_user_data: *cloudinit_user_data_1604
+
+              interfaces: *interfaces
+              network_config: *network_config
+
+          - name: {{ HOSTNAME_DBS01 }}
+            role: salt_minion
+            params:
+              vcpu: !os_env SLAVE_NODE_CPU, 1
+              memory: !os_env SLAVE_NODE_MEMORY, 6144
+              boot:
+                - hd
+              cloud_init_volume_name: iso
+              cloud_init_iface_up: ens4
+              volumes:
+                - name: system
+                  capacity: !os_env NODE_VOLUME_SIZE, 150
+                  backing_store: cloudimage1604
+                  format: qcow2
+                - name: iso  # Volume with name 'iso' will be used
+                             # for store image with cloud-init metadata.
+                  capacity: 1
+                  format: raw
+                  device: cdrom
+                  bus: ide
+                  cloudinit_meta_data: *cloudinit_meta_data
+                  cloudinit_user_data: *cloudinit_user_data_cicd
+
+              interfaces: *cid_interfaces
+              network_config: *cid_network_config
+
+          - name: {{ HOSTNAME_DBS02 }}
+            role: salt_minion
+            params:
+              vcpu: !os_env SLAVE_NODE_CPU, 1
+              memory: !os_env SLAVE_NODE_MEMORY, 6144
+              boot:
+                - hd
+              cloud_init_volume_name: iso
+              cloud_init_iface_up: ens4
+              volumes:
+                - name: system
+                  capacity: !os_env NODE_VOLUME_SIZE, 150
+                  backing_store: cloudimage1604
+                  format: qcow2
+                - name: iso  # Volume with name 'iso' will be used
+                             # for store image with cloud-init metadata.
+                  capacity: 1
+                  format: raw
+                  device: cdrom
+                  bus: ide
+                  cloudinit_meta_data: *cloudinit_meta_data
+                  cloudinit_user_data: *cloudinit_user_data_cicd
+
+              interfaces: *cid_interfaces
+              network_config: *cid_network_config
+
+          - name: {{ HOSTNAME_DBS03 }}
+            role: salt_minion
+            params:
+              vcpu: !os_env SLAVE_NODE_CPU, 1
+              memory: !os_env SLAVE_NODE_MEMORY, 6144
+              boot:
+                - hd
+              cloud_init_volume_name: iso
+              cloud_init_iface_up: ens4
+              volumes:
+                - name: system
+                  capacity: !os_env NODE_VOLUME_SIZE, 150
+                  backing_store: cloudimage1604
+                  format: qcow2
+                - name: iso  # Volume with name 'iso' will be used
+                             # for store image with cloud-init metadata.
+                  capacity: 1
+                  format: raw
+                  device: cdrom
+                  bus: ide
+                  cloudinit_meta_data: *cloudinit_meta_data
+                  cloudinit_user_data: *cloudinit_user_data_cicd
+
+              interfaces: *cid_interfaces
+              network_config: *cid_network_config
+
+          - name: {{ HOSTNAME_MSG01 }}
+            role: salt_minion
+            params:
+              vcpu: !os_env SLAVE_NODE_CPU, 1
+              memory: !os_env SLAVE_NODE_MEMORY, 4096
+              boot:
+                - hd
+              cloud_init_volume_name: iso
+              cloud_init_iface_up: ens4
+              volumes:
+                - name: system
+                  capacity: !os_env NODE_VOLUME_SIZE, 150
+                  backing_store: cloudimage1604
+                  format: qcow2
+                - name: iso  # Volume with name 'iso' will be used
+                             # for store image with cloud-init metadata.
+                  capacity: 1
+                  format: raw
+                  device: cdrom
+                  bus: ide
+                  cloudinit_meta_data: *cloudinit_meta_data
+                  cloudinit_user_data: *cloudinit_user_data_cicd
+
+              interfaces: *cid_interfaces
+              network_config: *cid_network_config
+
+#          - name: {{ HOSTNAME_MSG02 }}
+#            role: salt_minion
+#            params:
+#              vcpu: !os_env SLAVE_NODE_CPU, 1
+#              memory: !os_env SLAVE_NODE_MEMORY, 2048
+#              boot:
+#                - hd
+#              cloud_init_volume_name: iso
+#              cloud_init_iface_up: ens4
+#              volumes:
+#                - name: system
+#                  capacity: !os_env NODE_VOLUME_SIZE, 150
+#                  backing_store: cloudimage1604
+#                  format: qcow2
+#                - name: iso  # Volume with name 'iso' will be used
+#                             # for store image with cloud-init metadata.
+#                  capacity: 1
+#                  format: raw
+#                  device: cdrom
+#                  bus: ide
+#                  cloudinit_meta_data: *cloudinit_meta_data
+#                  cloudinit_user_data: *cloudinit_user_data_cicd
+#
+#              interfaces: *cid_interfaces
+#              network_config: *cid_network_config
+
+#          - name: {{ HOSTNAME_MSG03 }}
+#            role: salt_minion
+#            params:
+#              vcpu: !os_env SLAVE_NODE_CPU, 1
+#              memory: !os_env SLAVE_NODE_MEMORY, 2048
+#              boot:
+#                - hd
+#              cloud_init_volume_name: iso
+#              cloud_init_iface_up: ens4
+#              volumes:
+#                - name: system
+#                  capacity: !os_env NODE_VOLUME_SIZE, 150
+#                  backing_store: cloudimage1604
+#                  format: qcow2
+#                - name: iso  # Volume with name 'iso' will be used
+#                             # for store image with cloud-init metadata.
+#                  capacity: 1
+#                  format: raw
+#                  device: cdrom
+#                  bus: ide
+#                  cloudinit_meta_data: *cloudinit_meta_data
+#                  cloudinit_user_data: *cloudinit_user_data_cicd
+#
+#              interfaces: *cid_interfaces
+#              network_config: *cid_network_config
+
+          - name: {{ HOSTNAME_CTL01 }}
+            role: salt_minion
+            params:
+              vcpu: !os_env SLAVE_NODE_CPU, 2
+              memory: !os_env SLAVE_NODE_MEMORY, 6144
+              boot:
+                - hd
+              cloud_init_volume_name: iso
+              cloud_init_iface_up: ens4
+              volumes:
+                - name: system
+                  capacity: !os_env NODE_VOLUME_SIZE, 150
+                  backing_store: cloudimage1604
+                  format: qcow2
+                - name: cinder
+                  capacity: 50
+                  format: qcow2
+                - name: iso  # Volume with name 'iso' will be used
+                             # for store image with cloud-init metadata.
+                  capacity: 1
+                  format: raw
+                  device: cdrom
+                  bus: ide
+                  cloudinit_meta_data: *cloudinit_meta_data
+                  cloudinit_user_data: *cloudinit_user_data_cicd
+
+              interfaces: *cid_interfaces
+              network_config: *cid_network_config
+
           - name: {{ HOSTNAME_CTL02 }}
             role: salt_minion
             params:
               vcpu: !os_env SLAVE_NODE_CPU, 2
-              memory: !os_env SLAVE_NODE_MEMORY, 8192
+              memory: !os_env SLAVE_NODE_MEMORY, 6144
               boot:
                 - hd
               cloud_init_volume_name: iso
-              cloud_init_iface_up: ens3
+              cloud_init_iface_up: ens4
               volumes:
                 - name: system
                   capacity: !os_env NODE_VOLUME_SIZE, 150
@@ -379,127 +744,49 @@
                   device: cdrom
                   bus: ide
                   cloudinit_meta_data: *cloudinit_meta_data
-                  cloudinit_user_data: *cloudinit_user_data_1604
+                  cloudinit_user_data: *cloudinit_user_data_cicd
 
-              interfaces: *interfaces
-              network_config: *network_config
+              interfaces: *cid_interfaces
+              network_config: *cid_network_config
 
-          - name: {{ HOSTNAME_CTL03 }}
-            role: salt_minion
-            params:
-              vcpu: !os_env SLAVE_NODE_CPU, 2
-              memory: !os_env SLAVE_NODE_MEMORY, 8192
-              boot:
-                - hd
-              cloud_init_volume_name: iso
-              cloud_init_iface_up: ens3
-              volumes:
-                - name: system
-                  capacity: !os_env NODE_VOLUME_SIZE, 150
-                  backing_store: cloudimage1604
-                  format: qcow2
-                - name: cinder
-                  capacity: 50
-                  format: qcow2
-                - name: iso  # Volume with name 'iso' will be used
-                             # for store image with cloud-init metadata.
-                  capacity: 1
-                  format: raw
-                  device: cdrom
-                  bus: ide
-                  cloudinit_meta_data: *cloudinit_meta_data
-                  cloudinit_user_data: *cloudinit_user_data_1604
-
-              interfaces: *interfaces
-              network_config: *network_config
-
-          - name: {{ HOSTNAME_MON01 }}
-            role: salt_minion
-            params:
-              vcpu: !os_env SLAVE_NODE_CPU, 3
-              memory: !os_env SLAVE_NODE_MEMORY, 2048
-              boot:
-                - hd
-              cloud_init_volume_name: iso
-              cloud_init_iface_up: ens3
-              volumes:
-                - name: system
-                  capacity: !os_env NODE_VOLUME_SIZE, 150
-                  backing_store: cloudimage1604
-                  format: qcow2
-                - name: iso  # Volume with name 'iso' will be used
-                             # for store image with cloud-init metadata.
-                  capacity: 1
-                  format: raw
-                  device: cdrom
-                  bus: ide
-                  cloudinit_meta_data: !include underlay--meta-data.yaml
-                  cloudinit_user_data: !include underlay--user-data1604.yaml
-
-              interfaces: *interfaces
-              network_config: *network_config
-
-          - name: {{ HOSTNAME_MON02 }}
-            role: salt_minion
-            params:
-              vcpu: !os_env SLAVE_NODE_CPU, 3
-              memory: !os_env SLAVE_NODE_MEMORY, 2048
-              boot:
-                - hd
-              cloud_init_volume_name: iso
-              cloud_init_iface_up: ens3
-              volumes:
-                - name: system
-                  capacity: !os_env NODE_VOLUME_SIZE, 150
-                  backing_store: cloudimage1604
-                  format: qcow2
-                - name: iso  # Volume with name 'iso' will be used
-                             # for store image with cloud-init metadata.
-                  capacity: 1
-                  format: raw
-                  device: cdrom
-                  bus: ide
-                  cloudinit_meta_data: !include underlay--meta-data.yaml
-                  cloudinit_user_data: !include underlay--user-data1604.yaml
-
-              interfaces: *interfaces
-              network_config: *network_config
-
-          - name: {{ HOSTNAME_MON03 }}
-            role: salt_minion
-            params:
-              vcpu: !os_env SLAVE_NODE_CPU, 3
-              memory: !os_env SLAVE_NODE_MEMORY, 2048
-              boot:
-                - hd
-              cloud_init_volume_name: iso
-              cloud_init_iface_up: ens3
-              volumes:
-                - name: system
-                  capacity: !os_env NODE_VOLUME_SIZE, 150
-                  backing_store: cloudimage1604
-                  format: qcow2
-                - name: iso  # Volume with name 'iso' will be used
-                             # for store image with cloud-init metadata.
-                  capacity: 1
-                  format: raw
-                  device: cdrom
-                  bus: ide
-                  cloudinit_meta_data: !include underlay--meta-data.yaml
-                  cloudinit_user_data: !include underlay--user-data1604.yaml
-
-              interfaces: *interfaces
-              network_config: *network_config
+#          - name: {{ HOSTNAME_CTL03 }}
+#            role: salt_minion
+#            params:
+#              vcpu: !os_env SLAVE_NODE_CPU, 2
+#              memory: !os_env SLAVE_NODE_MEMORY, 6144
+#              boot:
+#                - hd
+#              cloud_init_volume_name: iso
+#              cloud_init_iface_up: ens4
+#              volumes:
+#                - name: system
+#                  capacity: !os_env NODE_VOLUME_SIZE, 150
+#                  backing_store: cloudimage1604
+#                  format: qcow2
+#                - name: cinder
+#                  capacity: 50
+#                  format: qcow2
+#                - name: iso  # Volume with name 'iso' will be used
+#                             # for store image with cloud-init metadata.
+#                  capacity: 1
+#                  format: raw
+#                  device: cdrom
+#                  bus: ide
+#                  cloudinit_meta_data: *cloudinit_meta_data
+#                  cloudinit_user_data: *cloudinit_user_data_cicd
+#
+#              interfaces: *cid_interfaces
+#              network_config: *cid_network_config
 
           - name: {{ HOSTNAME_PRX01 }}
             role: salt_minion
             params:
               vcpu: !os_env SLAVE_NODE_CPU, 1
-              memory: !os_env SLAVE_NODE_MEMORY, 8192
+              memory: !os_env SLAVE_NODE_MEMORY, 2048
               boot:
                 - hd
               cloud_init_volume_name: iso
-              cloud_init_iface_up: ens3
+              cloud_init_iface_up: ens4
               volumes:
                 - name: system
                   capacity: !os_env NODE_VOLUME_SIZE, 150
@@ -515,17 +802,16 @@
                   device: cdrom
                   bus: ide
                   cloudinit_meta_data: *cloudinit_meta_data
-                  cloudinit_user_data: *cloudinit_user_data_1604
+                  cloudinit_user_data: *cloudinit_user_data_cicd
 
-              interfaces: *interfaces
-              network_config: *network_config
-
+              interfaces: *cid_interfaces
+              network_config: *cid_network_config
 
           - name: {{ HOSTNAME_CMP01 }}
             role: salt_minion
             params:
               vcpu: !os_env SLAVE_NODE_CPU, 3
-              memory: !os_env SLAVE_NODE_MEMORY, 4096
+              memory: !os_env SLAVE_NODE_MEMORY, 3072
               boot:
                 - hd
               cloud_init_volume_name: iso
@@ -576,7 +862,7 @@
             role: salt_minion
             params:
               vcpu: !os_env SLAVE_NODE_CPU, 3
-              memory: !os_env SLAVE_NODE_MEMORY, 4096
+              memory: !os_env SLAVE_NODE_MEMORY, 3072
               boot:
                 - hd
               cloud_init_volume_name: iso
@@ -601,7 +887,7 @@
           - name: {{ HOSTNAME_GTW01 }}
             role: salt_minion
             params:
-              vcpu: !os_env SLAVE_NODE_CPU, 1
+              vcpu: !os_env SLAVE_NODE_CPU, 2
               memory: !os_env SLAVE_NODE_MEMORY, 2048
               boot:
                 - hd