From 683c3023f969ec14dcae50d975a06d37d01b1b28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kalu=C5=BEa?= Date: Mon, 28 May 2018 08:25:38 +0000 Subject: [PATCH] Uprade odcs-stg to latest ODCS --- playbooks/manual/upgrade/odcs.yml | 4 +- roles/odcs/backend/tasks/main.yml | 4 +- roles/odcs/base/files/pungi.conf | 37 +++++++++---------- roles/odcs/base/handlers/main.yml | 4 ++ .../odcs/base/templates/etc/odcs/config.py.j2 | 25 +++++++++++++ 5 files changed, 51 insertions(+), 23 deletions(-) diff --git a/playbooks/manual/upgrade/odcs.yml b/playbooks/manual/upgrade/odcs.yml index 44e26c168c..2b801df247 100644 --- a/playbooks/manual/upgrade/odcs.yml +++ b/playbooks/manual/upgrade/odcs.yml @@ -85,7 +85,7 @@ delegate_to: noc01.phx2.fedoraproject.org ignore_errors: true - name: Stop the odcs backend - service: name="odcs-backend" state=stopped + service: name="fedmsg-hub" state=stopped roles: - odcs/base @@ -93,7 +93,7 @@ post_tasks: - name: Start the odcs backend - service: name="odcs-backend" state=started + service: name="fedmsg-hub" state=started - 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 diff --git a/roles/odcs/backend/tasks/main.yml b/roles/odcs/backend/tasks/main.yml index a3248358ed..6e198a7d66 100644 --- a/roles/odcs/backend/tasks/main.yml +++ b/roles/odcs/backend/tasks/main.yml @@ -23,7 +23,7 @@ group: odcs mode: 0440 notify: - - restart odcs-backend + - restart fedmsg-hub tags: - odcs - odcs/backend @@ -34,7 +34,7 @@ groups: apache append: true notify: - - restart odcs-backend + - restart fedmsg-hub tags: - odcs - odcs/backend diff --git a/roles/odcs/base/files/pungi.conf b/roles/odcs/base/files/pungi.conf index 8cd558e841..0b112c89a1 100644 --- a/roles/odcs/base/files/pungi.conf +++ b/roles/odcs/base/files/pungi.conf @@ -31,6 +31,7 @@ runroot_channel = "compose" runroot = False {%- endif %} + # PDC settings pdc_url = '{{ config.pdc_url }}' pdc_insecure = {{ config.pdc_insecure }} @@ -40,19 +41,21 @@ pdc_develop = {{ config.pdc_develop }} {%- if config.pkgset_source == 'repos' %} pkgset_source = 'repos' pkgset_repos = { -{%- for arch in config.arches %} - '{{ arch }}': ['{{ config.source }}',], -{%- endfor %} -} -{%- elif config.pkgset_source == 'koji' %} -pkgset_source = 'koji' -pkgset_koji_tag = '{{ config.koji_tag }}' -pkgset_koji_inherit = {{ config.pkgset_koji_inherit }} -{%- endif %} - -filter_system_release_packages = False - -# GATHER +{%- for arch in config.arches %} + '{{ arch }}': ['{{ config.source }}',], +{%- endfor %} +} +{%- elif config.pkgset_source == 'koji' %} +pkgset_source = 'koji' +{%- if config.koji_tag %} +pkgset_koji_tag = '{{ config.koji_tag }}' +{%- endif %} +pkgset_koji_inherit = {{ config.pkgset_koji_inherit }} +{%- endif %} + +filter_system_release_packages = False + +# GATHER gather_source = '{{ config.gather_source }}' gather_method = '{{ config.gather_method }}' {%- if config.comps_file %} @@ -86,14 +89,10 @@ skip_phases = [ "live_images", "ostree"] +link_type = 'symlink' + translate_paths = [ -{%- if config.koji_profile == "odcs_stg" %} - ('/mnt/koji/compose/', 'http://kojipkgs.stg.fedoraproject.org/compose/'), -{%- else %} - ('/mnt/koji/compose/', 'http://kojipkgs.fedoraproject.org/compose/'), -{%- endif %} ] koji_profile = '{{ config.koji_profile }}' - diff --git a/roles/odcs/base/handlers/main.yml b/roles/odcs/base/handlers/main.yml index 418b8fd7f8..150a1c77ac 100644 --- a/roles/odcs/base/handlers/main.yml +++ b/roles/odcs/base/handlers/main.yml @@ -3,3 +3,7 @@ service: name: "odcs-backend" state: restarted +- name: restart fedmsg-hub + service: + name: fedmsg-hub + state: restarted diff --git a/roles/odcs/base/templates/etc/odcs/config.py.j2 b/roles/odcs/base/templates/etc/odcs/config.py.j2 index 55de32e3d8..a421b29804 100644 --- a/roles/odcs/base/templates/etc/odcs/config.py.j2 +++ b/roles/odcs/base/templates/etc/odcs/config.py.j2 @@ -114,6 +114,15 @@ class ProdConfiguration(BaseConfiguration): SIGKEYS = {{ odcs_sigkeys }} + MESSAGING_BACKEND = "{{ odcs_messaging_backend }}" + MESSAGING_BROKER_URLS = {{ odcs_messaging_producer_broker_urls }} + MESSAGING_CERT_FILE = "/etc/ssl/odcs/umb-client.crt" + MESSAGING_KEY_FILE = "/etc/ssl/odcs/umb-client.key" + MESSAGING_CA_CERT = "{{ odcs_messaging_ca_cert }}" + MESSAGING_TOPIC_PREFIX = "{{ odcs_messaging_topic_prefix }}" + MESSAGING_TOPIC = "VirtualTopic.eng.odcs.state.change" + INTERNAL_MESSAGING_TOPIC = "VirtualTopic.eng.odcs.internal.msg" + PUNGI_RUNROOT_ENABLED = {{ odcs_pungi_runroot_enabled }} PUNGI_PARENT_RUNROOT_CHANNEL = "{{ odcs_pungi_parent_runroot_channel }}" PUNGI_PARENT_RUNROOT_PACKAGES = {{ odcs_pungi_parent_runroot_packages }} @@ -124,3 +133,19 @@ class ProdConfiguration(BaseConfiguration): PUNGI_RUNROOT_TARGET_DIR = "{{ odcs_pungi_runroot_target_dir }}" PUNGI_RUNROOT_TARGET_DIR_URL = "{{ odcs_pungi_runroot_target_dir_url }}" +{% if odcs_allowed_source_types %} + ALLOWED_SOURCE_TYPES = {{ odcs_allowed_source_types }} +{% endif %} +{% if odcs_allowed_flags %} + ALLOWED_FLAGS = {{ odcs_allowed_flags }} +{% endif %} +{% if odcs_allowed_arches %} + ALLOWED_ARCHES = {{ odcs_allowed_arches }} +{% endif %} +{% if odcs_allowed_results %} + ALLOWED_RESULTS = {{ odcs_allowed_results }} +{% endif %} +{% if odcs_allowed_sources %} + ALLOWED_SOURCES = {{ odcs_allowed_sources }} +{% endif %} +