Add 4 node stack type for hwvtep suites 40/61440/3
authorJamo Luhrsen <jluhrsen@redhat.com>
Wed, 9 Aug 2017 18:17:10 +0000 (11:17 -0700)
committerJamo Luhrsen <jluhrsen@redhat.com>
Wed, 9 Aug 2017 18:25:23 +0000 (11:25 -0700)
hwvtep suites need an odl node type, 1 larger openstack
node (control) type, 2 smaller openstack node (compute)
and 1 more node type for mininet systems

Change-Id: Ib8f255a23148b3d1ca15c5e29e6a49c998199d49
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
jjb/integration/integration-macros.yaml
jjb/integration/integration-templates.yaml
openstack-hot/csit-4-instance-type.yaml [new file with mode: 0644]

index 69c978061eee81cac25ff70fb52f02b0fecf6893..8ee7f0b50abb9a60cdf0b9349d5956ecf1e877e4 100644 (file)
       - opendaylight-infra-stack:
           stack-template: 'csit-3-instance-type.yaml'
 
+# Macro: integration-infra-stack-4-type
+# Operation: Sets environment and then calls opendaylight-infra-stack to spin
+#            up csit lab using openstack-heat.
+# Used by: {project}-csit-* job templates
+
+- builder:
+    name: integration-infra-stack-4-type
+    builders:
+      - integration-cleanup-workspace
+      - shell: |
+          #!/bin/bash
+          # Setup openstack envirnoment file for use by
+          # the opendaylight-infra-stack macro
+          cat > $WORKSPACE/opendaylight-infra-environment.yaml << EOF
+          parameters:
+              vm_0_count: {vm_0_count}
+              vm_0_flavor: {vm_0_flavor}
+              vm_0_image: {vm_0_image}
+              vm_1_count: {vm_1_count}
+              vm_1_flavor: {vm_1_flavor}
+              vm_1_image: {vm_1_image}
+              vm_2_count: {vm_2_count}
+              vm_2_flavor: {vm_2_flavor}
+              vm_2_image: {vm_2_image}
+              vm_3_count: {vm_3_count}
+              vm_3_flavor: {vm_3_flavor}
+              vm_3_image: {vm_3_image}
+          EOF
+          echo "Contents of opendaylight-infra-environment.yaml ..."
+          cat $WORKSPACE/opendaylight-infra-environment.yaml
+      - opendaylight-infra-stack:
+          stack-template: 'csit-4-instance-type.yaml'
+
 # Macro: integration-get-slave-addresses
 # Operation: this macro gets the IP addresses of the dynamic vms
 # Used by: {project}-csit-* job templates
index b62b09ccfd8445b50b98387f5701630baccdf1f0..89e41122f3e980c6bdd90a6e26c1d7537367e3bc 100644 (file)
       - timed: '{schedule}'
 
     builders:
-      - integration-infra-stack-3-type:
+      - integration-infra-stack-4-type:
+          stack-template: '{stack-template}'
           vm_0_count: '{odl_system_count}'
           vm_0_flavor: '{odl_system_flavor}'
           vm_0_image: '{odl_system_image}'
           vm_1_count: '{openstack_system_count}'
           vm_1_flavor: '{openstack_system_flavor}'
           vm_1_image: '{openstack_system_image}'
-          vm_2_count: '{tools_system_count}'
-          vm_2_flavor: '{tools_system_flavor}'
-          vm_2_image: '{tools_system_image}'
+          vm_2_count: '{openstack_system2_count}'
+          vm_2_flavor: '{openstack_system2_flavor}'
+          vm_2_image: '{openstack_system2_image}'
+          vm_3_count: '{tools_system_count}'
+          vm_3_flavor: '{tools_system_flavor}'
+          vm_3_image: '{tools_system_image}'
       - integration-install-robotframework
       - inject:
           properties-file: 'env.properties'
