Files
fedora-infra_ansible/playbooks/openshift-apps/bodhi.yml
Randy Barlow 30af615f18 Upgrade staging Bodhi back to 3.8.0b0.
Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
2018-05-17 19:05:52 +00:00

94 lines
2.8 KiB
YAML

- name: make the app be real
hosts: os-masters[0]:os-masters-stg[0]
user: root
gather_facts: False
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
roles:
- role: openshift/project
app: bodhi
description: bodhi
appowners:
- bowlofeggs
- role: openshift/keytab
app: bodhi
key: koji-keytab
secret_name: bodhi-keytab
service: bodhi
host: "bodhi{{ env_suffix }}.fedoraproject.org"
- role: openshift/secret-file
app: bodhi
secret_name: bodhi-fedmsg-key
key: fedmsg-bodhi.key
privatefile: fedmsg-certs/keys/bodhi-bodhi01.stg.phx2.fedoraproject.org.key
when: env == "staging"
- role: openshift/secret-file
app: bodhi
secret_name: bodhi-fedmsg-key
key: fedmsg-bodhi.key
privatefile: fedmsg-certs/keys/bodhi-bodhi-web-temp-bodhi.app.os.fedoraproject.org.key
when: env != "staging"
- role: openshift/secret-file
app: bodhi
secret_name: bodhi-fedmsg-crt
key: fedmsg-bodhi.crt
privatefile: fedmsg-certs/keys/bodhi-bodhi01.stg.phx2.fedoraproject.org.crt
when: env == "staging"
- role: openshift/secret-file
app: bodhi
secret_name: bodhi-fedmsg-crt
key: fedmsg-bodhi.crt
privatefile: fedmsg-certs/keys/bodhi-bodhi-web-temp-bodhi.app.os.fedoraproject.org.crt
when: env != "staging"
- role: openshift/imagestream
app: bodhi
imagename: bodhi-web
- role: openshift/object
app: bodhi
template: buildconfig.yml
objectname: buildconfig.yml
bodhi_version: 3.8.0-0.0.beta.fc27
when: env == "staging"
- role: openshift/object
app: bodhi
template: buildconfig.yml
objectname: buildconfig.yml
bodhi_version: 3.7.0-1.fc27
when: env != "staging"
- role: openshift/start-build
app: bodhi
buildname: bodhi-web
- role: openshift/object
app: bodhi
template_fullpath: "{{roles_path}}/bodhi2/base/templates/configmap.yml"
objectname: configmap.yml
- role: openshift/object
app: bodhi
file: service.yml
objectname: service.yml
- role: openshift/route
app: bodhi
routename: bodhi-web
host: "bodhi{{ env_suffix }}.fedoraproject.org"
serviceport: web
servicename: bodhi-web
- role: openshift/object
app: bodhi
template: deploymentconfig.yml
objectname: deploymentconfig.yml
- role: openshift/rollout
app: bodhi
dcname: bodhi-web
post_tasks:
- name: Scale up pods
command: oc -n bodhi scale dc/bodhi-web --replicas={{ hostvars[groups['bodhi2'][0]]['openshift_pods'] }}
when: env != "staging"
- name: Scale up pods
command: oc -n bodhi scale dc/bodhi-web --replicas={{ hostvars[groups['bodhi2-stg'][0]]['openshift_pods'] }}
when: env == "staging"