diff --git a/.zuul.yaml b/.zuul.yaml index a763b490e7..ca9c467bdc 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1013,7 +1013,8 @@ run_playbooks: - playbooks/service-letsencrypt.yaml - playbooks/service-gitea-lb.yaml - - playbooks/remote_puppet_git.yaml + - playbooks/service-gitea.yaml + - playbooks/manage-projects.yaml run_test_playbook: playbooks/test-gitea.yaml host-vars: gitea99.opendev.org: @@ -1026,11 +1027,19 @@ '/var/haproxy/etc': logs files: - playbooks/bridge.yaml + - playbooks/service-letsencrypt.yaml + - playbooks/service-gitea-lb.yaml + - playbooks/service-gitea.yaml + - playbooks/manage-projects.yaml + - playbooks/test-gitea.yaml - playbooks/group_vars/gitea.yaml - playbooks/group_vars/gitea-lb.yaml - playbooks/host_vars/gitea.* - playbooks/zuul/templates/group_vars/gitea.yaml.j2 - playbooks/zuul/templates/group_vars/gitea-lb.yaml.j2 + - playbooks/roles/install-docker/ + - playbooks/roles/letsencrypt.* + - playbooks/roles/gerrit/ - playbooks/roles/gitea/ - playbooks/roles/gitea-git-repos/ - playbooks/roles/haproxy/ @@ -1083,6 +1092,7 @@ - playbooks/service-letsencrypt.yaml - playbooks/service-review-dev.yaml - playbooks/service-review.yaml + - playbooks/manage-projects.yaml host-vars: review-dev01.opendev.org: host_copy_output: @@ -1097,16 +1107,19 @@ '/var/log/apache2/': logs '/var/log/acme.sh': logs files: + - playbooks/bridge.yaml + - playbooks/service-letsencrypt.yaml + - ^playbooks/service-review.*.yaml - playbooks/group_vars/review.yaml + - playbooks/manage-projects.yaml - ^playbooks/host_vars/review\d+.openstack.org.yaml - playbooks/group_vars/review-dev.yaml - ^playbooks/host_vars/review-dev\d+.opendev.org.yaml - - ^playbooks/service-review.*.yaml + - playbooks/roles/install-docker/ - playbooks/roles/letsencrypt.* - - playbooks/service-letsencrypt.yaml + - playbooks/roles/gerrit/ - playbooks/zuul/templates/group_vars/review-dev.yaml.j2 - playbooks/zuul/templates/group_vars/review.yaml.j2 - - playbooks/roles/gerrit/ - testinfra/test_gerrit.py - job: diff --git a/doc/source/gitea.rst b/doc/source/gitea.rst index 5a17630a76..6c177bb06c 100644 --- a/doc/source/gitea.rst +++ b/doc/source/gitea.rst @@ -68,10 +68,9 @@ repo rename redirects) so there is a small amount of process required to deploy a new Gitea backend. To deploy a new Gitea backend we add it to the ansible inventory, but -exclude it from the "Create repos on gitea servers" play in -remote_puppet_git.yaml playbook. This will full provision an empty -Gitea server with running Gitea and database processes. Then -we can manually restore the database from another node, create all of +exclude it from the manage-projects.yaml playbook. This will full +provision an empty Gitea server with running Gitea and database processes. +Then we can manually restore the database from another node, create all of the bare git repos, and replicate all of the repo content. When these steps are done the new gitea backend can be added to the diff --git a/playbooks/remote_puppet_git.yaml b/playbooks/manage-projects.yaml similarity index 51% rename from playbooks/remote_puppet_git.yaml rename to playbooks/manage-projects.yaml index f6e6c6b11a..70519819bd 100644 --- a/playbooks/remote_puppet_git.yaml +++ b/playbooks/manage-projects.yaml @@ -1,12 +1,5 @@ -- hosts: "gitea:!disabled" - name: "Base: configure gitea" - serial: 1 - roles: - - install-docker - - gitea - - hosts: "localhost:!disabled" - name: "Puppet-git: Collect the project-config ref" + name: "Clone project-config for gitea-git-repos lookup" strategy: free connection: local tasks: @@ -15,7 +8,6 @@ repo: https://opendev.org/openstack/project-config dest: /opt/project-config force: yes - register: gitinfo - hosts: "gitea:!disabled" name: "Create repos on gitea servers" @@ -24,10 +16,3 @@ roles: - gitea-git-repos -- hosts: "review:!disabled" - name: "Configure gerrit" - roles: - - install-docker - - role: gerrit - gerrit_run_compose_up: false - gerrit_run_init: false diff --git a/playbooks/service-gitea.yaml b/playbooks/service-gitea.yaml new file mode 100644 index 0000000000..66282f50b8 --- /dev/null +++ b/playbooks/service-gitea.yaml @@ -0,0 +1,6 @@ +- hosts: "gitea:!disabled" + name: "Base: configure gitea" + serial: 1 + roles: + - install-docker + - gitea diff --git a/run_all.sh b/run_all.sh index 8cbe832254..bfd12404de 100755 --- a/run_all.sh +++ b/run_all.sh @@ -137,10 +137,17 @@ start_timer timeout -k 2m 30m ansible-playbook -f 50 ${ANSIBLE_PLAYBOOKS}/service-review-dev.yaml send_timer nodepool -# Run the git/gerrit/zuul sequence, since it's important that they all work together start_timer -timeout -k 2m 30m ansible-playbook -f 50 ${ANSIBLE_PLAYBOOKS}/remote_puppet_git.yaml -send_timer git +timeout -k 2m 30m ansible-playbook -f 50 ${ANSIBLE_PLAYBOOKS}/service-review.yaml +send_timer nodepool + +start_timer +timeout -k 2m 30m ansible-playbook -f 50 ${ANSIBLE_PLAYBOOKS}/service-gitea.yaml +send_timer nodepool + +start_timer +timeout -k 2m 30m ansible-playbook -f 50 ${ANSIBLE_PLAYBOOKS}/manage-projects.yaml +send_timer manage-projects # Run AFS changes separately so we can make sure to only do one at a time # (turns out quorum is nice to have)