Refactor memory usage for the template cookied-mcp-ocata-dop-sl2

- Increase memory usage to allocate 128Gb RAM
- Use different environment variable names for CPU/RAM/VOL
  options for each type of nodes

Change-Id: Ic727a5307824a7995e2ee7f60325e947fbc1095b
diff --git a/tcp_tests/templates/cookied-mcp-ocata-dop-sl2/underlay.yaml b/tcp_tests/templates/cookied-mcp-ocata-dop-sl2/underlay.yaml
index 4cf97fa..9893151 100644
--- a/tcp_tests/templates/cookied-mcp-ocata-dop-sl2/underlay.yaml
+++ b/tcp_tests/templates/cookied-mcp-ocata-dop-sl2/underlay.yaml
@@ -20,7 +20,6 @@
 
 {% import 'cookied-mcp-ocata-dop-sl2/underlay--meta-data.yaml' as CLOUDINIT_META_DATA with context %}
 {% import 'cookied-mcp-ocata-dop-sl2/underlay--user-data-cfg01.yaml' as CLOUDINIT_USER_DATA_CFG01 with context %}
-{% import 'cookied-mcp-ocata-dop-sl2/underlay--user-data-cicd.yaml' as CLOUDINIT_USER_DATA_CICD with context %}
 {% import 'cookied-mcp-ocata-dop-sl2/underlay--user-data1604.yaml' as CLOUDINIT_USER_DATA_1604 with context %}
 
 ---
@@ -28,7 +27,6 @@
  - &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:
@@ -174,13 +172,13 @@
         driver:
           name: devops.driver.libvirt
           params:
-            connection_string: !os_env CONNECTION_STRING, qemu:///system
-            storage_pool_name: !os_env STORAGE_POOL_NAME, default
+            connection_string: {{ os_env('CONNECTION_STRING', 'qemu:///system') }}
+            storage_pool_name: {{ os_env('STORAGE_POOL_NAME', 'default') }}
             stp: False
             hpet: False
             enable_acpi: true
-            use_host_cpu: !os_env DRIVER_USE_HOST_CPU, true
-            use_hugepages: !os_env DRIVER_USE_HUGEPAGES, false
+            use_host_cpu: {{ os_env('DRIVER_USE_HOST_CPU', true) }}
+            use_hugepages: {{ os_env('DRIVER_USE_HUGEPAGES', false) }}
 
         network_pools:
           admin: admin-pool01
@@ -212,7 +210,7 @@
 
         group_volumes:
          - name: cloudimage1604    # This name is used for 'backing_store' option for node volumes.
-           source_image: !os_env IMAGE_PATH1604  # https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img or
+           source_image: {{ os_env('IMAGE_PATH1604') }}  # https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img or
                                              # http://apt.tcpcloud.eu/images/ubuntu-16-04-x64-201608231004.qcow2
            format: qcow2
 
@@ -220,15 +218,15 @@
           - name: {{ HOSTNAME_CFG01 }}
             role: salt_master
             params:
-              vcpu: !os_env SLAVE_NODE_CPU, 2
-              memory: !os_env SLAVE_NODE_MEMORY, 3072
+              vcpu: {{ os_env('CFG_NODE_CPU', 2) }}
+              memory: {{ os_env('CFG_NODE_MEMORY', 4096) }}
               boot:
                 - hd
               cloud_init_volume_name: iso
               cloud_init_iface_up: ens3
               volumes:
                 - name: system
-                  capacity: !os_env NODE_VOLUME_SIZE, 150
+                  capacity: {{ os_env('CFG_NODE_VOLUME_SIZE', 150) }}
                   backing_store: cloudimage1604
                   format: qcow2
                 - name: iso  # Volume with name 'iso' will be used
@@ -258,15 +256,15 @@
           - name: {{ HOSTNAME_CID01 }}
             role: salt_minion
             params:
-              vcpu: !os_env SLAVE_NODE_CPU, 4
-              memory: !os_env SLAVE_NODE_MEMORY, 4096
+              vcpu: {{ os_env('CID_NODE_CPU', 3) }}
+              memory: {{ os_env('CID_NODE_MEMORY', 12288) }}
               boot:
                 - hd
               cloud_init_volume_name: iso
               cloud_init_iface_up: ens3
               volumes:
                 - name: system
-                  capacity: !os_env NODE_VOLUME_SIZE, 150
+                  capacity: {{ os_env('CID_NODE_VOLUME_SIZE', 150) }}
                   backing_store: cloudimage1604
                   format: qcow2
                 - name: iso  # Volume with name 'iso' will be used
@@ -296,15 +294,15 @@
           - name: {{ HOSTNAME_CID02 }}
             role: salt_minion
             params:
