Before we enable any monitoring, we should clean up app owners some so we do not spam people who arent around anymore and no longer care about the app. ;) If I removed anyone here who is still around and does care, we can easily add you back in. Signed-off-by: Kevin Fenzi <kevin@scrye.com>
124 lines
3.3 KiB
YAML
124 lines
3.3 KiB
YAML
- name: prepare setting up the database
|
|
hosts: db01.stg.iad2.fedoraproject.org:db01.iad2.fedoraproject.org
|
|
gather_facts: no
|
|
user: root
|
|
|
|
tasks:
|
|
- name: install psycopg2 for the postgresql ansible modules
|
|
package: name=python3-psycopg2 state=present
|
|
tags:
|
|
- packages
|
|
|
|
- name: setup the database
|
|
hosts: db01.stg.iad2.fedoraproject.org:db01.iad2.fedoraproject.org
|
|
gather_facts: no
|
|
become: yes
|
|
become_user: postgres
|
|
vars_files:
|
|
- /srv/web/infra/ansible/vars/global.yml
|
|
- "/srv/private/ansible/vars.yml"
|
|
- "/srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml"
|
|
|
|
tasks:
|
|
- name: Create the database user
|
|
postgresql_user:
|
|
name: "{{ oraculum_db_user }}"
|
|
password: "{{ oraculum_db_pass }}"
|
|
- name: Create the database itself
|
|
postgresql_db:
|
|
name: "{{ oraculum_db_name }}"
|
|
owner: "{{ oraculum_db_user }}"
|
|
encoding: UTF-8
|
|
- name: Test the database creation
|
|
postgresql_db:
|
|
name: "{{ oraculum_db_name }}"
|
|
owner: "{{ oraculum_db_user }}"
|
|
encoding: UTF-8
|
|
|
|
- name: make the app be real
|
|
hosts: os_control_stg[0]:os_control[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: oraculum
|
|
description: Packager Dashboard
|
|
appowners:
|
|
- frantisekz
|
|
tags:
|
|
- appowners
|
|
|
|
- role: openshift/object
|
|
app: oraculum
|
|
template: buildconfig.yml
|
|
objectname: buildconfig.yml
|
|
|
|
- role: openshift/object
|
|
app: oraculum
|
|
template: deploymentconfig.yml
|
|
objectname: deploymentconfig.yml
|
|
|
|
- role: openshift/object
|
|
app: oraculum
|
|
template: imagestream.yml
|
|
objectname: imagestream.yml
|
|
|
|
- role: openshift/object
|
|
app: oraculum
|
|
file: service.yml
|
|
objectname: service.yml
|
|
|
|
- role: openshift/object
|
|
app: oraculum
|
|
template: secret.yml
|
|
objectname: secret.yml
|
|
|
|
- role: openshift/route
|
|
app: oraculum
|
|
routename: oraculum-api
|
|
host: "packager-dashboard{{ env_suffix }}.fedoraproject.org"
|
|
path: "/api"
|
|
serviceport: 8080-tcp
|
|
servicename: oraculum-api-endpoint
|
|
annotations:
|
|
haproxy.router.openshift.io/set-forwarded-headers: append
|
|
|
|
- role: openshift/route
|
|
app: oraculum
|
|
routename: oraculum-oidc-callback
|
|
host: "packager-dashboard{{ env_suffix }}.fedoraproject.org"
|
|
path: "/oidc_callback"
|
|
serviceport: 8080-tcp
|
|
servicename: oraculum-api-endpoint
|
|
annotations:
|
|
haproxy.router.openshift.io/set-forwarded-headers: append
|
|
|
|
- role: openshift/route
|
|
app: oraculum
|
|
routename: oraculum-flower
|
|
host: "packager-dashboard{{ env_suffix }}.fedoraproject.org"
|
|
path: "/_flower"
|
|
serviceport: 8080-tcp
|
|
servicename: oraculum-flower
|
|
annotations:
|
|
haproxy.router.openshift.io/set-forwarded-headers: append
|
|
|
|
- role: openshift/route
|
|
app: oraculum
|
|
routename: oraculum-frontend
|
|
host: "packager-dashboard{{ env_suffix }}.fedoraproject.org"
|
|
serviceport: 8080-tcp
|
|
servicename: oraculum-frontend
|
|
annotations:
|
|
haproxy.router.openshift.io/set-forwarded-headers: append
|
|
|
|
- role: openshift/start-build
|
|
app: oraculum
|
|
buildname: packager-dashboard-build
|
|
objectname: packager-dashboard-build
|