2018-04-13 13:02:24 +00:00
|
|
|
- name: make the app be real
|
2022-06-09 10:42:03 +01:00
|
|
|
hosts: os_control[0]:os_control_stg[0]
|
2018-04-13 13:02:24 +00:00
|
|
|
user: root
|
2018-04-17 02:39:14 +02:00
|
|
|
gather_facts: False
|
2018-04-13 13:02:24 +00:00
|
|
|
|
|
|
|
vars_files:
|
|
|
|
- /srv/web/infra/ansible/vars/global.yml
|
|
|
|
- "/srv/private/ansible/vars.yml"
|
|
|
|
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
|
|
|
|
2019-05-15 18:23:44 +00:00
|
|
|
vars:
|
|
|
|
- bodhi_message_queue_name: "bodhi{{ env_suffix }}"
|
|
|
|
- bodhi_message_routing_keys:
|
|
|
|
- "org.fedoraproject.*.bodhi.update.edit"
|
|
|
|
- "org.fedoraproject.*.bodhi.update.request.testing"
|
|
|
|
- "org.fedoraproject.*.buildsys.tag"
|
2022-01-11 11:53:49 -08:00
|
|
|
- "org.fedoraproject.*.resultsdb.result.new"
|
|
|
|
- "org.fedoraproject.*.waiverdb.waiver.new"
|
2022-04-14 11:23:41 +02:00
|
|
|
- ocp4: true
|
2019-05-15 18:23:44 +00:00
|
|
|
|
2018-10-31 22:21:44 +00:00
|
|
|
pre_tasks:
|
2018-10-31 22:15:58 +00:00
|
|
|
- include_vars: dir=/srv/web/infra/ansible/vars/all/ ignore_files=README
|
2019-10-10 13:17:50 +02:00
|
|
|
- set_fact:
|
|
|
|
args:
|
2019-11-11 20:11:25 +00:00
|
|
|
bodhi_version: "{{ bodhi_version }}"
|
2018-10-31 22:15:58 +00:00
|
|
|
|
2018-04-13 13:02:24 +00:00
|
|
|
roles:
|
2019-05-15 17:36:34 +00:00
|
|
|
- role: rabbit/queue
|
|
|
|
username: "bodhi{{ env_suffix }}"
|
|
|
|
queue_name: "{{ bodhi_message_queue_name }}"
|
|
|
|
routing_keys: "{{ bodhi_message_routing_keys }}"
|
2019-08-12 14:49:56 +02:00
|
|
|
thresholds:
|
|
|
|
warning: 10
|
|
|
|
critical: 100
|
2022-07-07 09:09:07 +02:00
|
|
|
sent_topics: ^org\.fedoraproject\.{{ env_short }}\.bodhi\..*
|
2022-06-21 11:14:34 +02:00
|
|
|
|
2018-04-13 14:57:55 +00:00
|
|
|
- role: openshift/project
|
|
|
|
app: bodhi
|
|
|
|
description: bodhi
|
|
|
|
appowners:
|
2019-04-16 13:47:47 +00:00
|
|
|
- abompard
|
2020-10-12 16:43:47 +02:00
|
|
|
- mattia
|
2022-01-24 15:22:45 +01:00
|
|
|
- patrikp
|
|
|
|
- lenkaseg
|
2019-03-14 14:39:25 +01:00
|
|
|
tags:
|
|
|
|
- apply-appowners
|
2019-11-04 14:51:11 +01:00
|
|
|
when: env == "production"
|
|
|
|
- role: openshift/project
|
|
|
|
app: bodhi
|
|
|
|
description: bodhi
|
|
|
|
appowners:
|
|
|
|
- abompard
|
2019-11-27 10:28:16 +01:00
|
|
|
- ryanlerch
|
2020-10-12 16:43:47 +02:00
|
|
|
- mattia
|
2021-11-10 10:37:34 +01:00
|
|
|
- humaton
|
2022-01-24 15:22:45 +01:00
|
|
|
- patrikp
|
|
|
|
- lenkaseg
|
2019-11-04 14:51:11 +01:00
|
|
|
tags:
|
|
|
|
- apply-appowners
|
|
|
|
when: env == "staging"
|
2023-01-20 13:08:51 -08:00
|
|
|
- role: openshift/object
|
|
|
|
app: bodhi
|
|
|
|
file: pvc.yml
|
|
|
|
objectname: pvc.yml
|
2018-04-17 01:25:04 +02:00
|
|
|
- role: openshift/keytab
|
|
|
|
app: bodhi
|
2018-04-16 23:35:02 +00:00
|
|
|
key: koji-keytab
|
2018-04-17 01:25:04 +02:00
|
|
|
secret_name: bodhi-keytab
|
|
|
|
service: bodhi
|
2018-04-17 02:48:57 +00:00
|
|
|
host: "bodhi{{ env_suffix }}.fedoraproject.org"
|
2018-04-16 20:31:30 +00:00
|
|
|
- role: openshift/secret-file
|
|
|
|
app: bodhi
|
2019-05-09 21:44:44 +00:00
|
|
|
secret_name: bodhi-fedora-messaging-ca
|
|
|
|
key: cacert.pem
|
|
|
|
privatefile: "rabbitmq/{{env}}/pki/ca.crt"
|
|
|
|
- role: openshift/secret-file
|
|
|
|
app: bodhi
|
|
|
|
secret_name: bodhi-fedora-messaging-crt
|
|
|
|
key: bodhi-cert.pem
|
2019-05-10 15:40:42 +00:00
|
|
|
privatefile: "rabbitmq/{{env}}/pki/issued/bodhi{{env_suffix}}.crt"
|
2019-05-09 21:44:44 +00:00
|
|
|
- role: openshift/secret-file
|
|
|
|
app: bodhi
|
|
|
|
secret_name: bodhi-fedora-messaging-key
|
|
|
|
key: bodhi-key.pem
|
2019-05-10 15:40:42 +00:00
|
|
|
privatefile: "rabbitmq/{{env}}/pki/private/bodhi{{env_suffix}}.key"
|
2019-12-12 14:07:31 +00:00
|
|
|
- role: openshift/object
|
|
|
|
app: bodhi
|
|
|
|
template: imagestreams-tagged.yml
|
|
|
|
objectname: imagestreams.yml
|
2019-05-15 18:46:03 +00:00
|
|
|
- role: openshift/imagestream
|
|
|
|
app: bodhi
|
|
|
|
imagename: bodhi-base
|
2018-04-27 17:36:50 +00:00
|
|
|
- role: openshift/object
|
|
|
|
app: bodhi
|
|
|
|
template: buildconfig.yml
|
|
|
|
objectname: buildconfig.yml
|
2019-05-15 18:53:21 +00:00
|
|
|
- role: openshift/start-build
|
|
|
|
app: bodhi
|
|
|
|
buildname: bodhi-base
|
2018-04-16 21:30:17 +00:00
|
|
|
- role: openshift/object
|
|
|
|
app: bodhi
|
|
|
|
template_fullpath: "{{roles_path}}/bodhi2/base/templates/configmap.yml"
|
2018-04-17 01:02:15 +00:00
|
|
|
objectname: configmap.yml
|
2018-04-16 21:30:17 +00:00
|
|
|
- role: openshift/object
|
|
|
|
app: bodhi
|
|
|
|
file: service.yml
|
2018-04-17 01:02:15 +00:00
|
|
|
objectname: service.yml
|
2021-03-15 11:38:34 +01:00
|
|
|
- role: openshift/object
|
|
|
|
app: bodhi
|
|
|
|
file: servicemonitor.yml
|
|
|
|
objectname: servicemonitor.yml
|
|
|
|
when: env != "production"
|
2021-03-17 10:26:07 +01:00
|
|
|
- role: openshift/object
|
|
|
|
app: bodhi
|
|
|
|
file: podmonitor.yml
|
|
|
|
objectname: podmonitor.yml
|
|
|
|
when: env != "production"
|
2018-04-17 20:12:08 +02:00
|
|
|
- role: openshift/route
|
2018-04-16 21:30:17 +00:00
|
|
|
app: bodhi
|
2018-04-17 20:12:08 +02:00
|
|
|
routename: bodhi-web
|
|
|
|
host: "bodhi{{ env_suffix }}.fedoraproject.org"
|
|
|
|
serviceport: web
|
|
|
|
servicename: bodhi-web
|
2020-09-16 15:27:20 +02:00
|
|
|
annotations:
|
|
|
|
haproxy.router.openshift.io/timeout: 180s
|
2018-04-16 21:30:17 +00:00
|
|
|
- role: openshift/object
|
|
|
|
app: bodhi
|
2018-05-17 17:40:30 +00:00
|
|
|
template: deploymentconfig.yml
|
2018-04-17 01:02:15 +00:00
|
|
|
objectname: deploymentconfig.yml
|
2023-01-20 13:08:51 -08:00
|
|
|
- role: openshift/object
|
|
|
|
app: bodhi
|
|
|
|
template: critpathcron.yml
|
|
|
|
objectname: critpathcron.yml
|
|
|
|
- role: openshift/imagestream
|
|
|
|
app: bodhi
|
|
|
|
imagename: bodhi-critpathcron
|
2018-04-16 21:30:17 +00:00
|
|
|
- role: openshift/rollout
|
|
|
|
app: bodhi
|
2018-04-16 21:58:26 +00:00
|
|
|
dcname: bodhi-web
|
2019-05-15 17:36:34 +00:00
|
|
|
- role: openshift/rollout
|
|
|
|
app: bodhi
|
|
|
|
dcname: bodhi-consumer
|
2019-10-09 11:33:40 +02:00
|
|
|
- role: openshift/rollout
|
|
|
|
app: bodhi
|
|
|
|
dcname: bodhi-celery
|
2018-05-17 17:50:19 +00:00
|
|
|
|
|
|
|
post_tasks:
|
2019-05-28 15:58:52 +00:00
|
|
|
- name: Scale up pods
|
2019-11-11 20:11:25 +00:00
|
|
|
command: oc -n bodhi scale dc/bodhi-consumer --replicas={{ bodhi_openshift_pods }}
|
2019-05-28 15:58:52 +00:00
|
|
|
when: env == "production"
|
2019-10-09 11:33:40 +02:00
|
|
|
- name: Scale up pods
|
2019-11-11 20:11:25 +00:00
|
|
|
command: oc -n bodhi scale dc/bodhi-celery --replicas={{ bodhi_openshift_pods }}
|
2019-10-09 11:33:40 +02:00
|
|
|
when: env == "production"
|
2018-05-17 17:50:19 +00:00
|
|
|
- name: Scale up pods
|
2019-11-11 20:11:25 +00:00
|
|
|
command: oc -n bodhi scale dc/bodhi-web --replicas={{ bodhi_openshift_pods }}
|
2019-05-09 21:44:44 +00:00
|
|
|
when: env == "production"
|
2019-05-15 17:36:34 +00:00
|
|
|
- name: Scale up pods
|
2019-11-11 20:11:25 +00:00
|
|
|
command: oc -n bodhi scale dc/bodhi-consumer --replicas={{ bodhi_openshift_pods }}
|
2019-05-15 17:36:34 +00:00
|
|
|
when: env == "staging"
|
2019-10-09 11:33:40 +02:00
|
|
|
- name: Scale up pods
|
2019-11-11 20:11:25 +00:00
|
|
|
command: oc -n bodhi scale dc/bodhi-celery --replicas={{ bodhi_openshift_pods }}
|
2019-10-09 11:33:40 +02:00
|
|
|
when: env == "staging"
|
2018-05-17 17:50:19 +00:00
|
|
|
- name: Scale up pods
|
2019-11-11 20:11:25 +00:00
|
|
|
command: oc -n bodhi scale dc/bodhi-web --replicas={{ bodhi_openshift_pods }}
|
2018-05-17 17:50:19 +00:00
|
|
|
when: env == "staging"
|
2020-05-26 21:21:38 +02:00
|
|
|
- name: Set the timeout to the openshift route
|
2022-06-21 13:35:38 -07:00
|
|
|
command: "oc -n bodhi annotate route bodhi-web --overwrite haproxy.router.openshift.io/timeout=180s"
|
2020-05-26 21:21:38 +02:00
|
|
|
tags:
|
|
|
|
- route-timeout
|
2023-01-20 13:08:51 -08:00
|
|
|
- name: trigger critpath cronjob
|
|
|
|
command: "oc -n bodhi create job critpathcron-manual-{{ lookup('pipe','date +%s') }} --from=cronjob/fedora-bodhi-critpathcron"
|
|
|
|
tags:
|
|
|
|
- never
|
|
|
|
- critpathcron
|