diff --git a/openstack-hot/csit-4-instance-type.yaml b/openstack-hot/csit-4-instance-type.yaml
new file mode 100644 (file)
index 0000000..79de0db
--- /dev/null
@@ -0,0 +1,118 @@
+---
+heat_template_version: 2016-04-08
+
+parameters:
+    job_name:
+        type: string
+        description: Name of job running this template
+    silo:
+        type: string
+        description: Jenkins Silo job is running in (typically releng|sandbox)
+    vm_0_count:
+        type: number
+        description: Number of VMs for 1st VM type
+    vm_0_flavor:
+        type: string
+        default: 1 GB General Purpose v1
+        description: Flavor to run instance on for 1st VM type
+    vm_0_image:
+        type: string
+        description: Image to run instance on for 1st VM type
+    vm_1_count:
+        type: number
+        description: Number of VMs for 2nd VM type
+    vm_1_flavor:
+        type: string
+        default: 1 GB General Purpose v1
+        description: Flavor to run instance on for 2nd VM type
+    vm_1_image:
+        type: string
+        description: Image to run instance on for 2nd VM type
+    vm_2_count:
+        type: number
+        description: Number of VMs for 3rd VM type
+    vm_2_flavor:
+        type: string
+        default: 1 GB General Purpose v1
+        description: Flavor to run instance on for 3rd VM type
+    vm_2_image:
+        type: string
+    vm_3_count:
+        type: number
+        description: Number of VMs for 3rd VM type
+    vm_3_flavor:
+        type: string
+        default: 1 GB General Purpose v1
+        description: Flavor to run instance on for 3rd VM type
+    vm_3_image:
+        type: string
+
+resources:
+    vm_0_group:
+        type: "OS::Heat::ResourceGroup"
+        properties:
+            count: {get_param: vm_0_count}
+            resource_def:
+                type: generic-server.yaml
+                properties:
+                    job_name: {get_param: job_name}
+                    silo: {get_param: silo}
+                    ssh_key: {get_param: silo}
+                    index: "%index%"
+                    vm_flavor: {get_param: vm_0_flavor}
+                    vm_image: {get_param: vm_0_image}
+
+    vm_1_group:
+        type: "OS::Heat::ResourceGroup"
+        properties:
+            count: {get_param: vm_1_count}
+            resource_def:
+                type: generic-server.yaml
+                properties:
+                    job_name: {get_param: job_name}
+                    silo: {get_param: silo}
+                    ssh_key: {get_param: silo}
+                    index: "%index%"
+                    vm_flavor: {get_param: vm_1_flavor}
+                    vm_image: {get_param: vm_1_image}
+
+    vm_2_group:
+        type: "OS::Heat::ResourceGroup"
+        properties:
+            count: {get_param: vm_2_count}
+            resource_def:
+                type: generic-server.yaml
+                properties:
+                    job_name: {get_param: job_name}
+                    silo: {get_param: silo}
+                    ssh_key: {get_param: silo}
+                    index: "%index%"
+                    vm_flavor: {get_param: vm_2_flavor}
+                    vm_image: {get_param: vm_2_image}
+    vm_3_group:
+        type: "OS::Heat::ResourceGroup"
+        properties:
+            count: {get_param: vm_3_count}
+            resource_def:
+                type: generic-server.yaml
+                properties:
+                    job_name: {get_param: job_name}
+                    silo: {get_param: silo}
+                    ssh_key: {get_param: silo}
+                    index: "%index%"
+                    vm_flavor: {get_param: vm_3_flavor}
+                    vm_image: {get_param: vm_3_image}
+
+outputs:
+    vm_0_ips:
+        description: IP addresses of the 1st vm types
+        value: {get_attr: [vm_0_group, ip]}
+    vm_1_ips:
+        description: IP addresses of the 2nd vm types
+        value: {get_attr: [vm_1_group, ip]}
+    vm_2_ips:
+        description: IP addresses of the 3rd vm types
+        value: {get_attr: [vm_2_group, ip]}
+    vm_3_ips:
+        description: IP addresses of the 4th vm types
+        value: {get_attr: [vm_3_group, ip]}