Removed all traces i could fild of the tagger and statscache (and stats_cache for databases) in ansible, proxy configs, and the nagios config. Pursuant to request in pagzre issue https://pagure.io/fedora-infrastructure/issue/7267 . - Odin2016

This commit is contained in:
David Shier 2018-10-02 02:01:03 +02:00 committed by Kevin Fenzi
parent 09fee6e297
commit c0f45892ff
55 changed files with 4 additions and 1267 deletions
inventory
master.yml
playbooks
roles

View file

@ -1,16 +0,0 @@
---
# Define resources for this group of hosts here.
lvm_size: 20000
mem_size: 16384
num_cpus: 4
# for systems that do not match the above - specify the same parameter in
# the host_vars/$hostname file
# No fedmsg publication... no ports.
tcp_ports: []
fas_client_groups: sysadmin-noc,sysadmin-datanommer,sysadmin-veteran
# For performance measurement.. for now. This can be removed whenever.
fedmsg_loglevel: DEBUG

View file

@ -1,13 +0,0 @@
---
# Define resources for this group of hosts here.
lvm_size: 20000
mem_size: 1024
num_cpus: 2
# for systems that do not match the above - specify the same parameter in
# the host_vars/$hostname file
# Nope
tcp_ports: []
fas_client_groups: sysadmin-noc,sysadmin-datanommer,sysadmin-veteran

View file

@ -1,12 +0,0 @@
---
# Define resources for this group of hosts here.
lvm_size: 20000
mem_size: 1024
num_cpus: 2
# for systems that do not match the above - specify the same parameter in
# the host_vars/$hostname file
tcp_ports: [ 80 ]
fas_client_groups: sysadmin-noc,sysadmin-datanommer,sysadmin-veteran

View file

@ -1,12 +0,0 @@
---
# Define resources for this group of hosts here.
lvm_size: 20000
mem_size: 1024
num_cpus: 2
# for systems that do not match the above - specify the same parameter in
# the host_vars/$hostname file
tcp_ports: [ 80 ]
fas_client_groups: sysadmin-noc,sysadmin-datanommer,sysadmin-veteran

View file

@ -1,36 +0,0 @@
---
# Define resources for this group of hosts here.
lvm_size: 20000
mem_size: 4096
num_cpus: 2
# for systems that do not match the above - specify the same parameter in
# the host_vars/$hostname file
wsgi_fedmsg_service: fedoratagger
wsgi_procs: 2
wsgi_threads: 2
tcp_ports: [ 80 ]
# Neeed for rsync from log01 for logs.
custom_rules: [ '-A INPUT -p tcp -m tcp -s 10.5.126.13 --dport 873 -j ACCEPT', '-A INPUT -p tcp -m tcp -s 192.168.1.59 --dport 873 -j ACCEPT' ]
fas_client_groups: sysadmin-noc,sysadmin-veteran
# These are consumed by a task in roles/fedmsg/base/main.yml
fedmsg_certs:
- service: shell
owner: root
group: sysadmin
can_send:
- logger.log
- service: fedoratagger
owner: root
group: fedoratagger
can_send:
- fedoratagger.rating.update
- fedoratagger.tag.create
- fedoratagger.tag.update
- fedoratagger.usage.toggle
- fedoratagger.user.rank.update

View file

@ -1,36 +0,0 @@
---
# Define resources for this group of hosts here.
lvm_size: 20000
mem_size: 1024
num_cpus: 2
# for systems that do not match the above - specify the same parameter in
# the host_vars/$hostname file
wsgi_fedmsg_service: fedoratagger
wsgi_procs: 2
wsgi_threads: 2
tcp_ports: [ 80 ]
# Neeed for rsync from log01 for logs.
custom_rules: [ '-A INPUT -p tcp -m tcp -s 10.5.126.13 --dport 873 -j ACCEPT', '-A INPUT -p tcp -m tcp -s 192.168.1.59 --dport 873 -j ACCEPT' ]
fas_client_groups: sysadmin-noc,sysadmin-veteran
# These are consumed by a task in roles/fedmsg/base/main.yml
fedmsg_certs:
- service: shell
owner: root
group: sysadmin
can_send:
- logger.log
- service: fedoratagger
owner: root
group: fedoratagger
can_send:
- fedoratagger.rating.update
- fedoratagger.tag.create
- fedoratagger.tag.update
- fedoratagger.usage.toggle
- fedoratagger.user.rank.update

View file

@ -19,7 +19,6 @@ databases:
- bodhi2 - bodhi2
- elections - elections
- fedocal - fedocal
- fedoratagger
- hyperkitty - hyperkitty
- kerneltest - kerneltest
- koschei - koschei
@ -31,7 +30,6 @@ databases:
- odcs - odcs
- pagure - pagure
- pdc - pdc
- statscache
- tahrir - tahrir
- waiverdb - waiverdb
@ -44,7 +42,6 @@ dbs_to_backup:
- bodhi2 - bodhi2
- elections - elections
- fedocal - fedocal
- fedoratagger
- hyperkitty - hyperkitty
- kerneltest - kerneltest
- koschei - koschei
@ -56,7 +53,6 @@ dbs_to_backup:
- odcs - odcs
- pagure - pagure
- pdc - pdc
- statscache
- tahrir - tahrir
- waiverdb - waiverdb

View file

@ -1,14 +0,0 @@
---
nm: 255.255.255.0
gw: 10.5.126.254
dns: 10.5.126.21
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-rhel-7
ks_repo: http://10.5.126.23/repo/rhel/RHEL7-x86_64/
eth0_ip: 10.5.126.81
volgroup: /dev/vg_guests
vmhost: virthost21.phx2.fedoraproject.org
datacenter: phx2

View file

@ -1,14 +0,0 @@
---
nm: 255.255.255.0
gw: 10.5.128.254
dns: 10.5.126.21
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-rhel-7
ks_repo: http://10.5.126.23/repo/rhel/RHEL7-x86_64/
eth0_ip: 10.5.128.181
volgroup: /dev/vg_virthost16
vmhost: virthost05.stg.phx2.fedoraproject.org
datacenter: phx2

View file

@ -1,14 +0,0 @@
---
nm: 255.255.255.0
gw: 10.5.126.254
dns: 10.5.126.21
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-rhel-7
ks_repo: http://10.5.126.23/repo/rhel/RHEL7-x86_64/
eth0_ip: 10.5.126.31
volgroup: /dev/vg_guests
vmhost: virthost02.phx2.fedoraproject.org
datacenter: phx2

View file

