diff --git a/inventory/group_vars/value b/inventory/group_vars/value index 5e5f4a5f32..d3583198e0 100644 --- a/inventory/group_vars/value +++ b/inventory/group_vars/value @@ -1,13 +1,13 @@ --- # Define resources for this group of hosts here. lvm_size: 30000 -mem_size: 2048 +mem_size: 6144 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, +tcp_ports: [ 80, 443, 5050, # 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] diff --git a/inventory/group_vars/value-stg b/inventory/group_vars/value-stg index 5e5f4a5f32..d3583198e0 100644 --- a/inventory/group_vars/value-stg +++ b/inventory/group_vars/value-stg @@ -1,13 +1,13 @@ --- # Define resources for this group of hosts here. lvm_size: 30000 -mem_size: 2048 +mem_size: 6144 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, +tcp_ports: [ 80, 443, 5050, # 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] diff --git a/playbooks/fedmsgupdate.yml b/playbooks/fedmsgupdate.yml index 2b935fa02a..3aac4fd785 100644 --- a/playbooks/fedmsgupdate.yml +++ b/playbooks/fedmsgupdate.yml @@ -19,3 +19,4 @@ - include: /srv/web/infra/ansible/playbooks/groups/pkgdb.yml - include: /srv/web/infra/ansible/playbooks/groups/summershum.yml - include: /srv/web/infra/ansible/playbooks/groups/wiki.yml +- include: /srv/web/infra/ansible/playbooks/groups/value.yml diff --git a/roles/elections/tasks/main.yml b/roles/elections/tasks/main.yml index 09be5e6ed0..564acfc547 100644 --- a/roles/elections/tasks/main.yml +++ b/roles/elections/tasks/main.yml @@ -27,6 +27,7 @@ - { file: fedora-elections.cfg, location: /etc/fedora-elections } - { file: fedora-elections.conf, location: /etc/httpd/conf.d } - { file: fedora-elections.wsgi, location: /var/www } + - { file: alembic.ini, location: /etc/fedora-elections } tags: - config notify: diff --git a/roles/elections/templates/alembic.ini b/roles/elections/templates/alembic.ini new file mode 100644 index 0000000000..3450a4ef70 --- /dev/null +++ b/roles/elections/templates/alembic.ini @@ -0,0 +1,50 @@ +# A generic, single database configuration. + +[alembic] +# path to migration scripts +script_location = /usr/share/fedora-elections/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://{{ elections_db_user }}:{{ elections_db_pass }}@{{ elections_db_host }}/{{ elections_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/elections/templates/fedora-elections.cfg b/roles/elections/templates/fedora-elections.cfg index 238ec2a3a9..70eff47cb0 100644 --- a/roles/elections/templates/fedora-elections.cfg +++ b/roles/elections/templates/fedora-elections.cfg @@ -18,9 +18,9 @@ FEDORA_ELECTIONS_ADMIN_GROUP = 'elections' ## integration. ## URL of the FAS server to use {% if env == 'staging' %} -FAS_BASE_URL = 'https://admin.fedoraproject.org/accounts/' -{% else %} FAS_BASE_URL = 'https://admin.stg.fedoraproject.org/accounts/' +{% else %} +FAS_BASE_URL = 'https://admin.fedoraproject.org/accounts/' {% endif %} FAS_USERNAME = '{{ fedorathirdpartyUser }}' FAS_PASSWORD = '{{ fedorathirdpartyPassword }}' diff --git a/roles/fedmsg/base/templates/endpoints.py.j2 b/roles/fedmsg/base/templates/endpoints.py.j2 index 6fffebe29b..bd812f5c45 100644 --- a/roles/fedmsg/base/templates/endpoints.py.j2 +++ b/roles/fedmsg/base/templates/endpoints.py.j2 @@ -17,14 +17,6 @@ config = dict( # name of it's calling module to determine which endpoint definition # to use. This can be overridden by explicitly providing the name in # the initial call to fedmsg.init(...). - "bodhi.app01": [ - "tcp://app01.%s:300%i" % (suffix, i) - for i in range(8) - ], - "bodhi.app02": [ - "tcp://app02.%s:300%i" % (suffix, i) - for i in range(8) - ], "bodhi.releng01": [ "tcp://releng01.%s:3000" % suffix, "tcp://releng01.%s:3001" % suffix, @@ -98,11 +90,12 @@ config = dict( for i in range(32) ], {% endif %} -{% if env != 'staging' %} - "supybot.value03": [ - "tcp://value03.%s:3000" % suffix, + + # This used to be on value01 and value03.. but now we just have one + "supybot.value01": [ + "tcp://value01.%s:3000" % suffix, ], -{% endif %} + # Askbot runs as 6 processes with 1 thread each. "askbot.ask01": [ "tcp://ask01.%s:30%02i" % (suffix, i) diff --git a/roles/fedmsg/base/templates/policy.py.j2 b/roles/fedmsg/base/templates/policy.py.j2 index 32fb30f73b..3e2212cdee 100644 --- a/roles/fedmsg/base/templates/policy.py.j2 +++ b/roles/fedmsg/base/templates/policy.py.j2 @@ -1,35 +1,13 @@ {% if env == 'staging' %} suffix = "stg.phx2.fedoraproject.org" -app_hosts = [ - "app01.stg.phx2.fedoraproject.org", - "app02.stg.phx2.fedoraproject.org", -] bodhi_hosts = [ - "app01.stg.phx2.fedoraproject.org", - "app02.stg.phx2.fedoraproject.org", "bodhi01.stg.phx2.fedoraproject.org", ] topic_prefix = "org.fedoraproject.stg." {% else %} suffix = "phx2.fedoraproject.org" -app_hosts = [ - "app01.phx2.fedoraproject.org", - "app02.phx2.fedoraproject.org", - "app03.phx2.fedoraproject.org", - "app04.phx2.fedoraproject.org", - "app05.fedoraproject.org", - "app07.phx2.fedoraproject.org", - "app08.fedoraproject.org", -] # TODO -- think about using the ansible group for this. bodhi_hosts = [ - "app01.phx2.fedoraproject.org", - "app02.phx2.fedoraproject.org", - "app03.phx2.fedoraproject.org", - "app04.phx2.fedoraproject.org", - "app05.fedoraproject.org", - "app07.phx2.fedoraproject.org", - "app08.fedoraproject.org", "bodhi01.phx2.fedoraproject.org", "bodhi02.phx2.fedoraproject.org", ] @@ -231,7 +209,7 @@ config = dict( # Supybot/meetbot topic_prefix + "meetbot.meeting.start": [ - "supybot-value03.%s" % suffix, + "supybot-value01.%s" % suffix, ], # When implemented, only @spot and @mattdm can use this one diff --git a/roles/fedmsg/base/templates/ssl.py.j2 b/roles/fedmsg/base/templates/ssl.py.j2 index 47fcc96eb0..fec9e94409 100644 --- a/roles/fedmsg/base/templates/ssl.py.j2 +++ b/roles/fedmsg/base/templates/ssl.py.j2 @@ -1,22 +1,9 @@ {% if env == 'staging' %} suffix = "stg.phx2.fedoraproject.org" -app_hosts = [ - "app01.stg.phx2.fedoraproject.org", - "app02.stg.phx2.fedoraproject.org", -] topic_prefix = "org.fedoraproject.stg." {% else %} suffix = "phx2.fedoraproject.org" -app_hosts = [ - "app01.phx2.fedoraproject.org", - "app02.phx2.fedoraproject.org", - "app03.phx2.fedoraproject.org", - "app04.phx2.fedoraproject.org", - "app05.fedoraproject.org", - "app07.phx2.fedoraproject.org", - "app08.fedoraproject.org", -] topic_prefix = "org.fedoraproject.prod." {% endif %} @@ -38,12 +25,6 @@ config = dict( certnames=dict( [ - ("shell.app0%i" % i, "shell-%s" % app_hosts[i-1]) - for i in range(1, len(app_hosts) + 1) - ] + [ - ("bodhi.app0%i" % i, "bodhi-%s" % app_hosts[i-1]) - for i in range(1, len(app_hosts) + 1) - ] + [ ("shell.pkgdb0%i" % i, "shell-pkgdb0%i.%s" % (i, suffix)) for i in range(1, 3) ] + [ @@ -94,8 +75,7 @@ config = dict( ("shell.busgateway01", "shell-busgateway01.%s" % suffix), ] + [ ("shell.value01", "shell-value01.%s" % suffix), - ("shell.value03", "shell-value03.%s" % suffix), - ("supybot.value03", "supybot-value03.%s" % suffix), + ("supybot.value01", "supybot-value01.%s" % suffix), ] + [ ("koji.koji04", "koji-koji04.%s" % suffix), ("koji.koji01", "koji-koji01.%s" % suffix), diff --git a/roles/fedmsg/irc/tasks/main.yml b/roles/fedmsg/irc/tasks/main.yml index 1da4dbe61a..85d3055a09 100644 --- a/roles/fedmsg/irc/tasks/main.yml +++ b/roles/fedmsg/irc/tasks/main.yml @@ -5,6 +5,12 @@ - packages - fedmsg/irc +- name: install python-fedmsg-meta-fedora-infrastructure + yum: pkg=python-fedmsg-meta-fedora-infrastructure state=installed + tags: + - packages + - fedmsg/irc + - name: enable on boot and start fedmsg-irc service: name=fedmsg-irc state=started enabled=true tags: diff --git a/roles/fedmsg/irc/templates/fas-credentials.py.j2 b/roles/fedmsg/irc/templates/fas-credentials.py.j2 index 098962ef87..176c77935b 100644 --- a/roles/fedmsg/irc/templates/fas-credentials.py.j2 +++ b/roles/fedmsg/irc/templates/fas-credentials.py.j2 @@ -2,5 +2,8 @@ config = dict( fas_credentials=dict( username="fedoradummy", password="{{ fedoraDummyUserPassword }}", + {% if env == 'staging' %} + base_url="https://admin.stg.fedoraproject.org/accounts/", + {% endif %} ), ) diff --git a/roles/pkgdb2/templates/pkgdb2.cfg b/roles/pkgdb2/templates/pkgdb2.cfg index 7e8864df56..a564402883 100644 --- a/roles/pkgdb2/templates/pkgdb2.cfg +++ b/roles/pkgdb2/templates/pkgdb2.cfg @@ -33,13 +33,13 @@ PKGDB2_CACHE_KWARGS = { ### Bugzilla information ## Upon changes in pkgdb, update bugzilla -PKGDB2_BUGZILLA_NOTIFICATION = False +# PKGDB2_BUGZILLA_NOTIFICATION = False ## URL to the bugzilla instance to update PKGDB2_BUGZILLA_URL = 'https://bugzilla.redhat.com' ## name of the user the pkgdb application can log in to bugzilla with -PKGDB2_BUGZILLA_USER = None +PKGDB2_BUGZILLA_USER = '{{ bugzilla_user }}' ## password of the user the pkgdb application can log in to bugzilla with -PKGDB2_BUGZILLA_PASSWORD = None +PKGDB2_BUGZILLA_PASSWORD = '{{ bugzilla_password }}' ### FAS information @@ -52,12 +52,16 @@ SITE_ROOT = 'https://admin.stg.fedoraproject.org' SITE_URL = '%s/pkgdb' % SITE_ROOT ## Pkgdb sends its notifications by email PKGDB2_EMAIL_NOTIFICATION = False +## Upon changes in pkgdb, update bugzilla +PKGDB2_BUGZILLA_NOTIFICATION = False {% else %} PKGDB2_FAS_URL = 'https://admin.fedoraproject.org/accounts' SITE_ROOT = 'https://admin.fedoraproject.org' SITE_URL = '%s/pkgdb' % SITE_ROOT ## Pkgdb sends its notifications by email PKGDB2_EMAIL_NOTIFICATION = True +## Upon changes in pkgdb, update bugzilla +PKGDB2_BUGZILLA_NOTIFICATION = True {% endif %} ## name of the user the pkgdb application can log in to FAS with PKGDB2_FAS_USER = '{{ fedorathirdpartyUser }}' diff --git a/roles/supybot/files/meetbot.conf b/roles/supybot/files/meetbot.conf index fb433618e0..68ccc059ca 100644 --- a/roles/supybot/files/meetbot.conf +++ b/roles/supybot/files/meetbot.conf @@ -1,3 +1,4 @@ +Alias /meetbot/icons /var/www/icons Alias /meetbot /srv/web/meetbot diff --git a/roles/supybot/tasks/main.yml b/roles/supybot/tasks/main.yml index 9dd197d2a9..0417b3a963 100644 --- a/roles/supybot/tasks/main.yml +++ b/roles/supybot/tasks/main.yml @@ -46,3 +46,6 @@ - name: setup meetbot.conf apache config copy: src=meetbot.conf dest=/etc/httpd/conf.d/meetbot.conf mode=644 + +- name: /srv/web/meetbot file contexts + command: semanage fcontext -a -t httpd_sys_content_t "/srv/web/meetbot(/.*)?"