Configuring for Red Hat Virtualization

You are viewing documentation for a release that is no longer supported. The latest supported version of version 3 is [3.11]. For the most recent version 4, see [4]

You are viewing documentation for a release that is no longer supported. The latest supported version of version 3 is [3.11]. For the most recent version 4, see [4]

You can configure OKD to use Red Hat Virtualization.

Configuring Red Hat Virtualization objects

To integrate OKD with Red Hat Virtualization, take the following actions as part of your host preparation.

  1. To provide high availability in case of the loss of one hypervisor host, add each class of instance to a negative affinity group. See VM Affinity.

  2. To ensure that the OKD environment meets the minimum hardware requirements, create templates for virtual machines that use the following resources:

    Master nodes

    • Minimum 2 CPU Cores

    • 16 GB Memory

    • Minimum 10 GB root disk

    • Minimum 15 GB container image registry disk

    • 30 GB local volume disk

    • Minimum 25 GB etcd disk

    Infrastructure nodes

    • Minimum 2 CPU Cores

    • 16 GB Memory

    • Minimum 10 GB root disk

    • Minimum 15 GB container image registry disk

    • 30 GB local volume disk

    • Minimum 25 GB Gluster registry disk

    Application nodes

    • 2 CPU Cores

    • 8 GB Memory

    • Minimum 10 GB root disk

    • Minimum 15 GB container image registry disk

    • 30 GB local volume disk

    Load balancer node

    • 1 CPU Core

    • 4 GB Memory

    • 10 GB root disk

  3. Create master, infrastructure, and application nodes as well as a load balancer node. Use the templates that you created.

  4. Create DNS entries for the routers. Provide entries for all infrastructure instances and configure a round-robin strategy so that the router can pass traffic to applications.

  5. Create a DNS entry for the OKD web console. Specify the IP address of the load balancer node.

  6. To use Red Hat Virtualization, you must provide external storage, for example GlusterFS, for persistent storage of registry images and for application storage.

Configuring OKD for Red Hat Virtualization

You configure OKD for Red Hat Virtualization by modifying the Ansible inventory file before you install the cluster.

  1. Modify the Ansible inventory file, located at /etc/ansible/hosts by default, to use the following YAML sections:

    1. [OSEv3:children]
    2. nodes
    3. masters
    4. etcd
    5. glusterfs_registry
    6. lb
    7. [OSEv3:vars]
    8. # General variables
    9. ansible_ssh_user=root
    10. openshift_deployment_type=openshift-enterprise
    11. openshift_release='3.10'
    12. openshift_master_cluster_method=native
    13. debug_level=2
    14. openshift_debug_level="{{ debug_level }}"
    15. openshift_node_debug_level="{{ node_debug_level | default(debug_level, true) }}"
    16. openshift_enable_service_catalog=False
    17. app_dns_prefix=apps
    18. public_hosted_zone=example.com
    19. load_balancer_hostname=lb.{{public_hosted_zone}}
    20. openshift_master_cluster_hostname="{{ load_balancer_hostname }}"
    21. openshift_master_cluster_public_hostname="{{ load_balancer_hostname }}"
    22. openshift_master_default_subdomain="{{ app_dns_prefix }}.{{ public_hosted_zone }}"
    23. # Pod Networking
    24. os_sdn_network_plugin_name=redhat/openshift-ovs-networkpolicy
    25. # Registry
    26. openshift_hosted_registry_storage_kind=glusterfs
    27. # Authentication (example here creates one user, myuser with password changeme)
    28. openshift_master_identity_providers="[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'True', 'kind': 'HTPasswdPasswordIdentityProvider', 'filename': '/etc/origin/master/htpasswd'}]"
    29. openshift_master_htpasswd_users={'myuser': '$apr1$zAhyA9Ko$rBxBOwAwwtRuuaw8OtCwH0'}
    30. # Docker and extra file system setup
    31. container_runtime_docker_storage_setup_device=/dev/vdb
    32. container_runtime_docker_storage_type=overlay2
    33. openshift_docker_use_system_container=False
    34. openshift_node_local_quota_per_fsgroup=512Mi (1)
    35. openshift_use_system_containers=False
    36. [masters]
    37. master0.example.com
    38. master1.example.com
    39. master2.example.com
    40. [etcd]
    41. master0.example.com
    42. master1.example.com
    43. master2.example.com
    44. [infras]
    45. infra0.example.com
    46. infra1.example.com
    47. infra2.example.com
    48. [glusterfs_registry]
    49. infra0.example.com glusterfs_devices="['/dev/vdd']"
    50. infra1.example.com glusterfs_devices="['/dev/vdd']"
    51. infra2.example.com glusterfs_devices="['/dev/vdd']"
    52. [lb]
    53. lb.example.com
    54. [nodes]
    55. master0.example.com openshift_node_group_name=node-config-master
    56. master1.example.com openshift_node_group_name=node-config-master
    57. master2.example.com openshift_node_group_name=node-config-master
    58. infra0.example.com openshift_node_group_name=node-config-infra
    59. infra1.example.com openshift_node_group_name=node-config-infra
    60. infra2.example.com openshift_node_group_name=node-config-infra
    61. app0.example.com openshift_node_group_name=node-config-compute
    62. app1.example.com openshift_node_group_name=node-config-compute
    63. app2.example.com openshift_node_group_name=node-config-compute
    1If you use the openshift_node_local_quota_per_fsgroup parameter, you must specify the partition or LVM to use for the directory of /var/lib/origin/openshift.local.volumes. The partition must be mounted with the option of gquota in fstab.

    This inventory file uses the following nodes and disks:

    • One load balancer instance

    • Three master instances

      • Extra disks attached: 15 GB for the container image registry, 30 GB for local volume storage, and 25 GB for etcd
    • Three infrastructure instances

      • Extra disks attached: 15 GB for Docker, 30 GB for local volume storage, and, because this cluster uses GlusterFS for persistent storage, 25 GB for a GlusterFS registry
    • One or more application instance

      • Extra disks attached: 15 GB for Docker, 30 GB for local volume storage
  1. Continue to install the cluster following the Installing OKD steps. During that process, make any changes to your inventory file that your cluster needs.