@ -1,14 +0,0 @@
---
nm: 255.255.255.0
gw: 10.5.128.254
dns: 10.5.126.21
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-rhel-7
ks_repo: http://10.5.126.23/repo/rhel/RHEL7-x86_64/
eth0_ip: 10.5.128.182
volgroup: /dev/vg_guests
vmhost: virthost01.stg.phx2.fedoraproject.org
datacenter: phx2

View file

@ -1,14 +0,0 @@
---
nm: 255.255.255.0
gw: 10.5.126.254
dns: 10.5.126.21
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-rhel-7
ks_repo: http://10.5.126.23/repo/rhel/RHEL7-x86_64/
eth0_ip: 10.5.126.32
volgroup: /dev/vg_guests
vmhost: virthost19.phx2.fedoraproject.org
datacenter: phx2

View file

@ -1,14 +0,0 @@
---
nm: 255.255.255.0
gw: 10.5.128.254
dns: 10.5.126.21
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-rhel-7
ks_repo: http://10.5.126.23/repo/rhel/RHEL7-x86_64/
eth0_ip: 10.5.128.183
volgroup: /dev/vg_guests
vmhost: virthost04.stg.phx2.fedoraproject.org
datacenter: phx2

View file

@ -1,14 +0,0 @@
---
nm: 255.255.255.0
gw: 10.5.126.254
dns: 10.5.126.21
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-rhel-7
ks_repo: http://10.5.126.23/repo/rhel/RHEL7-x86_64/
install_tagger_cron: true
volgroup: /dev/vg_guests
vmhost: virthost14.phx2.fedoraproject.org
eth0_ip: 10.5.126.212
datacenter: phx2

View file

@ -1,14 +0,0 @@
---
nm: 255.255.255.0
gw: 10.5.128.254
dns: 10.5.126.21
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-rhel-7
ks_repo: http://10.5.126.23/repo/rhel/RHEL7-x86_64/
install_tagger_cron: true
volgroup: /dev/vg_guests
eth0_ip: 10.5.128.186
vmhost: virthost01.stg.phx2.fedoraproject.org
datacenter: phx2

View file

@ -1,14 +0,0 @@
---
nm: 255.255.255.0
gw: 10.5.126.254
dns: 10.5.126.21
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-rhel-7
ks_repo: http://10.5.126.23/repo/rhel/RHEL7-x86_64/
install_tagger_cron: false
volgroup: /dev/vg_guests
vmhost: virthost12.phx2.fedoraproject.org
eth0_ip: 10.5.126.214
datacenter: phx2

View file

@ -839,11 +839,7 @@ rabbitmq03.stg.phx2.fedoraproject.org
resultsdb-stg01.qa.fedoraproject.org resultsdb-stg01.qa.fedoraproject.org
retrace02.qa.fedoraproject.org retrace02.qa.fedoraproject.org
sign-bridge01.stg.phx2.fedoraproject.org sign-bridge01.stg.phx2.fedoraproject.org
statscache-backend01.stg.phx2.fedoraproject.org
statscache-web01.stg.phx2.fedoraproject.org
statscache-web02.stg.phx2.fedoraproject.org
sundries01.stg.phx2.fedoraproject.org sundries01.stg.phx2.fedoraproject.org
tagger01.stg.phx2.fedoraproject.org
taskotron-stg01.qa.fedoraproject.org taskotron-stg01.qa.fedoraproject.org
value01.stg.phx2.fedoraproject.org value01.stg.phx2.fedoraproject.org
bvirthost01.stg.phx2.fedoraproject.org bvirthost01.stg.phx2.fedoraproject.org
@ -881,28 +877,6 @@ openqa-stg01.qa.fedoraproject.org
tang01.phx2.fedoraproject.org tang01.phx2.fedoraproject.org
tang02.phx2.fedoraproject.org tang02.phx2.fedoraproject.org
[statscache:children]
statscache-web
statscache-backend
[statscache-stg:children]
statscache-web-stg
statscache-backend-stg
[statscache-web]
statscache-web01.phx2.fedoraproject.org
statscache-web02.phx2.fedoraproject.org
[statscache-web-stg]
statscache-web01.stg.phx2.fedoraproject.org
statscache-web02.stg.phx2.fedoraproject.org
[statscache-backend]
statscache-backend01.phx2.fedoraproject.org
[statscache-backend-stg]
statscache-backend01.stg.phx2.fedoraproject.org
[sundries] [sundries]
sundries01.phx2.fedoraproject.org sundries01.phx2.fedoraproject.org
sundries02.phx2.fedoraproject.org sundries02.phx2.fedoraproject.org
@ -910,13 +884,6 @@ sundries02.phx2.fedoraproject.org
[sundries-stg] [sundries-stg]
sundries01.stg.phx2.fedoraproject.org sundries01.stg.phx2.fedoraproject.org
[tagger]
tagger01.phx2.fedoraproject.org
tagger02.phx2.fedoraproject.org
[tagger-stg]
tagger01.stg.phx2.fedoraproject.org
[taskotron:children] [taskotron:children]
taskotron-dev taskotron-dev
taskotron-stg taskotron-stg
@ -1020,7 +987,6 @@ mbs-backend
notifs-backend notifs-backend
pdc-backend pdc-backend
pkgs pkgs
statscache-backend
[fedmsg-hubs-stg:children] [fedmsg-hubs-stg:children]
autocloud-backend-stg autocloud-backend-stg
@ -1034,7 +1000,6 @@ mbs-backend-stg
notifs-backend-stg notifs-backend-stg
pdc-backend-stg pdc-backend-stg
pkgs-stg pkgs-stg
statscache-backend-stg
[fedmsg-ircs:children] [fedmsg-ircs:children]
value value

View file

@ -96,9 +96,7 @@
- import_playbook: /srv/web/infra/ansible/playbooks/groups/smtp-mm.yml - import_playbook: /srv/web/infra/ansible/playbooks/groups/smtp-mm.yml
- import_playbook: /srv/web/infra/ansible/playbooks/groups/sign-bridge.yml - import_playbook: /srv/web/infra/ansible/playbooks/groups/sign-bridge.yml
- import_playbook: /srv/web/infra/ansible/playbooks/groups/simple-koji-ci.yml - import_playbook: /srv/web/infra/ansible/playbooks/groups/simple-koji-ci.yml
- import_playbook: /srv/web/infra/ansible/playbooks/groups/statscache.yml
- import_playbook: /srv/web/infra/ansible/playbooks/groups/sundries.yml - import_playbook: /srv/web/infra/ansible/playbooks/groups/sundries.yml
- import_playbook: /srv/web/infra/ansible/playbooks/groups/tagger.yml
- import_playbook: /srv/web/infra/ansible/playbooks/groups/tang.yml - import_playbook: /srv/web/infra/ansible/playbooks/groups/tang.yml
- import_playbook: /srv/web/infra/ansible/playbooks/groups/taskotron.yml - import_playbook: /srv/web/infra/ansible/playbooks/groups/taskotron.yml
- import_playbook: /srv/web/infra/ansible/playbooks/groups/taskotron-client-hosts.yml - import_playbook: /srv/web/infra/ansible/playbooks/groups/taskotron-client-hosts.yml

