Permalink
Find file Copy path
c70efb1 Jan 15, 2019
1 contributor

Users who have contributed to this file

162 lines (152 sloc) 5.19 KB
---
engine_url: https://ovirt-engine-fqdn/ovirt-engine/api
engine_user: admin@internal
engine_password: 123
engine_insecure: true
engine_cafile:
compatibility_version: 4.2
openshift_ovirt_vm_manifest:
- name: 'master'
count: 1
profile: 'master_vm'
- name: 'node'
count: 0
profile: 'node_vm'
- name: 'lb'
count: 0
profile: 'node_vm'
openshift_ovirt_cluster: Default
openshift_ovirt_data_store: data
openshift_ovirt_ssh_key: "{{ lookup('file', 'id_rsa.pub') }}"
qcow_url: https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2c
image_path: "{{ lookup('env', 'HOME') }}/Downloads/{{ template_name }}.qcow2"
template_name: centos7
template_cluster: "{{ openshift_ovirt_cluster }}"
template_memory: 4GiB
template_cpu: 1
template_disk_storage: "{{ openshift_ovirt_data_store }}"
template_disk_size: 10GiB
template_nics:
- name: nic1
profile_name: ovirtmgmt
interface: virtio
debug_vm_create: true
wait_for_ip: true
vm_infra_wait_for_ip_retries: 30
vm_infra_wait_for_ip_delay: 20
openshift_ovirt_vm_profile:
master_vm:
cluster: "{{ openshift_ovirt_cluster }}"
template: "{{ template_name }}"
memory: "{{ vm_memory | default('8GiB') }}"
cores: "{{ vm_cores | default(2) }}"
high_availability: true
disks:
- size: 10GiB
storage_domain: "{{ openshift_ovirt_data_store }}"
name: docker_disk
interface: virtio
state: running
cloud_init:
root_password: admin
authorized_ssh_keys: "{{ openshift_ovirt_ssh_key }}"
custom_script: "{{ cloud_init_script_master }}"
##########################
# Cloud Init Script
##########################
# Use the following if RHEL 7.4 or below VMs are being created on a RHV 4.2 or above engine
# - sed -i 's@^# device =.*@device = /dev/virtio-ports/ovirt-guest-agent.0@' /etc/ovirt-guest-agent.conf
# - sed -i 's@com.redhat.rhevm.vdsm@ovirt-guest-agent.0@' /etc/udev/rules.d/55-ovirt-guest-agent.rules
# - 'udevadm trigger --subsystem-match="virtio-ports"'
cloud_init_script_master: |
yum_repos:
centos-ovirt42:
baseurl: http://mirror.centos.org/centos/7/virt/x86_64/ovirt-4.2
enabled: true
gpgcheck: false
packages:
- ovirt-guest-agent
- epel-release
- centos-release-openshift-origin311
runcmd:
- sed -i 's/# ignored_nics =.*/ignored_nics = docker0, tun0 /' /etc/ovirt-guest-agent.conf
- systemctl enable ovirt-guest-agent
- systemctl start ovirt-guest-agent
- mkdir -p /var/lib/docker
- /usr/sbin/mkfs.xfs -L dockervo /dev/vdb
mounts:
- [ '/dev/vdb', '/var/lib/docker', 'xfs', 'defaults,gquota' ]
power_state:
mode: reboot
message: cloud init finished - boot and install openshift
condition: True
### oVirt Metrics ###
# The following variables are specific to metrics installation
#openshift_ovirt_vm_profile:
# master_vm:
# cluster: "{{ openshift_ovirt_cluster }}"
# template: "{{ template_name }}"
# memory: "{{ vm_memory | default('10GiB') }}"
# cores: "{{ vm_cores | default(2) }}"
# high_availability: true
# disks:
# - size: 10GiB
# storage_domain: "{{ openshift_ovirt_data_store }}"
# name: docker_disk
# interface: virtio
# - size: 20GiB
# storage_domain: "{{ openshift_ovirt_data_store }}"
# name: elasticsearch_disk
# interface: virtio
# state: running
# cloud_init:
# root_password: admin
# authorized_ssh_keys: "{{ openshift_ovirt_ssh_key }}"
# custom_script: "{{ cloud_init_script_master }}"
#
#
## Metrics specific cloud init script
#cloud_init_script_master: |
# yum_repos:
# centos-ovirt42:
# baseurl: http://mirror.centos.org/centos/7/virt/x86_64/ovirt-4.2
# enabled: true
# gpgcheck: false
# packages:
# - ovirt-guest-agent
# - epel-release
# - centos-release-openshift-origin311
# runcmd:
# - sed -i 's/# ignored_nics =.*/ignored_nics = docker0, tun0 /' /etc/ovirt-guest-agent.conf
# - systemctl enable ovirt-guest-agent
# - systemctl start ovirt-guest-agent
# - mkdir -p /var/lib/docker
# - /usr/sbin/mkfs.xfs -L dockervo /dev/vdb
# - mkdir -p /var/lib/elasticsearch
# - /usr/sbin/mkfs.xfs -L elasticvo /dev/vdc
# - chgrp 65534 /var/lib/elasticsearch
# - semanage fcontext -a -t container_file_t "/var/lib/elasticsearch(/.*)?"
# - restorecon -R -v /var/lib/elasticsearch
# mounts:
# - [ '/dev/vdb', '/var/lib/docker', 'xfs', 'defaults,gquota' ]
# - [ '/dev/vdc', '/var/lib/elasticsearch', 'xfs', 'defaults,gquota' ]
# power_state:
# mode: reboot
# message: cloud init finished - boot and install openshift
# condition: True
#
## Metrics static host storage - In the future we should use ovirt flex/csi storage provisioner
#openshift_logging_es_nodeselector: {'node-role.kubernetes.io/infra': 'true'}
#openshift_logging_install_logging: True
#openshift_logging_es_allow_external: True
#openshift_logging_mux_file_buffer_storage_type: hostmount
#openshift_logging_elasticsearch_storage_type: hostmount
#openshift_logging_elasticsearch_hostmount_path: /var/lib/elasticsearch
#openshift_logging_mux_namespaces:
# - ovirt-metrics-engine
# - ovirt-logs-engine
#
## The tmp directory to download the template to.
#image_path: "/var/tmp/"
### oVirt Metrics ###
...