copr: add volumes for users logs

so they are persistent
This commit is contained in:
Miroslav Suchý 2016-05-23 14:09:53 +02:00
parent 962b5b9c99
commit fecbde877d
3 changed files with 14 additions and 5 deletions

View file

@ -9,8 +9,8 @@ public_ip: 209.132.184.163
root_auth_users: msuchy asamalik clime
description: dist-git for copr service - prod instance
tcp_ports: [22, 80]
# volumes: copr-dist-git
volumes: [ {volume_id: '98b038a4-1695-432b-bb80-d5d9440c94df', device: '/dev/vdc'} ]
# volumes: copr-dist-git, copr-dist-git-log
volumes: [ {volume_id: '98b038a4-1695-432b-bb80-d5d9440c94df', device: '/dev/vdc'}, {volume_id: 'e712828f-998f-49aa-85a6-aeb42a7d1843', device: '/dev/vdd'} ]
inventory_tenant: persistent
# name of machine in OpenStack
inventory_instance_name: copr-dist-git

View file

@ -36,10 +36,13 @@
shell: chown -R copr-service:copr-service /var/log/copr-dist-git
- name: make sure directories are owned by copr-service user
shell: chown copr-service:copr-service /var/lib/copr-dist-git/
shell: chown copr-service:copr-service {{ item }}
with_items:
- /var/lib/copr-dist-git/
- /var/lib/copr-dist-git/cgit_pkg_list
- name: make sure directories are owned by copr-service:packager user
shell: chown -R copr-service:packager /var/lib/dist-git/git
shell: stat -c '%U' /var/lib/copr-dist-git/git | grep copr-service || stat -c '%G' /var/lib/copr-dist-git/git |grep packager || chown -R copr-service:packager /var/lib/dist-git/git
# set ssh key, so that copr-service could access gitolite
- name: read pub key into var

View file

@ -4,7 +4,13 @@
- name: mount up disk of copr repo
mount: name=/var/lib/dist-git src='LABEL=copr-dist-git' fstype=ext4 state=mounted
- name: prepare mount point
file: state=directory path=/var/lib/copr-dist-git
- name: mount up disk of copr repo
mount: name=/var/lib/copr-dist-git src='LABEL=cdg-log' fstype=ext4 state=mounted
- name: Mount tmp as tmpfs
action: lineinfile dest=/etc/fstab regexp="/tmp" line="tmpfs /tmp tmpfs defaults,size=20G 0 0" state=present
action: lineinfile dest=/etc/fstab regexp="/tmp" line="tmpfs /tmp tmpfs defaults,size=6G 0 0" state=present
- mount: name=/tmp src=tmpfs fstype=tmpfs state=present