View file

@ -21,6 +21,5 @@
- include_playbook: /srv/web/infra/ansible/playbooks/groups/nuancier.yml - include_playbook: /srv/web/infra/ansible/playbooks/groups/nuancier.yml
- include_playbook: /srv/web/infra/ansible/playbooks/groups/packages.yml - include_playbook: /srv/web/infra/ansible/playbooks/groups/packages.yml
- include_playbook: /srv/web/infra/ansible/playbooks/groups/releng.yml - include_playbook: /srv/web/infra/ansible/playbooks/groups/releng.yml
- include_playbook: /srv/web/infra/ansible/playbooks/groups/tagger.yml
- include_playbook: /srv/web/infra/ansible/playbooks/groups/wiki.yml - include_playbook: /srv/web/infra/ansible/playbooks/groups/wiki.yml
- include_playbook: /srv/web/infra/ansible/playbooks/groups/value.yml - include_playbook: /srv/web/infra/ansible/playbooks/groups/value.yml

View file

@ -1,66 +0,0 @@
# create a new notifs-web server
# NOTE: should be used with --limit most of the time
# NOTE: make sure there is room/space for this server on the vmhost
# NOTE: most of these vars_path come from group_vars/notifs-web* or from hostvars
- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=statscache:statscache-stg"
- name: make the box be real
hosts: statscache:statscache-stg
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
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
roles:
- base
- rkhunter
- nagios_client
- hosts
- fas_client
- collectd/base
- fedmsg/base
- sudo
tasks:
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
- import_tasks: "{{ tasks_path }}/2fa_client.yml"
- import_tasks: "{{ tasks_path }}/motd.yml"
- name: Stuff just for the web frontend
hosts: statscache-web:statscache-web-stg
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
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
roles:
- mod_wsgi
- role: openvpn/client
when: env != "staging"
- statscache/frontend
- name: Stuff just for the fedmsg backend
hosts: statscache-backend:statscache-backend-stg
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
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
roles:
- fedmsg/hub
- statscache/backend
- role: collectd/fedmsg-service
process: fedmsg-hub

View file

@ -1,70 +0,0 @@
# create a new tagger server
# NOTE: should be used with --limit most of the time
# NOTE: make sure there is room/space for this server on the vmhost
# NOTE: most of these vars_path come from group_vars/tagger* or from hostvars
- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=tagger:tagger-stg"
- name: make the box be real
hosts: tagger:tagger-stg
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:
- base
- rkhunter
- nagios_client
- hosts
- fas_client
- collectd/base
- rsyncd
- sudo
- { role: openvpn/client,
when: env != "staging" }
- mod_wsgi
tasks:
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
- import_tasks: "{{ tasks_path }}/2fa_client.yml"
- import_tasks: "{{ tasks_path }}/motd.yml"
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
- name: dole out the service specific config
hosts: tagger:tagger-stg
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:
- tagger
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
# This comes last because it relies on a group created by the tagger role.
- name: setup fedmsg
hosts: tagger:tagger-stg
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:
- fedmsg/base
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"

View file

@ -124,14 +124,6 @@
remotepath: /packages remotepath: /packages
proxyurl: http://localhost:10016 proxyurl: http://localhost:10016
- role: httpd/reverseproxy
website: apps.fedoraproject.org
destname: tagger
localpath: /tagger
remotepath: /tagger
rewrite: true
proxyurl: http://localhost:10017
- role: httpd/reverseproxy - role: httpd/reverseproxy
website: ask.fedoraproject.org website: ask.fedoraproject.org
destname: askbot destname: askbot
@ -338,13 +330,6 @@
remotepath: /autocloud remotepath: /autocloud
proxyurl: http://localhost:10041 proxyurl: http://localhost:10041
- role: httpd/reverseproxy
website: apps.fedoraproject.org
destname: statscache
localpath: /statscache
remotepath: /statscache
proxyurl: http://localhost:10042
- role: httpd/reverseproxy - role: httpd/reverseproxy
website: pdc.fedoraproject.org website: pdc.fedoraproject.org
destname: pdc destname: pdc

View file

@ -39,7 +39,7 @@
tasks: tasks:
- name: Pull in the list of packages from pkgdb. Go get a snack. (2 hours) - name: Pull in the list of packages from pkgdb. Go get a snack. (2 hours)
command: /usr/bin/fcomm-index-packages --index-db-dest=/var/cache/fedoracommunity/packages/xapian --icons-dest /var/cache/fedoracommunity/packages/icons --mdapi-url=https://apps.stg.fedoraproject.org/mdapi --icons-url=https://dl.fedoraproject.org/pub/alt/screenshots --tagger-url=https://apps.stg.fedoraproject.org/tagger command: /usr/bin/fcomm-index-packages --index-db-dest=/var/cache/fedoracommunity/packages/xapian --icons-dest /var/cache/fedoracommunity/packages/icons --mdapi-url=https://apps.stg.fedoraproject.org/mdapi --icons-url=https://dl.fedoraproject.org/pub/alt/screenshots
when: install_packages_indexer when: install_packages_indexer
- name: Rebuild that search index on the side and install it. (just prod) - name: Rebuild that search index on the side and install it. (just prod)
@ -57,7 +57,7 @@
tasks: tasks:
- name: Pull in the list of packages from pkgdb. Go get a snack. (2 hours) - name: Pull in the list of packages from pkgdb. Go get a snack. (2 hours)
command: /usr/bin/fcomm-index-packages --index-db-dest=/var/cache/fedoracommunity/packages/xapian --icons-dest /var/cache/fedoracommunity/packages/icons --mdapi-url=https://apps.fedoraproject.org/mdapi --icons-url=https://dl.fedoraproject.org/pub/alt/screenshots --tagger-url=https://apps.fedoraproject.org/tagger command: /usr/bin/fcomm-index-packages --index-db-dest=/var/cache/fedoracommunity/packages/xapian --icons-dest /var/cache/fedoracommunity/packages/icons --mdapi-url=https://apps.fedoraproject.org/mdapi --icons-url=https://dl.fedoraproject.org/pub/alt/screenshots
when: install_packages_indexer when: install_packages_indexer
- name: leave maintenance mode - name: leave maintenance mode

