Skip to content

Commit

Permalink
removed generic workload
Browse files Browse the repository at this point in the history
added server workload
updated tests
  • Loading branch information
ksimon1 authored and MarSik committed Mar 11, 2019
1 parent 65e0c39 commit 7eb0165
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 59 deletions.
20 changes: 12 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,51 +17,55 @@ jobs:
script: bash -x test.sh

- name: Functional test of the Fedora template
env: TARGET=functional-tests TEST_FUNCTIONAL="fedora-generic-tiny fedora-generic-small fedora-generic-medium fedora-generic-large"
env: TARGET=functional-tests TEST_FUNCTIONAL="fedora-desktop-tiny fedora-desktop-small fedora-desktop-medium fedora-desktop-large"
script: bash -x test.sh

- name: Functional test of the Ubuntu template
env: TARGET=functional-tests TEST_FUNCTIONAL="ubuntu-generic-tiny ubuntu-generic-small ubuntu-generic-medium ubuntu-generic-large"
env: TARGET=functional-tests TEST_FUNCTIONAL="ubuntu-desktop-tiny ubuntu-desktop-small ubuntu-desktop-medium ubuntu-desktop-large"
script: bash -x test.sh

- name: Functional test of the RHEL 8 template
env: TARGET=functional-tests TEST_FUNCTIONAL="rhel8-generic-tiny rhel8-generic-small rhel8-generic-medium rhel8-generic-large"
env: TARGET=functional-tests TEST_FUNCTIONAL="rhel8-server-tiny rhel8-server-small rhel8-server-medium rhel8-server-large"
script: bash -x test.sh

- name: Functional test of the desktop RHEL 8 template
env: TARGET=functional-tests TEST_FUNCTIONAL="rhel8-desktop-tiny rhel8-desktop-small rhel8-desktop-medium rhel8-desktop-large"
script: bash -x test.sh

- name: Functional test of the CentOS 8 template
env: TARGET=functional-tests TEST_FUNCTIONAL="centos8-generic-tiny centos8-generic-small centos8-generic-medium centos8-generic-large"
env: TARGET=functional-tests TEST_FUNCTIONAL="centos8-server-tiny centos8-server-small centos8-server-medium centos8-server-large"
script: bash -x test.sh

- name: Functional test of the desktop CentOS 8 template
env: TARGET=functional-tests TEST_FUNCTIONAL="centos8-desktop-tiny centos8-desktop-small centos8-desktop-medium centos8-desktop-large"
script: bash -x test.sh

- name: Functional test of the RHEL 7 template
env: TARGET=functional-tests TEST_FUNCTIONAL="rhel7-generic-tiny rhel7-generic-small rhel7-generic-medium rhel7-generic-large"
env: TARGET=functional-tests TEST_FUNCTIONAL="rhel7-server-tiny rhel7-server-small rhel7-server-medium rhel7-server-large"
script: bash -x test.sh

- name: Functional test of the desktop RHEL 7 template
env: TARGET=functional-tests TEST_FUNCTIONAL="rhel7-desktop-tiny rhel7-desktop-small rhel7-desktop-medium rhel7-desktop-large"
script: bash -x test.sh

- name: Functional test of the CentOS 7 template
env: TARGET=functional-tests TEST_FUNCTIONAL="centos7-generic-tiny centos7-generic-small centos7-generic-medium centos7-generic-large"
env: TARGET=functional-tests TEST_FUNCTIONAL="centos7-server-tiny centos7-server-small centos7-server-medium centos7-server-large"
script: bash -x test.sh

- name: Functional test of the desktop CentOS 7 template
env: TARGET=functional-tests TEST_FUNCTIONAL="centos7-desktop-tiny centos7-desktop-small centos7-desktop-medium centos7-desktop-large"
script: bash -x test.sh

- name: Functional test of the RHEL 6 template
env: TARGET=functional-tests TEST_FUNCTIONAL="rhel6-generic-tiny rhel6-generic-small rhel6-generic-medium rhel6-generic-large"
env: TARGET=functional-tests TEST_FUNCTIONAL="rhel6-server-tiny rhel6-server-small rhel6-server-medium rhel6-server-large"
script: bash -x test.sh

- name: Functional test of the desktop RHEL 6 template
env: TARGET=functional-tests TEST_FUNCTIONAL="rhel6-desktop-tiny rhel6-desktop-small rhel6-desktop-medium rhel6-desktop-large"
script: bash -x test.sh

- name: Functional test of the CentOS 6 template
env: TARGET=functional-tests TEST_FUNCTIONAL="centos6-generic-tiny centos6-generic-small centos6-generic-medium centos6-generic-large"
env: TARGET=functional-tests TEST_FUNCTIONAL="centos6-server-tiny centos6-server-small centos6-server-medium centos6-server-large"
script: bash -x test.sh

- stage: Build and Deploy
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,23 @@ $ ansible-playbook generate-templates.yaml

# Pick a template by selecting
# - the guest OS - win2k12r2
# - the workload type - generic
# - the workload type - desktop
# - the size - medium

# Use the template
$ oc process --local -f dist/templates/win2k1r2-generic-medium.dist.yaml
The Template "win2k1r2-generic-medium" is invalid: template.parameters[1]: Required value:
$ oc process --local -f dist/templates/win2k1r2-desktop-medium.dist.yaml
The Template "win2k1r2-desktop-medium" is invalid: template.parameters[1]: Required value:
template.parameters[1]: parameter PVCNAME is required and must be specified

$ oc process --local -f dist/templates/win2k1r2-generic-medium.dist.yaml --parameters
$ oc process --local -f dist/templates/win2k1r2-desktop-medium.dist.yaml --parameters
NAME DESCRIPTION GENERATOR VALUE
NAME Name of the new VM expression windows2012r2-[a-z0-9]{6}
PVCNAME Name of the PVC with the disk image

$ oc process --local -f dist/templates/win2k1r2-generic-medium.dist.yaml PVCNAME=mydisk
$ oc process --local -f dist/templates/win2k1r2-desktop-medium.dist.yaml PVCNAME=mydisk

$ oc process --local -f dist/templates/win2k1r2-generic-medium.dist.yaml PVCNAME=mydisk | kubectl apply -f -
$ oc process --local -f dist/templates/win2k1r2-desktop-medium.dist.yaml PVCNAME=mydisk | kubectl apply -f -
virtualmachine.kubevirt.io/windows2012r2-rt1ap2 created

$
Expand Down
5 changes: 2 additions & 3 deletions automation/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,9 @@ set -e
echo "Nodes are ready:"
_oc get nodes

_oc adm policy add-scc-to-user privileged system:serviceaccount:kubevirt:kubevirt-privileged
_oc adm policy add-scc-to-user privileged system:serviceaccount:kubevirt:kubevirt-handler
_oc adm policy add-scc-to-user privileged system:serviceaccount:kubevirt:kubevirt-controller
_oc adm policy add-scc-to-user privileged system:serviceaccount:kubevirt:kubevirt-apiserver
_oc adm policy add-scc-to-user privileged system:serviceaccount:kubevirt:kubevirt-handler

_oc apply \
-f https://github.com/kubevirt/kubevirt/releases/download/$VERSION/kubevirt.yaml
Expand Down Expand Up @@ -236,7 +235,7 @@ _oc exec -it winrmcli -- yum install -y iproute iputils

