From d4fa9b230d32fa11fafeab0cf347764108ab674a Mon Sep 17 00:00:00 2001 From: Jason DeTiberus Date: Wed, 9 Mar 2016 12:19:05 -0500 Subject: Libvirt provider fixes - Use difference filter instead of reject/equalto - add ability to override vcpu and memory config for vms - add a dedicated drive for docker storage --- playbooks/libvirt/openshift-cluster/templates/domain.xml | 12 ++++++++---- playbooks/libvirt/openshift-cluster/templates/user-data | 9 +++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) (limited to 'playbooks/libvirt/openshift-cluster/templates') diff --git a/playbooks/libvirt/openshift-cluster/templates/domain.xml b/playbooks/libvirt/openshift-cluster/templates/domain.xml index 0ca8e0974..56f450642 100644 --- a/playbooks/libvirt/openshift-cluster/templates/domain.xml +++ b/playbooks/libvirt/openshift-cluster/templates/domain.xml @@ -1,6 +1,6 @@ {{ item }} - 1 + {{ os_libvirt_instance_memory_mib }} environment-{{ cluster_env }} @@ -9,8 +9,7 @@ sub-host-type-{{ g_sub_host_type }} - 1 - 2 + {{ os_libvirt_instance_vcpu }} hvm @@ -35,10 +34,15 @@ + + + + + - + diff --git a/playbooks/libvirt/openshift-cluster/templates/user-data b/playbooks/libvirt/openshift-cluster/templates/user-data index ead881f78..8b79940f4 100644 --- a/playbooks/libvirt/openshift-cluster/templates/user-data +++ b/playbooks/libvirt/openshift-cluster/templates/user-data @@ -4,6 +4,9 @@ disable_root: true hostname: {{ item[0] }} fqdn: {{ item[0] }}.example.com +mounts: +- [ vdb ] + users: - default - name: root @@ -23,6 +26,12 @@ write_files: permissions: 440 content: | Defaults:openshift !requiretty + - content: | + DEVS=/dev/vdb + VG=docker_vg + path: /etc/sysconfig/docker-storage-setup + owner: root:root + permissions: '0644' runcmd: - NETWORK_CONFIG=/etc/sysconfig/network-scripts/ifcfg-eth0; if ! grep DHCP_HOSTNAME ${NETWORK_CONFIG}; then echo 'DHCP_HOSTNAME="{{ item[0] }}.example.com"' >> ${NETWORK_CONFIG}; fi; pkill -9 dhclient; service network restart -- cgit v1.2.3