Run the lookaside copy playbook on a few sets of packages at a time.
This commit is contained in:
parent
3249d254b6
commit
eb92c14c62
2 changed files with 67 additions and 60 deletions
61
playbooks/manual/staging-sync/lookaside-include.yml
Normal file
61
playbooks/manual/staging-sync/lookaside-include.yml
Normal file
|
@ -0,0 +1,61 @@
|
|||
# This playbook syncs a *subset* of the production lookaside cache to stg.
|
||||
# bochecha asked for this in 2015 -- implemented by ralph.
|
||||
#
|
||||
# Adjust in 2016 to copy specific sets of packages. See lookaside.yml for that.
|
||||
|
||||
|
||||
- name: tar up a subset of the prod lookaside cache
|
||||
hosts: pkgs
|
||||
user: root
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
- "/srv/private/ansible/vars.yml"
|
||||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
||||
|
||||
vars:
|
||||
tarball: /var/tmp/prod-lookaside-subset.tar.xz
|
||||
intermediary: /var/tmp/prod-lookaside
|
||||
target: /srv/cache/lookaside/pkgs
|
||||
|
||||
|
||||
tasks:
|
||||
- shell: tar -cJvf {{tarball}} {{target}}/{{packages}}
|
||||
creates={{tarball}}
|
||||
- fetch: src={{tarball}}
|
||||
dest={{intermediary}}
|
||||
fail_on_missing=yes
|
||||
|
||||
- name: copy and expand that subset to staging lookaside
|
||||
hosts: pkgs-stg
|
||||
user: root
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
- "/srv/private/ansible/vars.yml"
|
||||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
||||
|
||||
vars:
|
||||
tarball: /var/tmp/prod-lookaside-subset.tar.xz
|
||||
intermediary: /var/tmp/prod-lookaside
|
||||
target: /srv/cache/lookaside/pkgs
|
||||
|
||||
tasks:
|
||||
- unarchive: src={{intermediary}}/pkgs02.phx2.fedoraproject.org/{{tarball}} dest=/
|
||||
|
||||
- name: finish cleaning up after ourselves
|
||||
hosts: batcave01.phx2.fedoraproject.org:pkgs:pkgs-stg
|
||||
user: root
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
- "/srv/private/ansible/vars.yml"
|
||||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
||||
|
||||
vars:
|
||||
tarball: /var/tmp/prod-lookaside-subset.tar.xz
|
||||
intermediary: /var/tmp/prod-lookaside
|
||||
target: /srv/cache/lookaside/pkgs
|
||||
|
||||
tasks:
|
||||
- file: dest={{intermediary}} state=absent
|
||||
tags: cleanup
|
||||
- file: dest={{tarball}} state=absent
|
||||
tags: cleanup
|
|
@ -1,61 +1,7 @@
|
|||
# This playbook syncs a *subset* of the production lookaside cache to stg.
|
||||
# bochecha asked for this in 2015 -- implemented by ralph.
|
||||
#
|
||||
# Presently, we only do the packages that start with 'a', because there's just
|
||||
# too much data otherwise.
|
||||
# Run staging sync for lookaside on a couple different package sets.
|
||||
|
||||
|
||||
- name: tar up a subset of the prod lookaside cache
|
||||
hosts: pkgs
|
||||
user: root
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
- "/srv/private/ansible/vars.yml"
|
||||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
||||
|
||||
vars:
|
||||
tarball: /var/tmp/prod-lookaside-subset.tar.xz
|
||||
intermediary: /var/tmp/prod-lookaside
|
||||
target: /srv/cache/lookaside/pkgs
|
||||
|
||||
tasks:
|
||||
- shell: tar -cJvf {{tarball}} {{target}}/ad* {{target}}/bash
|
||||
creates={{tarball}}
|
||||
- fetch: src={{tarball}}
|
||||
dest={{intermediary}}
|
||||
fail_on_missing=yes
|
||||
|
||||
- name: copy and expand that subset to staging lookaside
|
||||
hosts: pkgs-stg
|
||||
user: root
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
- "/srv/private/ansible/vars.yml"
|
||||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
||||
|
||||
vars:
|
||||
tarball: /var/tmp/prod-lookaside-subset.tar.xz
|
||||
intermediary: /var/tmp/prod-lookaside
|
||||
target: /srv/cache/lookaside/pkgs
|
||||
|
||||
tasks:
|
||||
- unarchive: src={{intermediary}}/pkgs02.phx2.fedoraproject.org/{{tarball}} dest=/
|
||||
|
||||
- name: finish cleaning up after ourselves
|
||||
hosts: batcave01.phx2.fedoraproject.org:pkgs:pkgs-stg
|
||||
user: root
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
- "/srv/private/ansible/vars.yml"
|
||||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
||||
|
||||
vars:
|
||||
tarball: /var/tmp/prod-lookaside-subset.tar.xz
|
||||
intermediary: /var/tmp/prod-lookaside
|
||||
target: /srv/cache/lookaside/pkgs
|
||||
|
||||
tasks:
|
||||
- file: dest={{intermediary}} state=absent
|
||||
tags: cleanup
|
||||
- file: dest={{tarball}} state=absent
|
||||
tags: cleanup
|
||||
- include: /srv/web/infra/ansible/playbooks/manual/staging-sync/lookaside-include.yml packages="{audit,basesystem,bash,coreutils,cronie,curl,dhcp,dnf,e2fsprogs,filesystem}"
|
||||
- include: /srv/web/infra/ansible/playbooks/manual/staging-sync/lookaside-include.yml packages="{glibc,grubby,hostname,httpd,initscripts,iproute,iputils,kbd,less,man-db}"
|
||||
- include: /srv/web/infra/ansible/playbooks/manual/staging-sync/lookaside-include.yml packages="{mariadb,ncurses,openssh,parted,passwd,php,plymouth,policycoreutils,procps-ng}"
|
||||
- include: /srv/web/infra/ansible/playbooks/manual/staging-sync/lookaside-include.yml packages="{rootfiles,rpm,selinux-policy,setup,shadow-utils,sudo,systemd,uboot-tools}"
|
||||
- include: /srv/web/infra/ansible/playbooks/manual/staging-sync/lookaside-include.yml packages="{util-linux,vim}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue