Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document/automate deploy OpenShift Virtualization Operator #22

Closed
liveaverage opened this issue May 28, 2020 · 3 comments
Closed

Document/automate deploy OpenShift Virtualization Operator #22

liveaverage opened this issue May 28, 2020 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@liveaverage
Copy link
Contributor

Post-install, and post-storage configuration, deploy CNV/kubevirt/OpenShift Virtualization/whatever the latest product name is. Depends on #21 to successfully launch VM's

@liveaverage liveaverage self-assigned this May 28, 2020
@liveaverage
Copy link
Contributor Author

Had some minor issues when redeploying the CNV operator that were only resolved after reversing the steps executed in deploy.sh here (and replaced create with delete) : https://github.com/kubevirt/hyperconverged-cluster-operator/blob/master/deploy/deploy.sh

@liveaverage
Copy link
Contributor Author

liveaverage commented Jun 2, 2020

Ended up using HostPathProvisioner since NFS was not supported... needed to create the following manifests. Note the path being used (/var/lib/kubevirt):

apiVersion: hostpathprovisioner.kubevirt.io/v1alpha1
kind: HostPathProvisioner
metadata:
  name: hostpath-provisioner
spec:
  imagePullPolicy: IfNotPresent
  pathConfig:
    path: "/var/lib/kubevirt"
    useNamingPrefix: "false"
---
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  name: 50-set-selinux-for-hostpath-provisioner
  labels:
    machineconfiguration.openshift.io/role: worker
spec:
  config:
    ignition:
      version: 2.2.0
    systemd:
      units:
        - contents: |
            [Unit]
            Description=Set SELinux chcon for hostpath provisioner
            Before=kubelet.service

            [Service]
            ExecStart=/usr/bin/chcon -Rt container_file_t /var/lib/kubevirt

            [Install]
            WantedBy=multi-user.target
          enabled: true
          name: hostpath-provisioner.service
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: hostpath-provisioner 
provisioner: kubevirt.io/hostpath-provisioner
reclaimPolicy: Delete 
volumeBindingMode: WaitForFirstConsumer

If pursuing OCS, prereq:

cat <<EOF | oc create -f -
apiVersion: v1
kind: Namespace
metadata:
  labels:
    openshift.io/cluster-monitoring: "true"
  name: openshift-storage
spec: {}
EOF

@liveaverage liveaverage changed the title Automatically deploy OpenShift Virtualization Operator Document/automate deploy OpenShift Virtualization Operator Jun 4, 2020
@liveaverage liveaverage added the documentation Improvements or additions to documentation label Jun 8, 2020
@liveaverage
Copy link
Contributor Author

Fixed by e3801cf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant