When we setup things we didn't setup fedmsg in iad2 staging. Now we are using it, so we should configure it until we get rid of it. Signed-off-by: Kevin Fenzi <kevin@scrye.com>
116 lines
4.1 KiB
YAML
116 lines
4.1 KiB
YAML
---
|
|
# create a new resultsdb production server
|
|
# NOTE: make sure there is room/space for this server on the vmhost
|
|
# NOTE: most of these vars_path come from group_vars/mirrorlist or from hostvars
|
|
|
|
- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=resultsdb_dev:resultsdb_stg:resultsdb_prod"
|
|
|
|
- name: make the box be real
|
|
hosts: resultsdb_stg:resultsdb_prod
|
|
user: root
|
|
gather_facts: True
|
|
|
|
vars_files:
|
|
- /srv/web/infra/ansible/vars/global.yml
|
|
- "/srv/private/ansible/vars.yml"
|
|
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
|
|
|
pre_tasks:
|
|
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
|
|
|
|
roles:
|
|
- { role: base, tags: ['base'] }
|
|
- { role: rkhunter, tags: ['rkhunter'] }
|
|
- { role: nagios_client, tags: ['nagios_client'] }
|
|
- { role: hosts, tags: ['hosts']}
|
|
- { role: fas_client, when: env != "staging", tags: ['fas_client'] }
|
|
- { role: ipa/client, when: env == "staging", tags: ['ipa/client'] }
|
|
- { role: collectd/base, tags: ['collectd_base'] }
|
|
- { role: sudo, tags: ['sudo'] }
|
|
- { role: openvpn/client,
|
|
when: deployment_type == "prod" }
|
|
- apache
|
|
- fedmsg/base
|
|
- { role: dnf-automatic, tags: ['dnfautomatic'] }
|
|
# Set up for fedora-messaging
|
|
- { role: rabbit/user,
|
|
username: "resultsdb{{ env_suffix }}"}
|
|
- role: rabbit/queue
|
|
username: "resultsdb{{ env_suffix }}"
|
|
queue_name: "resultsdb{{ env_suffix }}_ci_listener"
|
|
routing_keys:
|
|
- "org.centos.prod.ci.pipeline.allpackages-build.complete"
|
|
- "org.centos.prod.ci.pipeline.allpackages-build.image.complete"
|
|
- "org.centos.prod.ci.pipeline.allpackages-build.package.test.functional.complete"
|
|
- "org.centos.prod.ci.pipeline.allpackages-build.package.complete"
|
|
- "org.centos.prod.ci.pipeline.allpackages-build.package.ignored"
|
|
- "org.centos.prod.ci.koji-build.test.queued"
|
|
- "org.centos.prod.ci.koji-build.test.running"
|
|
- "org.centos.prod.ci.koji-build.test.complete"
|
|
- "org.centos.prod.ci.koji-build.test.error"
|
|
when: deployment_type == "prod"
|
|
thresholds:
|
|
warning: 10
|
|
critical: 100
|
|
tags:
|
|
- rabbit/queue
|
|
|
|
- role: rabbit/queue
|
|
username: "resultsdb{{ env_suffix }}"
|
|
queue_name: "resultsdb{{ env_suffix }}_ci_listener"
|
|
routing_keys:
|
|
- "org.centos.*.ci.pipeline.allpackages-build.complete"
|
|
- "org.centos.*.ci.pipeline.allpackages-build.image.complete"
|
|
- "org.centos.*.ci.pipeline.allpackages-build.package.test.functional.complete"
|
|
- "org.centos.*.ci.pipeline.allpackages-build.package.complete"
|
|
- "org.centos.*.ci.pipeline.allpackages-build.package.ignored"
|
|
- "org.centos.*.ci.koji-build.test.queued"
|
|
- "org.centos.*.ci.koji-build.test.running"
|
|
- "org.centos.*.ci.koji-build.test.complete"
|
|
- "org.centos.*.ci.koji-build.test.error"
|
|
when: deployment_type == "stg"
|
|
tags:
|
|
- rabbit/queue
|
|
|
|
tasks:
|
|
# this is how you include other task lists
|
|
- import_tasks: "{{ tasks_path }}/2fa_client.yml"
|
|
when: env != "staging"
|
|
- import_tasks: "{{ tasks_path }}/motd.yml"
|
|
|
|
handlers:
|
|
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|
|
|
|
- name: configure resultsdb production
|
|
hosts: resultsdb_stg:resultsdb_prod
|
|
user: root
|
|
gather_facts: True
|
|
|
|
vars_files:
|
|
- /srv/web/infra/ansible/vars/global.yml
|
|
- "/srv/private/ansible/vars.yml"
|
|
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
|
|
|
roles:
|
|
- { role: taskotron/resultsdb-fedmsg, tags: ['resultsdb-fedmsg'], when: deployment_type == "prod"}
|
|
- { role: taskotron/resultsdb-backend, tags: ['resultsdb-be'] }
|
|
- { role: taskotron/resultsdb-frontend, tags: ['resultsdb-fe'] }
|
|
|
|
handlers:
|
|
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|
|
|
|
- name: Install ci-resultsdb-listener
|
|
hosts: resultsdb_stg:resultsdb_prod
|
|
user: root
|
|
gather_facts: True
|
|
|
|
handlers:
|
|
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|
|
|
|
vars_files:
|
|
- /srv/web/infra/ansible/vars/global.yml
|
|
- "/srv/private/ansible/vars.yml"
|
|
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
|
|
|
roles:
|
|
- { role: ci_resultsdb, tags: ['ci_resultsdb'] }
|