Create basic Heat template 75/109675/2
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>
Tue, 30 Jun 2020 11:18:00 +0000 (13:18 +0200)
committerMorgan Richomme <morgan.richomme@orange.com>
Fri, 3 Jul 2020 16:02:32 +0000 (16:02 +0000)
Basic HOT template to deploy simulator to
OpenStack

Change-Id: Ic862239c888ba75578b9cc0d3ee8d6e756d72589
Issue-ID: INT-1641
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
test/mocks/mass-pnf-sim/deployment/heat/heat.env [new file with mode: 0644]
test/mocks/mass-pnf-sim/deployment/heat/heat.yaml [new file with mode: 0644]

diff --git a/test/mocks/mass-pnf-sim/deployment/heat/heat.env b/test/mocks/mass-pnf-sim/deployment/heat/heat.env
new file mode 100644 (file)
index 0000000..feed7d2
--- /dev/null
@@ -0,0 +1,6 @@
+parameters:
+  image_name: ubuntu-18.04-server-cloudimg-amd64
+  flavor_name: m1.medium
+  key_name:
+  instance_net_id:
+  float_net_id:
diff --git a/test/mocks/mass-pnf-sim/deployment/heat/heat.yaml b/test/mocks/mass-pnf-sim/deployment/heat/heat.yaml
new file mode 100644 (file)
index 0000000..7bc36dc
--- /dev/null
@@ -0,0 +1,49 @@
+description: Heat template for deploying Mass PNF Simulator
+heat_template_version: '2017-02-24'
+parameters:
+  flavor_name:
+    description: Flavor name of the simulator instance. This should depend on the requested amount of simulator instances
+    type: string
+  image_name:
+    description: Name or id of the image (Debian family only)
+    type: string
+  key_name:
+    label: Key pair name for passwordless login to instance
+    type: string
+  float_net_id:
+    description: ID of the network with a pool of floating IPs
+    label: Floating IP network
+    type: string
+  instance_net_id:
+    type: string
+    description: Id of a private network for instance interface
+resources:
+  simulator_floating_ip:
+    type: OS::Neutron::FloatingIP
+    properties:
+      floating_network:
+        get_param: float_net_id
+      port_id:
+        get_attr: [simulator, addresses, get_param: instance_net_id, 0, port]
+  simulator:
+    type: OS::Nova::Server
+    properties:
+      name: mass-pnf-simulator
+      key_name:
+        get_param: key_name
+      image:
+        get_param: image_name
+      flavor:
+        get_param: flavor_name
+      networks:
+        - network:
+            get_param: instance_net_id
+outputs:
+  simulator_instance_id:
+    description: ID of the simulator instance
+    value:
+      get_resource: simulator
+  simulator_instance_fip:
+    description: Floating IP address of the simulator instance
+    value:
+      get_attr: [simulator_floating_ip, floating_ip_address]