diff --git a/defaults/main.yml b/defaults/main.yml index 6db6586..3f893cd 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -10,12 +10,6 @@ mbs_mq_cert: 'cert.pem' mbs_mq_key: 'key.pem' mbs_mq_ca: 'ca.pem' mbs_default_modules_dir: default-modules -# repository config -mbs_custom_repo: true -mbs_custom_repo_name: mbs -mbs_custom_repo_url: http://buildlogs.centos.org/centos/8/infra/x86_64/buildtools-common/ -mbs_custom_repo_gpg_key: '' -mbs_custom_repo_gpg_check: false # kojihub kojihub_top_url: https://cbs.centos.org kojihub_use_fast_upload: true @@ -33,8 +27,6 @@ mbs_config_messaging_topic_prefix: 'org.centos.mbs' mbs_config_koji_file: /etc/module-build-service/koji.conf mbs_config_koji_profile: koji mbs_config_arches: - - i686 - - armv7hl - x86_64 mbs_config_koji_proxy_user: true mbs_config_koji_repository_url: https://kojipkgs.stg.fedoraproject.org/repos diff --git a/handlers/main.yml b/handlers/main.yml index 2079298..8ae0ac3 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -21,6 +21,7 @@ service: name: fedmsg-hub state: restarted + enabled: true become: true - name: Restart mbs poller diff --git a/molecule/default/verify.yml b/molecule/default/verify.yml index 230331d..cc72ff5 100644 --- a/molecule/default/verify.yml +++ b/molecule/default/verify.yml @@ -1,6 +1,5 @@ --- # This is an example playbook to execute Ansible tests. - - name: Verify hosts: all gather_facts: false @@ -39,6 +38,19 @@ - name: mbs service assert uri: - url: http://localhost:80/module-build-service/1/module-builds/ + url: http://localhost/module-build-service/1/module-builds/ method: GET status_code: 200 + + - set_fact: + post_body: + scmurl: https://src.fedoraproject.org/modules/foo + branch: master + - name: mbs service post auth failed assert + uri: + url: http://localhost/module-build-service/1/module-builds/ + body: "{{ post_body | to_json }}" + headers: + Content-Type: "application/json" + method: POST + status_code: 403 diff --git a/tasks/fedmsg-hub.yml b/tasks/fedmsg-hub.yml index c744ee9..760bee3 100644 --- a/tasks/fedmsg-hub.yml +++ b/tasks/fedmsg-hub.yml @@ -4,16 +4,13 @@ name: - python3-fedmsg state: present - update_cache: true - enablerepo: "{{ mbs_custom_repo_name }}" - disable_gpg_check: "{{ mbs_custom_repo_gpg_check }}" - name: Python3 workaround pip: name: - pygments executable: /usr/bin/pip3.6 - + - name: Ensure group "fedmsg" exists group: name: fedmsg diff --git a/tasks/mbs-backend.yml b/tasks/mbs-backend.yml index f1481c6..31039f6 100644 --- a/tasks/mbs-backend.yml +++ b/tasks/mbs-backend.yml @@ -8,7 +8,6 @@ - python3-stevedore - python3-psutil - python3-vine < 5.0.0 - - python3-mod_wsgi - python3-pungi >= 4.2.3 state: present update_cache: true @@ -73,25 +72,6 @@ owner: fedmsg group: fedmsg mode: 0750 - -# - name: create /etc/pdc.d directory -# file: -# path: /etc/pdc.d -# state: directory -# owner: root -# group: root -# mode: 0775 -# -# - name: copy pdc client config file -# template: -# src: mbs/pdc-client.json.j2 -# dest: /etc/pdc.d/{{ mbs_pdc_client_name }}.json -# owner: root -# group: root -# mode: 0644 -# # notify: -# - Restart apache -# - Restart fedmsg-hub - name: copy the MBS rabbitmq private queue crt copy: diff --git a/tasks/mbs-frontend.yml b/tasks/mbs-frontend.yml index f7bcf3b..b7345e3 100644 --- a/tasks/mbs-frontend.yml +++ b/tasks/mbs-frontend.yml @@ -1,4 +1,9 @@ --- +- name: Install mbs-frontend packages + yum: + name: + - python3-mod_wsgi + - name: Copy mbs httpd config template: src: mbs/mbs.conf.j2 @@ -9,23 +14,6 @@ notify: - Restart apache -- name: Disable the scheduler on the frontend - template: - src: mbs/mbs-scheduler.py.j2 - dest: /etc/fedmsg.d/mbs-scheduler.py - owner: fedmsg - group: fedmsg - mode: 0644 - notify: - - Restart apache - -- name: Make sure fedmsg-hub isn't running on the frontend. - service: - name: fedmsg-hub-3 - state: stopped - enabled: false - failed_when: false - - name: Ensure /usr/share/mbs folder exists file: path: /usr/share/mbs/ diff --git a/templates/mbs/config.py.j2 b/templates/mbs/config.py.j2 index 842ba70..08108f6 100644 --- a/templates/mbs/config.py.j2 +++ b/templates/mbs/config.py.j2 @@ -122,12 +122,6 @@ class ProdConfiguration(BaseConfiguration): # Relative Koji task priority (0 means default priority of 20). KOJI_BUILD_PRIORITY = {{ mbs_config_build_priority }} - # Check branch EOL before building. Block EOL modules from building. - # https://pagure.io/fm-orchestrator/issue/960 - # Because of https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/KGXBMTUR72FHQEG7IBHDPPX276QHSD2I/#MFT5SAWPKMCNLKAWEJFCFIVX5GJ7RBSP - # we decided to hold on to this and ask the maintainers to create a - # releng ticket to retire their modules. - # Koji Content Generator "-devel" modules aren't used in Fedora, so we can just disable them KOJI_CG_DEVEL_MODULE = {{ mbs_config_koji_devel_module | bool }}