-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added redhat_ocp_virt platform to sap_hypervisor_node_preconfigure
- Loading branch information
Nils Koenig
committed
Sep 26, 2023
1 parent
f0cc8c0
commit 3d4ae5b
Showing
39 changed files
with
1,374 additions
and
84 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
playbooks/sample-sap-hypervisor-redhat_ocp_virt-preconfigure.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
- hosts: all | ||
gather_facts: true | ||
serial: 1 | ||
vars: | ||
sap_hypervisor_node_platform: redhat_ocp_virt | ||
|
||
tasks: | ||
- name: Include Role | ||
ansible.builtin.include_role: | ||
name: sap_hypervisor_node_preconfigure |
89 changes: 89 additions & 0 deletions
89
playbooks/vars/sample-variables-sap-hypervisor-node-preconfigure-rh_ocp_virt.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
sap_hypervisor_node_preconfigure_cluster_config: | ||
|
||
# URL under which the OCP cluster is reachable | ||
cluster_url: ocpcluster.domain.org | ||
|
||
# namespace under which the VMs are created, note this has to be | ||
# openshift-sriov-network-operator in case of using SRIOV network | ||
# devices | ||
vm_namespace: sap | ||
|
||
# Optional, configuration for trident driver for Netapp NFS filer | ||
trident: | ||
management: management.domain.org | ||
data: datalif.netapp.domain.org | ||
svm: sap_svm | ||
backend: nas_backend | ||
aggregate: aggregate_Name | ||
username: admin | ||
password: xxxxx | ||
storage_driver: ontap-nas | ||
storage_prefix: ocpv_sap_ | ||
|
||
# detailed configuration for every worker that should be configured | ||
# | ||
workers: | ||
- kubernetes_reserved_cpus: "0,1" # CPU cores reserved for | ||
# kubernetes | ||
|
||
- name: worker-0 # name must match the node name | ||
networks: # Example network config | ||
- name: sapbridge # using a bridge | ||
description: SAP bridge | ||
state: up | ||
type: linux-bridge | ||
ipv4: | ||
enabled: false | ||
auto-gateway: false | ||
auto-dns: false | ||
bridge: | ||
options: | ||
stp: | ||
enabled: false | ||
port: | ||
- name: ens1f0 # network IF name | ||
- name: storage # an SRIOV device | ||
interface: ens2f0 # network IF name | ||
type: sriov | ||
|
||
- bridge: # another bridge | ||
options: | ||
stp: | ||
enabled: false | ||
port: | ||
- name: ens2f0 # network IF name | ||
description: storage | ||
mtu: 9000 | ||
ipv4: | ||
address: | ||
- ip: 192.168.1.51 # IP config | ||
prefix-length: 24 | ||
auto-dns: false | ||
auto-gateway: false | ||
enabled: true | ||
name: storagebridge | ||
state: up | ||
type: linux-bridge | ||
- name: multi # another SRIOV device | ||
interface: ens2f1 # network IF name | ||
type: sriov | ||
|
||
- name: worker-1 # second worker configuration | ||
networks: # Example network config | ||
- name: sapbridge # using a bridge | ||
description: SAP bridge | ||
state: up | ||
type: linux-bridge | ||
ipv4: | ||
enabled: false | ||
auto-gateway: false | ||
auto-dns: false | ||
bridge: | ||
options: | ||
stp: | ||
enabled: false | ||
port: | ||
- name: ens1f0 # network IF name | ||
- name: storage # an SRIOV device | ||
interface: ens2f0 # network IF name | ||
type: sriov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
..._node_preconfigure/files/platform/redhat_ocp_virt/cnv-namespace-operator-subscription.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: openshift-cnv | ||
--- | ||
apiVersion: operators.coreos.com/v1 | ||
kind: OperatorGroup | ||
metadata: | ||
name: kubevirt-hyperconverged-group | ||
namespace: openshift-cnv | ||
spec: | ||
targetNamespaces: | ||
- openshift-cnv | ||
--- | ||
apiVersion: operators.coreos.com/v1alpha1 | ||
kind: Subscription | ||
metadata: | ||
name: hco-operatorhub | ||
namespace: openshift-cnv | ||
spec: | ||
source: redhat-operators | ||
sourceNamespace: openshift-marketplace | ||
name: kubevirt-hyperconverged | ||
# startingCSV: kubevirt-hyperconverged-operator.v4.10.0 | ||
# channel: "stable" | ||
--- | ||
apiVersion: hco.kubevirt.io/v1beta1 | ||
kind: HyperConverged | ||
metadata: | ||
name: kubevirt-hyperconverged | ||
namespace: openshift-cnv | ||
spec: |
5 changes: 5 additions & 0 deletions
5
...rvisor_node_preconfigure/files/platform/redhat_ocp_virt/sriov-enabled-unsupported-nics.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
# in order to allow unsupported SRIOV nics such as Mellanox | ||
oc patch sriovoperatorconfig default --type=merge -n openshift-sriov-network-operator --patch '{ "spec": { "enableOperatorWebhook": false } }' | ||
|
||
|
26 changes: 26 additions & 0 deletions
26
...ode_preconfigure/files/platform/redhat_ocp_virt/sriov-namespace-operator-subscription.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: openshift-sriov-network-operator | ||
--- | ||
apiVersion: operators.coreos.com/v1 | ||
kind: OperatorGroup | ||
metadata: | ||
name: sriov-network-operators | ||
namespace: openshift-sriov-network-operator | ||
spec: | ||
targetNamespaces: | ||
- openshift-sriov-network-operator | ||
--- | ||
apiVersion: operators.coreos.com/v1alpha1 | ||
kind: Subscription | ||
metadata: | ||
name: sriov-network-operator-subscription | ||
namespace: openshift-sriov-network-operator | ||
spec: | ||
source: redhat-operators | ||
sourceNamespace: openshift-marketplace | ||
name: sriov-network-operator | ||
# startingCSV: sriov-network-operator | ||
channel: "stable" |
Oops, something went wrong.