View file

@ -1,100 +0,0 @@
- name: push packages out
hosts: statscache-backend:statscache-backend-stg:statscache-web:statscache-web-stg
user: root
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
vars:
testing: False
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
tasks:
- name: clean all metadata {%if testing%}(with infrastructure-testing on){%endif%}
command: yum clean all {%if testing%} --enablerepo=infrastructure-tags-stg {%endif%}
check_mode: no
- name: yum update statscache packages from main repo
yum: name="statscache*" state=latest
when: not testing
- name: yum update statscache packages from testing repo
yum: name="statscache*" state=latest enablerepo=infrastructure-tags-stg
when: testing
- name: verify the frontend and stop it
hosts: statscache-web:statscache-web-stg
user: root
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
pre_tasks:
- name: tell nagios to shush w.r.t. the frontend
nagios: action=downtime minutes=15 service=host host={{ inventory_hostname_short }}{{ env_suffix }}
delegate_to: noc01.phx2.fedoraproject.org
ignore_errors: true
roles:
- statscache/frontend
post_tasks:
- service: name="httpd" state=stopped
- name: verify the backend, stop it, and then upgrade the db
hosts: statscache-backend:statscache-backend-stg
user: root
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
pre_tasks:
- name: tell nagios to shush w.r.t. the backend
nagios: action=downtime minutes=15 service=host host={{ inventory_hostname_short }}{{ env_suffix }}
delegate_to: noc01.phx2.fedoraproject.org
ignore_errors: true
roles:
- statscache/backend
tasks:
- name: Stop the statscache backend
service: name="fedmsg-hub" state=stopped
#- name: Upgrade the database
# command: /usr/bin/alembic -c /usr/share/statscache/alembic.ini upgrade head
# args:
# chdir: /usr/share/statscache/
- name: And... start the backend again
service: name="fedmsg-hub" state=started
post_tasks:
- name: tell nagios to unshush w.r.t. the backend
nagios: action=unsilence service=host host={{ inventory_hostname_short }}{{ env_suffix }}
delegate_to: noc01.phx2.fedoraproject.org
ignore_errors: true
- name: restart the frontend
hosts: statscache-web:statscache-web-stg
user: root
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
tasks:
- service: name="httpd" state=started
post_tasks:
- name: tell nagios to unshush w.r.t. the frontend
nagios: action=unsilence service=host host={{ inventory_hostname_short }}{{ env_suffix }}
delegate_to: noc01.phx2.fedoraproject.org
ignore_errors: true

View file

@ -1,57 +0,0 @@
- name: push packages out
hosts: tagger:tagger-stg
user: root
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
vars:
testing: False
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
tasks:
- name: clean all metadata {%if testing%}(with infrastructure-testing on){%endif%}
command: yum clean all {%if testing%} --enablerepo=infrastructure-tags-stg {%endif%}
check_mode: no
- name: yum update fedora-tagger packages from main repo
yum: name="fedora-tagger" state=latest
when: not testing
- name: yum update fedora-tagger packages from testing repo
yum: name="fedora-tagger" state=latest enablerepo=infrastructure-tags-stg
when: testing
- name: verify the config and restart it
hosts: tagger:tagger-stg
user: root
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"
pre_tasks:
- name: tell nagios to shush
nagios: action=downtime minutes=60 service=host host={{ inventory_hostname_short }}{{ env_suffix }}
delegate_to: noc01.phx2.fedoraproject.org
ignore_errors: true
roles:
- tagger
post_tasks:
- service: name="httpd" state=stopped
- name: Upgrade the database (only on one of the two nodes...)
command: /usr/bin/alembic -c /usr/share/fedoratagger/alembic.ini upgrade head
args:
chdir: /usr/share/fedoratagger/
when: inventory_hostname.startswith('tagger01')
- service: name="httpd" state=started
- name: tell nagios to unshush
nagios: action=unsilence service=host host={{ inventory_hostname_short }}{{ env_suffix }}
delegate_to: noc01.phx2.fedoraproject.org
ignore_errors: true

View file

@ -405,21 +405,6 @@ children:
answered here. answered here.
It is sometimes called "Fedora Community v2" after the old It is sometimes called "Fedora Community v2" after the old
<a href="https://admin.fedoraproject.org/community">Fedora Community</a> site. <a href="https://admin.fedoraproject.org/community">Fedora Community</a> site.
- name: Tagger
data:
icon: tagger.png
url: https://apps.fedoraproject.org/tagger
package_url: https://apps.fedoraproject.org/tagger/{package}
source_url: https://github.com/fedora-infra/fedora-tagger
bugs_url: https://github.com/fedora-infra/fedora-tagger/issues
docs_url: https://github.com/fedora-infra/fedora-tagger/blob/develop/README.rst
sops:
- https://infrastructure.fedoraproject.org/infra/docs/fedora-tagger.rst
status_mappings: ['tagger']
description: >
Help build a tag cloud of all our packages.. It's actually
really useful. It'll help improve the search of the
"Packages" webapp.
- name: COPR - name: COPR
data: data:
icon: copr.png icon: copr.png

View file

@ -101,15 +101,6 @@ syncHttpLogs {{host}}
syncHttpLogs {{host}} syncHttpLogs {{host}}
{% endfor %} {% endfor %}
## Sync up all tagger hosts
{% for host in groups['tagger'] %}
syncHttpLogs {{host}}
{% endfor %}
{% for host in groups['tagger-stg'] %}
syncHttpLogs {{host}}
{% endfor %}
## Sync up all bodhi hosts ## Sync up all bodhi hosts
{% for host in groups['bodhi2'] %} {% for host in groups['bodhi2'] %}
syncHttpLogs {{host}} syncHttpLogs {{host}}
@ -188,16 +179,6 @@ syncHttpLogs {{host}}
syncHttpLogs {{host}} syncHttpLogs {{host}}
{% endfor %} {% endfor %}
## sync up statscache
{% for host in groups['statscache-web'] %}
syncHttpLogs {{host}}
{% endfor %}
{% for host in groups['statscache-web-stg'] %}
syncHttpLogs {{host}}
{% endfor %}
## sync up autocloud ## sync up autocloud
{% for host in groups['autocloud-web'] %} {% for host in groups['autocloud-web'] %}
syncHttpLogs {{host}} syncHttpLogs {{host}}

View file

@ -125,18 +125,6 @@ backend packages-backend
{% endif %} {% endif %}
option httpchk GET /packages/_heartbeat option httpchk GET /packages/_heartbeat
frontend tagger-frontend
bind 0.0.0.0:10017
default_backend tagger-backend
backend tagger-backend
balance hdr(appserver)
server tagger01 tagger01:80 check inter 60s rise 2 fall 3
{% if env == "production" %}
server tagger02 tagger02:80 check inter 60s rise 2 fall 3
{% endif %}
option httpchk GET /tagger/_heartbeat
frontend totpcgiprovision-frontend frontend totpcgiprovision-frontend
bind 0.0.0.0:10019 bind 0.0.0.0:10019
default_backend totpcgiprovision-backend default_backend totpcgiprovision-backend
@ -296,16 +284,6 @@ backend autocloud-backend
server autocloud-web02 autocloud-web02:80 check inter 10s rise 1 fall 2 server autocloud-web02 autocloud-web02:80 check inter 10s rise 1 fall 2
option httpchk GET /autocloud/ option httpchk GET /autocloud/
frontend statscache-frontend
bind 0.0.0.0:10042
default_backend statscache-backend
backend statscache-backend
balance hdr(appserver)
server statscache-web01 statscache-web01:80 check inter 10s rise 1 fall 2
server statscache-web02 statscache-web02:80 check inter 10s rise 1 fall 2
option httpchk GET /statscache/
frontend mdapi-frontend frontend mdapi-frontend
bind 0.0.0.0:10043 bind 0.0.0.0:10043
default_backend mdapi-backend default_backend mdapi-backend

View file

@ -1,11 +0,0 @@
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.5.128.177 proxy01.phx2.fedoraproject.org proxy1 proxy2 proxy3 proxy4 proxy01 proxy02 proxy03 proxy04 proxy05 proxy06 proxy07 proxy08 proxy09 proxy10 proxy11 proxy12 proxy13 proxy14 fedoraproject.org admin.fedoraproject.org admin.stg.fedoraproject.org apps.stg.fedoraproject.org
10.5.126.51 apps.fedoraproject.org
10.5.126.23 infrastructure.fedoraproject.org
10.5.128.175 pkgs.fedoraproject.org
10.5.128.148 memcached01.stg.phx2.fedoraproject.org memcached01 memcached02 memcached03 memcached04
10.5.128.120 db01.stg.phx2.fedoraproject.org db-ask db-elections db-koji01 db-datanommer db-datanommer01 db-datanommer02 db-datanommer02.phx2.fedoraproject.org db-github2fedmsg db-fedocal tagger_dbdb-summershum db-tahrir nuancier_db db-notifs db-blockerbugs db-kerneltest
10.5.128.129 fas01.stg.phx2.fedoraproject.org fas01.phx2.fedoraproject.org fas1 fas2 fas01 fas02 fas03 fas-all
10.5.128.139 koji01.stg.phx2.fedoraproject.org koji.stg.fedoraproject.org koji01 kojipkgs kojipkgs.stg.phx2.fedoraproject.org kojipkgs.stg.fedoraproject.org

View file

@ -1,7 +0,0 @@
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.5.126.23 infrastructure.fedoraproject.org
10.5.125.63 koji.fedoraproject.org
10.5.126.71 tagger_db tagger_db

View file

@ -1,7 +0,0 @@
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.5.126.23 infrastructure.fedoraproject.org
10.5.125.63 koji.fedoraproject.org
10.5.126.71 tagger_db tagger_db

View file

@ -57,7 +57,7 @@ openid identity url template=http://%(username)s.id{{env_suffix}}.fedoraproject.
{% if env == 'staging' %} {% if env == 'staging' %}
openid trusted roots= openid trusted roots=
{% else %} {% else %}
openid trusted roots=https://ask.fedoraproject.org/,https://fedorahosted.org/,https://badges.fedoraproject.org,https://apps.fedoraproject.org/tagger/,https://apps.fedoraproject.org/nuancier/,https://apps.fedoraproject.org/datagrepper/,https://apps.fedoraproject.org/calendar/,http://apps.fedoraproject.org/notifications/,http://copr.fedoraproject.org/,https://copr.fedoraproject.org/,https://admin.fedoraproject.org/voting/,https://apps.fedoraproject.org/github2fedmsg,https://admin.fedoraproject.org,https://apps.fedoraproject.org/,https://release-monitoring.org/,http://pagure.io/,http://admin.fedoraproject.org/mirrormanager/,https://apps.fedoraproject.org/koschei/,https://bodhi.fedoraproject.org,https://lists.fedoraproject.org/,https://openqa.fedoraproject.org/,https://src.fedoraproject.org/ openid trusted roots=https://ask.fedoraproject.org/,https://fedorahosted.org/,https://badges.fedoraproject.org,https://apps.fedoraproject.org/nuancier/,https://apps.fedoraproject.org/datagrepper/,https://apps.fedoraproject.org/calendar/,http://apps.fedoraproject.org/notifications/,http://copr.fedoraproject.org/,https://copr.fedoraproject.org/,https://admin.fedoraproject.org/voting/,https://apps.fedoraproject.org/github2fedmsg,https://admin.fedoraproject.org,https://apps.fedoraproject.org/,https://release-monitoring.org/,http://pagure.io/,http://admin.fedoraproject.org/mirrormanager/,https://apps.fedoraproject.org/koschei/,https://bodhi.fedoraproject.org,https://lists.fedoraproject.org/,https://openqa.fedoraproject.org/,https://src.fedoraproject.org/
{% endif %} {% endif %}
openid database url=postgresql://{{ ipsilon_db_user }}:{{ ipsilon_db_pass }}@{{ ipsilon_db_host }}/{{ ipsilon_db_openid_name }} openid database url=postgresql://{{ ipsilon_db_user }}:{{ ipsilon_db_pass }}@{{ ipsilon_db_host }}/{{ ipsilon_db_openid_name }}
openid untrusted roots= openid untrusted roots=

View file

@ -317,14 +317,6 @@ define service {
use internalwebsitetemplate use internalwebsitetemplate
} }
define service {
hostgroup_name tagger
service_description http-tagger-internal
check_command check_website!localhost!/tagger/api/v1/score/ralph/!libravatar.org
max_check_attempts 8
use internalwebsitetemplate
#event_handler restart_httpd
}
## Internal services ## Internal services

View file

