Creating a Configuration File for an Oracle Linux Virtualization Manager Cluster

Create a cluster configuration file for an Oracle Linux Virtualization Manager cluster.

Some mandatory configuration options need to be set in a configuration file before you create a cluster on Oracle Linux Virtualization Manager.

A cluster configuration contains the cluster specific information to use when creating the cluster. This file overrides any default configuration (set in the $HOME/.ocne/defaults.yaml file).

Note:

You can include the cluster configuration information in the default configuration file. If you do this, you don't need to include the location of the cluster configuration file when you create the cluster using the ocne cluster start command.

Set up a cluster configuration file. A cluster configuration file must include at least the following options:

provider: olvm
name: cluster_name
virtualIp: IP_address
providers:
  olvm:
    olvmDatacenterName: datacenter_name
    olvmOvirtAPIServer:
      serverURL: URL
      serverCAPath: path
    olvmOCK:
      storageDomainName: domain_name
      diskName: image_name
      diskSize: disk_size
    controlPlaneMachine:
      olvmOvirtClusterName: cluster_name
      vmTemplateName: template_name
      olvmNetwork:
        networkName: network_name
        vnicProfileName: profile_name
      virtualMachine:
        memory: size
        network:
          gateway: IP_address
          ipv4:
            subnet: subnet
            ipAddresses: IPs
    workerMachine:
      olvmOvirtClusterName: cluster_name
      vmTemplateName: template_name
      olvmNetwork:
        networkName: network_name
        vnicProfileName: profile_name
      virtualMachine:
        memory: size
        network:
          gateway: IP_address
          ipv4:
            subnet: subnet
            ipAddresses: IPs

For information on what can be included in the cluster configuration file, see Oracle Linux Virtualization Manager Provider Options.

For example:

provider: olvm
name: mycluster
virtualIp: 192.0.2.21
providers:
  olvm:
    olvmDatacenterName: Default
    olvmOvirtAPIServer:
      serverURL: https://olvm.example.com/ovirt-engine
      serverCAPath: /home/username/olvm/ca.crt
    olvmOCK:
      storageDomainName: mydomain
      diskName: ock-1.32
      diskSize: 16GB
    controlPlaneMachine:
      olvmOvirtClusterName: myolvmcluster
      vmTemplateName: ock-1.32
      olvmNetwork:
        networkName: mynetwork
        vnicProfileName: myprofile
      virtualMachine:
        memory: 8GB
        network:
          gateway: 2.3.4.1
          ipv4:
            subnet: 192.0.0.0/24
            ipAddresses: 192.0.2.0/24, 192.0.2.10-192.0.2.20
    workerMachine:
      olvmOvirtClusterName: myolvmcluster
      vmTemplateName: ock-1.32
      olvmNetwork:
        networkName: mynetwork
        vnicProfileName: myprofile
      virtualMachine:
        memory: 16GB
        network:
          gateway: 2.3.4.1
          ipv4:
            subnet: 192.0.0.0/24
            ipAddresses: 192.0.2.0/24, 192.0.2.21-192.0.2.30, 192.0.2.32

A more complex cluster configuration file might include:

provider: olvm
proxy:
  httpsProxy: http://myproxy.example.com:2138
  httpProxy: http://myproxy.example.com:2138
  noProxy: .example.com,127.0.0.1,localhost,169.254.169.254,10.96.0.0/12,10.244.0.0/16
headless: true
name: mycluster
workerNodes: 3 
controlPlaneNodes: 3
virtualIp: 192.0.2.21
providers:
  olvm:
    olvmDatacenterName: Default
    olvmOvirtAPIServer:
      serverURL: https://olvm.example.com/ovirt-engine
      serverCAPath: /home/username/olvm/ca.crt
      credentialsSecret:
        name: my-olvm-creds
        namespace: olvm
      caConfigMap:
        name: my-olvm-ca
        namespace: olvm
    olvmOCK:
      storageDomainName: mydomain
      diskName: ock-1.32
      diskSize: 16GB
    controlPlaneMachine:
      olvmOvirtClusterName: myolvmcluster
      vmTemplateName: ock-1.32
      olvmNetwork:
        networkName: mynetwork
        vnicName: nic-1
        vnicProfileName: myprofile
      virtualMachine:
        memory: 8GB
        network:
          gateway: 2.3.4.1
          ipv4:
            subnet: 192.0.0.0/24
            ipAddresses: 192.0.2.0/24, 192.0.2.10-192.0.2.20
    workerMachine:
      olvmOvirtClusterName: myolvmcluster
      vmTemplateName: ock-1.32
      olvmNetwork:
        networkName: mynetwork
        vnicName: nic-1
        vnicProfileName: myprofile
      virtualMachine:
        memory: 16GB
        network:
          gateway: 2.3.4.1
          ipv4:
            subnet: 192.0.0.0/24
            ipAddresses: 192.0.2.0/24, 192.0.2.21-192.0.2.30, 192.0.2.32