-              vcpu: !os_env SLAVE_NODE_CPU, 4
-              memory: !os_env SLAVE_NODE_MEMORY, 4096
+              vcpu: {{ os_env('CID_NODE_CPU', 3) }}
+              memory: {{ os_env('CID_NODE_MEMORY', 12288) }}
               boot:
                 - hd
               cloud_init_volume_name: iso
               cloud_init_iface_up: ens3
               volumes:
                 - name: system
-                  capacity: !os_env NODE_VOLUME_SIZE, 150
+                  capacity: {{ os_env('CID_NODE_VOLUME_SIZE', 150) }}
                   backing_store: cloudimage1604
                   format: qcow2
                 - name: iso  # Volume with name 'iso' will be used
@@ -322,15 +320,15 @@
           - name: {{ HOSTNAME_CID03 }}
             role: salt_minion
             params:
-              vcpu: !os_env SLAVE_NODE_CPU, 4
-              memory: !os_env SLAVE_NODE_MEMORY, 6144
+              vcpu: {{ os_env('CID_NODE_CPU', 3) }}
+              memory: {{ os_env('CID_NODE_MEMORY', 12288) }}
               boot:
                 - hd
               cloud_init_volume_name: iso
               cloud_init_iface_up: ens3
               volumes:
                 - name: system
-                  capacity: !os_env NODE_VOLUME_SIZE, 150
+                  capacity: {{ os_env('CID_NODE_VOLUME_SIZE', 150) }}
                   backing_store: cloudimage1604
                   format: qcow2
                 - name: iso  # Volume with name 'iso' will be used
@@ -348,15 +346,15 @@
           - name: {{ HOSTNAME_CTL01 }}
             role: salt_minion
             params:
-              vcpu: !os_env SLAVE_NODE_CPU, 2
-              memory: !os_env SLAVE_NODE_MEMORY, 6144
+              vcpu: {{ os_env('CTL_NODE_CPU', 3) }}
+              memory: {{ os_env('CTL_NODE_MEMORY', 12288) }}
               boot:
                 - hd
               cloud_init_volume_name: iso
               cloud_init_iface_up: ens3
               volumes:
                 - name: system
-                  capacity: !os_env NODE_VOLUME_SIZE, 150
+                  capacity: {{ os_env('CTL_NODE_VOLUME_SIZE', 150) }}
                   backing_store: cloudimage1604
                   format: qcow2
                 - name: cinder
@@ -377,15 +375,15 @@
           - name: {{ HOSTNAME_CTL02 }}
             role: salt_minion
             params:
-              vcpu: !os_env SLAVE_NODE_CPU, 2
-              memory: !os_env SLAVE_NODE_MEMORY, 6144
+              vcpu: {{ os_env('CTL_NODE_CPU', 3) }}
+              memory: {{ os_env('CTL_NODE_MEMORY', 12288) }}
               boot:
                 - hd
               cloud_init_volume_name: iso
               cloud_init_iface_up: ens3
               volumes:
                 - name: system
-                  capacity: !os_env NODE_VOLUME_SIZE, 150
+                  capacity: {{ os_env('CTL_NODE_VOLUME_SIZE', 150) }}
                   backing_store: cloudimage1604
                   format: qcow2
                 - name: cinder
@@ -406,15 +404,15 @@
           - name: {{ HOSTNAME_CTL03 }}
             role: salt_minion
             params:
-              vcpu: !os_env SLAVE_NODE_CPU, 2
-              memory: !os_env SLAVE_NODE_MEMORY, 6144
+              vcpu: {{ os_env('CTL_NODE_CPU', 3) }}
+              memory: {{ os_env('CTL_NODE_MEMORY', 12288) }}
               boot:
                 - hd
               cloud_init_volume_name: iso
               cloud_init_iface_up: ens3
               volumes:
                 - name: system
-                  capacity: !os_env NODE_VOLUME_SIZE, 150
+                  capacity: {{ os_env('CTL_NODE_VOLUME_SIZE', 150) }}
                   backing_store: cloudimage1604
                   format: qcow2
                 - name: cinder
@@ -435,15 +433,15 @@
           - name: {{ HOSTNAME_MON01 }}
             role: salt_minion
             params:
-              vcpu: !os_env SLAVE_NODE_CPU, 2
-              memory: !os_env SLAVE_NODE_MEMORY, 4096
+              vcpu: {{ os_env('MON_NODE_CPU', 2) }}
+              memory: {{ os_env('MON_NODE_MEMORY', 12288) }}
               boot:
                 - hd
               cloud_init_volume_name: iso
               cloud_init_iface_up: ens3
               volumes:
                 - name: system
-                  capacity: !os_env NODE_VOLUME_SIZE, 150
+                  capacity: {{ os_env('MON_NODE_VOLUME_SIZE', 150) }}
                   backing_store: cloudimage1604
                   format: qcow2
                 - name: cinder
