Add templates for create lmas and osds VM
Add default values for metadata in top.yaml
PRODX-2545

Change-Id: Ibe6ce4ce32e740c150725c31e3a5f313893b7927
diff --git a/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw3-lma3-osd3.yaml b/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw3-lma3-osd3.yaml
new file mode 100644
index 0000000..8248b82
--- /dev/null
+++ b/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw3-lma3-osd3.yaml
@@ -0,0 +1,18 @@
+parameters:
+  key_name: devcloud
+  image: bionic-server-cloudimg-amd64-20190612
+  flavor: system.compact.openstack.control
+  public_net_id: public
+  masters_size: 2
+  worker_size: 3
+  cmp_size: 2
+  gtw_size: 3
+  lma_size: 3
+  osd_size: 3
+  ucp_boot_timeout: 1200
+  worker_metadata: {"labels": {"openstack-control-plane":"enabled","openvswitch":"enabled"}}
+  cmp_metadata: {"labels": {"openstack-compute-node":"enabled","openvswitch":"enabled",}}
+  gtw_metadata: {"labels": {"openvswitch":"enabled", "gateway": "enabled"}}
+  lma_metadata: {"labels": {"role": "stacklight", "stacklight": "enabled"}}
+  osd_metadata: {"labels": {"role": "ceph-osd-node"}}
+  cluster_public_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCp0evjOaK8c8SKYK4r2+0BN7g+8YSvQ2n8nFgOURCyvkJqOHi1qPGZmuN0CclYVdVuZiXbWw3VxRbSW3EH736VzgY1U0JmoTiSamzLHaWsXvEIW8VCi7boli539QJP0ikJiBaNAgZILyCrVPN+A6mfqtacs1KXdZ0zlMq1BPtFciR1JTCRcVs5vP2Wwz5QtY2jMIh3aiwkePjMTQPcfmh1TkOlxYu5IbQyZ3G1ahA0mNKI9a0dtF282av/F6pwB/N1R1nEZ/9VtcN2I1mf1NW/tTHEEcTzXYo1R/8K9vlqAN8QvvGLZtZduGviNVNoNWvoxaXxDt8CPv2B2NCdQFZp
diff --git a/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw3-lma3.yaml b/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw3-lma3.yaml
new file mode 100644
index 0000000..760b2df
--- /dev/null
+++ b/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw3-lma3.yaml
@@ -0,0 +1,16 @@
+parameters:
+  key_name: devcloud
+  image: bionic-server-cloudimg-amd64-20190612
+  flavor: system.compact.openstack.control
+  public_net_id: public
+  masters_size: 2
+  worker_size: 3
+  cmp_size: 2
+  gtw_size: 3
+  lma_size: 3
+  ucp_boot_timeout: 1200
+  worker_metadata: {"labels": {"openstack-control-plane":"enabled","openvswitch":"enabled","role":"ceph-osd-node"}}
+  cmp_metadata: {"labels": {"openstack-compute-node":"enabled","openvswitch":"enabled", "role":"ceph-osd-node"}}
+  gtw_metadata: {"labels": {"openvswitch":"enabled", "gateway": "enabled"}}
+  lma_metadata: {"labels": {"role": "stacklight", "stacklight": "enabled"}}
+  cluster_public_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCp0evjOaK8c8SKYK4r2+0BN7g+8YSvQ2n8nFgOURCyvkJqOHi1qPGZmuN0CclYVdVuZiXbWw3VxRbSW3EH736VzgY1U0JmoTiSamzLHaWsXvEIW8VCi7boli539QJP0ikJiBaNAgZILyCrVPN+A6mfqtacs1KXdZ0zlMq1BPtFciR1JTCRcVs5vP2Wwz5QtY2jMIh3aiwkePjMTQPcfmh1TkOlxYu5IbQyZ3G1ahA0mNKI9a0dtF282av/F6pwB/N1R1nEZ/9VtcN2I1mf1NW/tTHEEcTzXYo1R/8K9vlqAN8QvvGLZtZduGviNVNoNWvoxaXxDt8CPv2B2NCdQFZp
diff --git a/de/heat-templates/top.yaml b/de/heat-templates/top.yaml
index 8a2ba4d..dca7823 100644
--- a/de/heat-templates/top.yaml
+++ b/de/heat-templates/top.yaml
@@ -30,6 +30,14 @@
     type: number
     description: Number of gtw workers to deploy
     default: 0
+  lma_size:
+    type: number
+    description: Number of gtw workers to deploy
+    default: 0
+  osd_size:
+    type: number
+    description: Number of gtw workers to deploy
+    default: 0
   ucp_boot_timeout:
     type: number
     description: Boot timeout for UCP instance
@@ -41,10 +49,19 @@
     default: '10.11.12.0/24'
   worker_metadata:
     type: json
+    default: {}
   cmp_metadata:
     type: json
+    default: {}
   gtw_metadata:
     type: json
+    default: {}
+  lma_metadata:
+    type: json
+    default: {}
+  osd_metadata:
+    type: json
+    default: {}
 
 resources:
   key_pair:
@@ -181,6 +198,45 @@
           node_type: "worker"
           ucp_master_host: { get_attr: [ucp, server_private_ip] }
 
+  lmas:
+    type: OS::Heat::ResourceGroup
+    depends_on:
+     - ucp
+    properties:
+      count: { get_param: lma_size }
+      resource_def:
+        type: ./srv-group.yaml
+        properties:
+          image: { get_param: image }
+          flavor: { get_param: flavor }
+          key_name: { get_param: "OS::stack_name" }
+          public_net_id: { get_param: public_net_id }
+          private_net_id: { get_resource: network }
+          private_subnet_id: { get_resource: subnet }
+          private_floating_network: { get_resource: private_floating_network }
+          metadata: { get_param: lma_metadata}
+          node_type: "worker"
+          ucp_master_host: { get_attr: [ucp, server_private_ip] }
+
+  osds:
+    type: OS::Heat::ResourceGroup
+    depends_on:
+     - ucp
+    properties:
+      count: { get_param: osd_size }
+      resource_def:
+        type: ./srv-group.yaml
+        properties:
+          image: { get_param: image }
+          flavor: { get_param: flavor }
+          key_name: { get_param: "OS::stack_name" }
+          public_net_id: { get_param: public_net_id }
+          private_net_id: { get_resource: network }
+          private_subnet_id: { get_resource: subnet }
+          private_floating_network: { get_resource: private_floating_network }
+          metadata: { get_param: osd_metadata}
+          node_type: "worker"
+          ucp_master_host: { get_attr: [ucp, server_private_ip] }
 
 outputs:
   ucp_ips:
@@ -198,6 +254,12 @@
   gtws_ips:
     description: Private IP addresses of the deployed gtw instances
     value: { get_attr: [gtws, server_public_ip] }
+  lmas_ips:
+    description: Private IP addresses of the deployed lma instances
+    value: { get_attr: [lmas, server_public_ip] }
+  osds_ips:
+    description: Private IP addresses of the deployed osd instances
+    value: { get_attr: [osds, server_public_ip] }
   worker_private_floating_ips:
     description: IPs might be used as gateway
     value: { get_attr: [workers, server_private_floating_ip] }