kubeconfig="cluster/$KUBEVIRT_PROVIDER/.kubeconfig"
sizes=("medium" "large")
workloads=("generic" "desktop")
workloads=("server" "desktop")
for size in ${sizes[@]}; do
for workload in ${workloads[@]}; do
windowsTemplatePath="../../dist/templates/win2k12r2-$workload-$size.yaml"
Expand Down
84 changes: 46 additions & 38 deletions generate-templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
src: rhel7.tpl.yaml
dest: "{{ playbook_dir }}/dist/templates/{{ os }}-{{ item.workload }}-{{ item.flavor }}.yaml"
with_items:
- {flavor: tiny, workload: generic, memsize: "1G", cpus: 1, iothreads: False, tablet: False}
- {flavor: tiny, workload: server, memsize: "1G", cpus: 1, iothreads: False, tablet: False}
- {flavor: tiny, workload: desktop, memsize: "1G", cpus: 1, iothreads: False, tablet: True}
- {flavor: tiny, workload: highperformance, memsize: "1G", cpus: 1, iothreads: True, tablet: False}
- {flavor: small, workload: generic, memsize: "2G", cpus: 1, iothreads: False, tablet: False}
- {flavor: small, workload: server, memsize: "2G", cpus: 1, iothreads: False, tablet: False}
- {flavor: small, workload: desktop, memsize: "2G", cpus: 1, iothreads: False, tablet: True}
- {flavor: small, workload: highperformance, memsize: "2G", cpus: 1, iothreads: True, tablet: False}
- {flavor: medium, workload: generic, memsize: "4G", cpus: 1, iothreads: False, tablet: False}
- {flavor: medium, workload: server, memsize: "4G", cpus: 1, iothreads: False, tablet: False}
- {flavor: medium, workload: desktop, memsize: "4G", cpus: 1, iothreads: False, tablet: True}
- {flavor: medium, workload: highperformance, memsize: "4G", cpus: 1, iothreads: True, tablet: False}
- {flavor: large, workload: generic, memsize: "8G", cpus: 2, iothreads: False, tablet: False}
- {flavor: large, workload: server, memsize: "8G", cpus: 2, iothreads: False, tablet: False}
- {flavor: large, workload: desktop, memsize: "8G", cpus: 2, iothreads: False, tablet: True}
- {flavor: large, workload: highperformance, memsize: "8G", cpus: 2, iothreads: True, tablet: False}
vars:
Expand All @@ -38,16 +38,16 @@
src: rhel7.tpl.yaml
dest: "{{ playbook_dir }}/dist/templates/{{ os }}-{{ item.workload }}-{{ item.flavor }}.yaml"
with_items:
- {flavor: tiny, workload: generic, memsize: "1G", cpus: 1, iothreads: False, tablet: False}
- {flavor: tiny, workload: server, memsize: "1G", cpus: 1, iothreads: False, tablet: False}
- {flavor: tiny, workload: desktop, memsize: "1G", cpus: 1, iothreads: False, tablet: True}
- {flavor: tiny, workload: highperformance, memsize: "1G", cpus: 1, iothreads: True, tablet: False}
- {flavor: small, workload: generic, memsize: "2G", cpus: 1, iothreads: False, tablet: False}
- {flavor: small, workload: server, memsize: "2G", cpus: 1, iothreads: False, tablet: False}
- {flavor: small, workload: desktop, memsize: "2G", cpus: 1, iothreads: False, tablet: True}
- {flavor: small, workload: highperformance, memsize: "2G", cpus: 1, iothreads: True, tablet: False}
- {flavor: medium, workload: generic, memsize: "4G", cpus: 1, iothreads: False, tablet: False}
- {flavor: medium, workload: server, memsize: "4G", cpus: 1, iothreads: False, tablet: False}
- {flavor: medium, workload: desktop, memsize: "4G", cpus: 1, iothreads: False, tablet: True}
- {flavor: medium, workload: highperformance, memsize: "4G", cpus: 1, iothreads: True, tablet: False}
- {flavor: large, workload: generic, memsize: "8G", cpus: 2, iothreads: False, tablet: False}
- {flavor: large, workload: server, memsize: "8G", cpus: 2, iothreads: False, tablet: False}
- {flavor: large, workload: desktop, memsize: "8G", cpus: 2, iothreads: False, tablet: True}
- {flavor: large, workload: highperformance, memsize: "8G", cpus: 2, iothreads: True, tablet: False}
vars:
Expand All @@ -69,10 +69,14 @@
src: rhel6.tpl.yaml
dest: "{{ playbook_dir }}/dist/templates/{{ os }}-{{ item.workload }}-{{ item.flavor }}.yaml"
with_items:
- {flavor: tiny, workload: generic, memsize: "1G", cpus: 1, iothreads: False, tablet: False}
- {flavor: small, workload: generic, memsize: "2G", cpus: 1, iothreads: False, tablet: False}
- {flavor: medium, workload: generic, memsize: "4G", cpus: 1, iothreads: False, tablet: False}
- {flavor: large, workload: generic, memsize: "8G", cpus: 2, iothreads: False, tablet: False}
- {flavor: tiny, workload: server, memsize: "1G", cpus: 1, iothreads: False, tablet: False}
- {flavor: tiny, workload: desktop, memsize: "1G", cpus: 1, iothreads: False, tablet: True}
- {flavor: small, workload: server, memsize: "2G", cpus: 1, iothreads: False, tablet: False}
- {flavor: small, workload: desktop, memsize: "2G", cpus: 1, iothreads: False, tablet: True}
- {flavor: medium, workload: server, memsize: "4G", cpus: 1, iothreads: False, tablet: False}
- {flavor: medium, workload: desktop, memsize: "4G", cpus: 1, iothreads: False, tablet: True}
- {flavor: large, workload: server, memsize: "8G", cpus: 2, iothreads: False, tablet: False}
- {flavor: large, workload: desktop, memsize: "8G", cpus: 2, iothreads: False, tablet: True}
vars:
os: rhel6
icon: rhel
Expand All @@ -95,13 +99,13 @@
src: centos7.tpl.yaml
dest: "{{ playbook_dir }}/dist/templates/{{ os }}-{{ item.workload }}-{{ item.flavor }}.yaml"
with_items:
- {flavor: tiny, workload: generic, memsize: "1G", cpus: 1, iothreads: False, tablet: False}
- {flavor: tiny, workload: server, memsize: "1G", cpus: 1, iothreads: False, tablet: False}
- {flavor: tiny, workload: desktop, memsize: "1G", cpus: 1, iothreads: False, tablet: True}
- {flavor: small, workload: generic, memsize: "2G", cpus: 1, iothreads: False, tablet: False}
- {flavor: small, workload: server, memsize: "2G", cpus: 1, iothreads: False, tablet: False}
- {flavor: small, workload: desktop, memsize: "2G", cpus: 1, iothreads: False, tablet: True}
- {flavor: medium, workload: generic, memsize: "4G", cpus: 1, iothreads: False, tablet: False}
- {flavor: medium, workload: server, memsize: "4G", cpus: 1, iothreads: False, tablet: False}
- {flavor: medium, workload: desktop, memsize: "4G", cpus: 1, iothreads: False, tablet: True}
- {flavor: large, workload: generic, memsize: "8G", cpus: 2, iothreads: False, tablet: False}
- {flavor: large, workload: server, memsize: "8G", cpus: 2, iothreads: False, tablet: False}
- {flavor: large, workload: desktop, memsize: "8G", cpus: 2, iothreads: False, tablet: True}
vars:
os: centos8
Expand All @@ -116,13 +120,13 @@
src: centos7.tpl.yaml
dest: "{{ playbook_dir }}/dist/templates/{{ os }}-{{ item.workload }}-{{ item.flavor }}.yaml"
with_items:
- {flavor: tiny, workload: generic, memsize: "1G", cpus: 1, iothreads: False, tablet: False}
- {flavor: tiny, workload: server, memsize: "1G", cpus: 1, iothreads: False, tablet: False}
- {flavor: tiny, workload: desktop, memsize: "1G", cpus: 1, iothreads: False, tablet: True}
- {flavor: small, workload: generic, memsize: "2G", cpus: 1, iothreads: False, tablet: False}
- {flavor: small, workload: server, memsize: "2G", cpus: 1, iothreads: False, tablet: False}
- {flavor: small, workload: desktop, memsize: "2G", cpus: 1, iothreads: False, tablet: True}
- {flavor: medium, workload: generic, memsize: "4G", cpus: 1, iothreads: False, tablet: False}
- {flavor: medium, workload: server, memsize: "4G", cpus: 1, iothreads: False, tablet: False}
- {flavor: medium, workload: desktop, memsize: "4G", cpus: 1, iothreads: False, tablet: True}
- {flavor: large, workload: generic, memsize: "8G", cpus: 2, iothreads: False, tablet: False}
- {flavor: large, workload: server, memsize: "8G", cpus: 2, iothreads: False, tablet: False}
- {flavor: large, workload: desktop, memsize: "8G", cpus: 2, iothreads: False, tablet: True}
vars:
os: centos7
Expand All @@ -137,10 +141,10 @@
src: centos6.tpl.yaml
dest: "{{ playbook_dir }}/dist/templates/{{ os }}-{{ item.workload }}-{{ item.flavor }}.yaml"
with_items:
- {flavor: tiny, workload: generic, memsize: "1G", cpus: 1, iothreads: False, tablet: False}
- {flavor: small, workload: generic, memsize: "2G", cpus: 1, iothreads: False, tablet: False}
- {flavor: medium, workload: generic, memsize: "4G", cpus: 1, iothreads: False, tablet: False}
- {flavor: large, workload: generic, memsize: "8G", cpus: 2, iothreads: False, tablet: False}
- {flavor: tiny, workload: server, memsize: "1G", cpus: 1, iothreads: False, tablet: False}
- {flavor: small, workload: server, memsize: "2G", cpus: 1, iothreads: False, tablet: False}
- {flavor: medium, workload: server, memsize: "4G", cpus: 1, iothreads: False, tablet: False}
- {flavor: large, workload: server, memsize: "8G", cpus: 2, iothreads: False, tablet: False}
vars:
os: centos6
icon: centos
Expand All @@ -163,13 +167,17 @@
src: fedora.tpl.yaml
dest: "{{ playbook_dir }}/dist/templates/{{ os }}-{{ item.workload }}-{{ item.flavor }}.yaml"
with_items:
- {flavor: tiny, workload: generic, memsize: "1G", cpus: 1, iothreads: False, tablet: True}
- {flavor: tiny, workload: desktop, memsize: "1G", cpus: 1, iothreads: False, tablet: True}
- {flavor: tiny, workload: server, memsize: "1G", cpus: 1, iothreads: False, tablet: False}
- {flavor: tiny, workload: highperformance, memsize: "1G", cpus: 1, iothreads: True, tablet: False}
- {flavor: small, workload: generic, memsize: "2G", cpus: 1, iothreads: False, tablet: True}
- {flavor: small, workload: desktop, memsize: "2G", cpus: 1, iothreads: False, tablet: True}
- {flavor: small, workload: server, memsize: "2G", cpus: 1, iothreads: False, tablet: False}
- {flavor: small, workload: highperformance, memsize: "2G", cpus: 1, iothreads: True, tablet: False}
- {flavor: medium, workload: generic, memsize: "4G", cpus: 1, iothreads: False, tablet: True}
- {flavor: medium, workload: desktop, memsize: "4G", cpus: 1, iothreads: False, tablet: True}
- {flavor: medium, workload: server, memsize: "4G", cpus: 1, iothreads: False, tablet: False}
- {flavor: medium, workload: highperformance, memsize: "4G", cpus: 1, iothreads: True, tablet: False}
- {flavor: large, workload: generic, memsize: "8G", cpus: 2, iothreads: False, tablet: True}
- {flavor: large, workload: desktop, memsize: "8G", cpus: 2, iothreads: False, tablet: True}
- {flavor: large, workload: server, memsize: "8G", cpus: 2, iothreads: False, tablet: False}
- {flavor: large, workload: highperformance, memsize: "8G", cpus: 2, iothreads: True, tablet: False}
vars:
os: fedora
Expand All @@ -186,10 +194,10 @@
src: opensuse.tpl.yaml
dest: "{{ playbook_dir }}/dist/templates/{{ os }}-{{ item.workload }}-{{ item.flavor }}.yaml"
with_items:
- {flavor: tiny, workload: generic, memsize: "1G", cpus: 1, iothreads: False, tablet: False}
- {flavor: small, workload: generic, memsize: "2G", cpus: 1, iothreads: False, tablet: False}
- {flavor: medium, workload: generic, memsize: "4G", cpus: 1, iothreads: False, tablet: False}
- {flavor: large, workload: generic, memsize: "8G", cpus: 2, iothreads: False, tablet: False}
- {flavor: tiny, workload: server, memsize: "1G", cpus: 1, iothreads: False, tablet: False}
- {flavor: small, workload: server, memsize: "2G", cpus: 1, iothreads: False, tablet: False}
- {flavor: medium, workload: server, memsize: "4G", cpus: 1, iothreads: False, tablet: False}
- {flavor: large, workload: server, memsize: "8G", cpus: 2, iothreads: False, tablet: False}
vars:
os: opensuse
icon: opensuse
Expand All @@ -203,10 +211,10 @@
src: ubuntu.tpl.yaml
dest: "{{ playbook_dir }}/dist/templates/{{ os }}-{{ item.workload }}-{{ item.flavor }}.yaml"
with_items:
- {flavor: tiny, workload: generic, memsize: "1G", cpus: 1, iothreads: False, tablet: True}
- {flavor: small, workload: generic, memsize: "2G", cpus: 1, iothreads: False, tablet: True}
- {flavor: medium, workload: generic, memsize: "4G", cpus: 1, iothreads: False, tablet: True}
- {flavor: large, workload: generic, memsize: "8G", cpus: 2, iothreads: False, tablet: True}
- {flavor: tiny, workload: desktop, memsize: "1G", cpus: 1, iothreads: False, tablet: True}
- {flavor: small, workload: desktop, memsize: "2G", cpus: 1, iothreads: False, tablet: True}
- {flavor: medium, workload: desktop, memsize: "4G", cpus: 1, iothreads: False, tablet: True}
- {flavor: large, workload: desktop, memsize: "8G", cpus: 2, iothreads: False, tablet: True}
vars:
cpumodel: Conroe
os: ubuntu
Expand All @@ -221,9 +229,9 @@
src: win2k12r2.tpl.yaml
dest: "{{ playbook_dir }}/dist/templates/win2k12r2-{{ item.workload }}-{{ item.flavor }}.yaml"
with_items:
- {flavor: medium, workload: generic, memsize: "4G", cpus: 1, iothreads: False, tablet: False}
- {flavor: medium, workload: server, memsize: "4G", cpus: 1, iothreads: False, tablet: False}
- {flavor: medium, workload: desktop, memsize: "4G", cpus: 1, iothreads: False, tablet: True}
- {flavor: large, workload: generic, memsize: "8G", cpus: 2, iothreads: False, tablet: False}
- {flavor: large, workload: server, memsize: "8G", cpus: 2, iothreads: False, tablet: False}
- {flavor: large, workload: desktop, memsize: "8G", cpus: 2, iothreads: False, tablet: True}
vars:
osinfoname: win2k12r2
4 changes: 2 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ VERSION=unknown
TEST_SYNTAX=$(ALL_GUESTS)
TEST_UNIT=$(ALL_GUESTS)
ifeq ($(TEST_FUNCTIONAL),ALL)
TEST_FUNCTIONAL=fedora-generic-small ubuntu-generic-small rhel7-generic-small centos7-generic-small
TEST_FUNCTIONAL=fedora-desktop-small ubuntu-desktop-small rhel7-server-small centos7-server-small
endif


Expand Down Expand Up @@ -102,7 +102,7 @@ raws: $(TESTABLE_GUESTS:%=%.raw)
%.pvc: %.pv
kubectl get pvc $*

# fedora-generic-small.pv will use fedora.raw
# fedora-desktop-small.pv will use fedora.raw
.SECONDEXPANSION:
%.pv: $$(firstword $$(subst -, ,$$@)).raw
$(TRAVIS_FOLD_START)
Expand Down
Loading

0 comments on commit 7eb0165

Please sign in to comment.