@ -135,7 +135,6 @@ config = {
"fas": "light blue", "fas": "light blue",
"bodhi": "green", "bodhi": "green",
"git": "red", "git": "red",
"tagger": "brown",
"wiki": "purple", "wiki": "purple",
"logger": "orange", "logger": "orange",
"pkgdb": "teal", "pkgdb": "teal",

View file

@ -1,2 +0,0 @@
# ifconfig-push actualIP PtPIP
ifconfig-push 192.168.1.3 192.168.0.3

View file

@ -1,2 +0,0 @@
# ifconfig-push actualIP PtPIP
ifconfig-push 192.168.1.4 192.168.0.4

View file

@ -1,2 +0,0 @@
# ifconfig-push actualIP PtPIP
ifconfig-push 192.168.1.120 192.168.0.120

View file

@ -1,2 +0,0 @@
# ifconfig-push actualIP PtPIP
ifconfig-push 192.168.1.121 192.168.0.121

View file

@ -158,7 +158,7 @@
state: present state: present
- name: Build the database the first time. This takes a while - name: Build the database the first time. This takes a while
command: /usr/bin/fcomm-index-packages --index-db-dest=/var/cache/fedoracommunity/packages/xapian --icons-dest /var/cache/fedoracommunity/packages/icons --mdapi-url=https://apps{{env_suffix}}.fedoraproject.org/mdapi --icons-url=https://dl.fedoraproject.org/pub/alt/screenshots --tagger-url=https://apps{{env_suffix}}.fedoraproject.org/tagger creates=/var/cache/fedoracommunity/packages/xapian/search/termlist.glass command: /usr/bin/fcomm-index-packages --index-db-dest=/var/cache/fedoracommunity/packages/xapian --icons-dest /var/cache/fedoracommunity/packages/icons --mdapi-url=https://apps{{env_suffix}}.fedoraproject.org/mdapi --icons-url=https://dl.fedoraproject.org/pub/alt/screenshots
tags: tags:
- packages - packages
- packages/web - packages/web

View file

@ -23,7 +23,6 @@ fedoracommunity.script_name = /packages
fedoracommunity.connector.kojihub.baseurl = https://koji{{env_suffix}}.fedoraproject.org/kojihub fedoracommunity.connector.kojihub.baseurl = https://koji{{env_suffix}}.fedoraproject.org/kojihub
fedoracommunity.connector.bodhi.baseurl = https://bodhi{{env_suffix}}.fedoraproject.org/ fedoracommunity.connector.bodhi.baseurl = https://bodhi{{env_suffix}}.fedoraproject.org/
fedoracommunity.connector.mdapi.baseurl = https://apps{{env_suffix}}.fedoraproject.org/mdapi fedoracommunity.connector.mdapi.baseurl = https://apps{{env_suffix}}.fedoraproject.org/mdapi
fedoracommunity.connector.tagger.baseurl = https://apps{{env_suffix}}.fedoraproject.org/tagger
fedoracommunity.connector.fas.baseurl = https://admin{{env_suffix}}.fedoraproject.org/accounts/ fedoracommunity.connector.fas.baseurl = https://admin{{env_suffix}}.fedoraproject.org/accounts/
fedoracommunity.connector.icons.baseurl = http://download01.phx2.fedoraproject.org/pub/alt/screenshots fedoracommunity.connector.icons.baseurl = http://download01.phx2.fedoraproject.org/pub/alt/screenshots
{% if env == "staging" %} {% if env == "staging" %}
@ -64,10 +63,8 @@ datagrepper_url = https://apps.fedoraproject.org/datagrepper/raw
# #
{% if env == "staging" %} {% if env == "staging" %}
feed_cache = postgres://fedoracommunity:{{ fcommFeedCacheDBPassword }}@db-community.stg/fedoracommunity_feed_cache feed_cache = postgres://fedoracommunity:{{ fcommFeedCacheDBPassword }}@db-community.stg/fedoracommunity_feed_cache
stats_cache = postgres://fedoracommunity:{{ fcommFeedCacheDBPassword }}@db-community.stg/fedoracommunity_stats_cache
{% else %} {% else %}
feed_cache = postgres://fedoracommunity:{{ fcommFeedCacheDBPassword }}@db-community/fedoracommunity_feed_cache feed_cache = postgres://fedoracommunity:{{ fcommFeedCacheDBPassword }}@db-community/fedoracommunity_feed_cache
stats_cache = postgres://fedoracommunity:{{ fcommFeedCacheDBPassword }}@db-community/fedoracommunity_stats_cache
{% endif %} {% endif %}
# #

View file

@ -1,43 +0,0 @@
---
# Configuration for the notifications consumer
- name: install needed packages
package: name={{ item }} state=present
with_items:
- statscache-consumer
- statscache-plugins
- python-psycopg2
- libsemanage-python
tags:
- notifs
- notifs/backend
- name: copy database configuration
template: >
src={{ item }} dest=/etc/fedmsg.d/{{ item }}
owner=fedmsg group=fedmsg mode=0600
with_items:
- statscache.py
notify:
- restart fedmsg-hub
tags:
- notifs
- notifs/backend
- name: ensure we have a dir to copy shared config to.
file: >
dest=/usr/share/statscache/ state=directory
owner=root group=root mode=0755
tags:
- notifs
- notifs/backend
- name: copy the alembic configuration for DBAs
template: >
src=alembic.ini dest=/usr/share/statscache/alembic.ini
owner=root group=sysadmin-dba mode=0660
notify:
- restart fedmsg-hub
tags:
- notifs
- notifs/backend

View file

@ -1,53 +0,0 @@
# A generic, single database configuration.
[alembic]
# path to migration scripts
script_location = /usr/share/statscache/alembic/
# template used to generate migration files
# file_template = %%(rev)s_%%(slug)s
# max length of characters to apply to the
# "slug" field
#truncate_slug_length = 40
# set to 'true' to run the environment during
# the 'revision' command, regardless of autogenerate
# revision_environment = false
sqlalchemy.url = postgres://statscache:{{statscache_db_password}}@db01/statscache
# Logging configuration
[loggers]
keys = root,sqlalchemy,alembic
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = WARN
handlers = console
qualname =
[logger_sqlalchemy]
level = WARN
handlers =
qualname = sqlalchemy.engine
[logger_alembic]
level = INFO
handlers =
qualname = alembic
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S

View file

@ -1,55 +0,0 @@
import datetime
config = {
"statscache.datagrepper.profile": False,
{% if env == 'staging' %}
#"statscache.datagrepper.endpoint": "https://apps.stg.fedoraproject.org/datagrepper/raw",
# Consume production fedmsg data in staging for now.
"statscache.datagrepper.endpoint": "https://apps.fedoraproject.org/datagrepper/raw",
"endpoints": {
"production-loopback": [
"tcp://10.5.126.51:9940",
],
},
{% else %}
"statscache.datagrepper.endpoint": "https://apps.fedoraproject.org/datagrepper/raw",
{% endif %}
# Consumer stuff
"statscache.consumer.enabled": True,
"statscache.sqlalchemy.uri": "postgres://statscache:{{statscache_db_password}}@db01/statscache",
# stats models will go back at least this far (current value arbitrary)
{% if env == 'staging' %}
"statscache.consumer.epoch": datetime.datetime(year=2015, month=10, day=1),
{% else %}
"statscache.consumer.epoch": datetime.datetime(year=2014, month=1, day=1),
{% endif %}
# stats models are updated at this frequency
"statscache.producer.frequency": datetime.timedelta(seconds=1),
# Configuration of web API
"statscache.app.maximum_rows_per_page": 100,
"statscache.app.default_rows_per_page": 100,
# Turn on logging for statscache
"logging": dict(
loggers=dict(
statscache={
"level": "DEBUG",
"propagate": False,
"handlers": ["console"],
},
statscache_plugins={
"level": "DEBUG",
"propagate": False,
"handlers": ["console"],
},
),
),
}

View file

@ -1,8 +0,0 @@
# http://stackoverflow.com/questions/8007176/500-error-without-anything-in-the-apache-logs
import logging
import sys
logging.basicConfig(stream=sys.stderr)
import statscache.app
application = statscache.app.app
#application.debug = True # Nope. Be careful!

View file

@ -1,75 +0,0 @@
---
# Configuration for the Fedora Notifications webapp
- name: install needed packages
package: name={{ item }} state=present
with_items:
- statscache-web
- statscache-plugins
- python-psycopg2
- libsemanage-python
notify:
- restart apache
tags:
- statscache
- statscache/frontend
- name: copy statscache app configuration
template: >
src={{ item }} dest=/etc/fedmsg.d/{{ item }}
owner=apache group=apache mode=0600
with_items:
- statscache.py
notify:
- restart apache
tags:
- statscache
- statscache/frontend
- name: copy statscache httpd config
template: >
src=statscache.conf dest=/etc/httpd/conf.d/statscache.conf
owner=apache group=apache mode=0644
notify:
- restart apache
tags:
- statscache
- statscache/frontend
- name: copy custom wsgi file
copy: src=statscache.wsgi dest=/usr/share/statscache/apache/statscache.wsgi mode=0644
notify:
- restart apache
tags:
- statscache
- statscache/frontend
- name: copy app configuration
template: >
src=statscache.cfg dest=/etc/statscache.cfg
owner=root group=apache mode=0640
notify:
- restart apache
tags:
- statscache
- statscache/frontend
- name: apply selinux type to static files
file: >
dest=/usr/share/statscache/static
setype=httpd_sys_content_t
state=directory
recurse=yes
tags:
- statscache
- statscache/frontend
- selinux
- name: ensure selinux lets httpd talk to postgres
seboolean: name={{item}} state=yes persistent=yes
with_items:
- httpd_can_network_connect_db
tags:
- statscache
- statscache/frontend
- selinux

View file

@ -1,2 +0,0 @@
### Secret key for the Flask application
SECRET_KEY='{{statscache_secret_key}}'

View file

@ -1,18 +0,0 @@
LoadModule wsgi_module modules/mod_wsgi.so
WSGIDaemonProcess statscache user=apache group=apache maximum-requests=50000 display-name=statscache processes=4 threads=4 inactivity-timeout=300
WSGISocketPrefix run/wsgi
WSGIRestrictStdout Off
WSGIRestrictSignal Off
WSGIPythonOptimize 1
WSGIScriptAlias /statscache /usr/share/statscache/apache/statscache.wsgi
Alias /statscache/static/ /usr/lib/python2.7/site-packages/statscache/static/
<Location /statscache>
WSGIProcessGroup statscache
Require all granted
</Location>
<Directory /usr/share/statscache/>
Require all granted
</Directory>

View file

@ -1,37 +0,0 @@
import datetime
config = {
"statscache.datagrepper.profile": False,
# Consumer stuff
"statscache.consumer.enabled": False,
"statscache.sqlalchemy.uri": "postgres://statscache:{{statscache_db_password}}@db01/statscache",
# stats models will go back at least this far (current value arbitrary)
"statscache.consumer.epoch": datetime.datetime(year=2015, month=8, day=8),
# stats models are updated at this frequency
"statscache.producer.frequency": datetime.timedelta(seconds=1),
# Configuration of web API
"statscache.app.maximum_rows_per_page": 100,
"statscache.app.default_rows_per_page": 100,
# Turn on logging for statscache
"logging": dict(
loggers=dict(
statscache={
"level": "DEBUG",
"propagate": False,
"handlers": ["console"],
},
statscache_plugins={
"level": "DEBUG",
"propagate": False,
"handlers": ["console"],
},
),
),
}

View file

@ -1,2 +0,0 @@
# Pull in new packages from koji and pkgdb every other hour at 19 minutes past.
49 */2 * * * apache FEDORATAGGER_CONFIG=/etc/fedoratagger/fedoratagger.cfg /usr/bin/fedoratagger-remove-pkgs -s Retired >> /var/log/fedoratagger.log 2>&1

View file

@ -1,2 +0,0 @@
# Pull in new packages from koji and pkgdb every other hour at 19 minutes past.
19 */2 * * * apache FEDORATAGGER_CONFIG=/etc/fedoratagger/fedoratagger.cfg /usr/bin/fedoratagger-update-db >> /var/log/fedoratagger.log 2>&1

View file

@ -1,123 +0,0 @@
---
# Configuration for the tahrir webapp
# TODO -- add the cronjob
- name: install needed packages
package: name={{ item }} state=present
with_items:
- fedora-tagger
- python-psycopg2
- python-memcached
- python-webob
- koji
tags:
- packages
- tagger
- name: link the README into the right place because tagger is ridiculous
file: >
src=/usr/lib/python2.7/site-packages/fedoratagger/README.rst
dest=/usr/lib/python2.7/site-packages/README.rst
state=link
tags:
- config
- ridiculous
- tagger
- name: make the cache directory
file: >
path=/var/cache/fedoratagger
state=directory
owner=apache group=apache mode=0755
tags:
- config
- tagger
- name: copy tagger app configuration
template: >
src=fedoratagger.cfg.j2
dest=/etc/fedoratagger/fedoratagger.cfg
owner=apache
group=apache
mode=0640
tags:
- config
- tagger
notify:
- restart apache
- name: copy tagger httpd config
template: >
src=fedoratagger-app.conf
dest=/etc/httpd/conf.d/fedoratagger.conf
owner=apache
group=apache
mode=0644
tags:
- config
- tagger
notify:
- restart apache
- name: copy tagger alembic config
template: >
src=alembic.ini
dest=/usr/share/fedoratagger/alembic.ini
owner=apache
group=apache
mode=0640
tags:
- config
- tagger
- name: Set some selinux booleans
seboolean: name={{item}} persistent=yes state=yes
with_items:
- httpd_can_network_connect_db
- httpd_verify_dns
tags:
- selinux
- tagger
- name: check log file
command: stat /var/log/fedoratagger.log
register: logstat
check_mode: no
changed_when: "1 != 1"
ignore_errors: true
tags:
- tagger
- name: ensure cronjob log file is writable
file: >
dest=/var/log/fedoratagger.log
state=touch
owner=apache group=apache mode=0755
tags:
- cron
- config
- tagger
when: logstat.rc == 1
- name: setup the update-with-new-packages cronjob
copy: >
src=cron-tagger-update-db
dest=/etc/cron.d/cron-tagger-update-db
tags:
- cron
- config
- tagger
when: install_tagger_cron
- name: setup the remove-old-and-crusty-packages cronjob
copy: >
src=cron-tagger-remove-retired
dest=/etc/cron.d/cron-tagger-remove-retired
tags:
- cron
- config
- tagger
when: install_tagger_cron

View file

@ -1,53 +0,0 @@
# A generic, single database configuration.
[alembic]
# path to migration scripts
script_location = alembic
# template used to generate migration files
# file_template = %%(rev)s_%%(slug)s
# max length of characters to apply to the
# "slug" field
#truncate_slug_length = 40
# set to 'true' to run the environment during
# the 'revision' command, regardless of autogenerate
# revision_environment = false
sqlalchemy.url = postgresql://fedoratagger:{{taggerDBPassword}}@tagger_db/fedoratagger
# Logging configuration
[loggers]
keys = root,sqlalchemy,alembic
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = WARN
handlers = console
qualname =
[logger_sqlalchemy]
level = WARN
handlers =
qualname = sqlalchemy.engine
[logger_alembic]
level = INFO
handlers =
qualname = alembic
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S

View file

@ -1,48 +0,0 @@
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
LoadModule deflate_module modules/mod_deflate.so
ExpiresActive On
#ExpiresDefault "access plus 300 seconds"
ErrorLog logs/fedoracommunity_error_log
CustomLog logs/fedoracommunity_access_log combined
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css application/x-javascript
# This caching may not necessarily be ideal, or even correct.
# However, it was the only I could get firebug to show me 302's for
# my ToscaWidget resources.
<filesmatch ".(gif|jpe?g|png|css|js)$">
Header unset Cache-Control
Header unset Etag
Header add Cache-Control "max-age=2592000"
#ExpiresDefault A2592000
</filesmatch>
# Lots of static resources for the tagger app.
Alias /tagger/css /usr/lib/python2.7/site-packages/fedoratagger/frontend/static/css
Alias /tagger/javascript /usr/lib/python2.7/site-packages/fedoratagger/frontend/static/javascript
Alias /tagger/images /usr/lib/python2.7/site-packages/fedoratagger/frontend/static/images/
Alias /tagger/rating /usr/lib/python2.7/site-packages/fedoratagger/frontend/static/rating/
Alias /tagger/_res /usr/share/fedoratagger/toscawidgets/resources
WSGIPythonEggs /var/cache/fedoracommunity/.python-eggs
WSGIDaemonProcess fedoratagger user=apache group=fedoratagger maximum-requests=50000 display-name=fedoratagger processes={{ wsgi_procs }} threads={{ wsgi_threads }} inactivity-timeout=300
WSGISocketPrefix run/wsgi
WSGIRestrictStdout Off
WSGIRestrictSignal Off
WSGIPythonOptimize 1
WSGIScriptAlias /tagger /usr/share/fedoratagger/fedoratagger.wsgi
<Directory /usr/share/fedoratagger/>
WSGIProcessGroup fedoratagger
Require all granted
</Directory>
<Directory /usr/lib/python2.7/site-packages/fedoratagger/frontend/static/>
Require all granted
</Directory>
<Directory /usr/share/fedoratagger/toscawidgets/resources>
Require all granted
</Directory>

View file

@ -1,30 +0,0 @@
### Secret key for the Flask application
SECRET_KEY = 'wat {{taggerCookieSecret}}'
### url to the database server:
DB_URL = 'postgresql://fedoratagger:{{taggerDBPassword}}@tagger_db/fedoratagger'
{% if env == "staging" %}
FAS_OPENID_ENDPOINT = 'https://id.stg.fedoraproject.org/openid/'
{% else %}
FAS_OPENID_ENDPOINT = 'https://id.fedoraproject.org/openid/'
{% endif %}
# This is required for openid to work in stg. Might as well for prod too.
PREFERRED_URL_SCHEME = 'https'
# Make browsers send session cookie only via HTTPS
SESSION_COOKIE_SECURE = True
# Stuff for toscawidgets2
RES_PREFIX = '/tagger/_res/'
### Unhappy mako
MAKO_OUTPUT_ENCODING='utf-8'
{% if env == "staging" %}
FEDMENU_URL = 'https://apps.stg.fedoraproject.org/fedmenu'
FEDMENU_DATA_URL = 'https://apps.stg.fedoraproject.org/js/data.js'
{% else %}
FEDMENU_URL = 'https://apps.fedoraproject.org/fedmenu'
FEDMENU_DATA_URL = 'https://apps.fedoraproject.org/js/data.js'
{% endif %}

View file

@ -99,11 +99,6 @@ backend packages {
.port = "10016"; .port = "10016";
} }
backend tagger {
.host = "localhost";
.port = "10017";
}
backend askbot { backend askbot {
.host = "localhost"; .host = "localhost";
.port = "10021"; .port = "10021";
@ -248,13 +243,6 @@ sub vcl_recv {
if (req.url ~ "^/freemedia/") { if (req.url ~ "^/freemedia/") {
set req.backend_hint = freemedia; set req.backend_hint = freemedia;
} }
if (req.url ~ "^/tagger/") {
set req.backend_hint = tagger;
if (req.url ~ "^/tagger/ui/static/") {
unset req.http.cookie;
set req.http.clear-cookies = "yes";
set req.url = regsub(req.url, "\?.*", "");
}
} }
if (req.http.X-Forwarded-Server ~ "^paste.fedoraproject.org") { if (req.http.X-Forwarded-Server ~ "^paste.fedoraproject.org") {
set req.backend_hint = paste; set req.backend_hint = paste;