Upgrade Bodhi staging to 3.11 beta and use Python 3.

Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
This commit is contained in:
Randy Barlow 2018-11-08 14:35:19 +00:00
parent 995dc8e1ef
commit a19aaaed9e
5 changed files with 112 additions and 2 deletions

View file

@ -24,6 +24,13 @@
# stuff happens and we # don't want to interrupt that.
when: inventory_hostname not in ['bodhi-backend01.phx2.fedoraproject.org', 'bodhi-backend03.phx2.fedoraproject.org']
- name: restart fedmsg-hub-3
command: /usr/local/bin/conditional-restart.sh fedmsg-hub-3
# Note that, we're cool with arbitrary restarts on bodhi-backend02, just
# not bodhi-backend01 or bodhi-backend03. 01 and 03 is where the releng/mash
# stuff happens and we # don't want to interrupt that.
when: inventory_hostname not in ['bodhi-backend01.phx2.fedoraproject.org', 'bodhi-backend03.phx2.fedoraproject.org']
- name: restart fedmsg-irc
command: /usr/local/bin/conditional-restart.sh fedmsg-irc

View file

@ -54,7 +54,7 @@
app: bodhi
template: buildconfig.yml
objectname: buildconfig.yml
bodhi_version: 3.10.1-1.fc29
bodhi_version: 3.11.0-0.1.beta.fc29
when: env == "staging"
- role: openshift/object
app: bodhi

View file

@ -12,6 +12,27 @@
tags:
- bodhi
- name: install needed packages
package: name={{ item }} state=present
with_items:
- bodhi-composer
- sigul
# Are these still needed?
- compose-utils
- pungi-utils
- python-scandir
- python2-fedfind
- python2-fedmsg-meta-fedora-infrastructure
- python2-koji-cli-plugins
- python2-pdc-client
- python2-productmd
tags:
- packages
- bodhi
# This line can be dropped when Bodhi 3.11.0 is deployed to production.
when: env == "staging"
# This block can be dropped when Bodhi 3.11.0 is deployed to production.
- name: install needed packages
package: name={{ item }} state=present
with_items:
@ -34,6 +55,7 @@
tags:
- packages
- bodhi
when: env == "production"
- name: install tag2distrepo on fedora bodhi backends
package: name=python2-tag2distrepo state=present
@ -64,11 +86,13 @@
- packages
- bodhi
# This block can be dropped when Bodhi 3.11.0 is deployed to production.
- name: hotfix /usr/bin/alembic to use our webob forward compat package
copy: src=alembic dest=/usr/bin/alembic
tags:
- hotfix
- bodhi
when: env == "production"
- name: add masher group
group: name=masher gid=751 system=yes state=present
@ -241,6 +265,8 @@
- bodhi
- koji-sync
# This block can be dropped when bodhi-3.11.0 is deployed to production. Don't forget to update the vars
# so that /usr/bin/bodhi-sar is used instead of /usr/local/bin/bodhi_sar.py.
- name: Install bodhi_sar.py
copy:
src: bodhi_sar.py
@ -251,6 +277,7 @@
when: inventory_hostname.startswith('bodhi-backend02')
tags:
- bodhi
when: env == "production"
#
# cron job that syncs updates to master mirror
@ -371,6 +398,23 @@
- config
- bodhi
- name: install a femdsg-hub.service drop-in to run it as the apache
copy: >
src="fedmsg-hub.conf"
dest="/usr/lib/systemd/system/fedmsg-hub.service.d/fedmsg-hub.conf"
owner=root
group=root
mode=0644
notify:
- reload systemd
- restart fedmsg-hub-3
tags:
- bodhi
- config
# This line can be dropped once production is upgraded to Bodhi 3.11.0.
when: env == "staging"
# This block can be dropped once production is upgraded to Bodhi 3.11.0.
- name: install a femdsg-hub.service drop-in to run it as the apache
copy: >
src="fedmsg-hub.conf"
@ -384,6 +428,7 @@
tags:
- bodhi
- config
when: env == "production"
- name: have the apache own /var/cache/bodhi because of course..
file: >
@ -406,6 +451,23 @@
- config
- bodhi
- name: ensure that nrpe has rights to monitor us (dir), including setgid bit.
file: >
dest=/var/run/fedmsg
mode=2775
owner=apache
group=nrpe
state=directory
ignore_errors: true
notify:
- restart fedmsg-hub-3
tags:
- fedmsgmonitor
- bodhi
# This line can be removed once production is upgraded to bodhi-3.11.0.
when: env == "staging"
# This block can be removed once production is upgraded to bodhi-3.11.0.
- name: ensure that nrpe has rights to monitor us (dir), including setgid bit.
file: >
dest=/var/run/fedmsg
@ -419,6 +481,7 @@
tags:
- fedmsgmonitor
- bodhi
when: env == "production"
- name: ensure that nrpe has rights to monitor us (file)
file: >
@ -437,10 +500,19 @@
tags:
- bodhi
- name: ensure fedmsg-hub-3 is enabled and started on the backend
service: name=fedmsg-hub-3 enabled=yes state=started
tags:
- bodhi
# This line can be removed once production is upgraded to bodhi-3.11.0.
when: env == "staging"
# This block can be removed once production is upgraded to bodhi-3.11.0.
- name: ensure fedmsg-hub is enabled and started on the backend
service: name=fedmsg-hub enabled=yes state=started
tags:
- bodhi
when: env == "production"
- name: Set up koji profile
template: src=kojiprofile.conf dest=/etc/koji.conf.d/bodhi.conf

View file

@ -8,7 +8,6 @@
- bodhi-docs
- bodhi-server
- libsemanage-python
- python-psycopg2
tags:
- packages
- bodhi
@ -29,6 +28,29 @@
- config
- bodhi
- name: Copy some fedmsg configuration of our own for fedmsg-hub-3
template: >
src={{item}}
dest=/etc/fedmsg.d/{{item}}
owner=root
group=root
mode=0644
with_items:
- bodhi-logging.py
- bodhi-threading.py
- bodhi.py
- masher.py
- updates_handler.py
- signed_handler.py
notify:
- restart fedmsg-hub-3
tags:
- config
- bodhi
# This line can be dropped once Bodhi 3.11 is in production.
when: env == "staging"
# This block can be dropped once Bodhi 3.11 is in production.
- name: Copy some fedmsg configuration of our own for fedmsg-hub
template: >
src={{item}}
@ -48,6 +70,7 @@
tags:
- config
- bodhi
when: env == "production"
- name: setup /etc/pki/bodhi directory
file: path=/etc/pki/bodhi owner=root group=root mode=0755 state=directory

View file

@ -72,7 +72,11 @@ data:
AllowOverride None
Require all granted
</Directory>
{% if env == 'staging' %}
<Directory "/usr/lib/python3.7/site-packages/bodhi/server/static/">
{% else %}
<Directory "/usr/lib/python2.7/site-packages/bodhi/server/static/">
{% endif %}
AllowOverride None
Require all granted
</Directory>
@ -97,7 +101,11 @@ data:
AddDefaultCharset UTF-8
CoreDumpDirectory /tmp
Alias /docs /usr/share/doc/bodhi-docs/html/
{% if env == 'staging' %}
Alias /static /usr/lib/python3.7/site-packages/bodhi/server/static/
{% else %}
Alias /static /usr/lib/python2.7/site-packages/bodhi/server/static/
{% endif %}
WSGIDaemonProcess bodhi display-name=bodhi processes=2 threads=2 maximum-requests=1000 home=/httpdir
WSGIApplicationGroup %{GLOBAL}
WSGISocketPrefix run/wsgi