#718 [doc] use separate playbooks for upgrade
Merged 4 years ago by praiskup. Opened 4 years ago by frostyx.
copr/ frostyx/copr upgrade-playbooks  into  master

@@ -31,12 +31,20 @@ 

  

  Check that .repo files correctly points to ``@copr/copr``. And run on batcave01.phx2.fedoraproject.org (if you do not have account there ask Mirek or somebody from fedora-infra)::

  

+     sudo rbac-playbook -l copr-be-dev.cloud.fedoraproject.org \

+                        manual/copr/copr-backend-upgrade.yml

      sudo rbac-playbook -l copr-be-dev.cloud.fedoraproject.org groups/copr-backend.yml

  

+     sudo rbac-playbook -l copr-keygen-dev.cloud.fedoraproject.org \

+                        manual/copr/copr-keygen-upgrade.yml

      sudo rbac-playbook -l copr-keygen-dev.cloud.fedoraproject.org groups/copr-keygen.yml

  

+     sudo rbac-playbook -l copr-fe-dev.cloud.fedoraproject.org \

+                        manual/copr/copr-frontend-upgrade.yml

      sudo rbac-playbook -l copr-fe-dev.cloud.fedoraproject.org groups/copr-frontend-cloud.yml

  

+     sudo rbac-playbook -l copr-dist-git-dev.fedorainfracloud.org \

+                        manual/copr/copr-dist-git-upgrade.yml

      sudo rbac-playbook -l copr-dist-git-dev.fedorainfracloud.org groups/copr-dist-git.yml

  

  
@@ -187,12 +195,20 @@ 

  

  Run on batcave01.phx2.fedoraproject.org (if you do not have account there ask Mirek or somebody from fedora-infra)::

  

+     sudo rbac-playbook -l copr-be.cloud.fedoraproject.org \

+                        manual/copr/copr-backend-upgrade.yml

      sudo rbac-playbook -l copr-be.cloud.fedoraproject.org groups/copr-backend.yml

  

+     sudo rbac-playbook -l copr-keygen.cloud.fedoraproject.org \

+                        manual/copr/copr-keygen-upgrade.yml

      sudo rbac-playbook -l copr-keygen.cloud.fedoraproject.org groups/copr-keygen.yml

  

+     sudo rbac-playbook -l copr-fe.cloud.fedoraproject.org \

+                        manual/copr/copr-frontend-upgrade.yml

      sudo rbac-playbook -l copr-fe.cloud.fedoraproject.org groups/copr-frontend-cloud.yml

  

+     sudo rbac-playbook -l copr-dist-git.fedorainfracloud.org \

+                        manual/copr/copr-dist-git-upgrade.yml

      sudo rbac-playbook -l copr-dist-git.fedorainfracloud.org groups/copr-dist-git.yml

  

  Note: You shouldn't need to upgrade DB manually, playbook covers it.

There is a problem with our current playbooks, that they can be
executed automatically without us knowing about it. That is an issue
particularly during release process because we can prepare new
packages into infra-tags repo or bodhi and a nightly reprovision
can upgrade to them outside of an outage window or any of us being
prepared for it.

Therefore groups/copr-*.yml playbooks should not upgrade any
packages, but only ensure, that those packages are installed. For
upgrade, there should be separate manual/copr/copr-*-upgrade.yml
playbooks. Because they are located under manual directory, it
is secured, that they can't be run automatically.

This is only a documentation change to demonstrate, how those
upgrade playbooks could be used. Please review this patch for ansible repo,
which needs to be merged first.
https://frostyx.fedorapeople.org/pagure/0001-Create-manual-playbooks-for-upgrading-Copr-instances.patch

I've pushed the ansible patch and I am currently trying to get this working.

So far, there is a problem, that not every fedora-infra member can execute playbooks from manual directory, so we all will have to request them. I will keep you up to date what needs to be done.

1 new commit added

  • [doc] run playbooks in two separate commands
4 years ago

It turned out, that rbac-playbook can run only one playbook at the time, so I have updated this PR and created an RFE https://bitbucket.org/tflink/ansible_utils/issues/4/

So far, there is a problem, that not every fedora-infra member can execute playbooks from manual directory, so we all will have to request them.

According to @smooge, the permissions are granted per file, so you need to request permissions for all playbooks in playbooks/manual/copr directory.

Also, we have found out, that there is a playbooks/manual/upgrade/copr.yml.
@smooge asked if we can remove it (since we have added playbooks/manual/copr/*). I would say yes but rather wanted to ask you first.

I'd remove playbooks/manual/upgrade/copr.yml, if you don't find the constructs there useful for future scripting.

It would be really convenient to have some "wrapper" playbook, calling both the "upgrade" and "normal" playbooks systematically. But I suppose that would mean quite some work.. I'm fine with what you propose.

It would be really convenient to have some "wrapper" playbook, calling both the "upgrade" and "normal" playbooks systematically.

Agreed, that's why I filed this RFE https://bitbucket.org/tflink/ansible_utils/issues/4/ . If it doesn't get resolved by itself, we can implement it.

rebased onto 9021978

4 years ago

Pull-Request has been merged by praiskup

4 years ago
Metadata