@@ -464,15 +462,15 @@
           - name: {{ HOSTNAME_MON02 }}
             role: salt_minion
             params:
-              vcpu: !os_env SLAVE_NODE_CPU, 2
-              memory: !os_env SLAVE_NODE_MEMORY, 6144
+              vcpu: {{ os_env('MON_NODE_CPU', 2) }}
+              memory: {{ os_env('MON_NODE_MEMORY', 12288) }}
               boot:
                 - hd
               cloud_init_volume_name: iso
               cloud_init_iface_up: ens3
               volumes:
                 - name: system
-                  capacity: !os_env NODE_VOLUME_SIZE, 150
+                  capacity: {{ os_env('MON_NODE_VOLUME_SIZE', 150) }}
                   backing_store: cloudimage1604
                   format: qcow2
                 - name: cinder
@@ -493,15 +491,15 @@
           - name: {{ HOSTNAME_MON03 }}
             role: salt_minion
             params:
-              vcpu: !os_env SLAVE_NODE_CPU, 2
-              memory: !os_env SLAVE_NODE_MEMORY, 4096
+              vcpu: {{ os_env('MON_NODE_CPU', 2) }}
+              memory: {{ os_env('MON_NODE_MEMORY', 12288) }}
               boot:
                 - hd
               cloud_init_volume_name: iso
               cloud_init_iface_up: ens3
               volumes:
                 - name: system
-                  capacity: !os_env NODE_VOLUME_SIZE, 150
+                  capacity: {{ os_env('MON_NODE_VOLUME_SIZE', 150) }}
                   backing_store: cloudimage1604
                   format: qcow2
                 - name: cinder
@@ -522,15 +520,15 @@
           - name: {{ HOSTNAME_PRX01 }}
             role: salt_minion
             params:
-              vcpu: !os_env SLAVE_NODE_CPU, 1
-              memory: !os_env SLAVE_NODE_MEMORY, 2048
+              vcpu: {{ os_env('MON_NODE_CPU', 1) }}
+              memory: {{ os_env('MON_NODE_MEMORY', 4096) }}
               boot:
                 - hd
               cloud_init_volume_name: iso
               cloud_init_iface_up: ens3
               volumes:
                 - name: system
-                  capacity: !os_env NODE_VOLUME_SIZE, 150
+                  capacity: {{ os_env('MON_NODE_VOLUME_SIZE', 150) }}
                   backing_store: cloudimage1604
                   format: qcow2
                 - name: cinder
@@ -551,15 +549,15 @@
           - name: {{ HOSTNAME_CMP01 }}
             role: salt_minion
             params:
-              vcpu: !os_env SLAVE_NODE_CPU, 2
-              memory: !os_env SLAVE_NODE_MEMORY, 3072
+              vcpu: {{ os_env('CMP_NODE_CPU', 2) }}
+              memory: {{ os_env('CMP_NODE_MEMORY', 3072) }}
               boot:
                 - hd
               cloud_init_volume_name: iso
               cloud_init_iface_up: ens3
               volumes:
                 - name: system
-                  capacity: !os_env NODE_VOLUME_SIZE, 150
+                  capacity: {{ os_env('CMP_NODE_VOLUME_SIZE', 150) }}
                   backing_store: cloudimage1604
                   format: qcow2
                 - name: iso  # Volume with name 'iso' will be used
@@ -599,28 +597,28 @@
                   networks:
                     - external
 
-#          - name: {{ HOSTNAME_CMP02 }}
-#            role: salt_minion
-#            params:
-#              vcpu: !os_env SLAVE_NODE_CPU, 2
-#              memory: !os_env SLAVE_NODE_MEMORY, 3072
-#              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
+          - name: {{ HOSTNAME_CMP02 }}
+            role: salt_minion
+            params:
+              vcpu: {{ os_env('CMP_NODE_CPU', 2) }}
+              memory: {{ os_env('CMP_NODE_MEMORY', 3072) }}
+              boot:
+                - hd
+              cloud_init_volume_name: iso
+              cloud_init_iface_up: ens3
+              volumes:
+                - name: system
+                  capacity: {{ os_env('CMP_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: *all_interfaces
               network_config: *all_network_config
@@ -628,15 +626,15 @@
           - name: {{ HOSTNAME_GTW01 }}
             role: salt_minion
             params:
-              vcpu: !os_env SLAVE_NODE_CPU, 1
-              memory: !os_env SLAVE_NODE_MEMORY, 2048
+              vcpu: {{ os_env('GTW_NODE_CPU', 1) }}
+              memory: {{ os_env('GTW_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
+                  capacity: {{ os_env('GTW_NODE_VOLUME_SIZE', 150) }}
                   backing_store: cloudimage1604
                   format: qcow2
                 - name: iso  # Volume with name 'iso' will be used