From 0c1189afd53a83c7f2bff23ee20baa6477ba4cad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20=C5=A0imon?= Date: Tue, 19 Apr 2022 09:21:20 +0200 Subject: [PATCH] remove sap hana template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sap hana template was migrated to https://github.com/RHsyseng/cnv-supplemental-templates/blob/main/templates/saphana/rhel8.saphana.yaml Signed-off-by: Karel Šimon --- automation/test-linux.sh | 5 - generate-templates.yaml | 14 --- templates/rhel8.saphana.tpl.yaml | 209 ------------------------------- 3 files changed, 228 deletions(-) delete mode 100644 templates/rhel8.saphana.tpl.yaml diff --git a/automation/test-linux.sh b/automation/test-linux.sh index 9b484bae..70b3f32a 100755 --- a/automation/test-linux.sh +++ b/automation/test-linux.sh @@ -88,11 +88,6 @@ fi if [[ $TARGET =~ centos7.* ]] || [[ $TARGET =~ centos-stream.* ]]; then workloads=("server" "desktop") fi -if [[ $TARGET =~ .*saphana.* ]]; then - workloads=("saphana") - sizes=("tiny") - apply_only=true -fi delete_vm() { vm_name=$1 diff --git a/generate-templates.yaml b/generate-templates.yaml index 539bc09e..9ed63ba4 100644 --- a/generate-templates.yaml +++ b/generate-templates.yaml @@ -41,20 +41,6 @@ set_fact: rhel8_labels: "{{ lookup('osinfo', 'distro=rhel') |map(attribute='short_id') |select('match', '^rhel8\\.') |list |sort }}" - - name: Generate RHEL 8 SAP HANA template - template: - src: rhel8.saphana.tpl.yaml - dest: "{{ playbook_dir }}/dist/templates/{{ os }}-{{ item.workload }}-{{ item.flavor }}.yaml" - with_items: - - {flavor: tiny, workload: saphana, default: False} - vars: - os: rhel8 - icon: rhel - majorrelease: rhel8 - oslabels: "{{ rhel8_labels }}" - osinfoname: "{{ oslabels[0] }}" - cloudusername: cloud-user - - name: Generate RHEL 8 templates template: src: rhel8.tpl.yaml diff --git a/templates/rhel8.saphana.tpl.yaml b/templates/rhel8.saphana.tpl.yaml deleted file mode 100644 index 549251bc..00000000 --- a/templates/rhel8.saphana.tpl.yaml +++ /dev/null @@ -1,209 +0,0 @@ -apiVersion: template.openshift.io/v1 -kind: Template -metadata: - name: {{ os }}-{{ item.workload }}-{{ item.flavor }} - annotations: - openshift.io/display-name: "Red Hat Enterprise Linux 8.4 VM for SAP HANA workloads" - description: >- - Template for Red Hat Enterprise Linux 8.4 for SAP HANA workloads. - Please consult the SAP HANA guide for node setup requirements. - tags: "hidden,kubevirt,virtualmachine,linux,rhel,sap,hana" - iconClass: "icon-{{ icon }}" - openshift.io/provider-display-name: "KubeVirt" - openshift.io/documentation-url: "https://github.com/kubevirt/common-templates" - openshift.io/support-url: "https://github.com/kubevirt/common-templates/issues" - template.openshift.io/bindable: "false" - template.kubevirt.io/version: v1alpha1 - defaults.template.kubevirt.io/disk: rootdisk - name.os.template.kubevirt.io/rhel8.4: Red Hat Enterprise Linux 8.0 or higher - labels: - os.template.kubevirt.io/rhel8.4: "true" - workload.template.kubevirt.io/{{ item.workload }}: "true" - flavor.template.kubevirt.io/{{ item.flavor }}: "true" - template.kubevirt.io/type: "base" - template.kubevirt.io/version: "{{ lookup('env', 'VERSION') | default('devel', true) }}" -{% if item.default %} - template.kubevirt.io/default-os-variant: "true" -{% endif %} -objects: - - apiVersion: kubevirt.io/v1 - kind: VirtualMachine - metadata: - labels: - vm.kubevirt.io/template: {{ os }}-{{ item.workload }}-{{ item.flavor }} - vm.kubevirt.io/template.version: "{{ lookup('env', 'VERSION') | default('devel', true) }}" - vm.kubevirt.io/template.revision: "{{ lookup('env', 'REVISION') | default(1, true) }}" - app: ${NAME} - name: ${NAME} - annotations: - vm.kubevirt.io/validations: | - [ - { - "name": "minimal-required-memory", - "path": "jsonpath::.spec.domain.resources.requests.memory", - "rule": "integer", - "message": "This VM requires more memory.", - "min": {{ lookup('osinfo', osinfoname)["minimum_resources.architecture=x86_64|all.ram"] }} - } - ] - spec: - dataVolumeTemplates: - - apiVersion: cdi.kubevirt.io/v1beta1 - kind: DataVolume - metadata: - name: ${NAME} - spec: - storage: - resources: - requests: - storage: 50Gi - source: - registry: - url: ${SRC_CONTAINERDISK} - pullMethod: node - running: false - template: - metadata: - annotations: - vm.kubevirt.io/os: "{{ os }}" - vm.kubevirt.io/workload: "{{ item.workload }}" - vm.kubevirt.io/flavor: "{{ item.flavor }}" - labels: - kubevirt.io/domain: ${NAME} - kubevirt.io/size: {{ item.flavor }} - spec: - hostname: ${NAME} - domain: - ioThreadsPolicy: auto - cpu: - cores: {{ '${{CPU_CORES}}' }} - threads: {{ '${{CPU_THREADS}}' }} - sockets: {{ '${{CPU_SOCKETS}}' }} - model: host-passthrough - isolateEmulatorThread: true - dedicatedCpuPlacement: true - features: - - name: "invtsc" - policy: "require" - numa: - guestMappingPassthrough : {} - devices: - blockMultiQueue: true - networkInterfaceMultiqueue: true - disks: - - disk: - bus: virtio - dedicatedIOThread: true - name: ${NAME} - - disk: - bus: virtio - name: cloudinitdisk - - disk: - bus: virtio - name: downwardmetrics - interfaces: - - masquerade: {} - name: default - model: virtio - - name: sriov-net1 - sriov: {} - - name: sriov-net2 - sriov: {} - - name: sriov-net3 - sriov: {} - machine: - type: "" - resources: - requests: - memory: ${MEMORY_OVERHEAD} - memory: - guest: ${MEMORY} - hugepages: - pageSize: ${HUGEPAGES_PAGE_SIZE} - terminationGracePeriodSeconds: 3600 - volumes: - - dataVolume: - name: ${NAME} - name: ${NAME} - - cloudInitNoCloud: - userData: |- - #cloud-config - user: {{ cloudusername }} - password: ${CLOUD_USER_PASSWORD} - chpasswd: { expire: False } - name: cloudinitdisk - - downwardMetrics: {} - name: downwardmetrics - networks: - - name: default - pod: {} - - multus: - networkName: ${SRIOV_NETWORK_NAME1} - name: sriov-net1 - - multus: - networkName: ${SRIOV_NETWORK_NAME2} - name: sriov-net2 - - multus: - networkName: ${SRIOV_NETWORK_NAME3} - name: sriov-net3 - nodeSelector: - kubevirt.io/workload: ${WORKLOAD_NODE_LABEL_VALUE} - tolerations: - - key: kubevirt.io/workload - operator: Equal - value: hana - effect: NoSchedule -parameters: - - description: Name for the new VM - displayName: Name - name: NAME - required: true - - description: Value of the node label selector key - displayName: "The value of the kubevirt.io/workload node selector label key. The target node needs to match this label" - name: WORKLOAD_NODE_LABEL_VALUE - required: true - - description: Amount of memory - displayName: Memory - name: MEMORY - value: 24Gi - - description: Amount of memory overhead for qemu - displayName: Memory Overhead - name: MEMORY_OVERHEAD - value: 44Gi - - description: Amount of cores - displayName: CPU Cores - name: CPU_CORES - value: "4" - - description: Amount of threads - displayName: CPU Threads - name: CPU_THREADS - value: "1" - - description: Amount of sockets - displayName: CPU Sockets - name: CPU_SOCKETS - value: "1" - - description: Name of the SR-IOV network1 - displayName: SR-IOV network1 - name: SRIOV_NETWORK_NAME1 - required: true - - description: Name of the SR-IOV network2 - displayName: SR-IOV network2 - name: SRIOV_NETWORK_NAME2 - required: true - - description: Name of the SR-IOV network3 - displayName: SR-IOV network3 - name: SRIOV_NETWORK_NAME3 - required: true - - description: Page size of huge pages - displayName: Huge page size - name: HUGEPAGES_PAGE_SIZE - value: "1Gi" - - name: SRC_CONTAINERDISK - description: Name of the source container disk to import - displayName: Source container disk - value: "docker://registry.redhat.io/rhel8/rhel-guest-image:8.4.0" - - description: Randomized password for the cloud-init user {{ cloudusername }} - displayName: Cloud user password - from: '[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}' - generate: expression - name: CLOUD_USER_PASSWORD