diff --git a/inventory/group_vars/fedocal b/inventory/group_vars/fedocal deleted file mode 100644 index f7b777fa2d..0000000000 --- a/inventory/group_vars/fedocal +++ /dev/null @@ -1,49 +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 - -tcp_ports: [ 80, 443, - # These 16 ports are used by fedmsg. One for each wsgi thread. - 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, - 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015] - -# Neeed for rsync from log01 for logs. -custom_rules: [ '-A INPUT -p tcp -m tcp -s 10.3.163.39 --dport 873 -j ACCEPT', '-A INPUT -p tcp -m tcp -s 192.168.1.59 --dport 873 -j ACCEPT' ] - -primary_auth_source: ipa -ipa_host_group: fedocal -ipa_host_group_desc: Fedora calendaring service -ipa_client_shell_groups: -- sysadmin-noc -- sysadmin-web -- sysadmin-veteran -ipa_client_sudo_groups: -- sysadmin-web - -freezes: false - -# 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: fedocal - owner: root - group: apache - can_send: - - fedocal.calendar.clear - - fedocal.calendar.delete - - fedocal.calendar.new - - fedocal.calendar.update - - fedocal.calendar.upload - - fedocal.meeting.delete - - fedocal.meeting.new - - fedocal.meeting.reminder - - fedocal.meeting.update diff --git a/inventory/inventory b/inventory/inventory index 2ba4865831..0ef039e9c5 100644 --- a/inventory/inventory +++ b/inventory/inventory @@ -128,13 +128,6 @@ busgateway01.iad2.fedoraproject.org [busgateway_stg] busgateway01.stg.iad2.fedoraproject.org -[fedocal] -fedocal01.iad2.fedoraproject.org -fedocal02.iad2.fedoraproject.org - -[fedocal_stg] -# fedocal01.stg.iad2.fedoraproject.org - [github2fedmsg] github2fedmsg01.iad2.fedoraproject.org @@ -217,7 +210,6 @@ blockerbugs01.stg.iad2.fedoraproject.org bodhi-backend01.stg.iad2.fedoraproject.org busgateway01.stg.iad2.fedoraproject.org datagrepper01.stg.iad2.fedoraproject.org -# fedocal01.stg.iad2.fedoraproject.org koji01.stg.iad2.fedoraproject.org os-node01.stg.iad2.fedoraproject.org os-node02.stg.iad2.fedoraproject.org diff --git a/main.yml b/main.yml index cfabe01d73..d034b7bee5 100644 --- a/main.yml +++ b/main.yml @@ -33,7 +33,6 @@ - import_playbook: /srv/web/infra/ansible/playbooks/groups/dns.yml - import_playbook: /srv/web/infra/ansible/playbooks/groups/download.yml - import_playbook: /srv/web/infra/ansible/playbooks/groups/fedimg.yml -- import_playbook: /srv/web/infra/ansible/playbooks/groups/fedocal.yml - import_playbook: /srv/web/infra/ansible/playbooks/groups/github2fedmsg.yml - import_playbook: /srv/web/infra/ansible/playbooks/groups/ipa.yml - import_playbook: /srv/web/infra/ansible/playbooks/groups/ipsilon.yml diff --git a/playbooks/fedmsgupdate.yml b/playbooks/fedmsgupdate.yml index a73425ede0..4360c43943 100644 --- a/playbooks/fedmsgupdate.yml +++ b/playbooks/fedmsgupdate.yml @@ -10,8 +10,6 @@ - include_playbook: /srv/web/infra/ansible/playbooks/groups/badges-backend.yml - include_playbook: /srv/web/infra/ansible/playbooks/groups/badges-web.yml - include_playbook: /srv/web/infra/ansible/playbooks/groups/busgateway.yml -- include_playbook: /srv/web/infra/ansible/playbooks/groups/elections.yml -- include_playbook: /srv/web/infra/ansible/playbooks/groups/fedocal.yml - include_playbook: /srv/web/infra/ansible/playbooks/groups/gallery.yml - include_playbook: /srv/web/infra/ansible/playbooks/groups/koji-hub.yml - include_playbook: /srv/web/infra/ansible/playbooks/groups/mailman.yml diff --git a/playbooks/groups/fedocal.yml b/playbooks/groups/fedocal.yml deleted file mode 100644 index 863e18c6e2..0000000000 --- a/playbooks/groups/fedocal.yml +++ /dev/null @@ -1,65 +0,0 @@ -- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=fedocal_stg:fedocal" - -- name: make the box be real - hosts: fedocal_stg:fedocal - 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 - - { role: openvpn/client, - when: env != "staging" } - - ipa/client - - rsyncd - - sudo - - mod_wsgi - - collectd/base - - pre_tasks: - - import_tasks: "{{ tasks_path }}/yumrepos.yml" - - tasks: - - import_tasks: "{{ tasks_path }}/motd.yml" - - handlers: - - import_tasks: "{{ handlers_path }}/restart_services.yml" - -- name: set up fedmsg - hosts: fedocal_stg:fedocal - user: root - gather_facts: True - - vars_files: - - /srv/web/infra/ansible/vars/global.yml - - "/srv/private/ansible/vars.yml" - - "{{ vars_path }}/{{ ansible_distribution }}.yml" - - roles: - - fedmsg/base - - handlers: - - import_tasks: "{{ handlers_path }}/restart_services.yml" - -- name: deploy fedocal itself - hosts: fedocal_stg:fedocal - user: root - gather_facts: True - - vars_files: - - /srv/web/infra/ansible/vars/global.yml - - "/srv/private/ansible/vars.yml" - - "{{ vars_path }}/{{ ansible_distribution }}.yml" - - roles: - - fedocal - - handlers: - - import_tasks: "{{ handlers_path }}/restart_services.yml" diff --git a/roles/base/files/syncHttpLogs.sh b/roles/base/files/syncHttpLogs.sh index 707a788957..830062e264 100644 --- a/roles/base/files/syncHttpLogs.sh +++ b/roles/base/files/syncHttpLogs.sh @@ -61,9 +61,6 @@ syncHttpLogs proxy40.vpn.fedoraproject.org syncHttpLogs proxy101.iad2.fedoraproject.org syncHttpLogs proxy110.iad2.fedoraproject.org # syncHttpLogs proxy01.stg.iad2.fedoraproject.org - syncHttpLogs fedocal01.iad2.fedoraproject.org - syncHttpLogs fedocal02.iad2.fedoraproject.org -# syncHttpLogs fedocal01.stg.iad2.fedoraproject.org syncHttpLogs datagrepper01.iad2.fedoraproject.org # syncHttpLogs datagrepper02.iad2.fedoraproject.org # syncHttpLogs datagrepper01.stg.iad2.fedoraproject.org diff --git a/roles/fedmsg/base/tasks/main.yml b/roles/fedmsg/base/tasks/main.yml index 576d8ae8e4..a112b215dd 100644 --- a/roles/fedmsg/base/tasks/main.yml +++ b/roles/fedmsg/base/tasks/main.yml @@ -97,7 +97,6 @@ - ssl.py - endpoints.py - endpoints-anitya.py - - endpoints-fedocal.py - endpoints-fedbadges.py - endpoints-fmn-backend.py - endpoints-mbs-backend.py diff --git a/roles/fedmsg/base/templates/endpoints-fedocal.py.j2 b/roles/fedmsg/base/templates/endpoints-fedocal.py.j2 deleted file mode 100644 index bfc76152b8..0000000000 --- a/roles/fedmsg/base/templates/endpoints-fedocal.py.j2 +++ /dev/null @@ -1,30 +0,0 @@ -{% if datacenter == 'iad2' %} -{% if env == 'staging' %} -suffix = 'stg.iad2.fedoraproject.org' -{% else %} -suffix = 'iad2.fedoraproject.org' -vpn_suffix = 'vpn.fedoraproject.org' -{% endif %} -{% else %} -{% if env == 'staging' %} -suffix = 'stg.fedoraproject.org' -{% else %} -suffix = 'fedoraproject.org' -vpn_suffix = 'vpn.fedoraproject.org' -{% endif %} -{% endif %} - -config = dict( - endpoints={ - "fedocal.fedocal01": [ - "tcp://fedocal01.%s:30%02i" % (suffix, i) - for i in range(2) - ], -{% if env != 'staging' %} - "fedocal.fedocal02": [ - "tcp://fedocal02.%s:30%02i" % (suffix, i) - for i in range(2) - ], -{% endif %} - }, -) diff --git a/roles/fedocal/tasks/main.yml b/roles/fedocal/tasks/main.yml deleted file mode 100644 index a83b199b1f..0000000000 --- a/roles/fedocal/tasks/main.yml +++ /dev/null @@ -1,74 +0,0 @@ ---- -# Configuration for the fedocal webapp - -- name: install needed packages - package: - state: present - name: - - fedocal - - python-psycopg2 - - python-openid-cla - - python-openid-teams - - python-memcached - - libsemanage-python - tags: - - packages - -- name: copy sundry fedocal configuration - template: src={{ item.file }} - dest={{ item.location }}/{{ item.dest }} - owner=apache group=apache mode=0600 - with_items: - - { file: fedocal.cfg, location: /etc/fedocal, dest: fedocal.cfg } - - { file: alembic.ini, location: /etc/fedocal, dest: alembic.ini } - changed_when: "1 != 1" - tags: - - config - notify: - - restart apache - -#- name: create the database scheme -# command: /usr/bin/python2 /usr/share/fedocal/fedocal_createdb.py -# environment: -# FEDOCAL_CONFIG: /etc/fedocal/fedocal.cfg - -- name: Install all the configuration file of fedocal - template: src={{ item.file }} - dest={{ item.location }}/{{ item.file }} - owner=apache group=apache mode=0600 - with_items: - - { file: fedocal.cfg, location: /etc/fedocal } - - { file: alembic.ini, location: /etc/fedocal } - - { file: fedocal.conf, location: /etc/httpd/conf.d } - - { file: fedocal.wsgi, location: /var/www/ } - tags: - - config - notify: - - restart apache - -- name: Install the reminder cron job - when: inventory_hostname.startswith('fedocal02') - template: src={{ item.file }} - dest={{ item.location }}/{{ item.file }} - with_items: - - { file: 'fedocal-reminder.cron', location: /etc/cron.d } - tags: - - config - -- name: set sebooleans so fedocal can talk to the db - seboolean: name=httpd_can_network_connect_db - state=true - persistent=true - -- name: Install the SAR script for GDPR - when: inventory_hostname.startswith('fedocal02') - template: src={{ item.file }} - dest={{ item.location }}/{{ item.file }} - owner=apache group=apache mode=0700 - with_items: - - { file: 'fedocal_sar.py', location: /usr/local/bin/ } - tags: - - config - - GDPR - - SAR - diff --git a/roles/fedocal/templates/alembic.ini b/roles/fedocal/templates/alembic.ini deleted file mode 100644 index 3c73014a58..0000000000 --- a/roles/fedocal/templates/alembic.ini +++ /dev/null @@ -1,51 +0,0 @@ -# A generic, single database configuration. - -[alembic] -# path to migration scripts -script_location = /usr/share/fedocal/alembic - -# template used to generate migration files -# file_template = %%(rev)s_%%(slug)s - -# set to 'true' to run the environment during -# the 'revision' command, regardless of autogenerate -# revision_environment = false - -#sqlalchemy.url = postgresql://<%= fedocal_app %>:<%= fedocal_appPassword %>@db-fedocal/fedocal -sqlalchemy.url = postgresql://{{ fedocal_db_user }}:{{ fedocal_db_pass }}@{{ fedocal_db_host }}/{{ fedocal_db_name }} - - -# 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 diff --git a/roles/fedocal/templates/fedocal-proxy.conf b/roles/fedocal/templates/fedocal-proxy.conf deleted file mode 100644 index 613a731d7f..0000000000 --- a/roles/fedocal/templates/fedocal-proxy.conf +++ /dev/null @@ -1,6 +0,0 @@ -RewriteEngine On - -ProxyPass <%= path %> <%= proxyurl %>/calendar -ProxyPassReverse <%= path %> <%= proxyurl %>/calendar - -RequestHeader set X-Scheme https early diff --git a/roles/fedocal/templates/fedocal-reminder.cron b/roles/fedocal/templates/fedocal-reminder.cron deleted file mode 100644 index 55ce636397..0000000000 --- a/roles/fedocal/templates/fedocal-reminder.cron +++ /dev/null @@ -1,6 +0,0 @@ -# Sends the reminder about coming meetings -# -# The frequency set here should be consistent with the one set in the -# configuration file. -# -*/30 * * * * root FEDOCAL_CONFIG=/etc/fedocal/fedocal.cfg /usr/bin/fedocal_cron.py diff --git a/roles/fedocal/templates/fedocal.cfg b/roles/fedocal/templates/fedocal.cfg deleted file mode 100644 index 56adda5cd0..0000000000 --- a/roles/fedocal/templates/fedocal.cfg +++ /dev/null @@ -1,63 +0,0 @@ -# Beware that the quotes around the values are mandatory - -### Secret key for the Flask application -SECRET_KEY='{{ fedocal_secret_key }}' - -### url to the database server: -#DB_URL=mysql://user:pass@host/db_name -#DB_URL=postgres://user:pass@host/db_name -#DB_URL="postgresql://<%= fedocal_app %>:<%= fedocal_appPassword %>@db-fedocal/fedocal" -DB_URL='postgresql://{{ fedocal_db_user }}:{{ fedocal_db_pass }}@{{ fedocal_db_host }}/{{ fedocal_db_name }}' - - -### The FAS group in which the admin of fedocal are -ADMIN_GROUP='sysadmin-calendar' - -### The address of the SMTP server used to send the reminders emails -### via the cron job. -### Default: 'localhost' -SMTP_SERVER='localhost' - -### The cron job can be set with any frequency but fedocal_cron needs -### this information to accurately retrieve the meetings to remind and -### avoid sending multiple reminders for a single meeting. -### Default: 30 -CRON_FREQUENCY=30 - -### Path to the alembic configuration file -### When creating the database, we need to tell the database which -### revision of alembic we are at and to do this we need access to the -### alembic.ini file. -PATH_ALEMBIC_INI='/etc/fedocal/alembic.ini' - -# This is required to fix login -PREFERRED_URL_SCHEME='https' - -# Make browsers send session cookie only via HTTPS -SESSION_COOKIE_SECURE = True -SESSION_COOKIE_PATH = '/calendar' -SESSION_COOKIE_NAME = 'fedocal' - -# Used by SESSION_COOKIE_PATH -APPLICATION_ROOT = '/calendar/' - -{% if env == 'staging' %} -APP_URL = 'https://apps.stg.fedoraproject.org/' + APPLICATION_ROOT -FAS_OPENID_ENDPOINT = 'https://id.stg.fedoraproject.org/openid/' -SITE_ROOT = 'https://apps.stg.fedoraproject.org' -SITE_URL = '%s/calendar' % SITE_ROOT -{% else %} -APP_URL = 'https://apps.fedoraproject.org/' + APPLICATION_ROOT -SITE_ROOT = 'https://apps.fedoraproject.org' -SITE_URL = '%s/calendar' % SITE_ROOT -{% endif %} - -## URLs to fedmenu resources -{% 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 %} - diff --git a/roles/fedocal/templates/fedocal.conf b/roles/fedocal/templates/fedocal.conf deleted file mode 100644 index f7c8a38d4f..0000000000 --- a/roles/fedocal/templates/fedocal.conf +++ /dev/null @@ -1,23 +0,0 @@ - -Alias /calendar/static /usr/lib/python2.7/site-packages/fedocal/static/default/ - -WSGIDaemonProcess fedocal user=apache maximum-requests=1000 display-name=fedocal processes=2 threads=1 -WSGISocketPrefix run/wsgi -WSGIRestrictStdout On -WSGIRestrictSignal Off -WSGIPythonOptimize 1 - -WSGIScriptAlias /calendar /var/www/fedocal.wsgi - - - WSGIProcessGroup fedocal - - # Apache 2.4 - Require all granted - - - # Apache 2.2 - Order deny,allow - Allow from all - - diff --git a/roles/fedocal/templates/fedocal.wsgi b/roles/fedocal/templates/fedocal.wsgi deleted file mode 100644 index a73b24b76c..0000000000 --- a/roles/fedocal/templates/fedocal.wsgi +++ /dev/null @@ -1,22 +0,0 @@ -#-*- coding: UTF-8 -*- - -# The three lines below are required to run on EL6 as EL6 has -# two possible version of python-sqlalchemy and python-jinja2 -# These lines make sure the application uses the correct version. -import __main__ -__main__.__requires__ = ['SQLAlchemy >= 0.7', 'jinja2 >= 2.4'] -import pkg_resources - -import os -## Set the environment variable pointing to the configuration file -os.environ['FEDOCAL_CONFIG'] = '/etc/fedocal/fedocal.cfg' - -## The following is only needed if you did not install fedocal -## as a python module (for example if you run it from a git clone). -#import sys -#sys.path.insert(0, '/path/to/fedocal/') - - -## The most import line to make the wsgi working -from fedocal import APP as application - diff --git a/roles/fedocal/templates/fedocal_sar.py b/roles/fedocal/templates/fedocal_sar.py deleted file mode 100644 index 9b7f344ddc..0000000000 --- a/roles/fedocal/templates/fedocal_sar.py +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/python - -from __future__ import unicode_literals, print_function - -import os -import json -import sys - - -if 'FEDOCAL_CONFIG' not in os.environ \ - and os.path.exists('/etc/fedocal/fedocal.cfg'): - os.environ['FEDOCAL_CONFIG'] = '/etc/fedocal/fedocal.cfg' - - -from fedocal import SESSION # noqa -from fedocal.fedocallib import model # noqa - - -def get_user_calendars(email): - ''' Return fedocal.fedocallib.model.Calendar objects related to the - specified user. - ''' - query = SESSION.query( - model.Calendar - ).filter( - model.Calendar.calendar_contact == email - ).order_by( - model.Calendar.calendar_name - ) - return query.all() - - -def get_user_meetings(username): - ''' Return fedocal.fedocallib.model.Meeting objects related to the - specified user. - ''' - query = SESSION.query( - model.Meeting - ).filter( - model.Meeting.meeting_id == model.MeetingsUsers.meeting_id - ).filter( - model.MeetingsUsers.username == username - ).order_by( - model.Meeting.meeting_id - ) - return query.all() - - -def main(): - ''' Prints out all the calendar and meeting related to the username - specified in the SAR_USERNAME environment variable. - If no such environment variable is available, the script will bail. - ''' - email = os.getenv('SAR_EMAIL') - username = os.getenv('SAR_USERNAME') - if not username: - print('An username is required to query fedocal') - return 1 - - output = {} - # Get all calendar related to this user. - output['calendars'] = [ - calendar.to_json() - for calendar in get_user_calendars(email) - ] - output['meetings'] = [ - meeting.to_json() - for meeting in get_user_meetings(username) - ] - - print(json.dumps( - output, sort_keys=True, indent=4, separators=(',', ': ') - ).encode('utf-8')) - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/roles/haproxy/templates/haproxy.cfg b/roles/haproxy/templates/haproxy.cfg index a59e0f9c03..d4edf042f9 100644 --- a/roles/haproxy/templates/haproxy.cfg +++ b/roles/haproxy/templates/haproxy.cfg @@ -103,15 +103,6 @@ backend blockerbugs-backend server blockerbugs01 blockerbugs01:80 check inter 10s rise 1 fall 2 option httpchk GET /blockerbugs -frontend fedocal-frontend - bind 0.0.0.0:10023 - default_backend fedocal-backend - -backend fedocal-backend - balance hdr(appserver) - server fedocal01 fedocal01:80 check inter 10s rise 1 fall 2 - option httpchk GET /calendar - # IMPORTANT: 10023-10026 will NOT work because of selinux policies frontend datagrepper-frontend diff --git a/roles/varnish/templates/proxies.vcl.j2 b/roles/varnish/templates/proxies.vcl.j2 index b14d85ba89..40663b3dfa 100644 --- a/roles/varnish/templates/proxies.vcl.j2 +++ b/roles/varnish/templates/proxies.vcl.j2 @@ -77,11 +77,6 @@ backend blockerbugs { .port = "10022"; } -backend fedocal { - .host = "localhost"; - .port = "10023"; -} - backend kerneltest { .host = "localhost"; .port = "10038";