copr-hv: volume storage
This commit is contained in:
parent
40a145dac6
commit
f4a4919b49
2 changed files with 65 additions and 0 deletions
38
roles/copr/hypervisor/README
Normal file
38
roles/copr/hypervisor/README
Normal file
|
@ -0,0 +1,38 @@
|
|||
General VM requirements for builder VMs
|
||||
---------------------------------------
|
||||
|
||||
- 2xvCPU
|
||||
- 16GB RAM
|
||||
- 16G for built results
|
||||
- 4G for root partition
|
||||
- SWAP+RAM
|
||||
- 32GB for /var/lib/mock tmpfs
|
||||
- 140GB tmpfs for mock root(s)
|
||||
|
||||
|
||||
AMD hypervisors
|
||||
===============
|
||||
|
||||
vmhost-x86-copr0[1-4].rdu-cc.fedoraproject.org
|
||||
|
||||
- 256G RAM
|
||||
- 64 threads (2x16 cores)
|
||||
- 2.6T+ storage
|
||||
- 300 G SWAP
|
||||
|
||||
This brings us 32+ (few devel) overcommitted builders on each builder:
|
||||
|
||||
- 32*16G = up to 512 GRAM (256 RAM + 300 G SWAP)
|
||||
- 4G+16G = 20G*32 = up to 640G for root+results
|
||||
- 172G*32 = up to 5.5T SWAP for tmpfs (huge overcommit, though only limitted
|
||||
amount of build tasks require that much tmpfs)
|
||||
|
||||
Manually created swap:
|
||||
|
||||
1. lvcreate -L 300G vg_guests -n swap
|
||||
2. mkswap -L swap /dev/mapper/vg_guests-swap
|
||||
|
||||
Manually created space for volumes/images:
|
||||
|
||||
1. lvcreate -n images -l 100%FREE vg_guests
|
||||
2. mkfs.ext4 /dev/mapper/vg_guests-images -L vmvolumes
|
|
@ -11,6 +11,33 @@
|
|||
when: fstab_swap_entry.changed
|
||||
tags: swap
|
||||
|
||||
- set_fact: image_pool_dir=/libvirt-images
|
||||
tags: libvirt
|
||||
|
||||
- name: create libvirt image directory
|
||||
file: path={{ image_pool_dir }}
|
||||
owner=qemu group=qemu mode=0700
|
||||
state=directory
|
||||
tags: libvirt
|
||||
|
||||
- name: mount libvirt image partition
|
||||
mount: name={{ image_pool_dir }} src='LABEL=vmvolumes'
|
||||
fstype=ext4 state=mounted
|
||||
tags: libvirt
|
||||
|
||||
- name: correct selinux
|
||||
sefcontext:
|
||||
target: "{{ image_pool_dir }}(/.*)?"
|
||||
setype: virt_image_t
|
||||
state: present
|
||||
register: semanage_run
|
||||
tags: libvirt
|
||||
|
||||
- name: restorecon
|
||||
shell: restorecon -irv "{{ image_pool_dir }}"
|
||||
when: semanage_run.changed
|
||||
tags: libvirt
|
||||
|
||||
- name: create the copr user
|
||||
user: name=copr uid=11666
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue