CVP Shaker docker repo

Change-Id: If9d39409caaf4eb562ca6734a26808642b4ffd3b
Related-task: https://mirantis.jira.com/browse/PROD-24883
diff --git a/scenarios/essential/l2/dense_l2.yaml b/scenarios/essential/l2/dense_l2.yaml
new file mode 100644
index 0000000..6347a17
--- /dev/null
+++ b/scenarios/essential/l2/dense_l2.yaml
@@ -0,0 +1,26 @@
+title: OpenStack L2 Dense
+
+description:
+  In this scenario Shaker launches several pairs of instances on a single
+  compute node. Instances are plugged into the same tenant network.
+  The traffic goes within the tenant network (L2 domain).
+
+deployment:
+  template: l2.hot
+  accommodation: [pair, double_room, density: 6, compute_nodes: 1]
+
+execution:
+  progression: linear
+  tests:
+  -
+    title: Download
+    class: flent
+    method: tcp_download
+  -
+    title: Upload
+    class: flent
+    method: tcp_upload
+  -
+    title: Bi-directional
+    class: flent
+    method: tcp_bidirectional
diff --git a/scenarios/essential/l2/full_l2.yaml b/scenarios/essential/l2/full_l2.yaml
new file mode 100644
index 0000000..9767a26
--- /dev/null
+++ b/scenarios/essential/l2/full_l2.yaml
@@ -0,0 +1,27 @@
+title: OpenStack L2
+
+description:
+  In this scenario Shaker launches pairs of instances in the same tenant
+  network. Every instance is hosted on a separate compute node, all available
+  compute nodes are utilized. The traffic goes within the tenant network
+  (L2 domain).
+
+deployment:
+  template: l2.hot
+  accommodation: [pair, single_room]
+
+execution:
+  progression: quadratic
+  tests:
+  -
+    title: Download
+    class: flent
+    method: tcp_download
+  -
+    title: Upload
+    class: flent
+    method: tcp_upload
+  -
+    title: Bi-directional
+    class: flent
+    method: tcp_bidirectional
diff --git a/scenarios/essential/l2/l2.hot b/scenarios/essential/l2/l2.hot
new file mode 100644
index 0000000..3636a49
--- /dev/null
+++ b/scenarios/essential/l2/l2.hot
@@ -0,0 +1,102 @@
+heat_template_version: 2013-05-23
+
+description:
+  This Heat template creates a new Neutron network, a router to the external
+  network and plugs instances into this new network. All instances are located
+  in the same L2 domain.
+
+parameters:
+  image:
+    type: string
+    description: Name of image to use for servers
+  flavor:
+    type: string
+    description: Flavor to use for servers
+  external_net:
+    type: string
+    description: ID or name of external network
+  server_endpoint:
+    type: string
+    description: Server endpoint address
+  dns_nameservers:
+    type: comma_delimited_list
+    description: DNS nameservers for the subnet
+
+resources:
+  private_net:
+    type: OS::Neutron::Net
+    properties:
+      name: {{ unique }}_net
+
+  private_subnet:
+    type: OS::Neutron::Subnet
+    properties:
+      network_id: { get_resource: private_net }
+      cidr: 10.0.0.0/16
+      dns_nameservers: { get_param: dns_nameservers }
+
+  router:
+    type: OS::Neutron::Router
+    properties:
+      external_gateway_info:
+        network: { get_param: external_net }
+
+  router_interface:
+    type: OS::Neutron::RouterInterface
+    properties:
+      router_id: { get_resource: router }
+      subnet_id: { get_resource: private_subnet }
+
+  server_security_group:
+    type: OS::Neutron::SecurityGroup
+    properties:
+      rules: [
+        {remote_ip_prefix: 0.0.0.0/0,
+        protocol: tcp,
+        port_range_min: 1,
+        port_range_max: 65535},
+        {remote_ip_prefix: 0.0.0.0/0,
+        protocol: udp,
+        port_range_min: 1,
+        port_range_max: 65535},
+        {remote_ip_prefix: 0.0.0.0/0,
+        protocol: icmp}]
+
+{% for agent in agents.values() %}
+
+  {{ agent.id }}:
+    type: OS::Nova::Server
+    properties:
+      name: {{ agent.id }}
+      image: { get_param: image }
+      flavor: { get_param: flavor }
+      availability_zone: "{{ agent.availability_zone }}"
+      networks:
+        - port: { get_resource: {{ agent.id }}_port }
+      user_data_format: RAW
+      user_data:
+        str_replace:
+          template: |
+            #!/bin/sh
+            screen -dmS shaker-agent-screen shaker-agent --server-endpoint=$SERVER_ENDPOINT --agent-id=$AGENT_ID
+          params:
+            "$SERVER_ENDPOINT": { get_param: server_endpoint }
+            "$AGENT_ID": {{ agent.id }}
+
+  {{ agent.id }}_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_resource: private_net }
+      fixed_ips:
+        - subnet_id: { get_resource: private_subnet }
+      security_groups: [{ get_resource: server_security_group }]
+
+{% endfor %}
+
+outputs:
+{% for agent in agents.values() %}
+  {{ agent.id }}_instance_name:
+    value: { get_attr: [ {{ agent.id }}, instance_name ] }
+  {{ agent.id }}_ip:
+    value: { get_attr: [ {{ agent.id }}, networks, { get_attr: [private_net, name] }, 0 ] }
+{% endfor %}
diff --git a/scenarios/essential/l2/perf_l2.yaml b/scenarios/essential/l2/perf_l2.yaml
new file mode 100644
index 0000000..a38ef31
--- /dev/null
+++ b/scenarios/essential/l2/perf_l2.yaml
@@ -0,0 +1,34 @@
+title: OpenStack L2 Performance
+
+description:
+  In this scenario Shaker launches 1 pair of instances in the same tenant
+  network. Each instance is hosted on a separate compute node. The traffic goes
+  within the tenant network (L2 domain).
+
+deployment:
+  template: l2.hot
+  accommodation: [pair, single_room, compute_nodes: 2]
+
+execution:
+  tests:
+  -
+    title: Ping
+    class: flent
+    method: ping
+    time: 10
+    sla:
+    - "[type == 'agent'] >> (stats.ping_icmp.avg < 2.0)"
+  -
+    title: TCP
+    class: iperf3
+    sla:
+    - "[type == 'agent'] >> (stats.bandwidth.avg > 5000)"
+    - "[type == 'agent'] >> (stats.retransmits.max < 10)"
+  -
+    title: UDP
+    class: iperf3
+    udp: on
+    bandwidth: 0
+    datagram_size: 32
+    sla:
+    - "[type == 'agent'] >> (stats.packets.avg > 100000)"
diff --git a/scenarios/essential/l2/udp_l2.yaml b/scenarios/essential/l2/udp_l2.yaml
new file mode 100644
index 0000000..0e142e5
--- /dev/null
+++ b/scenarios/essential/l2/udp_l2.yaml
@@ -0,0 +1,21 @@
+title: OpenStack L2 UDP
+
+description:
+  In this scenario Shaker launches pairs of instances in the same tenant
+  network. Every instance is hosted on a separate compute node.
+  The traffic goes within the tenant network (L2 domain). The load is
+  generated by UDP traffic.
+
+deployment:
+  template: l2.hot
+  accommodation: [pair, single_room]
+
+execution:
+  progression: quadratic
+  tests:
+  -
+    title: UDP
+    class: iperf3
+    udp: on
+    bandwidth: 1000M
+    datagram_size: 32